]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
70c435062a0b9f0ce7a72df9760f0a8a2a967116
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 445
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % used for multi-column text
37 \usepackage{multicol}
38
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
41 \end_preamble
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
44 \begin_modules
45 logicalmkup
46 theorems-ams
47 theorems-ams-extended
48 multicol
49 \end_modules
50 \maintain_unincluded_children false
51 \begin_local_layout
52 Format 7
53 InsetLayout CharStyle:MenuItem
54 LyxType               charstyle
55 LabelString           menu
56 LatexType             command
57 LatexName             menuitem
58 Font
59 Family              Sans
60 EndFont
61 Preamble
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
63 EndPreamble
64 End
65 \end_local_layout
66 \language english
67 \language_package default
68 \inputencoding auto
69 \fontencoding global
70 \font_roman default
71 \font_sans default
72 \font_typewriter default
73 \font_math auto
74 \font_default_family default
75 \use_non_tex_fonts false
76 \font_sc false
77 \font_osf false
78 \font_sf_scale 100
79 \font_tt_scale 100
80 \graphics default
81 \default_output_format default
82 \output_sync 1
83 \bibtex_command default
84 \index_command default
85 \paperfontsize 12
86 \spacing single
87 \use_hyperref true
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
92 \pdf_bookmarks true
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
96 \pdf_breaklinks false
97 \pdf_pdfborder false
98 \pdf_colorlinks true
99 \pdf_backref false
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \papersize default
103 \use_geometry false
104 \use_package amsmath 1
105 \use_package amssymb 1
106 \use_package esint 0
107 \use_package mathdots 1
108 \use_package mathtools 0
109 \use_package mhchem 1
110 \use_package undertilde 0
111 \cite_engine basic
112 \cite_engine_type numerical
113 \biblio_style plain
114 \use_bibtopic false
115 \use_indices false
116 \paperorientation portrait
117 \suppress_date false
118 \justification true
119 \use_refstyle 0
120 \notefontcolor #0000ff
121 \index Index
122 \shortcut idx
123 \color #008000
124 \end_index
125 \secnumdepth 3
126 \tocdepth 3
127 \paragraph_separation indent
128 \paragraph_indentation default
129 \quotes_language english
130 \papercolumns 1
131 \papersides 2
132 \paperpagestyle headings
133 \tracking_changes true
134 \output_changes false
135 \html_math_output 0
136 \html_css_as_file 0
137 \html_be_strict true
138 \author 274215730 "scott" 
139 \end_header
140
141 \begin_body
142
143 \begin_layout Title
144 Additional LyX Features
145 \end_layout
146
147 \begin_layout Subtitle
148 Version 2.0.x
149 \end_layout
150
151 \begin_layout Author
152 by the LyX Team
153 \begin_inset Foot
154 status collapsed
155
156 \begin_layout Plain Layout
157 \noindent
158 Principal maintainer of this file is
159 \noun on
160  Richard Heck
161 \noun default
162 .
163  If you have comments or error corrections, please send them to the LyX
164  Documentation mailing list, 
165 \begin_inset Flex Code
166 status collapsed
167
168 \begin_layout Plain Layout
169 \noindent
170 <lyx-docs@lists.lyx.org>
171 \end_layout
172
173 \end_inset
174
175 .
176 \end_layout
177
178 \end_inset
179
180
181 \end_layout
182
183 \begin_layout Standard
184 \begin_inset CommandInset toc
185 LatexCommand tableofcontents
186
187 \end_inset
188
189
190 \end_layout
191
192 \begin_layout Chapter
193 Introduction
194 \end_layout
195
196 \begin_layout Standard
197 This manual is essentially Part II of the 
198 \emph on
199 User's Guide\SpecialChar \@.
200
201 \emph default
202  The reason for separating the two documents is simple: the 
203 \emph on
204 User's Guide
205 \emph default
206  is already quite lengthy, and it contains information on all of the basic
207  features one needs to know in order to prepare most documents.
208  However, the LyX Team has worked to make LyX extensible through various
209  configuration files and external packages.
210  That means that if you want to support the Fizzwizzle LaTeX package, you
211  can create a layout file (or module) for it without having to alter LyX
212  itself.
213  We've already had contributions of several new features this way, and some
214  of them are documented here.
215  There are also some more `advanced' features, such as how to control the
216  presentation of bibliographies and how to work with multi-part documents,
217  that are not covered in the 
218 \emph on
219 User's Guide
220 \emph default
221  and are discussed here.
222 \end_layout
223
224 \begin_layout Standard
225 This manual also documents some special features, like fax support, version
226  control, and SGML support, which require additional software to work properly.
227  There is also a chapter on LyX's support for HTML.
228  And lastly, there's a chapter of LaTeX tools and tips, things you can use
229  to spruce up your documents by directly using the powerful features of
230  LaTeX.
231  After all, LyX 
232 \emph on
233 is
234 \emph default
235  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
236 \end_layout
237
238 \begin_layout Standard
239 If you haven't read the 
240 \emph on
241 Introduction
242 \emph default
243  yet, you are definitely in the wrong manual.
244  The 
245 \emph on
246 Introduction
247 \emph default
248  is the first place to go, since it describes the notation and format of
249  all of the manuals.
250  You should also be thoroughly familiar with the 
251 \emph on
252 User's Guide
253 \emph default
254  and all of the basic features of LyX before attempting to read this one.
255 \end_layout
256
257 \begin_layout Standard
258 Since many of the topics in this manual depend heavily on LyX's interaction
259  with LaTeX, this first chapter covers the inner workings of LyX and how
260  to direct LyX to generate exactly the LaTeX code you want.
261  It is obviously for more seasoned LyX users.
262 \end_layout
263
264 \begin_layout Chapter
265 LyX and LaTeX
266 \end_layout
267
268 \begin_layout Section
269 How LyX Uses LaTeX
270 \end_layout
271
272 \begin_layout Standard
273 This chapter is for both TeX-nicians and the LaTeX-curious.
274  In it, we'll explain how LyX and LaTeX work together to produce printable
275  output.
276  This is the only place in any of the manuals where we assume you know something
277  about LaTeX.
278 \end_layout
279
280 \begin_layout Standard
281 At one time, LyX was called a 
282 \begin_inset Quotes eld
283 \end_inset
284
285 WYSIWYM frontend to LaTeX,
286 \begin_inset Quotes erd
287 \end_inset
288
289  but that's no longer true.
290  There are frontends to LaTeX out there.
291 \begin_inset Foot
292 status collapsed
293
294 \begin_layout Plain Layout
295 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
296  There are also the LaTeX modes for vi and emacs, of course.
297 \end_layout
298
299 \end_inset
300
301  These are basically text editors with the ability to run LaTeX and mark
302  any errors in the file you're editing.
303  Although LyX 
304 \emph on
305 is
306 \emph default
307  an editor, and it 
308 \emph on
309 does
310 \emph default
311  run LaTeX, and it also indicates errors in the file, it also does much,
312  much more.
313  For one thing, you don't need to know LaTeX to use LyX effectively.
314  And LyX has added its own extensions to LaTeX.
315  Try the following sometime: select 
316 \begin_inset Flex MenuItem
317 status collapsed
318
319 \begin_layout Plain Layout
320 Export\SpecialChar \menuseparator
321 LaTeX
322 \end_layout
323
324 \end_inset
325
326  from the 
327 \begin_inset Flex MenuItem
328 status collapsed
329
330 \begin_layout Plain Layout
331 File
332 \end_layout
333
334 \end_inset
335
336  menu (or 
337 \begin_inset Flex MenuItem
338 status collapsed
339
340 \begin_layout Plain Layout
341 View\SpecialChar \menuseparator
342 Source
343 \end_layout
344
345 \end_inset
346
347 ), then look at the preamble of the resulting 
348 \begin_inset Flex Code
349 status collapsed
350
351 \begin_layout Plain Layout
352 .tex
353 \end_layout
354
355 \end_inset
356
357  file.
358  You'll notice a variety of new macros defined specifically by LyX.
359  These macros are defined automatically, according to the features you use
360  in the document.
361 \end_layout
362
363 \begin_layout Standard
364 There are several commands that automatically invoke LaTeX.
365  They are:
366 \end_layout
367
368 \begin_layout Itemize
369 \begin_inset Flex MenuItem
370 status collapsed
371
372 \begin_layout Plain Layout
373 View\SpecialChar \menuseparator
374 View
375 \end_layout
376
377 \end_inset
378
379
380 \end_layout
381
382 \begin_layout Itemize
383 \begin_inset Flex MenuItem
384 status collapsed
385
386 \begin_layout Plain Layout
387 View\SpecialChar \menuseparator
388 Update
389 \end_layout
390
391 \end_inset
392
393
394 \end_layout
395
396 \begin_layout Itemize
397 \begin_inset Flex MenuItem
398 status collapsed
399
400 \begin_layout Plain Layout
401 File\SpecialChar \menuseparator
402 Print
403 \end_layout
404
405 \end_inset
406
407
408 \end_layout
409
410 \begin_layout Itemize
411 \begin_inset Flex MenuItem
412 status collapsed
413
414 \begin_layout Plain Layout
415 File\SpecialChar \menuseparator
416 Fax
417 \end_layout
418
419 \end_inset
420
421
422 \end_layout
423
424 \begin_layout Standard
425 They will only invoke LaTeX if the file has changed since the last time
426  LaTeX was run.
427  
428 \end_layout
429
430 \begin_layout Standard
431 When LyX runs LaTeX on the file you're editing, it performs these steps:
432 \end_layout
433
434 \begin_layout Enumerate
435 Convert the document to LaTeX and save to a file with the extension 
436 \begin_inset Flex Code
437 status collapsed
438
439 \begin_layout Plain Layout
440 .tex
441 \end_layout
442
443 \end_inset
444
445  in place of 
446 \begin_inset Flex Code
447 status collapsed
448
449 \begin_layout Plain Layout
450 .lyx
451 \end_layout
452
453 \end_inset
454
455 .
456 \end_layout
457
458 \begin_layout Enumerate
459 Run LaTeX on the 
460 \begin_inset Flex Code
461 status collapsed
462
463 \begin_layout Plain Layout
464 .tex
465 \end_layout
466
467 \end_inset
468
469  file (maybe several times), and run any other commands (such as 
470 \begin_inset Flex Code
471 status collapsed
472
473 \begin_layout Plain Layout
474 bibtex
475 \end_layout
476
477 \end_inset
478
479  or 
480 \begin_inset Flex Code
481 status collapsed
482
483 \begin_layout Plain Layout
484 makeindex
485 \end_layout
486
487 \end_inset
488
489 ) needed to compile the LaTeX file.
490 \end_layout
491
492 \begin_layout Enumerate
493 If there are any errors, show the error log.
494 \end_layout
495
496 \begin_layout Standard
497 If you have run LaTeX using 
498 \begin_inset Flex MenuItem
499 status collapsed
500
501 \begin_layout Plain Layout
502 View
503 \bar under
504 \SpecialChar \menuseparator
505
506 \bar default
507 DVI
508 \end_layout
509
510 \end_inset
511
512 , LyX then runs a DVI viewer to display the DVI-file.
513  If you have used 
514 \begin_inset Flex MenuItem
515 status collapsed
516
517 \begin_layout Plain Layout
518 View
519 \bar under
520 \SpecialChar \menuseparator
521
522 \bar default
523 PostScript
524 \end_layout
525
526 \end_inset
527
528 , LyX performs further steps:
529 \end_layout
530
531 \begin_layout Itemize
532 Run 
533 \begin_inset Flex Code
534 status collapsed
535
536 \begin_layout Plain Layout
537 dvips
538 \end_layout
539
540 \end_inset
541
542  to convert the DVI file to PostScript.
543 \end_layout
544
545 \begin_layout Itemize
546 Run a PostScript viewer, such as 
547 \begin_inset Flex Code
548 status collapsed
549
550 \begin_layout Plain Layout
551 ghostview
552 \end_layout
553
554 \end_inset
555
556 , to display the PostScript file.
557 \end_layout
558
559 \begin_layout Standard
560 LyX does similar things when viewing, or exporting, other formats.
561 \end_layout
562
563 \begin_layout Section
564 Translating LaTeX files into LyX
565 \end_layout
566
567 \begin_layout Standard
568 You can import a LaTeX file into LyX by using the 
569 \begin_inset Flex MenuItem
570 status collapsed
571
572 \begin_layout Plain Layout
573 File\SpecialChar \menuseparator
574 Import\SpecialChar \menuseparator
575 LaTeX
576 \end_layout
577
578 \end_inset
579
580  command in LyX.
581  This will call a program named 
582 \begin_inset Flex Code
583 status collapsed
584
585 \begin_layout Plain Layout
586 tex2lyx
587 \end_layout
588
589 \end_inset
590
591  which will create a file 
592 \begin_inset Flex Code
593 status collapsed
594
595 \begin_layout Plain Layout
596 foo.lyx
597 \end_layout
598
599 \end_inset
600
601  from the file 
602 \begin_inset Flex Code
603 status collapsed
604
605 \begin_layout Plain Layout
606 foo.tex
607 \end_layout
608
609 \end_inset
610
611 .
612  LyX will then open that file.
613 \begin_inset Foot
614 status collapsed
615
616 \begin_layout Plain Layout
617 \begin_inset Flex Code
618 status collapsed
619
620 \begin_layout Plain Layout
621 tex2lyx
622 \end_layout
623
624 \end_inset
625
626  can also be run from the command line, of course.
627 \end_layout
628
629 \end_inset
630
631
632 \end_layout
633
634 \begin_layout Standard
635 \begin_inset Flex Code
636 status collapsed
637
638 \begin_layout Plain Layout
639 tex2lyx
640 \end_layout
641
642 \end_inset
643
644  will translate most legal LaTeX, but not everything.
645  It will put things it doesn't understand into TeX code, so after translating
646  a file with 
647 \begin_inset Flex Code
648 status collapsed
649
650 \begin_layout Plain Layout
651 tex2lyx
652 \end_layout
653
654 \end_inset
655
656 , you can look for TeX code and hand-edit it until it looks right.
657 \end_layout
658
659 \begin_layout Standard
660 If you don't know what TeX code is, read the next section.
661 \end_layout
662
663 \begin_layout Section
664 \begin_inset CommandInset label
665 LatexCommand label
666 name "sec:Inserting-TeX-Code"
667
668 \end_inset
669
670 Inserting TeX Code into LyX Documents 
671 \end_layout
672
673 \begin_layout Standard
674 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
675  You can always insert TeX code into any LyX document.
676  LyX cannot, and will never be able to, display every possible LaTeX construct.
677  If ever you need to insert LaTeX commands into your LyX document, you can
678  use the 
679 \begin_inset Flex Code
680 status collapsed
681
682 \begin_layout Plain Layout
683 TeX Code
684 \end_layout
685
686 \end_inset
687
688  box, which you can insert into your document with 
689 \begin_inset Flex MenuItem
690 status collapsed
691
692 \begin_layout Plain Layout
693 Insert\SpecialChar \menuseparator
694 TeX Code
695 \end_layout
696
697 \end_inset
698
699  or the keyboard shortcut 
700 \begin_inset Info
701 type  "shortcut"
702 arg   "ert-insert"
703 \end_inset
704
705 .
706 \end_layout
707
708 \begin_layout Standard
709 Here's an example of inserting LaTeX commands in a LyX document.
710  The code looks like this:
711 \end_layout
712
713 \begin_layout LyX-Code
714
715 \backslash
716 begin{tabular}{ll}
717 \begin_inset Newline newline
718 \end_inset
719
720
721 \backslash
722 begin{minipage}{5cm}
723 \begin_inset Newline newline
724 \end_inset
725
726 This is an example of a minipage environment.
727  You 
728 \begin_inset Newline newline
729 \end_inset
730
731 can put nearly everything in it, even (non-floating) 
732 \begin_inset Newline newline
733 \end_inset
734
735 figures and tables.
736  
737 \begin_inset Newline newline
738 \end_inset
739
740
741 \backslash
742 end{minipage}
743 \begin_inset Newline newline
744 \end_inset
745
746 &
747 \begin_inset Newline newline
748 \end_inset
749
750
751 \backslash
752 begin{minipage}{5cm}
753 \begin_inset Newline newline
754 \end_inset
755
756
757 \backslash
758 begin{verbatim}
759 \begin_inset Newline newline
760 \end_inset
761
762
763 \backslash
764 begin{minipage}{5cm}
765 \begin_inset Newline newline
766 \end_inset
767
768 This ...
769  
770 \begin_inset Newline newline
771 \end_inset
772
773
774 \backslash
775 end{minipage}
776 \begin_inset Newline newline
777 \end_inset
778
779
780 \backslash
781 end{verbatim}
782 \begin_inset Newline newline
783 \end_inset
784
785
786 \backslash
787 end{minipage}
788 \begin_inset Newline newline
789 \end_inset
790
791
792 \backslash
793 end{tabular}
794 \end_layout
795
796 \begin_layout LyX-Code
797
798 \end_layout
799
800 \begin_layout Standard
801 The 
802 \begin_inset Flex Code
803 status collapsed
804
805 \begin_layout Plain Layout
806 TeX Code
807 \end_layout
808
809 \end_inset
810
811  box containing this text is directly after this paragraph.
812  Those of you reading the manual in LyX will only see the TeX code inset.
813  Those reading a printed version of the manuals will see the actual results:
814 \begin_inset VSpace bigskip
815 \end_inset
816
817
818 \end_layout
819
820 \begin_layout Standard
821 \begin_inset ERT
822 status open
823
824 \begin_layout Plain Layout
825
826
827 \backslash
828 begin{tabular}{ll}
829 \end_layout
830
831 \begin_layout Plain Layout
832
833
834 \backslash
835 begin{minipage}{5cm}
836 \end_layout
837
838 \begin_layout Plain Layout
839
840 This is an example of a minipage environment.
841  You can put nearly everything in it, even (non-floating) figures and tables.
842  
843 \end_layout
844
845 \begin_layout Plain Layout
846
847
848 \backslash
849 end{minipage}
850 \end_layout
851
852 \begin_layout Plain Layout
853
854 &
855 \end_layout
856
857 \begin_layout Plain Layout
858
859
860 \backslash
861 begin{minipage}{5cm}
862 \end_layout
863
864 \begin_layout Plain Layout
865
866
867 \backslash
868 begin{verbatim}
869 \end_layout
870
871 \begin_layout Plain Layout
872
873
874 \backslash
875 begin{minipage}{5cm}
876 \end_layout
877
878 \begin_layout Plain Layout
879
880 This ...
881  
882 \end_layout
883
884 \begin_layout Plain Layout
885
886
887 \backslash
888 end{minipage}
889 \end_layout
890
891 \begin_layout Plain Layout
892
893
894 \backslash
895 end{verbatim}
896 \end_layout
897
898 \begin_layout Plain Layout
899
900
901 \backslash
902 end{minipage}
903 \end_layout
904
905 \begin_layout Plain Layout
906
907
908 \backslash
909 end{tabular}
910 \end_layout
911
912 \end_inset
913
914
915 \begin_inset VSpace bigskip
916 \end_inset
917
918
919 \end_layout
920
921 \begin_layout Standard
922 In addition to using TeX code, you can also create a separate file containing
923  some complex LaTeX structure and then use 
924 \begin_inset Flex MenuItem
925 status collapsed
926
927 \begin_layout Plain Layout
928 Insert\SpecialChar \menuseparator
929 Child
930 \begin_inset space ~
931 \end_inset
932
933 Document
934 \end_layout
935
936 \end_inset
937
938  to include your file (you should select the type 
939 \begin_inset Flex Code
940 status collapsed
941
942 \begin_layout Plain Layout
943 Input
944 \end_layout
945
946 \end_inset
947
948 ).
949  We recommend that you only do this if you have a 
950 \begin_inset Flex Code
951 status collapsed
952
953 \begin_layout Plain Layout
954 .tex
955 \end_layout
956
957 \end_inset
958
959  file which you 
960 \emph on
961 know
962 \emph default
963  works already.
964  Otherwise, you'll have a big job tracking down LaTeX errors.
965 \end_layout
966
967 \begin_layout Standard
968 There are a few last points to emphasize:
969 \end_layout
970
971 \begin_layout Itemize
972 LyX 
973 \emph on
974 does not
975 \emph default
976  check if your LaTeX code is correct.
977 \end_layout
978
979 \begin_layout Itemize
980 Beware of reinventing the wheel.
981 \end_layout
982
983 \begin_layout Standard
984 On that last point, LyX does have quite a few features tucked into it, and
985  more are coming.
986  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
987  feature before you decide you have to do it by hand.
988  Moreover, there are numerous LaTeX packages out there to do all sorts of
989  things, from labels to envelopes to fancy multipage tables.
990  Check out 
991 \begin_inset CommandInset href
992 LatexCommand href
993 name "CTAN"
994 target "http://www.ctan.org/"
995
996 \end_inset
997
998  for details.
999 \end_layout
1000
1001 \begin_layout Standard
1002 If you do need to do some wild and fancy things within your document, be
1003  sure to check out a good LaTeX book for assistance.
1004  There are a number of them listed in the bibliography of the 
1005 \emph on
1006 User's Guide
1007 \emph default
1008 .
1009 \end_layout
1010
1011 \begin_layout Section
1012 LyX and the LaTeX Preamble
1013 \end_layout
1014
1015 \begin_layout Subsection
1016 About the LaTeX Preamble
1017 \end_layout
1018
1019 \begin_layout Standard
1020 If you already know LaTeX, there is no need to explain here what the preamble
1021  is good for.
1022  If you don't, the following will give you some ideas—we recommend again
1023  that you consult a LaTeX book for further information.
1024  In any case, you should read the points below, because they explain what
1025  you can do and what you don't need to do in the LaTeX preamble of a LyX
1026  document.
1027 \end_layout
1028
1029 \begin_layout Standard
1030 The LaTeX preamble comes at the very beginning of a document, 
1031 \emph on
1032 before
1033 \emph default
1034  the text.
1035  It serves to:
1036 \end_layout
1037
1038 \begin_layout Itemize
1039 Declare the document class.
1040  
1041 \begin_inset Newline newline
1042 \end_inset
1043
1044 LyX already does this for you.
1045  If you're a seasoned LaTeX-nician, and you have a custom document class
1046  you want to use, check out the 
1047 \emph on
1048 Customization Manual
1049 \emph default
1050  for information on how to make LyX interface to it.
1051 \end_layout
1052
1053 \begin_layout Itemize
1054 Declare the usage of packages.
1055  
1056 \begin_inset Newline newline
1057 \end_inset
1058
1059 LaTeX packages provide special commands, which are only available within
1060  a document when the package has been declared in the preamble.
1061  In addition to providing special commands, the inclusion of a package can
1062  change the document.
1063  For example, the package 
1064 \begin_inset Flex Code
1065 status collapsed
1066
1067 \begin_layout Plain Layout
1068 indentfirst
1069 \end_layout
1070
1071 \end_inset
1072
1073  forces all paragraphs to be indented.
1074  There are other packages for labels, envelopes, margins, etc.
1075  
1076 \end_layout
1077
1078 \begin_layout Itemize
1079 Set counters, variables, lengths and widths.
1080  
1081 \begin_inset Newline newline
1082 \end_inset
1083
1084 There are several LaTeX counters and variables that 
1085 \emph on
1086 must
1087 \emph default
1088  be set globally from within the preamble in order to have the desired effect.
1089  (There are variables that you can set and reset inside the document, too.)
1090  Margins are a good example of something that must be set in the preamble.
1091  Another example is the label format for lists.
1092  You can actually set these just about anywhere, but it's best to do it
1093  just once, inside the preamble.
1094 \end_layout
1095
1096 \begin_layout Itemize
1097 Declare user defined commands (with 
1098 \begin_inset Flex Code
1099 status collapsed
1100
1101 \begin_layout Plain Layout
1102
1103 \backslash
1104 newcommand
1105 \end_layout
1106
1107 \end_inset
1108
1109  or 
1110 \begin_inset Flex Code
1111 status collapsed
1112
1113 \begin_layout Plain Layout
1114
1115 \backslash
1116 renewcommand
1117 \end_layout
1118
1119 \end_inset
1120
1121 ).
1122 \begin_inset Newline newline
1123 \end_inset
1124
1125 These are abbreviations for LaTeX commands which appear very often inside
1126  a document.
1127  Although the preamble is a good place to declare such commands, they 
1128 \emph on
1129 can
1130 \emph default
1131  be declared anywhere (before they are used for the first time, of course).
1132  This can be useful if there is a lot of raw LaTeX code in your document,
1133  which normally should not be the case.
1134 \end_layout
1135
1136 \begin_layout Standard
1137 LyX adds its own set of definitions to the preamble of the 
1138 \begin_inset Flex Code
1139 status collapsed
1140
1141 \begin_layout Plain Layout
1142 .tex
1143 \end_layout
1144
1145 \end_inset
1146
1147  file it produces.
1148  This makes LaTeX files generated by LyX portable.
1149 \end_layout
1150
1151 \begin_layout Subsection
1152 Changing the Preamble
1153 \end_layout
1154
1155 \begin_layout Standard
1156 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1157  can't change them without patching LyX itself.
1158  You can, however, add your own stuff to the preamble by selecting 
1159 \begin_inset Flex MenuItem
1160 status collapsed
1161
1162 \begin_layout Plain Layout
1163 LaTeX
1164 \begin_inset space ~
1165 \end_inset
1166
1167 Preamble
1168 \end_layout
1169
1170 \end_inset
1171
1172  in the 
1173 \begin_inset Flex MenuItem
1174 status collapsed
1175
1176 \begin_layout Plain Layout
1177 Document\SpecialChar \menuseparator
1178 Settings
1179 \end_layout
1180
1181 \end_inset
1182
1183  dialog.
1184  LyX adds anything in the 
1185 \begin_inset Flex MenuItem
1186 status collapsed
1187
1188 \begin_layout Plain Layout
1189 Preamble
1190 \end_layout
1191
1192 \end_inset
1193
1194  dialog to its own built-in preamble.
1195  Before adding your own declarations in the preamble, you should make sure
1196  that LyX doesn't already support what you want to do.
1197  (Remember what we said about reinventing the wheel?) Also, 
1198 \emph on
1199 make sure your preamble code is correct
1200 \emph default
1201 .
1202  LyX doesn't check it for you.
1203  If there is an error, you're likely to get an error like 
1204 \begin_inset Quotes eld
1205 \end_inset
1206
1207
1208 \begin_inset Flex Code
1209 status collapsed
1210
1211 \begin_layout Plain Layout
1212 Missing 
1213 \backslash
1214 begin{document}
1215 \end_layout
1216
1217 \end_inset
1218
1219
1220 \begin_inset Quotes erd
1221 \end_inset
1222
1223 .
1224  If you see this error, check your preamble.
1225 \end_layout
1226
1227 \begin_layout Subsection
1228 Examples
1229 \end_layout
1230
1231 \begin_layout Standard
1232 Here are some examples of what you can add to a preamble, and what they
1233  do.
1234 \end_layout
1235
1236 \begin_layout Subsubsection
1237 Example #1: Offsets
1238 \end_layout
1239
1240 \begin_layout Standard
1241 There are two variables under LaTeX that control page position: 
1242 \begin_inset Flex Code
1243 status collapsed
1244
1245 \begin_layout Plain Layout
1246
1247 \backslash
1248 hoffset
1249 \end_layout
1250
1251 \end_inset
1252
1253  and 
1254 \begin_inset Flex Code
1255 status collapsed
1256
1257 \begin_layout Plain Layout
1258
1259 \backslash
1260 voffset
1261 \end_layout
1262
1263 \end_inset
1264
1265 .
1266  Their names should be self-explanatory.
1267  These variables are useful if you think for a moment about computer labels.
1268  Sometimes, the size of a print medium and the area of the medium that you
1269  can actually print on aren't the same.
1270  This is where 
1271 \begin_inset Flex Code
1272 status collapsed
1273
1274 \begin_layout Plain Layout
1275
1276 \backslash
1277 hoffset
1278 \end_layout
1279
1280 \end_inset
1281
1282  and 
1283 \begin_inset Flex Code
1284 status collapsed
1285
1286 \begin_layout Plain Layout
1287
1288 \backslash
1289 voffset
1290 \end_layout
1291
1292 \end_inset
1293
1294  come in.
1295 \end_layout
1296
1297 \begin_layout Standard
1298 The default values for 
1299 \begin_inset Flex Code
1300 status collapsed
1301
1302 \begin_layout Plain Layout
1303
1304 \backslash
1305 hoffset
1306 \end_layout
1307
1308 \end_inset
1309
1310  and 
1311 \begin_inset Flex Code
1312 status collapsed
1313
1314 \begin_layout Plain Layout
1315
1316 \backslash
1317 voffset
1318 \end_layout
1319
1320 \end_inset
1321
1322  are both 0
1323 \begin_inset space \thinspace{}
1324 \end_inset
1325
1326 points, i.
1327 \begin_inset space \thinspace{}
1328 \end_inset
1329
1330 e.
1331 \begin_inset space \space{}
1332 \end_inset
1333
1334 the page isn't shifted.
1335  Unfortunately, some DVI drivers always seem to shift the page.
1336  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1337  If you're using LyX on a system that you don't personally maintain, and
1338  your sysadmin is a doofus, 
1339 \begin_inset Flex Code
1340 status collapsed
1341
1342 \begin_layout Plain Layout
1343
1344 \backslash
1345 hoffset
1346 \end_layout
1347
1348 \end_inset
1349
1350  and 
1351 \begin_inset Flex Code
1352 status collapsed
1353
1354 \begin_layout Plain Layout
1355
1356 \backslash
1357 voffset
1358 \end_layout
1359
1360 \end_inset
1361
1362  can save the day.
1363  Suppose your left and top margins are always 0.5
1364 \begin_inset space \thinspace{}
1365 \end_inset
1366
1367 inches too big.
1368  You can add this to the preamble:
1369 \end_layout
1370
1371 \begin_layout LyX-Code
1372
1373 \backslash
1374 setlength{
1375 \backslash
1376 hoffset}{-0.5 in}
1377 \end_layout
1378
1379 \begin_layout LyX-Code
1380
1381 \backslash
1382 setlength{
1383 \backslash
1384 voffset}{-0.5 in}
1385 \end_layout
1386
1387 \begin_layout Standard
1388 and your margins should now be correct.
1389 \end_layout
1390
1391 \begin_layout Subsubsection
1392 Example #2: Labels
1393 \end_layout
1394
1395 \begin_layout Standard
1396 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1397  There's a rather nice package, available at your nearest CTAN archive,
1398  for printing sheets of labels: 
1399 \begin_inset Flex Code
1400 status collapsed
1401
1402 \begin_layout Plain Layout
1403 labels.sty
1404 \end_layout
1405
1406 \end_inset
1407
1408 .
1409  Now, your system may not have this package installed by default.
1410  We leave that up to you to check.
1411  You'll also want to read the documentation for it; we're not going to do
1412  that for you.
1413  Since this is an example, however, we'll give you an example of how you
1414  use this package.
1415 \end_layout
1416
1417 \begin_layout Standard
1418 First, make sure you're using the 
1419 \begin_inset Flex Code
1420 status collapsed
1421
1422 \begin_layout Plain Layout
1423 article
1424 \end_layout
1425
1426 \end_inset
1427
1428  document class.
1429  Next, you need to put the following in your preamble:
1430 \end_layout
1431
1432 \begin_layout LyX-Code
1433
1434 \backslash
1435 usepackage{labels}
1436 \end_layout
1437
1438 \begin_layout LyX-Code
1439
1440 \backslash
1441 LabelCols=3
1442 \end_layout
1443
1444 \begin_layout LyX-Code
1445
1446 \backslash
1447 LabelRows=7
1448 \end_layout
1449
1450 \begin_layout LyX-Code
1451
1452 \backslash
1453 LeftBorder=8mm
1454 \end_layout
1455
1456 \begin_layout LyX-Code
1457
1458 \backslash
1459 RightBorder=8mm
1460 \end_layout
1461
1462 \begin_layout LyX-Code
1463
1464 \backslash
1465 TopBorder=9mm
1466 \end_layout
1467
1468 \begin_layout LyX-Code
1469
1470 \backslash
1471 BottomBorder=2mm
1472 \end_layout
1473
1474 \begin_layout Standard
1475 This sets things up for Avery label sheets, stock #5360.
1476  You're now ready to print labels, but you'll need to insert LaTeX code,
1477  placing the commands 
1478 \begin_inset Flex Code
1479 status collapsed
1480
1481 \begin_layout Plain Layout
1482
1483 \backslash
1484 begin{labels}
1485 \end_layout
1486
1487 \end_inset
1488
1489  and 
1490 \begin_inset Flex Code
1491 status collapsed
1492
1493 \begin_layout Plain Layout
1494
1495 \backslash
1496 end{labels}
1497 \end_layout
1498
1499 \end_inset
1500
1501  around each label text.
1502  This and other special features of 
1503 \begin_inset Flex Code
1504 status collapsed
1505
1506 \begin_layout Plain Layout
1507 labels.sty
1508 \end_layout
1509
1510 \end_inset
1511
1512  are explained in its documentation.
1513 \end_layout
1514
1515 \begin_layout Standard
1516 Someday, someone may write a LyX layout file to support this package directly.
1517  Maybe that someone is you.
1518 \end_layout
1519
1520 \begin_layout Subsubsection
1521 Example #3: Paragraph Indentation
1522 \end_layout
1523
1524 \begin_layout Standard
1525 Americans are trained to indent the first line of 
1526 \emph on
1527 every
1528 \emph default
1529  paragraph.
1530  As with all of their other weird quirks, most Americans will whine and
1531  moan until they can have their way and indent the first line of all paragraphs.
1532  (Yes, we're joking.
1533  (We are?) 
1534 \emph on
1535 Yeah
1536 \emph default
1537 , we are.)
1538 \end_layout
1539
1540 \begin_layout Standard
1541 Of course, this behavior isn't standard typography.
1542  In books, you typically only indent the first line of a paragraph 
1543 \emph on
1544 if
1545 \emph default
1546  it follows another one.
1547  The idea behind indenting the first line of a paragraph is to distinguish
1548  neighboring paragraphs from one another.
1549  If there is no previous paragraph—for example, if it follows a figure or
1550  is the first paragraph in a section—then there is no need for indentation.
1551  
1552 \end_layout
1553
1554 \begin_layout Standard
1555 If you're a typical American (we're still joking!), though, you don't care
1556  about such esoteric things; you want your indentation! Add this to the
1557  preamble:
1558 \end_layout
1559
1560 \begin_layout LyX-Code
1561
1562 \backslash
1563 usepackage{indentfirst}
1564 \end_layout
1565
1566 \begin_layout Standard
1567 If your TeX distribution isn't braindead, you'll have this package, and
1568  all of your paragraphs will get the indentation the Founding Fathers intended
1569  they should have.
1570 \end_layout
1571
1572 \begin_layout Subsubsection
1573 Example #4: This Document
1574 \end_layout
1575
1576 \begin_layout Standard
1577 You can also check out the preamble of this document to get an idea of some
1578  of the advanced things you can do.
1579 \end_layout
1580
1581 \begin_layout Section
1582 LyX and LaTeX Errors
1583 \end_layout
1584
1585 \begin_layout Standard
1586 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1587  going.
1588  It then uses the logfile from the LaTeX run to do a post-mortem.
1589  After analyzing the logfile, LyX displays a dialog listing the errors.
1590  Clicking on any one of them will take you to the position in your LyX file
1591  where the error occurred.
1592 \begin_inset Foot
1593 status collapsed
1594
1595 \begin_layout Plain Layout
1596 Well, usually.
1597  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1598  right line.
1599  There are also cases where LaTeX reports the error on one line, but the
1600  actual error is earlier.
1601  This is not unlike forgetting a closing brace in a program: You'll get
1602  an error, but only later.
1603 \end_layout
1604
1605 \end_inset
1606
1607
1608 \end_layout
1609
1610 \begin_layout Standard
1611 Some folks also like to look at the log file directly: It is available from
1612  
1613 \begin_inset Flex MenuItem
1614 status collapsed
1615
1616 \begin_layout Plain Layout
1617 Document
1618 \bar under
1619 \SpecialChar \menuseparator
1620
1621 \bar default
1622 Latex
1623 \begin_inset space ~
1624 \end_inset
1625
1626 Log
1627 \end_layout
1628
1629 \end_inset
1630
1631 .
1632  There are some fairly common error messages and warnings.
1633  We'll cover those here.
1634  You should look at a good LaTeX book for a complete listing.
1635 \end_layout
1636
1637 \begin_layout Itemize
1638 \begin_inset Flex Code
1639 status collapsed
1640
1641 \begin_layout Plain Layout
1642 LaTeX Warning
1643 \end_layout
1644
1645 \end_inset
1646
1647
1648 \begin_inset Newline newline
1649 \end_inset
1650
1651 Anything beginning with these words is a warning message for the purpose
1652  of 
1653 \begin_inset Quotes eld
1654 \end_inset
1655
1656 debugging
1657 \begin_inset Quotes erd
1658 \end_inset
1659
1660  the LaTeX code itself.
1661  You'll get messages like this if you added or changed cross-references
1662  or bibliography entries, in which case, LaTeX is trying to tell you that
1663  you need to make another run.
1664  You can by-and-large ignore these.
1665 \end_layout
1666
1667 \begin_layout Itemize
1668 \begin_inset Flex Code
1669 status collapsed
1670
1671 \begin_layout Plain Layout
1672 LaTeX Font Warning
1673 \end_layout
1674
1675 \end_inset
1676
1677
1678 \begin_inset Newline newline
1679 \end_inset
1680
1681 Another warning message, this time about fonts which LaTeX couldn't find.
1682  The rest of the message will often say something about a replacement font
1683  that LaTeX used.
1684  You can safely ignore these, too.
1685 \end_layout
1686
1687 \begin_layout Itemize
1688 \begin_inset Flex Code
1689 status collapsed
1690
1691 \begin_layout Plain Layout
1692 Overfull 
1693 \backslash
1694 hbox
1695 \end_layout
1696
1697 \end_inset
1698
1699
1700 \begin_inset Newline newline
1701 \end_inset
1702
1703 LaTeX absolutely 
1704 \emph on
1705 loves
1706 \emph default
1707  to spew these out.
1708  They are warnings about lines that were too long and run past the right
1709  margin.
1710  Almost always, this is unnoticeable in the final output.
1711  (It can be just a point or two.) Or, only one or two characters extend past
1712  the margin.
1713  LaTeX seems to generate at least one of these messages for just about any
1714  document you write.
1715 \begin_inset Newline newline
1716 \end_inset
1717
1718 You can ignore these messages.
1719  Your eyes will tell you if there's a problem with something that's too
1720  wide; just look at the output.
1721 \begin_inset Foot
1722 status collapsed
1723
1724 \begin_layout Plain Layout
1725 You can also enable the `draft' option in 
1726 \begin_inset Flex MenuItem
1727 status collapsed
1728
1729 \begin_layout Plain Layout
1730 Document
1731 \bar under
1732 \SpecialChar \menuseparator
1733
1734 \bar default
1735 Settings
1736 \end_layout
1737
1738 \end_inset
1739
1740 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1741 \end_layout
1742
1743 \end_inset
1744
1745
1746 \end_layout
1747
1748 \begin_layout Itemize
1749 \begin_inset Flex Code
1750 status collapsed
1751
1752 \begin_layout Plain Layout
1753 Underfull 
1754 \backslash
1755 hbox
1756 \end_layout
1757
1758 \end_inset
1759
1760
1761 \begin_inset Newline newline
1762 \end_inset
1763
1764 Not quite as common as its cousin.
1765  LaTeX seems to like to print lines that are a bit too wide as opposed to
1766  ones that are a bit too narrow.
1767  We have no idea why.
1768 \end_layout
1769
1770 \begin_layout Itemize
1771 \begin_inset Flex Code
1772 status collapsed
1773
1774 \begin_layout Plain Layout
1775 Overfull 
1776 \backslash
1777 vbox
1778 \end_layout
1779
1780 \end_inset
1781
1782  and 
1783 \begin_inset Flex Code
1784 status collapsed
1785
1786 \begin_layout Plain Layout
1787 Underfull 
1788 \backslash
1789 vbox
1790 \end_layout
1791
1792 \end_inset
1793
1794
1795 \begin_inset Newline newline
1796 \end_inset
1797
1798 Warnings about troubles breaking the page.
1799  Once again, just look at the output.
1800  Your eyes will tell you where something has gone wrong.
1801 \end_layout
1802
1803 \begin_layout Itemize
1804 \begin_inset Flex Code
1805 status collapsed
1806
1807 \begin_layout Plain Layout
1808 LaTeX Error: File 
1809 \begin_inset Quotes els
1810 \end_inset
1811
1812 Xxxx
1813 \begin_inset Quotes ers
1814 \end_inset
1815
1816  not found
1817 \end_layout
1818
1819 \end_inset
1820
1821
1822 \begin_inset Newline newline
1823 \end_inset
1824
1825 The file 
1826 \begin_inset Quotes eld
1827 \end_inset
1828
1829 Xxxx
1830 \begin_inset Quotes erd
1831 \end_inset
1832
1833  isn't installed on this system.
1834  This usually appears because some package your document needs isn't installed.
1835  If you didn't touch the preamble or didn't use the 
1836 \begin_inset Flex Code
1837 status collapsed
1838
1839 \begin_layout Plain Layout
1840
1841 \backslash
1842 usepackage{}
1843 \end_layout
1844
1845 \end_inset
1846
1847  command, then one of the packages LyX tried to load is missing.
1848  Use 
1849 \begin_inset Flex MenuItem
1850 status collapsed
1851
1852 \begin_layout Plain Layout
1853 Help\SpecialChar \menuseparator
1854 LaTeX Configuration
1855 \end_layout
1856
1857 \end_inset
1858
1859  to get a list of packages that LyX knows about.
1860  This file is updated whenever you reconfigure LyX (using 
1861 \begin_inset Flex MenuItem
1862 status collapsed
1863
1864 \begin_layout Plain Layout
1865 Tools\SpecialChar \menuseparator
1866 Reconfigure
1867 \end_layout
1868
1869 \end_inset
1870
1871 ) and tells you which packages have been detected and what they do.
1872 \begin_inset Newline newline
1873 \end_inset
1874
1875 If you did use the 
1876 \begin_inset Flex Code
1877 status collapsed
1878
1879 \begin_layout Plain Layout
1880
1881 \backslash
1882 usepackage{}
1883 \end_layout
1884
1885 \end_inset
1886
1887  command and the package in question isn't installed, then you'll need to
1888  install it yourself.
1889 \end_layout
1890
1891 \begin_layout Itemize
1892 \begin_inset Flex Code
1893 status collapsed
1894
1895 \begin_layout Plain Layout
1896 LaTeX Error: Unknown option
1897 \end_layout
1898
1899 \end_inset
1900
1901
1902 \begin_inset Newline newline
1903 \end_inset
1904
1905 Error messages beginning with this are trying to tell you that you specified
1906  a bad or undefined option to a package.
1907  Check the package's documentation.
1908 \end_layout
1909
1910 \begin_layout Itemize
1911 \begin_inset Flex Code
1912 status collapsed
1913
1914 \begin_layout Plain Layout
1915 Undefined control sequence
1916 \end_layout
1917
1918 \end_inset
1919
1920
1921 \begin_inset Newline newline
1922 \end_inset
1923
1924 If you've inserted LaTeX code into your document, but made a typo, you'll
1925  get one of these.
1926  You may have forgotten to load a package.
1927  In any case, this error message usually means that you used an undefined
1928  command.
1929  
1930 \end_layout
1931
1932 \begin_layout Standard
1933 There are other error and warning messages.
1934  Some are self-explanatory.
1935  These are usually LaTeX messages.
1936  Others are downright cryptic.
1937  These are usually TeX error messages, and we really have 
1938 \emph on
1939 no clue
1940 \emph default
1941  what they mean or how to decipher them.
1942  No-one does.
1943 \end_layout
1944
1945 \begin_layout Standard
1946 There's a general sequence you should follow if you get error messages:
1947 \end_layout
1948
1949 \begin_layout Enumerate
1950 Look at the LaTeX code you inserted for typos.
1951 \end_layout
1952
1953 \begin_layout Enumerate
1954 If there are no typos, check that you used the command(s) correctly.
1955 \end_layout
1956
1957 \begin_layout Enumerate
1958 If you get a bunch of error boxes piled up at the very top of the document—and
1959  especially if you see a 
1960 \begin_inset Quotes eld
1961 \end_inset
1962
1963
1964 \begin_inset Flex Code
1965 status collapsed
1966
1967 \begin_layout Plain Layout
1968 Missing 
1969 \backslash
1970 begin{document}
1971 \end_layout
1972
1973 \end_inset
1974
1975
1976 \begin_inset Quotes erd
1977 \end_inset
1978
1979  error—it means that there are errors in the preamble.
1980  Start debugging your preamble.
1981 \end_layout
1982
1983 \begin_layout Enumerate
1984 If you didn't add anything to the preamble and didn't add any LaTeX code
1985  to the document, the first suspect is your LaTeX distribution itself.
1986  Check for missing packages and install them.
1987 \end_layout
1988
1989 \begin_layout Enumerate
1990 Okay, so there are no missing packages.
1991  Did you use any of the fine-tuning options in LyX? Specifically, did you
1992  
1993 \emph on
1994 misuse
1995 \emph default
1996  any of them, like trying to manually insert lots of 
1997 \begin_inset Flex Code
1998 status collapsed
1999
2000 \begin_layout Plain Layout
2001 Protected
2002 \begin_inset space ~
2003 \end_inset
2004
2005 Blanks
2006 \end_layout
2007
2008 \end_inset
2009
2010
2011 \begin_inset Flex Code
2012 status collapsed
2013
2014 \begin_layout Plain Layout
2015 Linebreaks
2016 \end_layout
2017
2018 \end_inset
2019
2020 , or 
2021 \begin_inset Flex Code
2022 status collapsed
2023
2024 \begin_layout Plain Layout
2025 Pagebreaks
2026 \end_layout
2027
2028 \end_inset
2029
2030 ? Did you try to kludge something together with these instead of using the
2031  appropriate paragraph environment?
2032 \end_layout
2033
2034 \begin_layout Enumerate
2035 All right, you didn't use any of the fine-tuning options, you played by
2036  the rules.
2037  Did you try to pull a fancy maneuver? Did you do something funky inside
2038  a table or an equation, like inserting a graphic into a table cell?
2039 \end_layout
2040
2041 \begin_layout Enumerate
2042 Do you have long sections of text where LaTeX cannot find a place to break
2043  a line? By default, LaTeX is rather strict about how much extra inter-word
2044  spacing it will add in order to break a line.
2045  Preferably, you should rework the paragraph to avoid the problem.
2046  If this isn't an option, you can wrap your text in 
2047 \begin_inset Flex Code
2048 status collapsed
2049
2050 \begin_layout Plain Layout
2051
2052 \backslash
2053 sloppypar
2054 \end_layout
2055
2056 \end_inset
2057
2058  to make LaTeX's line breaking more, well, sloppy.
2059 \end_layout
2060
2061 \begin_layout Enumerate
2062 Did you go overboard with the nesting? LyX (currently) doesn't check to
2063  make sure you're in the limits for nesting environments.
2064  If you nested a bunch of environments to the 
2065 \begin_inset Formula $17^{\mathrm{th}}$
2066 \end_inset
2067
2068  level, that's the problem.
2069  (The limit in LaTeX is five.)
2070 \end_layout
2071
2072 \begin_layout Enumerate
2073 Okay, you didn't get any error messages, but your output looks awful.
2074  If you have a table or figure that's too wide or long for the page, you
2075  need to:
2076 \end_layout
2077
2078 \begin_deeper
2079 \begin_layout Enumerate
2080 rescale the figure so it fits.
2081 \end_layout
2082
2083 \begin_layout Enumerate
2084 trim down the table so it fits.
2085 \end_layout
2086
2087 \end_deeper
2088 \begin_layout Enumerate
2089 If something else is wrong with the output, and you didn't try to pull anything
2090  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2091 \end_layout
2092
2093 \begin_layout Standard
2094 If all this doesn't help—well, then 
2095 \emph on
2096 perhaps
2097 \emph default
2098  you might have found a bug in LyX\SpecialChar \ldots{}
2099 .
2100 \end_layout
2101
2102 \begin_layout Chapter
2103 Supplemental Tools
2104 \end_layout
2105
2106 \begin_layout Section
2107 Customizing Bibliographies with BibTeX
2108 \end_layout
2109
2110 \begin_layout Standard
2111 The most basic information about how to use BibTeX with LyX is contained
2112  in the section 
2113 \emph on
2114 Bibliography databases (BibTeX)
2115 \emph default
2116  of the 
2117 \emph on
2118 User's Guide
2119 \emph default
2120 .
2121  The following subsections explain special bibliography features supported
2122  by LyX.
2123 \end_layout
2124
2125 \begin_layout Subsection
2126 Alternative Citation Styles
2127 \end_layout
2128
2129 \begin_layout Standard
2130 Standard BibTeX uses numbers (e.
2131 \begin_inset space \thinspace{}
2132 \end_inset
2133
2134 g.
2135 \begin_inset space \space{}
2136 \end_inset
2137
2138
2139 \begin_inset Quotes eld
2140 \end_inset
2141
2142 [12]
2143 \begin_inset Quotes erd
2144 \end_inset
2145
2146 ) to refer to a cited work.
2147  However, in many scientific disciplines, other citation styles are in use.
2148  The most common one is the author-year style (e.
2149 \begin_inset space \thinspace{}
2150 \end_inset
2151
2152 g.
2153 \begin_inset space \space{}
2154 \end_inset
2155
2156
2157 \begin_inset Quotes eld
2158 \end_inset
2159
2160 Knuth 1984a
2161 \begin_inset Quotes erd
2162 \end_inset
2163
2164 ).
2165  LyX supports two packages that provide this style, 
2166 \begin_inset Flex Code
2167 status collapsed
2168
2169 \begin_layout Plain Layout
2170 natbib
2171 \end_layout
2172
2173 \end_inset
2174
2175  and 
2176 \begin_inset Flex Code
2177 status collapsed
2178
2179 \begin_layout Plain Layout
2180 jurabib
2181 \end_layout
2182
2183 \end_inset
2184
2185 .
2186  Both packages have their pros and cons, which cannot be listed in detail.
2187  If you only want to have simple author-year (or author-numerical) style,
2188  or if you want to use one of the countless style files for 
2189 \begin_inset Flex Code
2190 status collapsed
2191
2192 \begin_layout Plain Layout
2193 natbib
2194 \end_layout
2195
2196 \end_inset
2197
2198 , then the established 
2199 \begin_inset Flex Code
2200 status collapsed
2201
2202 \begin_layout Plain Layout
2203 natbib
2204 \end_layout
2205
2206 \end_inset
2207
2208  package is probably your choice.
2209  If you need special features like short title references, ibidem etc., you
2210  might consider the 
2211 \begin_inset Flex Code
2212 status collapsed
2213
2214 \begin_layout Plain Layout
2215 jurabib
2216 \end_layout
2217
2218 \end_inset
2219
2220  package.
2221 \end_layout
2222
2223 \begin_layout Standard
2224 The handling of both packages in LyX is basically the same.
2225  Go to 
2226 \begin_inset Flex MenuItem
2227 status collapsed
2228
2229 \begin_layout Plain Layout
2230 Document\SpecialChar \menuseparator
2231 Settings
2232 \end_layout
2233
2234 \end_inset
2235
2236  and select under 
2237 \begin_inset Flex MenuItem
2238 status collapsed
2239
2240 \begin_layout Plain Layout
2241 Bibliography
2242 \end_layout
2243
2244 \end_inset
2245
2246  the option 
2247 \begin_inset Flex MenuItem
2248 status collapsed
2249
2250 \begin_layout Plain Layout
2251 Natbib
2252 \end_layout
2253
2254 \end_inset
2255
2256  or 
2257 \begin_inset Flex MenuItem
2258 status collapsed
2259
2260 \begin_layout Plain Layout
2261 Jurabib
2262 \end_layout
2263
2264 \end_inset
2265
2266 .
2267  With both packages, you will get some extra features in the citation dialog
2268  and you can select the style of the reference (
2269 \begin_inset Quotes eld
2270 \end_inset
2271
2272 Knuth 1984
2273 \begin_inset Quotes erd
2274 \end_inset
2275
2276
2277 \begin_inset Quotes eld
2278 \end_inset
2279
2280 Knuth (1984)
2281 \begin_inset Quotes erd
2282 \end_inset
2283
2284
2285 \begin_inset Quotes eld
2286 \end_inset
2287
2288 Knuth, 1984
2289 \begin_inset Quotes erd
2290 \end_inset
2291
2292
2293 \begin_inset Quotes eld
2294 \end_inset
2295
2296 1984
2297 \begin_inset Quotes erd
2298 \end_inset
2299
2300  etc.).
2301  Note that both packages need specifically designed style files.
2302  They both ship their own, but there are lots of additional style files,
2303  and there is even an interactive style file builder
2304 \begin_inset Foot
2305 status collapsed
2306
2307 \begin_layout Plain Layout
2308 See 
2309 \begin_inset Flex URL
2310 status open
2311
2312 \begin_layout Plain Layout
2313
2314 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2315 \end_layout
2316
2317 \end_inset
2318
2319
2320 \end_layout
2321
2322 \end_inset
2323
2324  for 
2325 \begin_inset Flex Code
2326 status collapsed
2327
2328 \begin_layout Plain Layout
2329 natbib
2330 \end_layout
2331
2332 \end_inset
2333
2334 .
2335 \end_layout
2336
2337 \begin_layout Subsection
2338 Sectioned Bibliographies
2339 \end_layout
2340
2341 \begin_layout Standard
2342 Sometimes you might need to divide your bibliography into several sections.
2343  If you are for instance a historian, the possibility to separate sources
2344  and scientific works is most likely a 
2345 \begin_inset Quotes eld
2346 \end_inset
2347
2348 must have
2349 \begin_inset Quotes erd
2350 \end_inset
2351
2352 .
2353  Unfortunately, BibTeX itself does not allow you to do this.
2354  But with the help of some LaTeX packages, BibTeX can be extended to fit
2355  your needs.
2356 \end_layout
2357
2358 \begin_layout Standard
2359 LyX provides native support for one of these packages, 
2360 \family typewriter
2361 bibtopic
2362 \family default
2363 .
2364 \begin_inset Foot
2365 status collapsed
2366
2367 \begin_layout Plain Layout
2368 Available from 
2369 \begin_inset Flex URL
2370 status open
2371
2372 \begin_layout Plain Layout
2373
2374 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2375 \end_layout
2376
2377 \end_inset
2378
2379
2380 \end_layout
2381
2382 \end_inset
2383
2384  The advantage of this package (compared to other packages like 
2385 \family typewriter
2386 multibib
2387 \family default
2388 ) is that you don't need to define new citation commands.
2389  Instead, you need to prepare different bibliographic databases which include
2390  the entries for the different sections of the bibliography.
2391  For example: If you want to divide your bibliography into the sections
2392  
2393 \begin_inset Quotes eld
2394 \end_inset
2395
2396 Sources
2397 \begin_inset Quotes erd
2398 \end_inset
2399
2400  and 
2401 \begin_inset Quotes eld
2402 \end_inset
2403
2404 Scientific works
2405 \begin_inset Quotes erd
2406 \end_inset
2407
2408 , you first need to create two bibliographic databases, e.
2409 \begin_inset space \thinspace{}
2410 \end_inset
2411
2412 g.
2413 \begin_inset space \space{}
2414 \end_inset
2415
2416
2417 \begin_inset Flex Code
2418 status collapsed
2419
2420 \begin_layout Plain Layout
2421 sources.bib
2422 \end_layout
2423
2424 \end_inset
2425
2426  and 
2427 \begin_inset Flex Code
2428 status collapsed
2429
2430 \begin_layout Plain Layout
2431 scientific.bib
2432 \end_layout
2433
2434 \end_inset
2435
2436 .
2437  
2438 \end_layout
2439
2440 \begin_layout Standard
2441 Go to 
2442 \begin_inset Flex MenuItem
2443 status collapsed
2444
2445 \begin_layout Plain Layout
2446 Document\SpecialChar \menuseparator
2447 Settings
2448 \end_layout
2449
2450 \end_inset
2451
2452  and check under 
2453 \begin_inset Flex MenuItem
2454 status collapsed
2455
2456 \begin_layout Plain Layout
2457 Bibliography
2458 \end_layout
2459
2460 \end_inset
2461
2462  the option 
2463 \begin_inset Flex MenuItem
2464 status collapsed
2465
2466 \begin_layout Plain Layout
2467 Sectioned bibliography
2468 \end_layout
2469
2470 \end_inset
2471
2472 .
2473  Now you can insert multiple BibTeX bibliographies, one for each section
2474  of your bibliography.
2475  Returning to our example: Insert the BibTeX bibliography 
2476 \begin_inset Flex Code
2477 status collapsed
2478
2479 \begin_layout Plain Layout
2480 sources.bib
2481 \end_layout
2482
2483 \end_inset
2484
2485  and a second one for the database 
2486 \begin_inset Flex Code
2487 status collapsed
2488
2489 \begin_layout Plain Layout
2490 scientific.bib
2491 \end_layout
2492
2493 \end_inset
2494
2495 .
2496  You are free to use the same or different styles for each section.
2497  Additionally, you can choose if the bibliography section should contain
2498  
2499 \begin_inset Quotes eld
2500 \end_inset
2501
2502 all cited references
2503 \begin_inset Quotes erd
2504 \end_inset
2505
2506  of the specified database(s) (which is the default), 
2507 \begin_inset Quotes eld
2508 \end_inset
2509
2510 all uncited references
2511 \begin_inset Quotes erd
2512 \end_inset
2513
2514  or even 
2515 \begin_inset Quotes eld
2516 \end_inset
2517
2518 all references
2519 \begin_inset Quotes erd
2520 \end_inset
2521
2522 .
2523  This might be useful if you would like to separate your bibliography into
2524  three sections: 
2525 \begin_inset Quotes eld
2526 \end_inset
2527
2528 Cited sources
2529 \begin_inset Quotes erd
2530 \end_inset
2531
2532
2533 \begin_inset Quotes eld
2534 \end_inset
2535
2536 Uncited sources
2537 \begin_inset Quotes erd
2538 \end_inset
2539
2540 , and 
2541 \begin_inset Quotes eld
2542 \end_inset
2543
2544 Scientific works
2545 \begin_inset Quotes erd
2546 \end_inset
2547
2548 .
2549  The titles for the sections can be added as ordinary sections or subsections.
2550  Since 
2551 \begin_inset Flex Code
2552 status collapsed
2553
2554 \begin_layout Plain Layout
2555 bibtopic
2556 \end_layout
2557
2558 \end_inset
2559
2560  removes the bibliography title, you have to manually re-add that, too (as
2561  a chapter* or section*, for instance).
2562 \end_layout
2563
2564 \begin_layout Subsection
2565 Multiple Bibliographies
2566 \end_layout
2567
2568 \begin_layout Standard
2569 Multiple bibliographies, e.
2570 \begin_inset space \thinspace{}
2571 \end_inset
2572
2573 g.
2574 \begin_inset space \space{}
2575 \end_inset
2576
2577 a bibliography for each section or chapter of the document, are not supported
2578  by BibTeX itself.
2579  But the 
2580 \begin_inset Flex Code
2581 status collapsed
2582
2583 \begin_layout Plain Layout
2584 bibtopic
2585 \end_layout
2586
2587 \end_inset
2588
2589  package, which is used for the creation of sectioned bibliographies in
2590  LyX (see the previous section), provides an easy way to solve this task,
2591  if you are willing to use some 
2592 \begin_inset Flex MenuItem
2593 status collapsed
2594
2595 \begin_layout Plain Layout
2596 TeX Code
2597 \end_layout
2598
2599 \end_inset
2600
2601  (see section
2602 \begin_inset space ~
2603 \end_inset
2604
2605
2606 \begin_inset CommandInset ref
2607 LatexCommand ref
2608 reference "sec:Inserting-TeX-Code"
2609
2610 \end_inset
2611
2612 ).
2613 \begin_inset Foot
2614 status collapsed
2615
2616 \begin_layout Plain Layout
2617 An alternative approach is to use the 
2618 \begin_inset Flex Code
2619 status collapsed
2620
2621 \begin_layout Plain Layout
2622 chapterbib
2623 \end_layout
2624
2625 \end_inset
2626
2627  or 
2628 \begin_inset Flex Code
2629 status collapsed
2630
2631 \begin_layout Plain Layout
2632 bibunits
2633 \end_layout
2634
2635 \end_inset
2636
2637  package, respectively.
2638 \end_layout
2639
2640 \end_inset
2641
2642
2643 \end_layout
2644
2645 \begin_layout Standard
2646 First go to 
2647 \begin_inset Flex MenuItem
2648 status collapsed
2649
2650 \begin_layout Plain Layout
2651 Document\SpecialChar \menuseparator
2652 Settings
2653 \end_layout
2654
2655 \end_inset
2656
2657  and under 
2658 \begin_inset Flex MenuItem
2659 status collapsed
2660
2661 \begin_layout Plain Layout
2662 Bibliography
2663 \end_layout
2664
2665 \end_inset
2666
2667  check 
2668 \begin_inset Flex MenuItem
2669 status collapsed
2670
2671 \begin_layout Plain Layout
2672 Sectioned bibliography
2673 \end_layout
2674
2675 \end_inset
2676
2677 .
2678  In the document, you have to enclose the sections, which shall contain
2679  their own bibliography (including the BibTeX bibliography itself), between
2680  
2681 \begin_inset Flex Code
2682 status collapsed
2683
2684 \begin_layout Plain Layout
2685
2686 \backslash
2687 begin{btUnit}
2688 \end_layout
2689
2690 \end_inset
2691
2692  and 
2693 \begin_inset Flex Code
2694 status collapsed
2695
2696 \begin_layout Plain Layout
2697
2698 \backslash
2699 end{btUnit}
2700 \end_layout
2701
2702 \end_inset
2703
2704  (those commands have to be inserted as TeX code).
2705  The bibliography will contain all references that have been cited in the
2706  current 
2707 \begin_inset Flex Code
2708 status collapsed
2709
2710 \begin_layout Plain Layout
2711 btUnit
2712 \end_layout
2713
2714 \end_inset
2715
2716 .
2717  
2718 \series bold
2719 Note:
2720 \series default
2721  If you are using this approach, then every citation reference has to be
2722  inside some 
2723 \begin_inset Flex Code
2724 status collapsed
2725
2726 \begin_layout Plain Layout
2727 btUnit
2728 \end_layout
2729
2730 \end_inset
2731
2732 .
2733  Also, the 
2734 \begin_inset Flex Code
2735 status collapsed
2736
2737 \begin_layout Plain Layout
2738 btUnit
2739 \end_layout
2740
2741 \end_inset
2742
2743 s cannot be nested.
2744 \end_layout
2745
2746 \begin_layout Section
2747 Multipart Documents
2748 \end_layout
2749
2750 \begin_layout Subsection
2751 General Operation
2752 \end_layout
2753
2754 \begin_layout Standard
2755 When you are working on a large file with many sections, it is often convenient
2756  to break up the document into several files, or perhaps you have something
2757  where a table may change from time to time, but the preceding text does
2758  not.
2759  In these cases, you should seriously consider using multipart documents.
2760  For example, scientific papers often have five major sections: the introduction
2761 , observations, results, discussion, and conclusion.
2762  Each of these could be its own separate LyX file, with one 
2763 \begin_inset Quotes eld
2764 \end_inset
2765
2766 master
2767 \begin_inset Quotes erd
2768 \end_inset
2769
2770  file which contains the title, authors, abstract, references, etc., plus
2771  the five included files.
2772  It is important to note that each of these files is a full LyX file which
2773  can be formatted and printed on its own, as well as included in a master
2774  file.
2775  Each of these files must have the same document class, however—don't attempt
2776  to mix book classes with article classes.
2777  You may also include LaTeX files; however, these files must not have their
2778  own preamble (i.
2779 \begin_inset space \thinspace{}
2780 \end_inset
2781
2782 e.
2783 \begin_inset space \space{}
2784 \end_inset
2785
2786 everything up to and including the 
2787 \begin_inset Flex Code
2788 status collapsed
2789
2790 \begin_layout Plain Layout
2791
2792 \backslash
2793 begin{document}
2794 \end_layout
2795
2796 \end_inset
2797
2798  line as well as the 
2799 \begin_inset Flex Code
2800 status collapsed
2801
2802 \begin_layout Plain Layout
2803
2804 \backslash
2805 end{document}
2806 \end_layout
2807
2808 \end_inset
2809
2810  line must be deleted) or else errors will be generated when you try to
2811  make a DVI file.
2812 \end_layout
2813
2814 \begin_layout Standard
2815 LyX allows you to include files quite easily with 
2816 \begin_inset Flex MenuItem
2817 status collapsed
2818
2819 \begin_layout Plain Layout
2820 Insert\SpecialChar \menuseparator
2821 ChiId
2822 \begin_inset space ~
2823 \end_inset
2824
2825 Document
2826 \end_layout
2827
2828 \end_inset
2829
2830 .
2831  When you click on this selection a small box is inserted into the file
2832  at the current cursor location.
2833  Clicking on the box raises a dialog which allows you to select the file
2834  to be included, and the method of its inclusion.
2835  
2836 \end_layout
2837
2838 \begin_layout Standard
2839 The file selection box should by now be obvious.
2840  The three inclusion methods are 
2841 \begin_inset Quotes eld
2842 \end_inset
2843
2844 include
2845 \begin_inset Quotes erd
2846 \end_inset
2847
2848
2849 \begin_inset Quotes eld
2850 \end_inset
2851
2852 input
2853 \begin_inset Quotes erd
2854 \end_inset
2855
2856 , and 
2857 \begin_inset Quotes eld
2858 \end_inset
2859
2860 verbatim
2861 \begin_inset Quotes erd
2862 \end_inset
2863
2864 .
2865  The difference between 
2866 \begin_inset Quotes eld
2867 \end_inset
2868
2869 include
2870 \begin_inset Quotes erd
2871 \end_inset
2872
2873  and 
2874 \begin_inset Quotes eld
2875 \end_inset
2876
2877 input
2878 \begin_inset Quotes erd
2879 \end_inset
2880
2881  is really only meaningful to LaTeXperts, but the practical difference is
2882  that files that are 
2883 \begin_inset Quotes eld
2884 \end_inset
2885
2886 included
2887 \begin_inset Quotes erd
2888 \end_inset
2889
2890  are typeset beginning on a new page, while files that are 
2891 \begin_inset Quotes eld
2892 \end_inset
2893
2894 inputted
2895 \begin_inset Quotes erd
2896 \end_inset
2897
2898  are typeset starting on the current page.
2899 \end_layout
2900
2901 \begin_layout Standard
2902 Generally, the master file is converted into a full LaTeX file before typesettin
2903 g, while the included files are converted to LaTeX files that do not have
2904  all the preamble information.
2905 \end_layout
2906
2907 \begin_layout Standard
2908
2909 \begin_inset Quotes eld
2910 \end_inset
2911
2912 verbatim
2913 \begin_inset Quotes erd
2914 \end_inset
2915
2916  included file allows you to include a file typeset exactly as it appears
2917  in the file, i.
2918 \begin_inset space \thinspace{}
2919 \end_inset
2920
2921 e.
2922 \begin_inset space \space{}
2923 \end_inset
2924
2925 in 
2926 \begin_inset Flex Code
2927 status collapsed
2928
2929 \begin_layout Plain Layout
2930 verbatim
2931 \end_layout
2932
2933 \end_inset
2934
2935  mode, with the characters set in a fixed-width typewriter font.
2936  Normally, spaces in this file are invisible, though two consecutive spaces
2937  are conserved, unlike LyX's normal treatment of spaces.
2938  However, setting the 
2939 \begin_inset Flex MenuItem
2940 status collapsed
2941
2942 \begin_layout Plain Layout
2943 Mark
2944 \begin_inset space ~
2945 \end_inset
2946
2947 spaces
2948 \begin_inset space ~
2949 \end_inset
2950
2951 in
2952 \begin_inset space ~
2953 \end_inset
2954
2955 output
2956 \end_layout
2957
2958 \end_inset
2959
2960  checkbox typesets a mark to unambiguously define the presence of a space.
2961  
2962 \end_layout
2963
2964 \begin_layout Subsection
2965 Cross-References Between Files
2966 \end_layout
2967
2968 \begin_layout Standard
2969 \begin_inset Box Shadowbox
2970 position "t"
2971 hor_pos "c"
2972 has_inner_box 1
2973 inner_pos "t"
2974 use_parbox 0
2975 use_makebox 0
2976 width "100col%"
2977 special "none"
2978 height "1in"
2979 height_special "totalheight"
2980 status open
2981
2982 \begin_layout Plain Layout
2983 This section is somewhat out of date.
2984  Need to describe default master documents and how children are opened when
2985  the master is.
2986  [[FIXME]]
2987 \end_layout
2988
2989 \end_inset
2990
2991
2992 \end_layout
2993
2994 \begin_layout Standard
2995 It is possible to set up cross-references between the different files.
2996  First, open all the files in question: let's call them A and B in a two
2997  file example, where B is included in A.
2998  Let's say you insert a label in A, then want to reference it in B.
2999  Open the cross-reference dialog whilst in document B, and you can select
3000  the 
3001 \begin_inset Quotes eld
3002 \end_inset
3003
3004 buffer
3005 \begin_inset Quotes erd
3006 \end_inset
3007
3008  to use.
3009 \end_layout
3010
3011 \begin_layout Subsection
3012 Bibliography Lists in all Subdocuments
3013 \end_layout
3014
3015 \begin_layout Standard
3016 \begin_inset Box Frameless
3017 position "t"
3018 hor_pos "c"
3019 has_inner_box 1
3020 inner_pos "t"
3021 use_parbox 0
3022 use_makebox 0
3023 width "100col%"
3024 special "none"
3025 height "1in"
3026 height_special "totalheight"
3027 status open
3028
3029 \begin_layout Plain Layout
3030 This section also needs updating.
3031  There is now material about this on the wiki, and it could be copied here.
3032 \end_layout
3033
3034 \end_inset
3035
3036
3037 \end_layout
3038
3039 \begin_layout Standard
3040 Copy the bibliography list with all entries to all subdocuments and transform
3041  them to a comment.
3042  This way LyX will find the 
3043 \begin_inset Flex Code
3044 status collapsed
3045
3046 \begin_layout Plain Layout
3047 .bib
3048 \end_layout
3049
3050 \end_inset
3051
3052 -files and you can easily insert references without making the bibliography
3053  list visible.
3054 \end_layout
3055
3056 \begin_layout Standard
3057 As the bibliography list is in a comment, LaTeX won't use it and the references
3058  will look like this: [?], instead of like this: [1].
3059  One solution is to use the LaTeX-package 
3060 \begin_inset Flex Code
3061 status collapsed
3062
3063 \begin_layout Plain Layout
3064 comment
3065 \end_layout
3066
3067 \end_inset
3068
3069  that will only include comments by processing the files separately.
3070  To do this, add in the LaTeX preamble of every subdocument the following:
3071 \end_layout
3072
3073 \begin_layout LyX-Code
3074
3075 \backslash
3076 usepackage{comment}
3077 \end_layout
3078
3079 \begin_layout LyX-Code
3080
3081 \backslash
3082 includecomment{comment}
3083 \end_layout
3084
3085 \begin_layout Standard
3086 See also 
3087 \begin_inset Flex URL
3088 status collapsed
3089
3090 \begin_layout Plain Layout
3091
3092 http://wiki.lyx.org/FAQ/Unsorted#toc31
3093 \end_layout
3094
3095 \end_inset
3096
3097 .
3098 \end_layout
3099
3100 \begin_layout Section
3101 LyX Archives
3102 \end_layout
3103
3104 \begin_layout Standard
3105 Users sometimes need to be able to 
3106 \begin_inset Quotes eld
3107 \end_inset
3108
3109 bundle
3110 \begin_inset Quotes erd
3111 \end_inset
3112
3113  a LyX file together with all the images (and other files) on which it depends,
3114  either for sending to a publisher or for sharing with a co-author.
3115  LyX 2.0 includes a Python script (
3116 \begin_inset Flex Code
3117 status collapsed
3118
3119 \begin_layout Plain Layout
3120 lyxpak.py
3121 \end_layout
3122
3123 \end_inset
3124
3125 ) that automates this process.
3126  To use it, you must have either the 
3127 \begin_inset Flex Code
3128 status collapsed
3129
3130 \begin_layout Plain Layout
3131 zipfile
3132 \end_layout
3133
3134 \end_inset
3135
3136  or 
3137 \begin_inset Flex Code
3138 status collapsed
3139
3140 \begin_layout Plain Layout
3141 tarfile
3142 \end_layout
3143
3144 \end_inset
3145
3146  python modules installed on your system.
3147  By default, the script prefers the 
3148 \begin_inset Flex Code
3149 status collapsed
3150
3151 \begin_layout Plain Layout
3152 gzip
3153 \end_layout
3154
3155 \end_inset
3156
3157 -compressed 
3158 \begin_inset Flex Code
3159 status collapsed
3160
3161 \begin_layout Plain Layout
3162 tar
3163 \end_layout
3164
3165 \end_inset
3166
3167  format on Unix-like systems and the 
3168 \begin_inset Flex Code
3169 status collapsed
3170
3171 \begin_layout Plain Layout
3172 zip
3173 \end_layout
3174
3175 \end_inset
3176
3177  format on Windows.
3178 \end_layout
3179
3180 \begin_layout Standard
3181 LyX's configuration process will set the script up to export a `LyX Archive',
3182  and this format will then be available under 
3183 \begin_inset Flex Code
3184 status collapsed
3185
3186 \begin_layout Plain Layout
3187 File\SpecialChar \menuseparator
3188 Export
3189 \end_layout
3190
3191 \end_inset
3192
3193 .
3194 \end_layout
3195
3196 \begin_layout Standard
3197 Independently of the platform, the generation of a particular archive format
3198  can be forced by adding either the 
3199 \begin_inset Flex Code
3200 status collapsed
3201
3202 \begin_layout Plain Layout
3203 -t
3204 \end_layout
3205
3206 \end_inset
3207
3208  (for the 
3209 \begin_inset Flex Code
3210 status collapsed
3211
3212 \begin_layout Plain Layout
3213 tar
3214 \end_layout
3215
3216 \end_inset
3217
3218  format) or 
3219 \begin_inset Flex Code
3220 status collapsed
3221
3222 \begin_layout Plain Layout
3223 -z
3224 \end_layout
3225
3226 \end_inset
3227
3228  (for the 
3229 \begin_inset Flex Code
3230 status collapsed
3231
3232 \begin_layout Plain Layout
3233 zip
3234 \end_layout
3235
3236 \end_inset
3237
3238  format) switch to the 
3239 \begin_inset Flex Code
3240 status collapsed
3241
3242 \begin_layout Plain Layout
3243 LyX\SpecialChar \menuseparator
3244 LyX Archive
3245 \end_layout
3246
3247 \end_inset
3248
3249  converter in 
3250 \begin_inset Flex Code
3251 status collapsed
3252
3253 \begin_layout Plain Layout
3254 Tools\SpecialChar \menuseparator
3255 Preferences\SpecialChar \menuseparator
3256 File Handling\SpecialChar \menuseparator
3257 Converters
3258 \end_layout
3259
3260 \end_inset
3261
3262 .
3263  (Make sure you add the switch after the script name, not before it.)
3264 \end_layout
3265
3266 \begin_layout Section
3267 Fancy Headers and Footers
3268 \end_layout
3269
3270 \begin_layout Standard
3271 The default page layout is rather plain; for an 
3272 \begin_inset Flex Code
3273 status collapsed
3274
3275 \begin_layout Plain Layout
3276 article
3277 \end_layout
3278
3279 \end_inset
3280
3281  document class, all you get is a centered page number at the bottom of
3282  the page.
3283  This document uses KOMA-script's book class, so it appears to be a bit
3284  fancier.
3285  But to really put on a show, you need to set the document page style to
3286  
3287 \begin_inset Quotes eld
3288 \end_inset
3289
3290 fancy
3291 \begin_inset Quotes erd
3292 \end_inset
3293
3294 , as mentioned in the 
3295 \emph on
3296 User Guide
3297 \emph default
3298 .
3299  This section describes the LaTeX code you need to insert in your LaTeX
3300  preamble in order to get the desired effects.
3301 \end_layout
3302
3303 \begin_layout Standard
3304 For more information on fancy headers, see the 
3305 \begin_inset Flex Code
3306 status collapsed
3307
3308 \begin_layout Plain Layout
3309 fancyhdr
3310 \end_layout
3311
3312 \end_inset
3313
3314  package documentation.
3315  (
3316 \begin_inset Flex URL
3317 status collapsed
3318
3319 \begin_layout Plain Layout
3320
3321 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3322 \end_layout
3323
3324 \end_inset
3325
3326 )
3327 \end_layout
3328
3329 \begin_layout Standard
3330 The page header is divided into three fields, not surprisingly labeled 
3331 \begin_inset Quotes eld
3332 \end_inset
3333
3334 left
3335 \begin_inset Quotes erd
3336 \end_inset
3337
3338
3339 \begin_inset Quotes eld
3340 \end_inset
3341
3342 center
3343 \begin_inset Quotes erd
3344 \end_inset
3345
3346 , and 
3347 \begin_inset Quotes eld
3348 \end_inset
3349
3350 right
3351 \begin_inset Quotes erd
3352 \end_inset
3353
3354 .
3355  The footer is also divided into these three fields.
3356  The LaTeX commands to set these fields in the simplest manner are 
3357 \begin_inset Flex Code
3358 status collapsed
3359
3360 \begin_layout Plain Layout
3361
3362 \backslash
3363 lhead
3364 \end_layout
3365
3366 \end_inset
3367
3368
3369 \begin_inset Flex Code
3370 status collapsed
3371
3372 \begin_layout Plain Layout
3373
3374 \backslash
3375 chead
3376 \end_layout
3377
3378 \end_inset
3379
3380
3381 \begin_inset Flex Code
3382 status collapsed
3383
3384 \begin_layout Plain Layout
3385
3386 \backslash
3387 rhead
3388 \end_layout
3389
3390 \end_inset
3391
3392
3393 \begin_inset Flex Code
3394 status collapsed
3395
3396 \begin_layout Plain Layout
3397
3398 \backslash
3399 lfoot
3400 \end_layout
3401
3402 \end_inset
3403
3404 , etc.
3405  Suppose you wish to put your name in the upper left hand corner of each
3406  page.
3407  Simply insert the following command in the preamble: 
3408 \end_layout
3409
3410 \begin_layout Standard
3411
3412 \family typewriter
3413
3414 \backslash
3415 lhead{John Q.
3416  DocWriter}
3417 \end_layout
3418
3419 \begin_layout Standard
3420 You will now see your name in the upper left.
3421  If a field has a default entry that you would like to get rid of (often
3422  the page number appears in the central footer) simply include a command
3423  with a blank argument, e.
3424 \begin_inset space \thinspace{}
3425 \end_inset
3426
3427 g.:
3428 \end_layout
3429
3430 \begin_layout Standard
3431
3432 \family typewriter
3433
3434 \backslash
3435 cfoot{}
3436 \end_layout
3437
3438 \begin_layout Standard
3439 Let's get really fancy: lets put the section number with the word 
3440 \begin_inset Quotes eld
3441 \end_inset
3442
3443 Section
3444 \begin_inset Quotes erd
3445 \end_inset
3446
3447  (e.
3448 \begin_inset space \thinspace{}
3449 \end_inset
3450
3451 g.
3452 \begin_inset space \space{}
3453 \end_inset
3454
3455 Section 3) in the upper left, the page number (e.
3456 \begin_inset space \thinspace{}
3457 \end_inset
3458
3459 g.
3460 \begin_inset space \space{}
3461 \end_inset
3462
3463 Page 4) in the upper right, your name in the lower left, and the date in
3464  the lower right.
3465  The following commands should now appear in the preamble:
3466 \end_layout
3467
3468 \begin_layout Standard
3469
3470 \family typewriter
3471
3472 \backslash
3473 lhead{Section 
3474 \backslash
3475 thesection}
3476 \end_layout
3477
3478 \begin_layout Standard
3479
3480 \family typewriter
3481
3482 \backslash
3483 chead{}
3484 \end_layout
3485
3486 \begin_layout Standard
3487
3488 \family typewriter
3489
3490 \backslash
3491 rhead{Page 
3492 \backslash
3493 thepage}
3494 \end_layout
3495
3496 \begin_layout Standard
3497
3498 \family typewriter
3499
3500 \backslash
3501 lfoot{John Q.
3502  DocWriter}
3503 \end_layout
3504
3505 \begin_layout Standard
3506
3507 \family typewriter
3508
3509 \backslash
3510 cfoot{}
3511 \end_layout
3512
3513 \begin_layout Standard
3514
3515 \family typewriter
3516
3517 \backslash
3518 rfoot{
3519 \backslash
3520 today}
3521 \end_layout
3522
3523 \begin_layout Standard
3524 The commands 
3525 \begin_inset Flex Code
3526 status collapsed
3527
3528 \begin_layout Plain Layout
3529
3530 \backslash
3531 thesection
3532 \end_layout
3533
3534 \end_inset
3535
3536  and 
3537 \begin_inset Flex Code
3538 status collapsed
3539
3540 \begin_layout Plain Layout
3541
3542 \backslash
3543 thepage
3544 \end_layout
3545
3546 \end_inset
3547
3548  access LaTeX's section and page counters, and so print out the current
3549  section and page numbers.
3550  
3551 \begin_inset Flex Code
3552 status collapsed
3553
3554 \begin_layout Plain Layout
3555
3556 \backslash
3557 today
3558 \end_layout
3559
3560 \end_inset
3561
3562  simply prints out today's date.
3563 \end_layout
3564
3565 \begin_layout Standard
3566 The thicknesses of the horizontal rules drawn beneath the header and above
3567  the footer can also be modified.
3568  If you don't want one of the rules, set its thickness to 0.
3569  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3570  Use commands
3571 \family typewriter
3572  
3573 \family default
3574 like 
3575 \begin_inset Flex Code
3576 status collapsed
3577
3578 \begin_layout Plain Layout
3579
3580 \backslash
3581 renewcommand{
3582 \backslash
3583 headrulewidth}{0.4pt}
3584 \end_layout
3585
3586 \end_inset
3587
3588  and 
3589 \begin_inset Flex Code
3590 status collapsed
3591
3592 \begin_layout Plain Layout
3593
3594 \backslash
3595 renewcommand{
3596 \backslash
3597 footrulewidth}{0.4pt}
3598 \end_layout
3599
3600 \end_inset
3601
3602  to set the thicknesses.
3603 \end_layout
3604
3605 \begin_layout Standard
3606 You can switch the header/footer settings on and off for individual pages
3607  using commands like 
3608 \begin_inset Flex Code
3609 status collapsed
3610
3611 \begin_layout Plain Layout
3612
3613 \backslash
3614 thispagestyle{empty}
3615 \end_layout
3616
3617 \end_inset
3618
3619
3620 \begin_inset Flex Code
3621 status collapsed
3622
3623 \begin_layout Plain Layout
3624
3625 \backslash
3626 thispagestyle{plain}
3627 \end_layout
3628
3629 \end_inset
3630
3631 , and 
3632 \begin_inset Flex Code
3633 status collapsed
3634
3635 \begin_layout Plain Layout
3636
3637 \backslash
3638 thispagestyle{fancy}
3639 \end_layout
3640
3641 \end_inset
3642
3643 .
3644  Simply insert them in the text on the page you want changed and mark them
3645  as TeX code.
3646  In fact, title pages are marked as plain by default, while following pages
3647  are marked fancy when using the global fancy setting.
3648 \end_layout
3649
3650 \begin_layout Standard
3651 As a final example, it is possible to include an image in the header or
3652  footer.
3653  Suppose you want to put a company logo in the upper lefthand corner.
3654  You might try something like
3655 \end_layout
3656
3657 \begin_layout Standard
3658
3659 \family typewriter
3660
3661 \backslash
3662 lhead{
3663 \backslash
3664 resizebox{1in}{!}{
3665 \backslash
3666 includegraphics{logo.eps}}}
3667 \end_layout
3668
3669 \begin_layout Standard
3670 \noindent
3671 (you may need to preface this with 
3672 \begin_inset Flex Code
3673 status collapsed
3674
3675 \begin_layout Plain Layout
3676 \noindent
3677
3678 \backslash
3679 usepackage{graphics}
3680 \end_layout
3681
3682 \end_inset
3683
3684  if you don't include graphics elsewhere in your document).
3685 \end_layout
3686
3687 \begin_layout Section
3688 Itemize Bullet Selection
3689 \begin_inset CommandInset label
3690 LatexCommand label
3691 name "sec:bullet"
3692
3693 \end_inset
3694
3695
3696 \end_layout
3697
3698 \begin_layout Standard
3699 by
3700 \noun on
3701  Allan Rae
3702 \end_layout
3703
3704 \begin_layout Subsection
3705 Introduction
3706 \end_layout
3707
3708 \begin_layout Standard
3709 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3710  Using this dialog you can easily specify what bullet shape to use at each
3711  level of an itemized list.
3712  These settings are document-wide so you won't be able to specify different
3713  sets of bullets for different paragraphs.
3714 \begin_inset Foot
3715 status collapsed
3716
3717 \begin_layout Plain Layout
3718 Well, actually you can but you'll have to do it by hand.
3719 \end_layout
3720
3721 \end_inset
3722
3723
3724 \end_layout
3725
3726 \begin_layout Subsection
3727 How it looks
3728 \end_layout
3729
3730 \begin_layout Standard
3731 Open the dialog by selecting the 
3732 \begin_inset Flex MenuItem
3733 status collapsed
3734
3735 \begin_layout Plain Layout
3736 Document\SpecialChar \menuseparator
3737 Settings
3738 \end_layout
3739
3740 \end_inset
3741
3742  menu item and then select the 
3743 \begin_inset Flex MenuItem
3744 status collapsed
3745
3746 \begin_layout Plain Layout
3747 Bullets
3748 \end_layout
3749
3750 \end_inset
3751
3752  tab.
3753 \end_layout
3754
3755 \begin_layout Standard
3756 The dialog provides you with a table of bullet shapes.
3757  A column of buttons on the left of the table provides access to the six
3758  different panels of bullet shapes.
3759  The row of buttons across the top is used to select which bullet depth
3760  you are changing.
3761  A text entry under the table shows the currently selected bullet shape's
3762  LaTeX equivalent and this can be edited if desired.
3763  If you do modify the text you will also need to specify any needed packages
3764  in the LaTeX preamble.
3765 \end_layout
3766
3767 \begin_layout Standard
3768 The six panels are divided up by the packages they require.
3769  The following table shows the mappings from button name to LaTeX package.
3770 \end_layout
3771
3772 \begin_layout Standard
3773 \align center
3774 \begin_inset Tabular
3775 <lyxtabular version="3" rows="7" columns="2">
3776 <features rotate="0" tabularvalignment="middle">
3777 <column alignment="center" valignment="top" width="0pt">
3778 <column alignment="center" valignment="top" width="0pt">
3779 <row>
3780 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3781 \begin_inset Text
3782
3783 \begin_layout Plain Layout
3784
3785 \family roman
3786 \series medium
3787 \shape up
3788 \size normal
3789 \emph off
3790 \bar no
3791 \noun off
3792 \color none
3793 Button
3794 \end_layout
3795
3796 \end_inset
3797 </cell>
3798 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3799 \begin_inset Text
3800
3801 \begin_layout Plain Layout
3802
3803 \family roman
3804 \series medium
3805 \shape up
3806 \size normal
3807 \emph off
3808 \bar no
3809 \noun off
3810 \color none
3811 Packages Required
3812 \end_layout
3813
3814 \end_inset
3815 </cell>
3816 </row>
3817 <row>
3818 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3819 \begin_inset Text
3820
3821 \begin_layout Plain Layout
3822
3823 \family sans
3824 \series medium
3825 \shape up
3826 \size normal
3827 \emph off
3828 \bar no
3829 \noun off
3830 \color none
3831 Standard
3832 \end_layout
3833
3834 \end_inset
3835 </cell>
3836 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3837 \begin_inset Text
3838
3839 \begin_layout Plain Layout
3840
3841 \series medium
3842 \shape up
3843 \size normal
3844 \emph off
3845 \bar no
3846 \noun off
3847 \color none
3848 base LaTeX
3849 \end_layout
3850
3851 \end_inset
3852 </cell>
3853 </row>
3854 <row>
3855 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3856 \begin_inset Text
3857
3858 \begin_layout Plain Layout
3859
3860 \family sans
3861 \series medium
3862 \shape up
3863 \size normal
3864 \emph off
3865 \bar no
3866 \noun off
3867 \color none
3868 Maths
3869 \end_layout
3870
3871 \end_inset
3872 </cell>
3873 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3874 \begin_inset Text
3875
3876 \begin_layout Plain Layout
3877
3878 \family typewriter
3879 \series medium
3880 \shape up
3881 \size normal
3882 \emph off
3883 \bar no
3884 \noun off
3885 \color none
3886 amssymb.sty
3887 \end_layout
3888
3889 \end_inset
3890 </cell>
3891 </row>
3892 <row>
3893 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3894 \begin_inset Text
3895
3896 \begin_layout Plain Layout
3897
3898 \family sans
3899 \series medium
3900 \shape up
3901 \size normal
3902 \emph off
3903 \bar no
3904 \noun off
3905 \color none
3906 Ding1
3907 \end_layout
3908
3909 \end_inset
3910 </cell>
3911 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3912 \begin_inset Text
3913
3914 \begin_layout Plain Layout
3915
3916 \family typewriter
3917 \series medium
3918 \shape up
3919 \size normal
3920 \emph off
3921 \bar no
3922 \noun off
3923 \color none
3924 pifont.sty
3925 \end_layout
3926
3927 \end_inset
3928 </cell>
3929 </row>
3930 <row>
3931 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3932 \begin_inset Text
3933
3934 \begin_layout Plain Layout
3935
3936 \family sans
3937 \series medium
3938 \shape up
3939 \size normal
3940 \emph off
3941 \bar no
3942 \noun off
3943 \color none
3944 Ding2
3945 \end_layout
3946
3947 \end_inset
3948 </cell>
3949 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3950 \begin_inset Text
3951
3952 \begin_layout Plain Layout
3953
3954 \family typewriter
3955 \series medium
3956 \shape up
3957 \size normal
3958 \emph off
3959 \bar no
3960 \noun off
3961 \color none
3962 pifont.sty
3963 \end_layout
3964
3965 \end_inset
3966 </cell>
3967 </row>
3968 <row>
3969 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3970 \begin_inset Text
3971
3972 \begin_layout Plain Layout
3973
3974 \family sans
3975 \series medium
3976 \shape up
3977 \size normal
3978 \emph off
3979 \bar no
3980 \noun off
3981 \color none
3982 Ding3
3983 \end_layout
3984
3985 \end_inset
3986 </cell>
3987 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3988 \begin_inset Text
3989
3990 \begin_layout Plain Layout
3991
3992 \family typewriter
3993 \series medium
3994 \shape up
3995 \size normal
3996 \emph off
3997 \bar no
3998 \noun off
3999 \color none
4000 pifont.sty
4001 \end_layout
4002
4003 \end_inset
4004 </cell>
4005 </row>
4006 <row>
4007 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4008 \begin_inset Text
4009
4010 \begin_layout Plain Layout
4011
4012 \family sans
4013 \series medium
4014 \shape up
4015 \size normal
4016 \emph off
4017 \bar no
4018 \noun off
4019 \color none
4020 Ding4
4021 \end_layout
4022
4023 \end_inset
4024 </cell>
4025 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4026 \begin_inset Text
4027
4028 \begin_layout Plain Layout
4029
4030 \family typewriter
4031 \series medium
4032 \shape up
4033 \size normal
4034 \emph off
4035 \bar no
4036 \noun off
4037 \color none
4038 pifont.sty
4039 \end_layout
4040
4041 \end_inset
4042 </cell>
4043 </row>
4044 </lyxtabular>
4045
4046 \end_inset
4047
4048
4049 \end_layout
4050
4051 \begin_layout Standard
4052 LyX doesn't stop you using bullets from packages you don't have.
4053  If you get errors from LaTeX when you try to view or print the file, then
4054  it is likely you are missing a package.
4055 \begin_inset Foot
4056 status collapsed
4057
4058 \begin_layout Plain Layout
4059 LyX doesn't restrict your use since you may be editing locally and exporting
4060  elsewhere.
4061 \end_layout
4062
4063 \end_inset
4064
4065
4066 \end_layout
4067
4068 \begin_layout Subsection
4069 How to use it
4070 \end_layout
4071
4072 \begin_layout Standard
4073 Select which bullet depth you want to change then select the bullet shape
4074  and size.
4075  Any changes will not be visible in LyX, but are visible when viewing the
4076  document.
4077 \end_layout
4078
4079 \begin_layout Standard
4080 You can reset a bullet shape to the default simply by clicking your right
4081  mouse button on the appropriate bullet depth button.
4082 \begin_inset Foot
4083 status collapsed
4084
4085 \begin_layout Plain Layout
4086 If you 
4087 \emph on
4088 really
4089 \emph default
4090  want to have multiple sets of paragraphs with different sets of bullets
4091  in each, then you're going to have to get your hands dirty with TeX code.
4092  The bullet selection dialog can help though because it provides you with
4093  the LaTeX code for a wide range of bullet shapes.
4094  To make your own custom paragraphs you have the following options:
4095 \end_layout
4096
4097 \begin_layout Plain Layout
4098 \begin_inset ERT
4099 status open
4100
4101 \begin_layout Plain Layout
4102
4103
4104 \backslash
4105 let
4106 \backslash
4107 savelabelitemi=
4108 \backslash
4109 labelitemi
4110 \end_layout
4111
4112 \end_inset
4113
4114
4115 \end_layout
4116
4117 \begin_layout Plain Layout
4118 \begin_inset ERT
4119 status open
4120
4121 \begin_layout Plain Layout
4122
4123
4124 \backslash
4125 renewcommand
4126 \backslash
4127 labelitemi[0]{
4128 \backslash
4129 small
4130 \backslash
4131 (
4132 \backslash
4133 sharp
4134 \backslash
4135 )}
4136 \end_layout
4137
4138 \end_inset
4139
4140
4141 \end_layout
4142
4143 \begin_layout Itemize
4144 Use the LaTeX command 
4145 \begin_inset Flex Code
4146 status collapsed
4147
4148 \begin_layout Plain Layout
4149
4150 \backslash
4151 renewcommand{}{}
4152 \end_layout
4153
4154 \end_inset
4155
4156  to specify a new bullet shape for a given depth.
4157  You'll also need to save the current bullet shape so you can restore it
4158  again afterwards.
4159  In this itemized list the following LaTeX code was used to change the bullet
4160  used for the first depth.
4161 \end_layout
4162
4163 \begin_deeper
4164 \begin_layout LyX-Code
4165
4166 \backslash
4167 let
4168 \backslash
4169 savelabelitemi=
4170 \backslash
4171 labelitemi 
4172 \end_layout
4173
4174 \begin_layout LyX-Code
4175
4176 \backslash
4177 renewcommand
4178 \backslash
4179 labelitemi[0]{
4180 \backslash
4181 small
4182 \backslash
4183 (
4184 \backslash
4185 sharp
4186 \backslash
4187 )}
4188 \end_layout
4189
4190 \end_deeper
4191 \begin_layout Itemize
4192 Note that the itemize depth is specified in Roman numerals as part of the
4193  
4194 \family typewriter
4195
4196 \backslash
4197 labelitem
4198 \family default
4199  command.
4200 \end_layout
4201
4202 \begin_layout Itemize
4203 \begin_inset ERT
4204 status open
4205
4206 \begin_layout Plain Layout
4207
4208 [
4209 \backslash
4210 (
4211 \backslash
4212 star
4213 \backslash
4214 )]
4215 \end_layout
4216
4217 \end_inset
4218
4219  Specify each individual entry by starting each item with the bullet shape
4220  enclosed in square brackets and set as 
4221 \begin_inset Flex MenuItem
4222 status collapsed
4223
4224 \begin_layout Plain Layout
4225 TeX Code
4226 \end_layout
4227
4228 \end_inset
4229
4230 .
4231  For example, this item was started with 
4232 \begin_inset Flex Code
4233 status collapsed
4234
4235 \begin_layout Plain Layout
4236 [
4237 \backslash
4238 (
4239 \backslash
4240 star
4241 \backslash
4242 )]
4243 \end_layout
4244
4245 \end_inset
4246
4247 .
4248 \end_layout
4249
4250 \begin_layout Plain Layout
4251 \begin_inset ERT
4252 status open
4253
4254 \begin_layout Plain Layout
4255
4256
4257 \backslash
4258 renewcommand
4259 \backslash
4260 labelitemi[0]{
4261 \backslash
4262 savelabelitemi}
4263 \end_layout
4264
4265 \end_inset
4266
4267
4268 \end_layout
4269
4270 \begin_layout Plain Layout
4271 You'll also need to revert the labelitem back to its previous setting for
4272  the global bullet shape settings to remain in effect.
4273  The way used here was:
4274 \end_layout
4275
4276 \begin_layout LyX-Code
4277
4278 \backslash
4279 renewcommand
4280 \backslash
4281 labelitemi[0]{
4282 \backslash
4283 savelabelitemi}
4284 \end_layout
4285
4286 \end_inset
4287
4288
4289 \end_layout
4290
4291 \begin_layout Chapter
4292 LyX and the World Wide Web
4293 \end_layout
4294
4295 \begin_layout Standard
4296 LyX has long supported the export of documents to various web-friendly formats,
4297  such as HTML.
4298  Before verson 2.0, however, HTML export was always accomplished by the use
4299  of external converters.
4300 \begin_inset Foot
4301 status collapsed
4302
4303 \begin_layout Plain Layout
4304 For details on the use of external converters with LyX, see the 
4305 \emph on
4306 Converters
4307 \emph default
4308  section of the Customization manual.
4309 \end_layout
4310
4311 \end_inset
4312
4313  These fall into two large groups: there are converters that use LaTeX as
4314  an intermediate format, such as 
4315 \begin_inset Flex Code
4316 status collapsed
4317
4318 \begin_layout Plain Layout
4319 htlatex
4320 \end_layout
4321
4322 \end_inset
4323
4324
4325 \begin_inset Flex Code
4326 status collapsed
4327
4328 \begin_layout Plain Layout
4329 html2latex
4330 \end_layout
4331
4332 \end_inset
4333
4334 , and 
4335 \begin_inset Flex Code
4336 status collapsed
4337
4338 \begin_layout Plain Layout
4339 plastex
4340 \end_layout
4341
4342 \end_inset
4343
4344 , relying upon LyX to produce the LaTeX; and there is a converter that works
4345  directly on LyX files, 
4346 \begin_inset Flex Code
4347 status collapsed
4348
4349 \begin_layout Plain Layout
4350 eLyXer
4351 \end_layout
4352
4353 \end_inset
4354
4355 .
4356  All of these have different advantages and disadvantages.
4357  
4358 \end_layout
4359
4360 \begin_layout Standard
4361 The LaTeX-based converters have the advantage that, in principle, they know
4362  everything about the exported document that LaTeX does.
4363  Such converters do not care, for example, if a certain block of code was
4364  produced by LyX or was Evil Red Text.
4365  These converters know about 
4366 \begin_inset Flex Code
4367 status collapsed
4368
4369 \begin_layout Plain Layout
4370 aux
4371 \end_layout
4372
4373 \end_inset
4374
4375  files, counters, and references, and can often make use of the 
4376 \begin_inset Flex Code
4377 status collapsed
4378
4379 \begin_layout Plain Layout
4380 bbl
4381 \end_layout
4382
4383 \end_inset
4384
4385  files generated by BibTeX.
4386  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4387  said that only TeX itself understands TeX---and LaTeX-based converters
4388  will often choke on what seem to be quite simple constructs; complex ones
4389  can throw them completely, and as of this writing, for example, the 
4390 \emph on
4391 Embedded Objects
4392 \emph default
4393  manual will not export with 
4394 \begin_inset Flex Code
4395 status collapsed
4396
4397 \begin_layout Plain Layout
4398 htlatex
4399 \end_layout
4400
4401 \end_inset
4402
4403 , though the others will.
4404  The other issue concerns how math is handled.
4405  These converters typically convert the formulae into little pictures that
4406  are then linked from the HTML document.
4407  Since these are actually generated by LaTeX, they are accurate.
4408  But they do not scale well, and just getting them to look as if they are
4409  actually meant to be in your document---so that the font sizes seem to
4410  be roughly the same---can be a challenge.
4411 \end_layout
4412
4413 \begin_layout Standard
4414 Alex Fernandez's 
4415 \begin_inset Flex Code
4416 status collapsed
4417
4418 \begin_layout Plain Layout
4419 eLyXer
4420 \end_layout
4421
4422 \end_inset
4423
4424  (
4425 \begin_inset CommandInset href
4426 LatexCommand href
4427 name "http://elyxer.nongnu.org/"
4428 target "http://elyxer.nongnu.org/"
4429
4430 \end_inset
4431
4432 ) solves some of these problems.
4433  In particular, the formulae it produces scale perfectly, since it renders
4434  math using a combination of HTML and CSS rather than converting the formulae
4435  to images.
4436  But even moderately complex formula are rendered less well than with 
4437 \begin_inset Flex Code
4438 status collapsed
4439
4440 \begin_layout Plain Layout
4441 htlatex
4442 \end_layout
4443
4444 \end_inset
4445
4446 ; this reflects the limitations of HTML.
4447 \begin_inset Foot
4448 status collapsed
4449
4450 \begin_layout Plain Layout
4451 That said, 
4452 \begin_inset Flex Code
4453 status collapsed
4454
4455 \begin_layout Plain Layout
4456 eLyXer
4457 \end_layout
4458
4459 \end_inset
4460
4461  can also use jsMath and MathJax for equations, but this setting is only
4462  available globally and requires one to have access to a server that runs
4463  the backend.
4464 \end_layout
4465
4466 \end_inset
4467
4468  More importantly (as of version 1.1.1, at least), 
4469 \begin_inset Flex Code
4470 status collapsed
4471
4472 \begin_layout Plain Layout
4473 eLyXer
4474 \end_layout
4475
4476 \end_inset
4477
4478  has limited support for math macros and no support for user-defined paragraph
4479  or character styles.
4480  These limitations make 
4481 \begin_inset Flex Code
4482 status collapsed
4483
4484 \begin_layout Plain Layout
4485 eLyXer
4486 \end_layout
4487
4488 \end_inset
4489
4490  unsuitable for many of the documents LyX users produce.
4491  In principle, of course, these problems could be solved, but the LyX developers
4492  have decided to follow a different path and have made LyX itself capable
4493  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4494  plaintext.
4495 \end_layout
4496
4497 \begin_layout Standard
4498 As of this writing, XHTML output remains under development and should probably
4499  be regarded as 
4500 \begin_inset Quotes eld
4501 \end_inset
4502
4503 experimental
4504 \begin_inset Quotes erd
4505 \end_inset
4506
4507 .
4508 \begin_inset Foot
4509 status collapsed
4510
4511 \begin_layout Plain Layout
4512 The file 
4513 \begin_inset Flex Code
4514 status collapsed
4515
4516 \begin_layout Plain Layout
4517 development/HTML.notes
4518 \end_layout
4519
4520 \end_inset
4521
4522 , which can be found in the LyX source tree or 
4523 \begin_inset CommandInset href
4524 LatexCommand href
4525 name "accessed online"
4526 target "http://www.lyx.org/trac/browser/lyxgit/development/HTML/HTML.notes?rev=master"
4527
4528 \end_inset
4529
4530 , usually contains up-to-date information about the state of XHTML output.
4531  See also the list of XHTML bugs on 
4532 \begin_inset CommandInset href
4533 LatexCommand href
4534 name "the bug tracker"
4535 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4536
4537 \end_inset
4538
4539 .
4540 \end_layout
4541
4542 \end_inset
4543
4544  Still, the developers have chosen this approach because it has several
4545  potential advantages over the other two.
4546 \end_layout
4547
4548 \begin_layout Standard
4549 These advantages are primarily due to the fact that the XHTML output routines,
4550  since they are part of LyX, know everything LyX knows about the document
4551  being exported.
4552 \begin_inset Foot
4553 status collapsed
4554
4555 \begin_layout Plain Layout
4556 Another advantage is that, since these routines are internal to LyX, they
4557  are immune to changes in LyX's file format, or to changes in the semantics
4558  of existing insets.
4559 \end_layout
4560
4561 \end_inset
4562
4563  So they know about the table of contents (as displayed in the outline),
4564  about the counters associated with different paragraph styles, and about
4565  user-defined styles.
4566  The XHTML output routines know what LyX knows about internationalization,
4567  too, so they will output 
4568 \begin_inset Quotes eld
4569 \end_inset
4570
4571 Chapter 1
4572 \begin_inset Quotes erd
4573 \end_inset
4574
4575  or 
4576 \begin_inset Quotes eld
4577 \end_inset
4578
4579
4580 \lang ngerman
4581 Kapitel
4582 \lang english
4583  1
4584 \begin_inset Quotes erd
4585 \end_inset
4586
4587 , depending upon the language in effect at the time.
4588  
4589 \end_layout
4590
4591 \begin_layout Standard
4592 Quite generally, the output routines know what LyX knows about document
4593  layout, that is, about how the document is to be rendered on screen.
4594  We use this information when we output the document as XHTML.
4595  In particular, LyX 
4596 \emph on
4597 automatically
4598 \emph default
4599  generates CSS style information corresponding to the layout information
4600  it uses to render the document on screen: if section headings are supposed
4601  to be sans-serif and bold as seen in LyX, then (by default) they will be
4602  sans-serif and bold when viewed in a web browser, too.
4603  And this is true not just for pre-defined styles, like Section, but for
4604  any style, including user-defined styles.
4605  Indeed, the XHTML output routines make no distinction between user-defined
4606  paragraph and character styles and LyX's own pre-defined styles: in each
4607  case, everything LyX knows about the styles is contained in the layout
4608  files.
4609  And much the same is true as regards pre-defined textual insets, such as
4610  footnotes, and various custom insets.
4611  
4612 \end_layout
4613
4614 \begin_layout Standard
4615 The result is that XHTML output can be customized and extended in exactly
4616  the same way LaTeX output can be customized and extended: through layout
4617  files and modules.
4618  See chapter five of the 
4619 \emph on
4620 Customization 
4621 \emph default
4622 manual for the details.
4623 \end_layout
4624
4625 \begin_layout Standard
4626 The remainder of this chapter contains more detailed information on XHTML
4627  output, its limitations, and ways to work around those limitations.
4628 \end_layout
4629
4630 \begin_layout Section
4631 Math Output in XHTML
4632 \end_layout
4633
4634 \begin_layout Standard
4635 LyX offers four choices for how math is rendered.
4636  These have various advantages and disadvantages:
4637 \end_layout
4638
4639 \begin_layout Itemize
4640 MathML
4641 \begin_inset Newline newline
4642 \end_inset
4643
4644 MathML is a dialect of XML designed specifically for mathematics on the
4645  web, and it typically renders very well in browsers that support it.
4646  The disadvantage is that not all browsers support MathML, and support is
4647  not complete even in the Gecko-based browsers, such as Firefox.
4648 \begin_inset Newline newline
4649 \end_inset
4650
4651 If LyX is unable to render a formula as MathML---for example, if the formula
4652  uses the 
4653 \begin_inset Flex Code
4654 status collapsed
4655
4656 \begin_layout Plain Layout
4657 xymatrix
4658 \end_layout
4659
4660 \end_inset
4661
4662  package or ERT---then it will instead output the formula as an image.
4663  
4664 \end_layout
4665
4666 \begin_layout Itemize
4667 HTML
4668 \begin_inset Newline newline
4669 \end_inset
4670
4671 As mentioned above, 
4672 \begin_inset Flex Code
4673 status collapsed
4674
4675 \begin_layout Plain Layout
4676 elyxer
4677 \end_layout
4678
4679 \end_inset
4680
4681  outputs math as HTML, styled by CSS.
4682 \begin_inset Foot
4683 status collapsed
4684
4685 \begin_layout Plain Layout
4686 LyX has borrowed some of the CSS for its HTML output from 
4687 \begin_inset Flex Code
4688 status collapsed
4689
4690 \begin_layout Plain Layout
4691 elyxer
4692 \end_layout
4693
4694 \end_inset
4695
4696 .
4697 \end_layout
4698
4699 \end_inset
4700
4701  For simple formulae, this can work quite well, though with more complicated
4702  formulae it tends to break down.
4703  Still, this method has the advantage that it is very widely supported and
4704  so it may be appropriate for documents that contain only a little, fairly
4705  simple math.
4706 \begin_inset Newline newline
4707 \end_inset
4708
4709 If Lyx is unable to render a formula as HTML---for example, if the formula
4710  uses the 
4711 \begin_inset Flex Code
4712 status collapsed
4713
4714 \begin_layout Plain Layout
4715 xymatrix
4716 \end_layout
4717
4718 \end_inset
4719
4720  package or ERT---then it will instead output the formula as an image.
4721  
4722 \end_layout
4723
4724 \begin_layout Itemize
4725 Images
4726 \begin_inset Newline newline
4727 \end_inset
4728
4729 Like 
4730 \begin_inset Flex Code
4731 status collapsed
4732
4733 \begin_layout Plain Layout
4734 htlatex
4735 \end_layout
4736
4737 \end_inset
4738
4739 , LyX will output formulae as images, the very same images, in fact, that
4740  are used for instant preview.
4741 \begin_inset Foot
4742 status collapsed
4743
4744 \begin_layout Plain Layout
4745 Instant preview does 
4746 \emph on
4747 not 
4748 \emph default
4749 have to be on for images to be output, however.
4750 \end_layout
4751
4752 \end_inset
4753
4754  The advantage to this method is that the images are simply generated by
4755  LaTeX, so they are very accurate.
4756  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4757  so they do not scale terribly well, and one cannot copy them, etc.
4758  (As of this writing, there are also problems about equation numbering.
4759  See 
4760 \begin_inset CommandInset href
4761 LatexCommand href
4762 name "bug 6894"
4763 target "http://www.lyx.org/trac/ticket/6894"
4764
4765 \end_inset
4766
4767 .)
4768 \begin_inset Newline newline
4769 \end_inset
4770
4771 The size of the images can be controlled by setting the 
4772 \begin_inset Quotes eld
4773 \end_inset
4774
4775 Math Images Scaling
4776 \begin_inset Quotes erd
4777 \end_inset
4778
4779  parameter under 
4780 \begin_inset Flex MenuItem
4781 status collapsed
4782
4783 \begin_layout Plain Layout
4784 Document\SpecialChar \menuseparator
4785 Settings\SpecialChar \menuseparator
4786 Output
4787 \end_layout
4788
4789 \end_inset
4790
4791 .
4792 \begin_inset Foot
4793 status collapsed
4794
4795 \begin_layout Plain Layout
4796 For those who want to know, this controls the resolution of the image in
4797  dots per inch and is based upon a default of 75 dpi.
4798 \end_layout
4799
4800 \end_inset
4801
4802
4803 \begin_inset Newline newline
4804 \end_inset
4805
4806 If LyX for some reason fails to create an image for a formula (e.g., if a
4807  required LaTeX package is not installed), then it will fall back to outputing
4808  the raw LaTeX.
4809 \end_layout
4810
4811 \begin_layout Itemize
4812 LaTeX
4813 \begin_inset Newline newline
4814 \end_inset
4815
4816 Finally, LyX will happily output math as LaTeX.
4817  As well as being the output of last resort, this method can be used with
4818  such tools as 
4819 \begin_inset CommandInset href
4820 LatexCommand href
4821 name "jsMath"
4822 target "http://www.math.union.edu/~dpvc/jsMath/"
4823
4824 \end_inset
4825
4826 , which uses JavaScript to render LaTeX embedded in HTML documents.
4827  LyX wraps the LaTeX in either a 
4828 \begin_inset Flex Code
4829 status collapsed
4830
4831 \begin_layout Plain Layout
4832 span
4833 \end_layout
4834
4835 \end_inset
4836
4837  (for inline formulas) or 
4838 \begin_inset Flex Code
4839 status collapsed
4840
4841 \begin_layout Plain Layout
4842 div
4843 \end_layout
4844
4845 \end_inset
4846
4847  (for displayed formulas) with 
4848 \begin_inset Flex Code
4849 status collapsed
4850
4851 \begin_layout Plain Layout
4852 class='math'
4853 \end_layout
4854
4855 \end_inset
4856
4857 , as is required for jsMath.
4858 \end_layout
4859
4860 \begin_layout Standard
4861 One of these output methods must be selected under 
4862 \begin_inset Flex MenuItem
4863 status collapsed
4864
4865 \begin_layout Plain Layout
4866 Document\SpecialChar \menuseparator
4867 Settings\SpecialChar \menuseparator
4868 Output
4869 \end_layout
4870
4871 \end_inset
4872
4873 .
4874  By default, LyX outputs MathML.
4875  This is a document-wide setting, therefore.
4876 \end_layout
4877
4878 \begin_layout Standard
4879 Eventually, LyX will offer the user the option to select an alternate output
4880  method for a particular inset, say, one that isn't being rendered very
4881  well by MathML.
4882 \begin_inset Foot
4883 status collapsed
4884
4885 \begin_layout Plain Layout
4886 That said, since LyX falls back to images if the inset contains ERT, then
4887  one can force output as an image by putting some harmless ERT into the
4888  math, for example: 
4889 \begin_inset Formula $a=b\relax$
4890 \end_inset
4891
4892 .
4893 \end_layout
4894
4895 \end_inset
4896
4897
4898 \end_layout
4899
4900 \begin_layout Section
4901 Bibliography and Citations
4902 \end_layout
4903
4904 \begin_layout Standard
4905 XHTML output fully supports bibliographies and citations.
4906  
4907 \end_layout
4908
4909 \begin_layout Standard
4910 Citation labels are generated by the same machinery that generates LyX's
4911  on-screen labels, so the labels will look in the output much as they do
4912  in LyX, though better.
4913  If you are using numerical citations, then LyX will output numerical labels,
4914  such as [1] or [17], rather than simply showing the citation key in square
4915  brackets, as it does on-screen.
4916  If you are using author-year citations, then LyX will add lowercase letters
4917  to the years, just as BibTeX does, if it finds more than one citation for
4918  a given author-year combination.
4919  The labels will be printed with the bibliography entries.
4920  Note that there is, at present, no way to customize the appearance of the
4921  labels, for example, to choose between square brackets and parentheses.
4922 \end_layout
4923
4924 \begin_layout Standard
4925 Bibliography output is handled by the same machinery that handles the presentati
4926 on of reference information in the citation dialog, so you will see in the
4927  XHTML output pretty much what you would see if you were to look at a given
4928  entry in the citation dialog.
4929  The formatting can be customized in your layout file or, preferably, in
4930  a module.
4931  See the 
4932 \emph on
4933 Customization
4934 \emph default
4935  manual for the details.
4936 \end_layout
4937
4938 \begin_layout Standard
4939 The main defect at present is that cross-referenced information is printed
4940  with every entry with which it is associated.
4941  So you can see things like this:
4942 \end_layout
4943
4944 \begin_layout Quote
4945 Jason Stanley, 
4946 \begin_inset Quotes eld
4947 \end_inset
4948
4949 Context and Logical Form
4950 \begin_inset Quotes erd
4951 \end_inset
4952
4953 , in 
4954 \emph on
4955 Language in Context: Selected Essays
4956 \emph default
4957  (Oxford: Oxford University Press, 2007), pp.
4958  30--68.
4959 \end_layout
4960
4961 \begin_layout Quote
4962 Jason Stanley, 
4963 \begin_inset Quotes eld
4964 \end_inset
4965
4966 Semantics in Context
4967 \begin_inset Quotes erd
4968 \end_inset
4969
4970 , in 
4971 \emph on
4972 Language in Context: Selected Essays
4973 \emph default
4974  (Oxford: Oxford University Press, 2007), pp.
4975  201--30.
4976 \end_layout
4977
4978 \begin_layout Standard
4979 This should be fixed before long.
4980 \end_layout
4981
4982 \begin_layout Standard
4983 There is no support at present for sectioned bibliographies.
4984  If you have multiple bibliographies, then LyX will print the same bibliography
4985  over and over.
4986 \end_layout
4987
4988 \begin_layout Section
4989 Indexes
4990 \end_layout
4991
4992 \begin_layout Standard
4993 LyX will happily export indexes as XHTML, but with certain limitations at
4994  the moment.
4995 \end_layout
4996
4997 \begin_layout Standard
4998 Index export will be most reliable when you do not attempt to use the fancy
4999  constructs that are described in the section on indexes in the 
5000 \emph on
5001 User's Guide
5002 \emph default
5003 .
5004 \begin_inset Foot
5005 status collapsed
5006
5007 \begin_layout Plain Layout
5008 The main issue here is that LyX itself does not really handle these.
5009  It just lets you enter what you would have to enter in raw LaTeX.
5010 \end_layout
5011
5012 \end_inset
5013
5014  We'll describe how they are handled using the subsection headings from
5015  that section.
5016 \end_layout
5017
5018 \begin_layout Itemize
5019 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5020  these, but the entries must be separated by 
5021 \begin_inset Quotes eld
5022 \end_inset
5023
5024  ! 
5025 \begin_inset Quotes erd
5026 \end_inset
5027
5028 , that is, there must be spaces around the exclamation point.
5029  This is because it is otherwise too difficult to check for escaped exclamation
5030  points, ones in math, and so forth.
5031 \end_layout
5032
5033 \begin_layout Itemize
5034 Page Ranges: There is no support at all for page ranges, since these make
5035  no sense with XHMTL.
5036  Instead, you will just get two index entries, one at either end.
5037 \end_layout
5038
5039 \begin_layout Itemize
5040 Cross-referencing: There is no support for cross-referencing.
5041  If LyX finds an entry containing the 
5042 \begin_inset Quotes eld
5043 \end_inset
5044
5045 |see\SpecialChar \ldots{}
5046
5047 \begin_inset Quotes erd
5048 \end_inset
5049
5050  construct, it is just dropped, and the rest is treated as an ordinary index
5051  entry.
5052 \end_layout
5053
5054 \begin_layout Itemize
5055 Index Entry Order: LyX does support attempts to fix the sorting order.
5056  It will take what is before the first `@' it finds and use that for sorting,
5057  taking what follows the first `@' to be the actual entry.
5058  At present, LyX does not check for escaped `@', so do not try to index
5059  email addresses.
5060 \end_layout
5061
5062 \begin_layout Itemize
5063 Index Entry Layout: You can format entries by using the text style dialog,
5064  or by using any other method available within LyX itself.
5065  There is no support for constructs like: 
5066 \begin_inset Quotes eld
5067 \end_inset
5068
5069 entry|textbf
5070 \begin_inset Quotes erd
5071 \end_inset
5072
5073 .
5074  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5075  and everything that follows it.
5076 \end_layout
5077
5078 \begin_layout Itemize
5079 Multiple Indexes: There is no support for multiple indexes.
5080  Rather, all index entries will be printed as one large index.
5081  To avoid our printing several versions of the index, we print only the
5082  main index, so make sure you have one.
5083 \end_layout
5084
5085 \begin_layout Section
5086 Nomenclature and Glossary
5087 \end_layout
5088
5089 \begin_layout Standard
5090 There is at present no support for glossaries.
5091  Adding it would be fairly trivial, and welcome.
5092 \end_layout
5093
5094 \begin_layout Chapter
5095 The LyX Server
5096 \end_layout
5097
5098 \begin_layout Section
5099 Introduction
5100 \end_layout
5101
5102 \begin_layout Standard
5103 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5104  and retrieve information about the LyX internal state.
5105  This is only intended for advanced users, but they should find it useful.
5106  It is by writing to the LyX server, for example, that bibliography managers,
5107  such as JabRef, are able to 
5108 \begin_inset Quotes eld
5109 \end_inset
5110
5111 push
5112 \begin_inset Quotes erd
5113 \end_inset
5114
5115  citations to LyX.
5116 \end_layout
5117
5118 \begin_layout Section
5119 Starting the LyX Server
5120 \end_layout
5121
5122 \begin_layout Standard
5123 The LyX server works through the use of a pair of named pipes.
5124  These are usually located in 
5125 \begin_inset Flex Code
5126 status collapsed
5127
5128 \begin_layout Plain Layout
5129 UserDir
5130 \end_layout
5131
5132 \end_inset
5133
5134 , (except on Windows, where 
5135 \emph on
5136 local
5137 \emph default
5138  named pipes are special objects located in 
5139 \begin_inset Flex Code
5140 status collapsed
5141
5142 \begin_layout Plain Layout
5143
5144 \backslash
5145
5146 \backslash
5147 .
5148 \backslash
5149 pipe
5150 \end_layout
5151
5152 \end_inset
5153
5154 ) and have the names 
5155 \begin_inset Quotes eld
5156 \end_inset
5157
5158
5159 \begin_inset Flex Code
5160 status collapsed
5161
5162 \begin_layout Plain Layout
5163 lyxpipe.in
5164 \end_layout
5165
5166 \end_inset
5167
5168
5169 \begin_inset Quotes erd
5170 \end_inset
5171
5172  and 
5173 \begin_inset Quotes eld
5174 \end_inset
5175
5176
5177 \begin_inset Flex Code
5178 status collapsed
5179
5180 \begin_layout Plain Layout
5181 lyxpipe.out
5182 \end_layout
5183
5184 \end_inset
5185
5186
5187 \begin_inset Quotes erd
5188 \end_inset
5189
5190 .
5191  External programs write into 
5192 \begin_inset Flex Code
5193 status collapsed
5194
5195 \begin_layout Plain Layout
5196 lyxpipe.in
5197 \end_layout
5198
5199 \end_inset
5200
5201  and read back data from 
5202 \begin_inset Flex Code
5203 status collapsed
5204
5205 \begin_layout Plain Layout
5206 lyxpipe.out
5207 \end_layout
5208
5209 \end_inset
5210
5211 .
5212  The stem of the pipe names can be defined in the 
5213 \begin_inset Flex MenuItem
5214 status collapsed
5215
5216 \begin_layout Plain Layout
5217 Tools\SpecialChar \menuseparator
5218 Preferences
5219 \end_layout
5220
5221 \end_inset
5222
5223  dialog, for example 
5224 \begin_inset Flex Code
5225 status collapsed
5226
5227 \begin_layout Plain Layout
5228 "/home/myhome/lyxpipe"
5229 \end_layout
5230
5231 \end_inset
5232
5233 , or 
5234 \begin_inset Flex Code
5235 status collapsed
5236
5237 \begin_layout Plain Layout
5238 "
5239 \backslash
5240
5241 \backslash
5242 .
5243 \backslash
5244 pipe
5245 \backslash
5246 lyxpipe"
5247 \end_layout
5248
5249 \end_inset
5250
5251  on Windows (but any working path can be used).
5252  You 
5253 \emph on
5254 must
5255 \emph default
5256  configure this manually in order for the server to start.
5257 \end_layout
5258
5259 \begin_layout Standard
5260 LyX will add the '
5261 \begin_inset Flex Code
5262 status collapsed
5263
5264 \begin_layout Plain Layout
5265 .in
5266 \end_layout
5267
5268 \end_inset
5269
5270 ' and '
5271 \begin_inset Flex Code
5272 status collapsed
5273
5274 \begin_layout Plain Layout
5275 .out
5276 \end_layout
5277
5278 \end_inset
5279
5280 ' to create the pipes.
5281  If one of the pipes already exists, LyX will assume that another LyX process
5282  is already running and will not start the server.
5283  On POSIX (Unix like) systems, if for some other reason, an unused 
5284 \begin_inset Quotes eld
5285 \end_inset
5286
5287 stale
5288 \begin_inset Quotes erd
5289 \end_inset
5290
5291  pipe is left in existence when LyX closes, then LyX will try to delete
5292  it.
5293  If this fails for some reason, you will need to delete the pipes manually
5294  and then restart LyX.
5295  On Windows, pipes are deleted by the OS on program termination or crash,
5296  so 
5297 \begin_inset Quotes eld
5298 \end_inset
5299
5300 stale
5301 \begin_inset Quotes erd
5302 \end_inset
5303
5304  pipes should not be possible.
5305 \end_layout
5306
5307 \begin_layout Standard
5308 To have several LyX processes with servers at the same time, you have to
5309  use different configurations, perhaps by using separate user directories,
5310  each with its own 
5311 \begin_inset Flex Code
5312 status collapsed
5313
5314 \begin_layout Plain Layout
5315 preferences
5316 \end_layout
5317
5318 \end_inset
5319
5320  file, for each process.
5321 \end_layout
5322
5323 \begin_layout Standard
5324 If you are developing a client program, you might find it useful to enable
5325  debugging information from the LyX server.
5326  Do this by starting LyX as 
5327 \begin_inset Flex Code
5328 status collapsed
5329
5330 \begin_layout Plain Layout
5331 lyx -dbg lyxserver
5332 \end_layout
5333
5334 \end_inset
5335
5336 .
5337 \end_layout
5338
5339 \begin_layout Standard
5340 You can find a complete example client written in C in the source distribution
5341  as 
5342 \begin_inset Flex Code
5343 status collapsed
5344
5345 \begin_layout Plain Layout
5346 development/lyxserver/server_monitor.c
5347 \end_layout
5348
5349 \end_inset
5350
5351 .
5352 \end_layout
5353
5354 \begin_layout Standard
5355 Another useful tool is the command-line based clientfound in 
5356 \begin_inset Flex Code
5357 status collapsed
5358
5359 \begin_layout Plain Layout
5360 src/client/lyxclient
5361 \end_layout
5362
5363 \end_inset
5364
5365 .
5366 \end_layout
5367
5368 \begin_layout Section
5369 Normal communication
5370 \end_layout
5371
5372 \begin_layout Standard
5373 To issue a LyX call, the client writes a line of ASCII text into the input
5374  pipe.
5375  This line has the following format:
5376 \end_layout
5377
5378 \begin_layout Quote
5379 LYXCMD:
5380 \emph on
5381 clientname
5382 \emph default
5383 :
5384 \emph on
5385 function
5386 \emph default
5387 :
5388 \emph on
5389 argument
5390 \end_layout
5391
5392 \begin_layout Description
5393 clientname is a name that the client can choose arbitrarily.
5394  Its only use is that LyX will echo it if it sends an answer—so a client
5395  can dispatch results from different requesters.
5396 \end_layout
5397
5398 \begin_layout Description
5399 function is the function you want LyX to perform.
5400  It is the same as the commands you'd use in the minibuffer.
5401 \end_layout
5402
5403 \begin_layout Description
5404 argument is an optional argument which is meaningful only to some functions
5405  (for instance, the 
5406 \begin_inset Quotes eld
5407 \end_inset
5408
5409 self-insert
5410 \begin_inset Quotes erd
5411 \end_inset
5412
5413  LFUN will insert the argument as text at the cursor position).
5414 \end_layout
5415
5416 \begin_layout Standard
5417 The answer from LyX will arrive in the output pipe and be of the form
5418 \end_layout
5419
5420 \begin_layout Quote
5421 INFO:
5422 \emph on
5423 clientname
5424 \emph default
5425 :
5426 \emph on
5427 function
5428 \emph default
5429 :
5430 \emph on
5431 data
5432 \end_layout
5433
5434 \begin_layout Standard
5435 where 
5436 \emph on
5437 clientname
5438 \emph default
5439  and 
5440 \emph on
5441 function
5442 \emph default
5443  are just echoed from the command request, while 
5444 \emph on
5445 data
5446 \emph default
5447  is more or less useful information filled according to how the command
5448  execution worked out.
5449  Some commands, such as 
5450 \begin_inset Quotes eld
5451 \end_inset
5452
5453 font-state
5454 \begin_inset Quotes erd
5455 \end_inset
5456
5457 , will return information about the internal state of LyX, while other will
5458  return an empty data-response.
5459  This means that the command execution went fine.
5460 \end_layout
5461
5462 \begin_layout Standard
5463 In case of errors, the response from LyX will have this form
5464 \end_layout
5465
5466 \begin_layout Quote
5467 ERROR:
5468 \emph on
5469 clientname
5470 \emph default
5471 :
5472 \emph on
5473 function
5474 \emph default
5475 :
5476 \emph on
5477 error message
5478 \end_layout
5479
5480 \begin_layout Standard
5481 where the 
5482 \emph on
5483 error message
5484 \emph default
5485  should contain an explanation of why the command failed.
5486 \end_layout
5487
5488 \begin_layout Standard
5489 Examples:
5490 \end_layout
5491
5492 \begin_layout LyX-Code
5493 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5494 \begin_inset Newline newline
5495 \end_inset
5496
5497 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5498 \begin_inset Newline newline
5499 \end_inset
5500
5501 read a <~/.lyxpipe.out
5502 \begin_inset Newline newline
5503 \end_inset
5504
5505 echo $a
5506 \end_layout
5507
5508 \begin_layout Section
5509 Notification
5510 \end_layout
5511
5512 \begin_layout Standard
5513 LyX can notify clients of events going on asynchronously.
5514  Currently it will only do this if the user binds a key sequence with the
5515  function 
5516 \begin_inset Quotes eld
5517 \end_inset
5518
5519 notify
5520 \begin_inset Quotes erd
5521 \end_inset
5522
5523 .
5524  The format of the string LyX sends is as follows:
5525 \end_layout
5526
5527 \begin_layout Quote
5528 \begin_inset Flex Code
5529 status collapsed
5530
5531 \begin_layout Plain Layout
5532 NOTIFY:
5533 \end_layout
5534
5535 \end_inset
5536
5537
5538 \emph on
5539 key-sequence
5540 \end_layout
5541
5542 \begin_layout Standard
5543 where 
5544 \emph on
5545 key-sequence
5546 \emph default
5547  is the printed representation of the key sequence that was actually typed
5548  by the user.
5549 \end_layout
5550
5551 \begin_layout Standard
5552 This mechanism can be used to extend LyX's command set and implement macros.
5553  Bind some key sequence to 
5554 \begin_inset Quotes eld
5555 \end_inset
5556
5557 notify
5558 \begin_inset Quotes erd
5559 \end_inset
5560
5561 .
5562  Then start a client that listens on the output pipe, dispatches the command
5563  according to the sequence, and starts a function that may use LyX calls
5564  and LyX requests to issue a command or a series of commands to LyX.
5565 \end_layout
5566
5567 \begin_layout Section
5568 The simple LyX Server Protocol
5569 \end_layout
5570
5571 \begin_layout Standard
5572 LyX implements a simple protocol that can be used for session management.
5573  All messages are of the form
5574 \end_layout
5575
5576 \begin_layout Quote
5577 LYXSRV:
5578 \emph on
5579 clientname
5580 \emph default
5581 :
5582 \emph on
5583 protocol message
5584 \end_layout
5585
5586 \begin_layout Standard
5587 where 
5588 \emph on
5589 protocol message
5590 \emph default
5591  can be 
5592 \begin_inset Quotes eld
5593 \end_inset
5594
5595 hello
5596 \begin_inset Quotes erd
5597 \end_inset
5598
5599  or 
5600 \begin_inset Quotes eld
5601 \end_inset
5602
5603 bye
5604 \begin_inset Quotes erd
5605 \end_inset
5606
5607 .
5608  If 
5609 \begin_inset Quotes eld
5610 \end_inset
5611
5612 hello
5613 \begin_inset Quotes erd
5614 \end_inset
5615
5616  is received from a client, LyX will report back to inform the client that
5617  it's listening to it's messages, while 
5618 \begin_inset Quotes eld
5619 \end_inset
5620
5621 bye
5622 \begin_inset Quotes erd
5623 \end_inset
5624
5625  sent from LyX will inform clients that LyX is closing.
5626 \end_layout
5627
5628 \begin_layout Section
5629 Reverse DVI/PDF search
5630 \end_layout
5631
5632 \begin_layout Standard
5633 Some DVI/PDF viewers
5634 \begin_inset Foot
5635 status collapsed
5636
5637 \begin_layout Plain Layout
5638 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5639  Skim on Mac OSX and SumatraPDF on Windows.
5640 \end_layout
5641
5642 \end_inset
5643
5644  provide 
5645 \emph on
5646 reverse search
5647 \emph default
5648  facility (also called 
5649 \emph on
5650 inverse search
5651 \emph default
5652 ).
5653  This means that you can tell LyX to put the cursor to a specific line in
5654  the document by clicking at the respective position in the DVI/PDF output.
5655  To achieve this, the viewer must be able to communicate with LyX.
5656  This is done via the LyX server either by using the named pipe (
5657 \emph on
5658 lyxpipe
5659 \emph default
5660 ), or the UNIX domain socket (
5661 \emph on
5662 lyxsocket
5663 \emph default
5664 ) that LyX creates in its temporary directory (this is the way the 
5665 \begin_inset Flex Code
5666 status collapsed
5667
5668 \begin_layout Plain Layout
5669 lyxclient
5670 \end_layout
5671
5672 \end_inset
5673
5674  program communicates with LyX).
5675  In some cases, you need a helper script that mediates between the viewer
5676  and LyX, in others, the viewer can communicate with LyX directly.
5677  This depends on the selected viewer and on your operating system.
5678  The same applies to the way viewers need to be configured and the way the
5679  reverse search is actually performed.
5680  In what follows, we will thus describe how to setup reverse search for
5681  specific viewers.
5682  Before we turn to this, though, we will explain what needs to be done generally
5683  to enable reverse search in the DVI/PDF output.
5684 \end_layout
5685
5686 \begin_layout Subsection
5687 Automatic setup
5688 \begin_inset CommandInset label
5689 LatexCommand label
5690 name "sub:rev-search"
5691
5692 \end_inset
5693
5694
5695 \end_layout
5696
5697 \begin_layout Standard
5698 In most cases LyX will do the work for you by enabling the option 
5699 \begin_inset Flex MenuItem
5700 status collapsed
5701
5702 \begin_layout Plain Layout
5703 Synchronize with Output
5704 \end_layout
5705
5706 \end_inset
5707
5708  in the menu 
5709 \begin_inset Flex MenuItem
5710 status collapsed
5711
5712 \begin_layout Plain Layout
5713 Document\SpecialChar \menuseparator
5714 Settings\SpecialChar \menuseparator
5715 Output
5716 \end_layout
5717
5718 \end_inset
5719
5720 .
5721  In such a case LyX will automatically insert the necessary SyncTeX macro
5722  (for PDF) or load the srcltx package (for DVI) respectively.
5723  This option can be easily reached also on 
5724 \begin_inset Flex Code
5725 status collapsed
5726
5727 \begin_layout Plain Layout
5728 View/Update
5729 \end_layout
5730
5731 \end_inset
5732
5733  Toolbar.
5734 \end_layout
5735
5736 \begin_layout Standard
5737 If you need a different setting, you can select or input a custom macro
5738  from the drop down box just below 
5739 \begin_inset Flex MenuItem
5740 status collapsed
5741
5742 \begin_layout Plain Layout
5743 Document\SpecialChar \menuseparator
5744 Settings\SpecialChar \menuseparator
5745 Output\SpecialChar \menuseparator
5746 Synchronize with Output
5747 \end_layout
5748
5749 \end_inset
5750
5751 .
5752 \end_layout
5753
5754 \begin_layout Standard
5755 Note that the method 
5756 \begin_inset Flex Code
5757 status collapsed
5758
5759 \begin_layout Plain Layout
5760
5761 \backslash
5762 synctex=1
5763 \end_layout
5764
5765 \end_inset
5766
5767  enables gzip compression.
5768  If your viewer does not support it, you should instead use 
5769 \begin_inset Flex Code
5770 status collapsed
5771
5772 \begin_layout Plain Layout
5773
5774 \backslash
5775 synctex=-1
5776 \end_layout
5777
5778 \end_inset
5779
5780 .
5781 \end_layout
5782
5783 \begin_layout Standard
5784 Please aöso note that including the 
5785 \begin_inset Flex Code
5786 status collapsed
5787
5788 \begin_layout Plain Layout
5789 srcltx
5790 \end_layout
5791
5792 \end_inset
5793
5794  package or 
5795 \begin_inset Flex Code
5796 status collapsed
5797
5798 \begin_layout Plain Layout
5799 src-specials
5800 \end_layout
5801
5802 \end_inset
5803
5804  sometimes has an undesired impact on the typesetting.
5805  Thus, you should switch output synchronization off for the final typesetting
5806  if you use the 
5807 \begin_inset Flex Code
5808 status collapsed
5809
5810 \begin_layout Plain Layout
5811 srcltx
5812 \end_layout
5813
5814 \end_inset
5815
5816  package or 
5817 \begin_inset Flex Code
5818 status collapsed
5819
5820 \begin_layout Plain Layout
5821 src-specials
5822 \end_layout
5823
5824 \end_inset
5825
5826 .
5827  
5828 \end_layout
5829
5830 \begin_layout Standard
5831 In case you need some more special settings that are not covered by the
5832  automatic settings, read the next section about how to set up output synchroniz
5833 ation manually.
5834  If the automatic setup suits your needs, you can readily jump to section
5835 \begin_inset space ~
5836 \end_inset
5837
5838
5839 \begin_inset CommandInset ref
5840 LatexCommand ref
5841 reference "sub:configuring-viewers"
5842
5843 \end_inset
5844
5845 , where the necessary configuration steps in your viewer -- needed both
5846  with the automatic and the manual setup -- are described.
5847 \end_layout
5848
5849 \begin_layout Subsection
5850 Manual setup
5851 \end_layout
5852
5853 \begin_layout Standard
5854 LaTeX provides several different methods for reverse search.
5855  Some are built-in in the 
5856 \begin_inset Flex Code
5857 status collapsed
5858
5859 \begin_layout Plain Layout
5860 latex/pdflatex
5861 \end_layout
5862
5863 \end_inset
5864
5865  program, some are provided by external packages.
5866  Your choice depends on whether your LaTeX distribution already provides
5867  a given method (the built-in methods are rather new) and whether your viewer
5868  can cope with it.
5869  The available methods are described in the following.
5870 \end_layout
5871
5872 \begin_layout Subsubsection*
5873 Built-in DVI-search via src-specials (DVI only) 
5874 \end_layout
5875
5876 \begin_layout Standard
5877 This method provides the DVI file with the necessary information for reverse
5878  search.
5879  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5880  distribution should include it), and it works reliably.
5881  To enable it, change the 
5882 \begin_inset Flex MenuItem
5883 status collapsed
5884
5885 \begin_layout Plain Layout
5886 LaT
5887 \begin_inset ERT
5888 status collapsed
5889
5890 \begin_layout Plain Layout
5891
5892 {}
5893 \end_layout
5894
5895 \end_inset
5896
5897 eX (plain)->DVI
5898 \end_layout
5899
5900 \end_inset
5901
5902  or 
5903 \begin_inset Flex MenuItem
5904 status collapsed
5905
5906 \begin_layout Plain Layout
5907 LaT
5908 \begin_inset ERT
5909 status collapsed
5910
5911 \begin_layout Plain Layout
5912
5913 {}
5914 \end_layout
5915
5916 \end_inset
5917
5918 eX (plain)->DraftDVI
5919 \end_layout
5920
5921 \end_inset
5922
5923  converter in 
5924 \begin_inset Flex MenuItem
5925 status collapsed
5926
5927 \begin_layout Plain Layout
5928 Preferences\SpecialChar \menuseparator
5929 File Handling\SpecialChar \menuseparator
5930 Converters
5931 \end_layout
5932
5933 \end_inset
5934
5935  to 
5936 \begin_inset Flex Code
5937 status collapsed
5938
5939 \begin_layout Plain Layout
5940 latex -src-specials $$i
5941 \end_layout
5942
5943 \end_inset
5944
5945 .
5946  If this doesn't work, check if your TeX engine needs different options
5947  (the syntax might differ in some distributions).
5948 \end_layout
5949
5950 \begin_layout Subsubsection*
5951 External Packages (PDFSync and scrltx) 
5952 \end_layout
5953
5954 \begin_layout Standard
5955 The packages 
5956 \emph on
5957 pdfsync
5958 \emph default
5959  and 
5960 \emph on
5961 scrltx
5962 \emph default
5963  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5964  respectively.
5965  In order to enable it, load the packages in the LyX preamble: 
5966 \end_layout
5967
5968 \begin_layout Itemize
5969 \begin_inset Flex Code
5970 status collapsed
5971
5972 \begin_layout Plain Layout
5973
5974 \backslash
5975 usepackage{pdfsync}
5976 \end_layout
5977
5978 \end_inset
5979
5980  for reverse PDF search,
5981 \end_layout
5982
5983 \begin_layout Itemize
5984 \begin_inset Flex Code
5985 status collapsed
5986
5987 \begin_layout Plain Layout
5988
5989 \backslash
5990 usepackage[active]{srcltx}
5991 \end_layout
5992
5993 \end_inset
5994
5995  for reverse DVI search.
5996 \end_layout
5997
5998 \begin_layout Standard
5999 If you want to be able to perform both DVI and PDF reverse searches, you
6000  can also insert in the preamble the following lines
6001 \end_layout
6002
6003 \begin_layout LyX-Code
6004
6005 \backslash
6006 usepackage{ifpdf}
6007 \begin_inset Newline newline
6008 \end_inset
6009
6010
6011 \backslash
6012 ifpdf
6013 \begin_inset Newline newline
6014 \end_inset
6015
6016   
6017 \backslash
6018 usepackage{pdfsync}
6019 \begin_inset Newline newline
6020 \end_inset
6021
6022
6023 \backslash
6024 else
6025 \begin_inset Newline newline
6026 \end_inset
6027
6028   
6029 \backslash
6030 usepackage[active]{srcltx}
6031 \begin_inset Newline newline
6032 \end_inset
6033
6034
6035 \backslash
6036 fi
6037 \end_layout
6038
6039 \begin_layout Standard
6040 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6041  right package will be used.
6042 \end_layout
6043
6044 \begin_layout Standard
6045 Note that PDFSync might affect the output layout of your document.
6046  It is therefore advised to disable PDFsync for final documents.
6047 \end_layout
6048
6049 \begin_layout Subsubsection*
6050 Built-in reverse search via SyncTeX (DVI and PDF) 
6051 \end_layout
6052
6053 \begin_layout Standard
6054 Recent versions of 
6055 \begin_inset Flex Code
6056 status collapsed
6057
6058 \begin_layout Plain Layout
6059 (pdf)latex
6060 \end_layout
6061
6062 \end_inset
6063
6064  have built-in support for both PDF and DVI reverse search.
6065  This so-called 
6066 \emph on
6067 SyncTeX
6068 \emph default
6069  facility is basically the result of the integration of the PDFSync package
6070  to the pdftex program and its merge with the 
6071 \emph on
6072 scr-specials
6073 \emph default
6074  approach.
6075  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6076  to use it.
6077  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6078  already provide SyncTeX support.
6079 \end_layout
6080
6081 \begin_layout Standard
6082 To enable SyncTeX for DVI output, change the 
6083 \begin_inset Flex MenuItem
6084 status collapsed
6085
6086 \begin_layout Plain Layout
6087 LaT
6088 \begin_inset ERT
6089 status collapsed
6090
6091 \begin_layout Plain Layout
6092
6093 {}
6094 \end_layout
6095
6096 \end_inset
6097
6098 eX (plain) -> DVI
6099 \end_layout
6100
6101 \end_inset
6102
6103  or 
6104 \begin_inset Flex MenuItem
6105 status collapsed
6106
6107 \begin_layout Plain Layout
6108 LaT
6109 \begin_inset ERT
6110 status collapsed
6111
6112 \begin_layout Plain Layout
6113
6114 {}
6115 \end_layout
6116
6117 \end_inset
6118
6119 eX (plain) -> DraftDVI
6120 \end_layout
6121
6122 \end_inset
6123
6124  converter in 
6125 \begin_inset Flex MenuItem
6126 status collapsed
6127
6128 \begin_layout Plain Layout
6129 Preferences\SpecialChar \menuseparator
6130 File Handling\SpecialChar \menuseparator
6131 Converters
6132 \end_layout
6133
6134 \end_inset
6135
6136  to 
6137 \begin_inset Flex Code
6138 status collapsed
6139
6140 \begin_layout Plain Layout
6141 latex -synctex=1 $$i
6142 \end_layout
6143
6144 \end_inset
6145
6146 , and for PDF output, change the 
6147 \begin_inset Flex MenuItem
6148 status collapsed
6149
6150 \begin_layout Plain Layout
6151 LaT
6152 \begin_inset ERT
6153 status collapsed
6154
6155 \begin_layout Plain Layout
6156
6157 {}
6158 \end_layout
6159
6160 \end_inset
6161
6162 eX (pdflatex) -> PDF (pdflatex)
6163 \end_layout
6164
6165 \end_inset
6166
6167  or converter to 
6168 \begin_inset Flex Code
6169 status collapsed
6170
6171 \begin_layout Plain Layout
6172 pdflatex -synctex=1 $$i
6173 \end_layout
6174
6175 \end_inset
6176
6177 .
6178  Check the documentation of your viewer whether the viewer needs to be configure
6179 d for the use with SyncTeX.
6180 \begin_inset Foot
6181 status collapsed
6182
6183 \begin_layout Plain Layout
6184 Note that the option 
6185 \begin_inset Flex Code
6186 status collapsed
6187
6188 \begin_layout Plain Layout
6189 -synctex=1
6190 \end_layout
6191
6192 \end_inset
6193
6194  option enables gzip compression.
6195  If your viewer does not support it, you should instead use 
6196 \begin_inset Flex Code
6197 status collapsed
6198
6199 \begin_layout Plain Layout
6200 -synctex=-1
6201 \end_layout
6202
6203 \end_inset
6204
6205 .
6206 \end_layout
6207
6208 \end_inset
6209
6210
6211 \end_layout
6212
6213 \begin_layout Subsection
6214 Configuring and using specific viewers
6215 \begin_inset CommandInset label
6216 LatexCommand label
6217 name "sub:configuring-viewers"
6218
6219 \end_inset
6220
6221
6222 \end_layout
6223
6224 \begin_layout Subsubsection*
6225 Xdvi (all platforms)
6226 \end_layout
6227
6228 \begin_layout Standard
6229 If you use 
6230 \begin_inset Flex Code
6231 status collapsed
6232
6233 \begin_layout Plain Layout
6234 xdvi
6235 \end_layout
6236
6237 \end_inset
6238
6239 , you don't need to do anything else for performing a reverse DVI search,
6240  as LyX already provides the necessary hooks for automatically using the
6241  
6242 \begin_inset Flex Code
6243 status collapsed
6244
6245 \begin_layout Plain Layout
6246 lyxclient
6247 \end_layout
6248
6249 \end_inset
6250
6251  program.
6252  Just setup your document as described above (reverse search is triggered
6253  by Ctrl-click or Alt-click on Mac OSX, respectively).
6254 \end_layout
6255
6256 \begin_layout Standard
6257 However, if for whatever reason you want to use the named pipe instead of
6258  the socket for communicating with LyX, simply change the DVI viewer in
6259  
6260 \begin_inset Flex MenuItem
6261 status collapsed
6262
6263 \begin_layout Plain Layout
6264 Preferences\SpecialChar \menuseparator
6265 File Handling\SpecialChar \menuseparator
6266 File formats
6267 \end_layout
6268
6269 \end_inset
6270
6271  to
6272 \begin_inset Foot
6273 status collapsed
6274
6275 \begin_layout Plain Layout
6276 On Mac OSX you have to use 
6277 \begin_inset Flex Code
6278 status collapsed
6279
6280 \begin_layout Plain Layout
6281 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6282 \end_layout
6283
6284 \end_inset
6285
6286
6287 \end_layout
6288
6289 \end_inset
6290
6291  
6292 \begin_inset Flex Code
6293 status collapsed
6294
6295 \begin_layout Plain Layout
6296 xdvi -editor 'lyxeditor.sh %f %l'
6297 \end_layout
6298
6299 \end_inset
6300
6301 , where 
6302 \begin_inset Flex Code
6303 status collapsed
6304
6305 \begin_layout Plain Layout
6306 lyxeditor.sh
6307 \end_layout
6308
6309 \end_inset
6310
6311  is a suitable script.
6312  For example, a minimal shell script is the following one:
6313 \end_layout
6314
6315 \begin_layout LyX-Code
6316 #!/bin/sh
6317 \begin_inset Newline newline
6318 \end_inset
6319
6320 LYXPIPE="/path/to/lyxpipe"
6321 \begin_inset Newline newline
6322 \end_inset
6323
6324 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6325 \begin_inset Newline newline
6326 \end_inset
6327
6328 echo "$COMMAND" > "${LYXPIPE}".in || exit
6329 \begin_inset Newline newline
6330 \end_inset
6331
6332 read < "${LYXPIPE}".out || exit
6333 \end_layout
6334
6335 \begin_layout Standard
6336 where 
6337 \begin_inset Flex Code
6338 status collapsed
6339
6340 \begin_layout Plain Layout
6341 /path/to/lyxpipe
6342 \end_layout
6343
6344 \end_inset
6345
6346  is the Ly
6347 \begin_inset ERT
6348 status collapsed
6349
6350 \begin_layout Plain Layout
6351
6352 {}
6353 \end_layout
6354
6355 \end_inset
6356
6357 XServer pipe path specified in 
6358 \begin_inset Flex MenuItem
6359 status collapsed
6360
6361 \begin_layout Plain Layout
6362 Preferences\SpecialChar \menuseparator
6363 Paths
6364 \end_layout
6365
6366 \end_inset
6367
6368 .
6369 \begin_inset Foot
6370 status collapsed
6371
6372 \begin_layout Plain Layout
6373 In the 
6374 \begin_inset Flex Code
6375 status collapsed
6376
6377 \begin_layout Plain Layout
6378 development/tools
6379 \end_layout
6380
6381 \end_inset
6382
6383  folder of a source distribution you can find a 
6384 \begin_inset Flex Code
6385 status collapsed
6386
6387 \begin_layout Plain Layout
6388 lyxeditor
6389 \end_layout
6390
6391 \end_inset
6392
6393  script which is able to locate the 
6394 \emph on
6395 lyxpipe
6396 \emph default
6397  based on your preferences.
6398 \end_layout
6399
6400 \end_inset
6401
6402
6403 \end_layout
6404
6405 \begin_layout Subsubsection*
6406 MacDviX (Mac OSX)
6407 \end_layout
6408
6409 \begin_layout Standard
6410 At the end of 
6411 \begin_inset Flex Code
6412 status collapsed
6413
6414 \begin_layout Plain Layout
6415 /Applications/MacDviX_Folder/calleditor.script
6416 \end_layout
6417
6418 \end_inset
6419
6420 , add the following lines:
6421 \end_layout
6422
6423 \begin_layout LyX-Code
6424 /Applications/Ly
6425 \begin_inset ERT
6426 status collapsed
6427
6428 \begin_layout Plain Layout
6429
6430 {}
6431 \end_layout
6432
6433 \end_inset
6434
6435 X.app/Contents/MacOS/lyxeditor "$2" $1
6436 \begin_inset Newline newline
6437 \end_inset
6438
6439 exit 1
6440 \end_layout
6441
6442 \begin_layout Standard
6443 Modify the lines accordingly if you install LyX somewhere else than in the
6444  Applications folder.
6445 \end_layout
6446
6447 \begin_layout Standard
6448 Reverse search is triggered by Alt-click (OPTION-click).
6449 \end_layout
6450
6451 \begin_layout Subsubsection*
6452 Skim (Mac OSX)
6453 \end_layout
6454
6455 \begin_layout Standard
6456 Enter 
6457 \begin_inset Flex Code
6458 status collapsed
6459
6460 \begin_layout Plain Layout
6461 open -a Skim.app $$i
6462 \end_layout
6463
6464 \end_inset
6465
6466  to the viewer setting in 
6467 \begin_inset Flex MenuItem
6468 status collapsed
6469
6470 \begin_layout Plain Layout
6471 Preferences\SpecialChar \menuseparator
6472 File Handling\SpecialChar \menuseparator
6473 File formats\SpecialChar \menuseparator
6474 PDF (pdflatex)
6475 \end_layout
6476
6477 \end_inset
6478
6479 , and then in 
6480 \begin_inset Flex MenuItem
6481 status collapsed
6482
6483 \begin_layout Plain Layout
6484 Skim\SpecialChar \menuseparator
6485 Preferences\SpecialChar \menuseparator
6486 Sync
6487 \end_layout
6488
6489 \end_inset
6490
6491  choose 
6492 \begin_inset Flex MenuItem
6493 status collapsed
6494
6495 \begin_layout Plain Layout
6496 custom
6497 \end_layout
6498
6499 \end_inset
6500
6501  preset and enter command 
6502 \begin_inset Flex MenuItem
6503 status collapsed
6504
6505 \begin_layout Plain Layout
6506 /Applications/LyX.app/Contents/MacOS/lyxeditor
6507 \end_layout
6508
6509 \end_inset
6510
6511 .
6512 \end_layout
6513
6514 \begin_layout Standard
6515 Reverse search is triggered by COMMAND-SHIFT-click
6516 \end_layout
6517
6518 \begin_layout Subsubsection*
6519 Okular (KDE)
6520 \end_layout
6521
6522 \begin_layout Standard
6523 Go to 
6524 \begin_inset Flex MenuItem
6525 status collapsed
6526
6527 \begin_layout Plain Layout
6528 Settings\SpecialChar \menuseparator
6529 Configure Okular\SpecialChar \ldots{}
6530 \SpecialChar \menuseparator
6531 Editor
6532 \end_layout
6533
6534 \end_inset
6535
6536 , select 
6537 \begin_inset Quotes eld
6538 \end_inset
6539
6540 Custom Text Editor
6541 \begin_inset Quotes erd
6542 \end_inset
6543
6544  and add the command 
6545 \begin_inset Flex Code
6546 status collapsed
6547
6548 \begin_layout Plain Layout
6549 lyxclient -g %f %l
6550 \end_layout
6551
6552 \end_inset
6553
6554 .
6555 \end_layout
6556
6557 \begin_layout Standard
6558 Reverse search is triggered by SHIFT-click.
6559 \end_layout
6560
6561 \begin_layout Subsubsection*
6562 YAP (Windows)
6563 \end_layout
6564
6565 \begin_layout Standard
6566 Launch yap, choose its 
6567 \begin_inset Flex MenuItem
6568 status collapsed
6569
6570 \begin_layout Plain Layout
6571 View\SpecialChar \menuseparator
6572 Options
6573 \end_layout
6574
6575 \end_inset
6576
6577  menu and select the 
6578 \begin_inset Quotes eld
6579 \end_inset
6580
6581 Inverse DVI Search
6582 \begin_inset Quotes erd
6583 \end_inset
6584
6585  tab.
6586  Click on the 
6587 \begin_inset Quotes eld
6588 \end_inset
6589
6590 New\SpecialChar \ldots{}
6591
6592 \begin_inset Quotes erd
6593 \end_inset
6594
6595  button and, in the window that opens, enter 
6596 \begin_inset Quotes eld
6597 \end_inset
6598
6599 LyX Editor
6600 \begin_inset Quotes erd
6601 \end_inset
6602
6603  (or any other name you like) in the 
6604 \begin_inset Quotes eld
6605 \end_inset
6606
6607 Name:
6608 \begin_inset Quotes erd
6609 \end_inset
6610
6611  field.
6612  Now click on the button labeled 
6613 \begin_inset Quotes eld
6614 \end_inset
6615
6616 \SpecialChar \ldots{}
6617
6618 \begin_inset Quotes erd
6619 \end_inset
6620
6621  to open a file dialog and navigate to the directory containing the batch
6622  file 
6623 \begin_inset Flex Code
6624 status collapsed
6625
6626 \begin_layout Plain Layout
6627 lyxeditor.bat
6628 \end_layout
6629
6630 \end_inset
6631
6632  (see below).
6633  Select 
6634 \begin_inset Flex Code
6635 status collapsed
6636
6637 \begin_layout Plain Layout
6638 lyxeditor.bat
6639 \end_layout
6640
6641 \end_inset
6642
6643  and then specify the program arguments as 
6644 \begin_inset Flex Code
6645 status collapsed
6646
6647 \begin_layout Plain Layout
6648 %f %l
6649 \end_layout
6650
6651 \end_inset
6652
6653 .
6654  The 
6655 \begin_inset Flex Code
6656 status collapsed
6657
6658 \begin_layout Plain Layout
6659 lyxeditor.bat
6660 \end_layout
6661
6662 \end_inset
6663
6664  wrapper is used for communicating with LyX through the 
6665 \emph on
6666 lyxpipe
6667 \emph default
6668  and is as follows:
6669 \end_layout
6670
6671 \begin_layout LyX-Code
6672 @echo off
6673 \begin_inset Newline newline
6674 \end_inset
6675
6676 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6677 \backslash
6678
6679 \backslash
6680 .
6681 \backslash
6682 pipe
6683 \backslash
6684 lyxpipe.in
6685 \begin_inset Newline newline
6686 \end_inset
6687
6688 type 
6689 \backslash
6690
6691 \backslash
6692 .
6693 \backslash
6694 pipe
6695 \backslash
6696 lyxpipe.out
6697 \end_layout
6698
6699 \begin_layout Standard
6700 Make sure that the LyXServer pipe path you specified in LyX is 
6701 \begin_inset Flex Code
6702 status collapsed
6703
6704 \begin_layout Plain Layout
6705
6706 \backslash
6707
6708 \backslash
6709 .
6710 \backslash
6711 pipe
6712 \backslash
6713 lyxpipe
6714 \end_layout
6715
6716 \end_inset
6717
6718 , otherwise change the 
6719 \begin_inset Flex Code
6720 status collapsed
6721
6722 \begin_layout Plain Layout
6723 lyxeditor.bat
6724 \end_layout
6725
6726 \end_inset
6727
6728  wrapper accordingly.
6729 \end_layout
6730
6731 \begin_layout Standard
6732 In yap, reverse search is triggered by double-click.
6733 \end_layout
6734
6735 \begin_layout Subsubsection*
6736 SumatraPDF (Windows)
6737 \end_layout
6738
6739 \begin_layout Standard
6740 In order to use SumatraPDF for inverse search, enter 
6741 \begin_inset Flex Code
6742 status collapsed
6743
6744 \begin_layout Plain Layout
6745 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6746 \end_layout
6747
6748 \end_inset
6749
6750  in the viewer setting in 
6751 \begin_inset Flex MenuItem
6752 status collapsed
6753
6754 \begin_layout Plain Layout
6755 Preferences\SpecialChar \menuseparator
6756 File Handling\SpecialChar \menuseparator
6757 File formats\SpecialChar \menuseparator
6758 PDF (pdflatex)
6759 \end_layout
6760
6761 \end_inset
6762
6763 , where 
6764 \begin_inset Flex Code
6765 status collapsed
6766
6767 \begin_layout Plain Layout
6768 lyxeditor.bat
6769 \end_layout
6770
6771 \end_inset
6772
6773  is the previous wrapper.
6774  If SumatraPDF.exe is not in your command PATH, use its full file name.
6775 \end_layout
6776
6777 \begin_layout Standard
6778 Reverse search is triggered by double-click.
6779 \end_layout
6780
6781 \begin_layout Subsubsection*
6782 YAP (Cygwin)
6783 \end_layout
6784
6785 \begin_layout Standard
6786 First of all, make sure that yap is your default DVI viewer in the Windows
6787  environment, then launch it, choose its 
6788 \begin_inset Flex MenuItem
6789 status collapsed
6790
6791 \begin_layout Plain Layout
6792 View\SpecialChar \menuseparator
6793 Options
6794 \end_layout
6795
6796 \end_inset
6797
6798  menu and select the 
6799 \begin_inset Quotes eld
6800 \end_inset
6801
6802 Inverse DVI Search
6803 \begin_inset Quotes erd
6804 \end_inset
6805
6806  tab.
6807  Click on the 
6808 \begin_inset Quotes eld
6809 \end_inset
6810
6811 New\SpecialChar \ldots{}
6812
6813 \begin_inset Quotes erd
6814 \end_inset
6815
6816  button and, in the window that opens, enter 
6817 \begin_inset Quotes eld
6818 \end_inset
6819
6820 LyX Editor
6821 \begin_inset Quotes erd
6822 \end_inset
6823
6824  (or any other name you like) in the 
6825 \begin_inset Quotes eld
6826 \end_inset
6827
6828 Name:
6829 \begin_inset Quotes erd
6830 \end_inset
6831
6832  field.
6833  Now click on the button labeled 
6834 \begin_inset Quotes eld
6835 \end_inset
6836
6837 \SpecialChar \ldots{}
6838
6839 \begin_inset Quotes erd
6840 \end_inset
6841
6842  to open a file dialog and navigate to the directory containing the 
6843 \begin_inset Flex Code
6844 status collapsed
6845
6846 \begin_layout Plain Layout
6847 lyxeditor.exe
6848 \end_layout
6849
6850 \end_inset
6851
6852  program (which is installed by default on Cygwin along with the LyX executable).
6853  Select 
6854 \begin_inset Flex Code
6855 status collapsed
6856
6857 \begin_layout Plain Layout
6858 lyxeditor.exe
6859 \end_layout
6860
6861 \end_inset
6862
6863  and then specify the program arguments as 
6864 \begin_inset Flex Code
6865 status collapsed
6866
6867 \begin_layout Plain Layout
6868 -g %f %l
6869 \end_layout
6870
6871 \end_inset
6872
6873 .
6874  In this way, you will be using the 
6875 \emph on
6876 lyxsocket
6877 \emph default
6878  for communicating with LyX.
6879  If, for whatever reason, you want to use the 
6880 \emph on
6881 lyxpipe
6882 \emph default
6883 , omit the 
6884 \begin_inset Flex Code
6885 status collapsed
6886
6887 \begin_layout Plain Layout
6888 -g
6889 \end_layout
6890
6891 \end_inset
6892
6893  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6894 \end_layout
6895
6896 \begin_layout Standard
6897 In yap, reverse search is triggered by double-click.
6898 \end_layout
6899
6900 \begin_layout Subsubsection*
6901 SumatraPDF (Cygwin)
6902 \end_layout
6903
6904 \begin_layout Standard
6905 In order to use SumatraPDF for inverse search, enter 
6906 \begin_inset Flex Code
6907 status collapsed
6908
6909 \begin_layout Plain Layout
6910 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6911 \end_layout
6912
6913 \end_inset
6914
6915  in the viewer setting in 
6916 \begin_inset Flex MenuItem
6917 status collapsed
6918
6919 \begin_layout Plain Layout
6920 Preferences\SpecialChar \menuseparator
6921 File Handling\SpecialChar \menuseparator
6922 File formats\SpecialChar \menuseparator
6923 PDF (pdflatex)
6924 \end_layout
6925
6926 \end_inset
6927
6928 .
6929  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6930  The 
6931 \begin_inset Flex Code
6932 status collapsed
6933
6934 \begin_layout Plain Layout
6935 -g
6936 \end_layout
6937
6938 \end_inset
6939
6940  enables communication via the 
6941 \emph on
6942 lyxsocket
6943 \emph default
6944 .
6945  Again, omit the 
6946 \begin_inset Flex Code
6947 status collapsed
6948
6949 \begin_layout Plain Layout
6950 -g
6951 \end_layout
6952
6953 \end_inset
6954
6955  option if you want to use the 
6956 \emph on
6957 lyxpipe
6958 \emph default
6959 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6960 \end_layout
6961
6962 \begin_layout Standard
6963 Reverse search is triggered by double-click.
6964 \end_layout
6965
6966 \begin_layout Section
6967 Forward search
6968 \end_layout
6969
6970 \begin_layout Standard
6971 Forward search is, as the name implies, in a sense the 
6972 \begin_inset Quotes eld
6973 \end_inset
6974
6975 opposite
6976 \begin_inset Quotes erd
6977 \end_inset
6978
6979  of reverse search.
6980  It allows you to let the viewer jump to a given position from within LyX.
6981  If forward search is set up (as described in what follows), you can put
6982  the cursor anywhere in your LyX document, and hit 
6983 \begin_inset Flex MenuItem
6984 status collapsed
6985
6986 \begin_layout Plain Layout
6987 Navigate\SpecialChar \menuseparator
6988 Forward search
6989 \end_layout
6990
6991 \end_inset
6992
6993  (or select 
6994 \begin_inset Flex MenuItem
6995 status collapsed
6996
6997 \begin_layout Plain Layout
6998 Forward search
6999 \end_layout
7000
7001 \end_inset
7002
7003  in the context menu via right mouse click), and then the viewer will jump
7004  to that position as well.
7005  This implies, of course, that your viewer supports this function.
7006 \end_layout
7007
7008 \begin_layout Standard
7009 To make forward search possible, you first need to provide the generated
7010  output PDF/DVI file with additional information about the TeX sources.
7011  This can be done via the methods described in the section 
7012 \begin_inset CommandInset ref
7013 LatexCommand ref
7014 reference "sub:rev-search"
7015
7016 \end_inset
7017
7018 .
7019 \end_layout
7020
7021 \begin_layout Standard
7022 Additionally, you need to configure LyX for using your viewers in 
7023 \begin_inset Flex MenuItem
7024 status collapsed
7025
7026 \begin_layout Plain Layout
7027 Tools\SpecialChar \menuseparator
7028 Preferences\SpecialChar \menuseparator
7029 Output\SpecialChar \menuseparator
7030 General
7031 \end_layout
7032
7033 \end_inset
7034
7035 .
7036  We provide a range of tested configurations for some viewers, which you
7037  can select from the drop down list.
7038  If none of these configurations suits you, you have to find out and enter
7039  a suitable configuration yourself.
7040  The definition syntax uses the following placeholders:
7041 \end_layout
7042
7043 \begin_layout Itemize
7044 \noindent
7045 \begin_inset Flex Code
7046 status collapsed
7047
7048 \begin_layout Plain Layout
7049 $$n
7050 \end_layout
7051
7052 \end_inset
7053
7054 : row number
7055 \end_layout
7056
7057 \begin_layout Itemize
7058 \noindent
7059 \begin_inset Flex Code
7060 status collapsed
7061
7062 \begin_layout Plain Layout
7063 $$t
7064 \end_layout
7065
7066 \end_inset
7067
7068 : name of the (temporary) exported .tex file (without path)
7069 \end_layout
7070
7071 \begin_layout Itemize
7072 \noindent
7073 \begin_inset Flex Code
7074 status collapsed
7075
7076 \begin_layout Plain Layout
7077 $$f
7078 \end_layout
7079
7080 \end_inset
7081
7082 : name of the (temporary) exported .tex file (including path)
7083 \end_layout
7084
7085 \begin_layout Itemize
7086 \noindent
7087 \begin_inset Flex Code
7088 status collapsed
7089
7090 \begin_layout Plain Layout
7091 $$o
7092 \end_layout
7093
7094 \end_inset
7095
7096 : name of the exported output file (either dvi or pdf, depending on which
7097  one exists in the temporary directory)
7098 \end_layout
7099
7100 \begin_layout Standard
7101 Note that only some of the viewers provide full forward search functionality,
7102  among them yap, xdvi, okular and Sumatra PDF.
7103 \begin_inset Foot
7104 status collapsed
7105
7106 \begin_layout Plain Layout
7107 For Sumatra CMCDDE is needed --- downloadable from 
7108 \begin_inset CommandInset href
7109 LatexCommand href
7110 target "http://www.istri.fr/zip/CMCDDE.zip"
7111
7112 \end_inset
7113
7114
7115 \end_layout
7116
7117 \end_inset
7118
7119  While many of the widespread PDF viewers (most notably Adobe Reader) do
7120  not support forward search at all, some other viewers -- e.
7121 \begin_inset space \thinspace{}
7122 \end_inset
7123
7124 g.
7125  evince and xpdf -- allow at least to reload the document and jump to a
7126  specific page of the file, so you can at least navigate 
7127 \begin_inset Quotes eld
7128 \end_inset
7129
7130 near
7131 \begin_inset Quotes erd
7132 \end_inset
7133
7134 .
7135  This latter functionality is provided by an external call of synctex (see
7136  the predefined example configurations).
7137  
7138 \end_layout
7139
7140 \begin_layout Standard
7141 Forward search works both with DVI and PDF output.
7142  LyX simply checks which preview format you have used before (i.
7143 \begin_inset space \thinspace{}
7144 \end_inset
7145
7146 e., which format is already there in the temporary directory) and chooses
7147  the appropriate configuration for the respective format.
7148 \end_layout
7149
7150 \begin_layout Chapter
7151 Special Document Classes
7152 \end_layout
7153
7154 \begin_layout Section
7155 A&A Paper
7156 \end_layout
7157
7158 \begin_layout Standard
7159 by 
7160 \noun on
7161 Peter Sütterlin
7162 \end_layout
7163
7164 \begin_layout Subsection
7165 Introduction
7166 \end_layout
7167
7168 \begin_layout Standard
7169 This section describes how LyX can be used to write articles for submission
7170  to the scientific journal 
7171 \emph on
7172 Astronomy and Astrophysics
7173 \emph default
7174  (www.edpsciences.fr/aa/ 
7175 \begin_inset Flex URL
7176 status collapsed
7177
7178 \begin_layout Plain Layout
7179
7180 http://www.edpsciences.fr/aa/
7181 \end_layout
7182
7183 \end_inset
7184
7185 ) using Version 5.01 of the document class 
7186 \family typewriter
7187 aa.cls
7188 \family default
7189 .
7190  This package can be downloaded from the ftp site
7191 \end_layout
7192
7193 \begin_layout Standard
7194 \begin_inset VSpace medskip
7195 \end_inset
7196
7197
7198 \end_layout
7199
7200 \begin_layout Standard
7201 \align center
7202 \begin_inset Flex URL
7203 status collapsed
7204
7205 \begin_layout Plain Layout
7206
7207 ftp://ftp.edpsciences.org/pub/aa/readme.html
7208 \end_layout
7209
7210 \end_inset
7211
7212
7213 \end_layout
7214
7215 \begin_layout Standard
7216 \begin_inset VSpace medskip
7217 \end_inset
7218
7219
7220 \end_layout
7221
7222 \begin_layout Standard
7223 A manual comes together with that package, and this text is not meant to
7224  replace the original manual but is merely a short guide in how to realize
7225  the correct form of your paper.
7226  
7227 \end_layout
7228
7229 \begin_layout Standard
7230 Please note that the publisher of the journal was changed from Springer
7231  to EDP Sciences starting January 1, 2001.
7232  That change involved also some slight changes to the style files, namely
7233  the removal of the thesaurus command.
7234  The LyX class aa supports the newest version of these style files, V 5.01.
7235  If you have an older version installed, please upgrade.
7236  For compatibility, the old (version 4) layout has been kept as 
7237 \family sans
7238 article (A&A V4)
7239 \family default
7240 .
7241  Please refer to the comments in 
7242 \family typewriter
7243 LyXDir/layouts/aapaper.layout
7244 \family default
7245 .
7246 \end_layout
7247
7248 \begin_layout Subsection
7249 Getting started
7250 \end_layout
7251
7252 \begin_layout Standard
7253 It is recommended you start from the example template distributed with LyX.
7254  If you are not using a template, note the following settings:
7255 \end_layout
7256
7257 \begin_layout Itemize
7258 Select 
7259 \family sans
7260 article (A&A)
7261 \family default
7262  in the 
7263 \family sans
7264 Document\SpecialChar \menuseparator
7265 Settings
7266 \family default
7267  dialog (OK, that one was obvious).
7268 \end_layout
7269
7270 \begin_layout Itemize
7271 Don't change the option 
7272 \family sans
7273 Page
7274 \begin_inset space ~
7275 \end_inset
7276
7277 style
7278 \family default
7279 : Leave it set to 
7280 \family sans
7281 default
7282 \family default
7283 .
7284  The whole layout is done by the macros, you shouldn't change anything.
7285 \end_layout
7286
7287 \begin_layout Subsection
7288 The header block
7289 \end_layout
7290
7291 \begin_layout Standard
7292 First thing to enter is the header information.
7293  It consists of seven entries, of which some are optional.
7294  They are
7295 \end_layout
7296
7297 \begin_layout Itemize
7298
7299 \family sans
7300 Title
7301 \family default
7302 : [required] 
7303 \end_layout
7304
7305 \begin_layout Itemize
7306
7307 \family sans
7308 Subtitle
7309 \family default
7310 : [optional] 
7311 \end_layout
7312
7313 \begin_layout Itemize
7314
7315 \family sans
7316 Author
7317 \family default
7318 : [required]
7319 \end_layout
7320
7321 \begin_layout Itemize
7322
7323 \family sans
7324 Address
7325 \family default
7326 : [required]
7327 \end_layout
7328
7329 \begin_layout Itemize
7330
7331 \family sans
7332 Offprints
7333 \family default
7334 : [optional] if more than one author: whom to contact for offprint requests.
7335 \end_layout
7336
7337 \begin_layout Itemize
7338
7339 \family sans
7340 Mail
7341 \family default
7342 : [optional] mail address for contacts.
7343 \end_layout
7344
7345 \begin_layout Itemize
7346
7347 \family sans
7348 Date
7349 \family default
7350 : [required].
7351  Suggested format is 
7352 \family typewriter
7353 Received: <date>; Accepted <date> 
7354 \end_layout
7355
7356 \begin_layout Standard
7357 There is no need to issue the 
7358 \family typewriter
7359
7360 \backslash
7361 maketitle
7362 \family default
7363  command, this is done automatically by LyX when the header is finished.
7364  Although the order of the single header entries doesn't matter it is advised
7365  to keep the above sequence, just to get the best optics and meets the layout
7366  of the real document.
7367 \end_layout
7368
7369 \begin_layout Standard
7370 If you want to place footnotes in the header block, e.
7371 \begin_inset space \thinspace{}
7372 \end_inset
7373
7374 g.
7375 \begin_inset space \space{}
7376 \end_inset
7377
7378 to state your present address, just use the standard footnote via the menu
7379  
7380 \family sans
7381 Insert\SpecialChar \menuseparator
7382 Footnote.
7383
7384 \family default
7385  LyX will automagically use the term 
7386 \family typewriter
7387
7388 \backslash
7389 thanks{}
7390 \family default
7391  in that case.
7392 \end_layout
7393
7394 \begin_layout Standard
7395 In addition to these topics, the macros use three additional LaTeX commands
7396  that have no counterpart in LyX:
7397 \end_layout
7398
7399 \begin_layout Itemize
7400
7401 \family typewriter
7402
7403 \backslash
7404 and
7405 \family default
7406  to separate different names for more than one author and institute, respectivel
7407 y.
7408 \end_layout
7409
7410 \begin_layout Itemize
7411
7412 \family typewriter
7413
7414 \backslash
7415 inst{<nr>}
7416 \family default
7417 to mark corresponding author/institute pairs.
7418  The institutes are numbered sequentially as they appear in the 
7419 \family sans
7420 Address
7421 \family default
7422  field, so you have to put a marker to each author.
7423 \end_layout
7424
7425 \begin_layout Itemize
7426
7427 \family typewriter
7428
7429 \backslash
7430 email{address}
7431 \family default
7432  to supply an email address for fast contact.
7433 \end_layout
7434
7435 \begin_layout Standard
7436 In all cases, the appropriate command has to be entered in LyX and marked
7437  as LaTeX code.
7438  See the examples.
7439  
7440 \end_layout
7441
7442 \begin_layout Subsection
7443 The abstract
7444 \end_layout
7445
7446 \begin_layout Standard
7447 The abstract should immediately follow the header block.
7448  With version 5 the abstract environment was changed to a command, and there
7449  is now a resctriction to only one paragraph.
7450  In addition, it should contain an entry with the keywords.
7451  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7452  command 
7453 \family typewriter
7454
7455 \backslash
7456 keywords{}
7457 \family default
7458  by hand and mark it as LaTeX code.
7459  Refer to the example paper.
7460 \end_layout
7461
7462 \begin_layout Subsection
7463 Supported environments
7464 \end_layout
7465
7466 \begin_layout Standard
7467 The A&A paper layout supports the following environments for structuring
7468  your text:
7469 \end_layout
7470
7471 \begin_layout Itemize
7472
7473 \family sans
7474 Standard
7475 \end_layout
7476
7477 \begin_layout Itemize
7478
7479 \family sans
7480 Section
7481 \end_layout
7482
7483 \begin_layout Itemize
7484
7485 \family sans
7486 Subsection
7487 \end_layout
7488
7489 \begin_layout Itemize
7490
7491 \family sans
7492 Subsubsection
7493 \end_layout
7494
7495 \begin_layout Itemize
7496
7497 \family sans
7498 Itemize
7499 \end_layout
7500
7501 \begin_layout Itemize
7502
7503 \family sans
7504 Enumerate
7505 \end_layout
7506
7507 \begin_layout Itemize
7508
7509 \family sans
7510 Description
7511 \end_layout
7512
7513 \begin_layout Itemize
7514
7515 \family sans
7516 Caption
7517 \end_layout
7518
7519 \begin_layout Itemize
7520
7521 \family sans
7522 Abstract
7523 \end_layout
7524
7525 \begin_layout Itemize
7526
7527 \family sans
7528 Acknowledgment
7529 \end_layout
7530
7531 \begin_layout Itemize
7532
7533 \family sans
7534 Bibliography
7535 \end_layout
7536
7537 \begin_layout Itemize
7538
7539 \family sans
7540 LaTeX
7541 \end_layout
7542
7543 \begin_layout Subsection
7544 Commands not supported by LyX
7545 \end_layout
7546
7547 \begin_layout Standard
7548 Some commands are not yet supported by the 
7549 \family sans
7550 paper (A&A)
7551 \family default
7552  layout for LyX.
7553  Some have already been mentioned.
7554  For the sake of completeness, they are listed all together here:
7555 \end_layout
7556
7557 \begin_layout Itemize
7558
7559 \family typewriter
7560
7561 \backslash
7562 and
7563 \end_layout
7564
7565 \begin_layout Itemize
7566
7567 \family typewriter
7568
7569 \backslash
7570 email
7571 \end_layout
7572
7573 \begin_layout Itemize
7574
7575 \family typewriter
7576
7577 \backslash
7578 appendix
7579 \end_layout
7580
7581 \begin_layout Itemize
7582
7583 \family typewriter
7584
7585 \backslash
7586 authorrunning
7587 \end_layout
7588
7589 \begin_layout Itemize
7590
7591 \family typewriter
7592
7593 \backslash
7594 inst{}
7595 \end_layout
7596
7597 \begin_layout Itemize
7598
7599 \family typewriter
7600
7601 \backslash
7602 keywords{}
7603 \end_layout
7604
7605 \begin_layout Itemize
7606
7607 \family typewriter
7608
7609 \backslash
7610 object{}
7611 \end_layout
7612
7613 \begin_layout Itemize
7614
7615 \family typewriter
7616
7617 \backslash
7618 titlerunning{}
7619 \end_layout
7620
7621 \begin_layout Standard
7622 If you want to use any of these commands, you have to enter them yourself.
7623  
7624 \series bold
7625 Do not forget to mark them as LaTeX code!
7626 \end_layout
7627
7628 \begin_layout Subsection
7629 Figure and Table Floats
7630 \end_layout
7631
7632 \begin_layout Standard
7633 LyX provides support for the necessary float environments 
7634 \family sans
7635 figure, figure*, table
7636 \family default
7637  and 
7638 \family sans
7639 table*
7640 \family default
7641 , therefore we won't tell much about it here.
7642  Refer to the 
7643 \emph on
7644 User's
7645 \begin_inset space ~
7646 \end_inset
7647
7648 Guide
7649 \emph default
7650 .
7651  Just remember that tables should be left-aligned.
7652  For that, select the table and change the alignment in 
7653 \family sans
7654 Edit\SpecialChar \menuseparator
7655 Paragraph
7656 \begin_inset space ~
7657 \end_inset
7658
7659 Settings.
7660 \end_layout
7661
7662 \begin_layout Standard
7663 There is only one special thing: the figures with caption besides the figure.
7664  To create such a figure, you have to do the following:
7665 \end_layout
7666
7667 \begin_layout Enumerate
7668 Create a wide figure float: 
7669 \family sans
7670 Insert\SpecialChar \menuseparator
7671 Float\SpecialChar \menuseparator
7672 Figure
7673 \family default
7674 , then right click in the figure and select 
7675 \family sans
7676 \bar under
7677 S
7678 \bar default
7679 pan
7680 \begin_inset space ~
7681 \end_inset
7682
7683 columns
7684 \family default
7685 .
7686 \end_layout
7687
7688 \begin_layout Enumerate
7689 Enter your caption text.
7690 \end_layout
7691
7692 \begin_layout Enumerate
7693 Press 
7694 \family sans
7695 Return
7696 \family default
7697  to move the cursor above the caption.
7698 \end_layout
7699
7700 \begin_layout Enumerate
7701 Insert your figure
7702 \end_layout
7703
7704 \begin_layout Enumerate
7705 Position the cursor behind the figure and insert a horizontal fill: 
7706 \family sans
7707 Insert\SpecialChar \menuseparator
7708 Special
7709 \begin_inset space ~
7710 \end_inset
7711
7712 Character\SpecialChar \menuseparator
7713 Horizontal
7714 \begin_inset space ~
7715 \end_inset
7716
7717 Fill
7718 \family default
7719 .
7720 \end_layout
7721
7722 \begin_layout Enumerate
7723 Switch to LaTeX mode: 
7724 \family sans
7725 M-c
7726 \begin_inset space ~
7727 \end_inset
7728
7729 t
7730 \family default
7731 .
7732 \end_layout
7733
7734 \begin_layout Enumerate
7735 Enter 
7736 \family typewriter
7737
7738 \backslash
7739 parbox[b]{55mm}{
7740 \family default
7741 .
7742  
7743 \series bold
7744 Do not close the brace!
7745 \end_layout
7746
7747 \begin_layout Enumerate
7748 Position the cursor behind the caption text, switch to LaTeX mode and insert
7749  the closing brace: 
7750 \family sans
7751 M-c
7752 \begin_inset space ~
7753 \end_inset
7754
7755 t
7756 \family default
7757  
7758 \family typewriter
7759 }
7760 \family default
7761 .
7762 \end_layout
7763
7764 \begin_layout Standard
7765 Also, refer to the figures in the example paper.
7766 \end_layout
7767
7768 \begin_layout Subsection
7769 Referee layout
7770 \end_layout
7771
7772 \begin_layout Standard
7773 For submission, the paper has to be formated in a special double-spacing
7774  layout.
7775  For this purpose, you have to give the option 
7776 \family typewriter
7777 referee
7778 \family default
7779  to the documentclass.
7780  This must be done using the extra class options field in the 
7781 \family sans
7782 Document\SpecialChar \menuseparator
7783 Settings
7784 \family default
7785  dialog.
7786  Just enter the string 
7787 \family typewriter
7788 referee
7789 \family default
7790  there.
7791 \end_layout
7792
7793 \begin_layout Subsection
7794 The example paper
7795 \end_layout
7796
7797 \begin_layout Standard
7798 The 
7799 \family sans
7800 Examples
7801 \family default
7802  directory contains an example paper written with LyX.
7803  It is the example paper from the original macro package, translated to
7804  LyX.
7805  Use it for inspiration, and compare the original LaTeX code with LyX way
7806  of writing.
7807 \end_layout
7808
7809 \begin_layout Section
7810 AASTeX
7811 \end_layout
7812
7813 \begin_layout Standard
7814 by 
7815 \noun on
7816 Mike Ressler
7817 \end_layout
7818
7819 \begin_layout Subsection
7820 Introduction
7821 \end_layout
7822
7823 \begin_layout Standard
7824 AASTeX is a set of macros produced by the American Astronomical Society
7825  to facilitate electronic manuscript submission to the three journals they
7826  publish: the Astrophysical Journal (including the Letters and Supplement),
7827  the Astronomical Journal, and the Publications of the Astronomical Society
7828  of the Pacific.
7829  LyX has proven to be an excellent tool for generating these documents,
7830  especially given its equation, citation, and figure handling capabilities.
7831  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7832  is the version described here, or higher.
7833  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7834  incompatible with LyX.
7835  The AASTeX package may be downloaded from the AASTeX Web site
7836 \end_layout
7837
7838 \begin_layout Standard
7839 \begin_inset VSpace medskip
7840 \end_inset
7841
7842
7843 \end_layout
7844
7845 \begin_layout Standard
7846 \align center
7847 \begin_inset Flex URL
7848 status collapsed
7849
7850 \begin_layout Plain Layout
7851
7852 http://www.journals.uchicago.edu/AAS/AASTeX
7853 \end_layout
7854
7855 \end_inset
7856
7857
7858 \end_layout
7859
7860 \begin_layout Standard
7861 \begin_inset VSpace medskip
7862 \end_inset
7863
7864
7865 \end_layout
7866
7867 \begin_layout Standard
7868 A complete user guide is contained in that package and you should familiarize
7869  yourself with it thoroughly before embarking on writing a paper in LyX.
7870  LyX will not reduce the need to figure out all the AASTeX commands, it
7871  will only reduce the drudgery of typing everything in.
7872  It is your responsibility to ensure that the final exported LaTeX document
7873  conforms completely to the requirements of the journal to which you are
7874  submitting your paper.
7875 \end_layout
7876
7877 \begin_layout Subsection
7878 Starting a New Paper
7879 \end_layout
7880
7881 \begin_layout Standard
7882 I strongly suggest that you start with the AASTeX template file.
7883  Click on 
7884 \family sans
7885 File\SpecialChar \menuseparator
7886 New from
7887 \family default
7888  
7889 \family sans
7890 Template
7891 \family default
7892 , enter the new file name, then choose the 
7893 \family typewriter
7894 aastex.lyx
7895 \family default
7896  template.
7897  This will show the most common fields found in a manuscript.
7898  Simply overwrite the existing text (including the brackets, 
7899 \family typewriter
7900 <>
7901 \family default
7902 ) with the correct information.
7903  Many of the AASTeX commands and environments can be implemented directly
7904  in LyX, but some cannot: most noticeably 
7905 \family typewriter
7906
7907 \backslash
7908 altaffilmark
7909 \family default
7910  and 
7911 \family typewriter
7912
7913 \backslash
7914 altaffiltext
7915 \family default
7916 , which should stick out like a sore thumb if you actually just opened the
7917  template file.
7918  For commands such as these, the LaTeX code must be entered directly and
7919  marked as such.
7920  Such commands are referred to as TeX code, or Evil Red Text.
7921  I tried to minimize the amount of TeX code needed in an AASTeX document,
7922  but there is still a bit more required than any of us would like.
7923 \end_layout
7924
7925 \begin_layout Subsection
7926 Finishing Your Paper
7927 \end_layout
7928
7929 \begin_layout Standard
7930 When the paper is finished to your satisfaction and previews/prints correctly,
7931  there are a few 
7932 \begin_inset Quotes eld
7933 \end_inset
7934
7935 postprocessing
7936 \begin_inset Quotes erd
7937 \end_inset
7938
7939  actions which need to be done before you submit it to the journals.
7940  
7941 \end_layout
7942
7943 \begin_layout Enumerate
7944 Export your paper as a LaTeX file (
7945 \family sans
7946 File\SpecialChar \menuseparator
7947 Export\SpecialChar \menuseparator
7948 LaTeX
7949 \family default
7950 ).
7951  
7952 \end_layout
7953
7954 \begin_layout Enumerate
7955 Edit the resulting 
7956 \family typewriter
7957 .tex
7958 \family default
7959  file with your favorite text editor
7960 \end_layout
7961
7962 \begin_deeper
7963 \begin_layout Enumerate
7964 remove the comment lines before the 
7965 \family typewriter
7966
7967 \backslash
7968 documentclass
7969 \family default
7970  command
7971 \end_layout
7972
7973 \begin_layout Enumerate
7974 remove the 
7975 \family typewriter
7976
7977 \backslash
7978 usepackage...{fontenc}
7979 \family default
7980  line if it appears (usually just after 
7981 \family typewriter
7982
7983 \backslash
7984 documentclass
7985 \family default
7986 }; also remove the 
7987 \family typewriter
7988
7989 \backslash
7990 secnumdepth
7991 \family default
7992  line if it appears.
7993 \end_layout
7994
7995 \begin_layout Enumerate
7996 remove everything between (and including) the 
7997 \family typewriter
7998
7999 \backslash
8000 makeatletter
8001 \family default
8002  and 
8003 \family typewriter
8004
8005 \backslash
8006 makeatother
8007 \family default
8008  commands, except for any commands you specifically put into the LaTeX preamble
8009  (which should appear immediately after the 
8010 \begin_inset Quotes eld
8011 \end_inset
8012
8013 User specified LaTeX commands
8014 \begin_inset Quotes erd
8015 \end_inset
8016
8017  comment in the 
8018 \family typewriter
8019 .tex
8020 \family default
8021  file).
8022 \end_layout
8023
8024 \end_deeper
8025 \begin_layout Enumerate
8026 Run the resulting file through LaTeX to make sure it still processes correctly.
8027 \end_layout
8028
8029 \begin_layout Enumerate
8030 Reread the journal requirements to make sure your filenames and formats
8031  are correct.
8032 \end_layout
8033
8034 \begin_layout Enumerate
8035 Submit it.
8036 \end_layout
8037
8038 \begin_layout Subsection
8039 Comments On Specific Commands
8040 \end_layout
8041
8042 \begin_layout Standard
8043 I will not describe the detailed usage of the individual AASTeX commands:
8044  the AASTeX User Guide (
8045 \family typewriter
8046 aasguide.tex
8047 \family default
8048 ) gives a good description of each.
8049  Thus it's probably easiest for me to go down the list as found in the guide
8050  and offer comments where necessary.
8051  So let's begin \SpecialChar \ldots{}
8052
8053 \end_layout
8054
8055 \begin_layout Subsubsection
8056 Things that work as expected
8057 \end_layout
8058
8059 \begin_layout Standard
8060 Because they work as you might expect, I simply list them and the section
8061  they are found in: 
8062 \family typewriter
8063
8064 \backslash
8065 documentclass
8066 \family default
8067  (2.1.1), 
8068 \family typewriter
8069
8070 \backslash
8071 begin{document}
8072 \family default
8073  (2.2), 
8074 \family typewriter
8075
8076 \backslash
8077 title
8078 \family default
8079  (2.3), 
8080 \family typewriter
8081
8082 \backslash
8083 author
8084 \family default
8085  (2.3), 
8086 \family typewriter
8087
8088 \backslash
8089 affil
8090 \family default
8091  (2.3), 
8092 \family typewriter
8093
8094 \backslash
8095 abstract
8096 \family default
8097  (2.4), 
8098 \family typewriter
8099
8100 \backslash
8101 keywords
8102 \family default
8103  (2.5), 
8104 \family typewriter
8105
8106 \backslash
8107 section
8108 \family default
8109  (2.7), 
8110 \family typewriter
8111
8112 \backslash
8113 subsection
8114 \family default
8115  (2.7), 
8116 \family typewriter
8117
8118 \backslash
8119 subsubsection
8120 \family default
8121  (2.7), 
8122 \family typewriter
8123
8124 \backslash
8125 paragraph
8126 \family default
8127  (2.7), 
8128 \family typewriter
8129
8130 \backslash
8131 facility
8132 \family default
8133  (2.10), 
8134 \family typewriter
8135
8136 \backslash
8137 begin{displaymath}
8138 \family default
8139  (2.12), 
8140 \family typewriter
8141
8142 \backslash
8143 begin{equation}
8144 \family default
8145  (2.12), 
8146 \family typewriter
8147
8148 \backslash
8149 begin{eqnarray}
8150 \family default
8151  (2.12), 
8152 \family typewriter
8153
8154 \backslash
8155 begin{mathletters}
8156 \family default
8157  (2.12), 
8158 \family typewriter
8159
8160 \backslash
8161 begin{thebibliography}
8162 \family default
8163  (2.13.1), 
8164 \family typewriter
8165
8166 \backslash
8167 bibitem
8168 \family default
8169  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8170  graphicx figure commands (2.14.1), 
8171 \family typewriter
8172
8173 \backslash
8174 begin{table}
8175 \family default
8176  (2.15.4), 
8177 \family typewriter
8178
8179 \backslash
8180 begin{tabular}
8181 \family default
8182  (2.15.4), 
8183 \family typewriter
8184
8185 \backslash
8186 caption
8187 \family default
8188  (2.15.4), 
8189 \family typewriter
8190
8191 \backslash
8192 label
8193 \family default
8194  (2.15.4, amongst other places), 
8195 \family typewriter
8196
8197 \backslash
8198 tablerefs
8199 \family default
8200  (2.15.5), 
8201 \family typewriter
8202
8203 \backslash
8204 tablecomments
8205 \family default
8206  (2.15.5), 
8207 \family typewriter
8208
8209 \backslash
8210 url
8211 \family default
8212  (2.17.4), 
8213 \family typewriter
8214
8215 \backslash
8216 end{document}
8217 \family default
8218  (2.18).
8219 \end_layout
8220
8221 \begin_layout Standard
8222 The following style options also work correctly: 
8223 \family typewriter
8224 longabstract
8225 \family default
8226  (2.4), 
8227 \family typewriter
8228 preprint
8229 \family default
8230  (3.2.1), 
8231 \family typewriter
8232 preprint2
8233 \family default
8234  (3.2.2), 
8235 \family typewriter
8236 eqsecnum
8237 \family default
8238  (3.3), 
8239 \family typewriter
8240 flushrt
8241 \family default
8242  (3.4).
8243  Simply put them in the 
8244 \family sans
8245 Options
8246 \family default
8247  box in 
8248 \family sans
8249 Layout\SpecialChar \menuseparator
8250 Document
8251 \family default
8252 .
8253 \end_layout
8254
8255 \begin_layout Subsubsection
8256 Things that work, but require more comment
8257 \end_layout
8258
8259 \begin_layout Standard
8260 The following items work, but require a little more discussion:
8261 \end_layout
8262
8263 \begin_layout Itemize
8264 These items are reserved for use by the journal editors, but you can put
8265  them into the LaTeX preamble if you feel compelled to do so: 
8266 \family typewriter
8267
8268 \backslash
8269 received
8270 \family default
8271
8272 \family typewriter
8273
8274 \backslash
8275 revised
8276 \family default
8277
8278 \family typewriter
8279
8280 \backslash
8281 accepted
8282 \family default
8283
8284 \family typewriter
8285
8286 \backslash
8287 ccc
8288 \family default
8289
8290 \family typewriter
8291
8292 \backslash
8293 cpright
8294 \family default
8295  (all from 2.1.3)
8296 \end_layout
8297
8298 \begin_layout Itemize
8299 These items may be placed in the LaTeX preamble, and are included as blanks
8300  in the template file: 
8301 \family typewriter
8302
8303 \backslash
8304 slugcomment
8305 \family default
8306  (2.1.4), 
8307 \family typewriter
8308
8309 \backslash
8310 shorttitle
8311 \family default
8312  (2.1.5), 
8313 \family typewriter
8314
8315 \backslash
8316 shortauthors
8317 \family default
8318  (2.1.5)
8319 \end_layout
8320
8321 \begin_layout Itemize
8322
8323 \family typewriter
8324
8325 \backslash
8326 email
8327 \family default
8328  (2.3) – can only be used 
8329 \begin_inset Quotes eld
8330 \end_inset
8331
8332 standalone
8333 \begin_inset Quotes erd
8334 \end_inset
8335
8336 , not in the middle of a paragraph.
8337  Use TeX code if you need to embed it.
8338 \end_layout
8339
8340 \begin_layout Itemize
8341
8342 \family typewriter
8343
8344 \backslash
8345 and
8346 \family default
8347  (2.3) – will have extra {} after it.
8348  This should not cause an error.
8349 \end_layout
8350
8351 \begin_layout Itemize
8352
8353 \family typewriter
8354
8355 \backslash
8356 notetoeditor
8357 \family default
8358  (2.6) – can only be used 
8359 \begin_inset Quotes eld
8360 \end_inset
8361
8362 standalone
8363 \begin_inset Quotes erd
8364 \end_inset
8365
8366 , not in the middle of a paragraph.
8367  Use TeX code if you need to embed it.
8368 \end_layout
8369
8370 \begin_layout Itemize
8371
8372 \family typewriter
8373
8374 \backslash
8375 placetable
8376 \family default
8377  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8378  hand
8379 \end_layout
8380
8381 \begin_layout Itemize
8382
8383 \family typewriter
8384
8385 \backslash
8386 placefigure
8387 \family default
8388  (2.8) – same as for 
8389 \family typewriter
8390
8391 \backslash
8392 placetable
8393 \end_layout
8394
8395 \begin_layout Itemize
8396
8397 \family typewriter
8398
8399 \backslash
8400 acknowledgements
8401 \family default
8402  (2.9) – will have extra {} after it.
8403  This should not cause an error.
8404 \end_layout
8405
8406 \begin_layout Itemize
8407
8408 \family typewriter
8409
8410 \backslash
8411 appendix
8412 \family default
8413  (2.11) – will have extra {} after it.
8414  This should not cause an error.
8415 \end_layout
8416
8417 \begin_layout Itemize
8418
8419 \family typewriter
8420
8421 \backslash
8422 figcaption
8423 \family default
8424  (2.14.2) – you can insert an optional filename argument by placing the cursor
8425  at the beginning of the text and selecting 
8426 \family sans
8427 Insert\SpecialChar \menuseparator
8428 Short Title
8429 \family default
8430 .
8431  
8432 \begin_inset Quotes eld
8433 \end_inset
8434
8435 Short Title
8436 \begin_inset Quotes erd
8437 \end_inset
8438
8439  inserts an optional argument of the type needed by 
8440 \family typewriter
8441
8442 \backslash
8443 figcaption
8444 \family default
8445 .
8446  Hopefully it will be renamed someday.
8447 \end_layout
8448
8449 \begin_layout Itemize
8450
8451 \family typewriter
8452
8453 \backslash
8454 objectname
8455 \family default
8456  (2.17.1) – same as 
8457 \family typewriter
8458
8459 \backslash
8460 figcaption
8461 \family default
8462  for the catalog ID optional parameter
8463 \end_layout
8464
8465 \begin_layout Itemize
8466
8467 \family typewriter
8468
8469 \backslash
8470 dataset
8471 \family default
8472  (2.17.1) – same as 
8473 \family typewriter
8474
8475 \backslash
8476 figcaption
8477 \family default
8478  for the catalog ID optional parameter
8479 \end_layout
8480
8481 \begin_layout Subsubsection
8482 Things not implemented, use TeX code
8483 \end_layout
8484
8485 \begin_layout Standard
8486
8487 \family typewriter
8488
8489 \backslash
8490 altaffilmark
8491 \family default
8492  (2.3), 
8493 \family typewriter
8494
8495 \backslash
8496 altaffiltext
8497 \family default
8498  (2.3), 
8499 \family typewriter
8500
8501 \backslash
8502 eqnum
8503 \family default
8504  (2.12), 
8505 \family typewriter
8506
8507 \backslash
8508 setcounter{equation}
8509 \family default
8510  (2.12), Journal name abbreviations (2.13.4), 
8511 \family typewriter
8512
8513 \backslash
8514 figurenum
8515 \family default
8516  (2.14.1), 
8517 \family typewriter
8518
8519 \backslash
8520 epsscale
8521 \family default
8522  (2.14.1), 
8523 \family typewriter
8524
8525 \backslash
8526 plotone
8527 \family default
8528  (2.14.1), 
8529 \family typewriter
8530
8531 \backslash
8532 plottwo
8533 \family default
8534  (2.14.1), 
8535 \family typewriter
8536
8537 \backslash
8538 tablenum
8539 \family default
8540  (2.15.4), 
8541 \family typewriter
8542
8543 \backslash
8544 tableline
8545 \family default
8546  (2.15.4, insert it as the first element in the lefthand cell after where
8547  you want it.
8548  Don't use any of LyX's rules in the table), 
8549 \family typewriter
8550
8551 \backslash
8552 tablenotemark
8553 \family default
8554  (2.15.5), 
8555 \family typewriter
8556
8557 \backslash
8558 tablenotetext
8559 \family default
8560  (2.15.5), much of Misc (2.17, except 
8561 \family typewriter
8562
8563 \backslash
8564 objectname
8565 \family default
8566
8567 \family typewriter
8568
8569 \backslash
8570 dataset
8571 \family default
8572
8573 \family typewriter
8574
8575 \backslash
8576 url
8577 \family default
8578 , and 
8579 \family typewriter
8580
8581 \backslash
8582 email
8583 \family default
8584 ; see above), 
8585 \family typewriter
8586
8587 \backslash
8588 singlespace
8589 \family default
8590  (3.1), 
8591 \family typewriter
8592
8593 \backslash
8594 doublespace
8595 \family default
8596  (3.1), 
8597 \family typewriter
8598
8599 \backslash
8600 onecolumn
8601 \family default
8602  (3.2), 
8603 \family typewriter
8604
8605 \backslash
8606 twocolumn
8607 \family default
8608  (3.2)
8609 \end_layout
8610
8611 \begin_layout Subsubsection
8612 Things that cannot be implemented
8613 \end_layout
8614
8615 \begin_layout Standard
8616 \SpecialChar \ldots{}
8617  at least in any meaningful sort of way, so I suggest ignoring them.
8618  They are the references environment (2.13.3), and the deluxetable environment
8619  (2.15).
8620  If you really, really need to use deluxetable, I suggest editing it in
8621  a separate file with a text editor, then using 
8622 \family sans
8623 Insert\SpecialChar \menuseparator
8624 Child
8625 \begin_inset space ~
8626 \end_inset
8627
8628 Document
8629 \family default
8630  to include it in your LyX document.
8631  See the 
8632 \family typewriter
8633 aas_sample.lyx
8634 \family default
8635  file to see an example of this.
8636 \end_layout
8637
8638 \begin_layout Subsection
8639 FAQs, Tips, Tricks, and Other Ruminations
8640 \end_layout
8641
8642 \begin_layout Subsubsection
8643 Getting LyX and AASTeX to cooperate
8644 \end_layout
8645
8646 \begin_layout Standard
8647 It can be a bit tricky to get LyX to recognize a new layout and document
8648  class.
8649  When all else fails, do this:
8650 \end_layout
8651
8652 \begin_layout Enumerate
8653 Make certain that LaTeX can find AASTeX.
8654  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8655  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8656 \family typewriter
8657 sample.tex
8658 \family default
8659 .
8660 \end_layout
8661
8662 \begin_layout Enumerate
8663 Make certain that 
8664 \family typewriter
8665 aastex.layout
8666 \family default
8667  appears in LyX's 
8668 \family typewriter
8669 layouts
8670 \family default
8671  folder
8672 \end_layout
8673
8674 \begin_layout Enumerate
8675 Rerun 
8676 \family sans
8677 Tools\SpecialChar \menuseparator
8678 Reconfigure
8679 \family default
8680  in LyX, then restart LyX.
8681 \end_layout
8682
8683 \begin_layout Enumerate
8684 Open a regular new file, not from a template.
8685  Does AASTeX appear in the class list in 
8686 \family sans
8687 Document\SpecialChar \menuseparator
8688 Settings
8689 \family default
8690 ?
8691 \end_layout
8692
8693 \begin_layout Standard
8694 If you get a warning from an existing AASTeX document about not being able
8695  to find the AASTeX layout or a message about 
8696 \begin_inset Quotes eld
8697 \end_inset
8698
8699 You should not mix title layouts with normal ones
8700 \begin_inset Quotes erd
8701 \end_inset
8702
8703 , things haven't been installed correctly.
8704 \end_layout
8705
8706 \begin_layout Subsubsection
8707 LaTeX error processing a table 
8708 \end_layout
8709
8710 \begin_layout Standard
8711 LyX, by default, attempts to center the table caption/title.
8712  This seems to produce a bad interaction in AASTeX so you should click somewhere
8713  in the caption/title, then select 
8714 \family sans
8715 Edit\SpecialChar \menuseparator
8716 Paragraph
8717 \begin_inset space ~
8718 \end_inset
8719
8720 Settings
8721 \family default
8722 , then set the 
8723 \family sans
8724 Alignment
8725 \family default
8726  to 
8727 \family sans
8728 Block
8729 \family default
8730 .
8731  This took care of it for me.
8732 \end_layout
8733
8734 \begin_layout Subsubsection
8735 References
8736 \end_layout
8737
8738 \begin_layout Standard
8739 A couple of things: 1) I have noticed some funny spacing in the reference
8740  entries in the text.
8741  When you enter the bibliography item data, make sure their is 
8742 \emph on
8743 no
8744 \emph default
8745  space between the last author and the parenthesis setting off the year;
8746  
8747 \emph on
8748 e.
8749 \begin_inset space \thinspace{}
8750 \end_inset
8751
8752 g.
8753 \begin_inset space \space{}
8754 \end_inset
8755
8756
8757 \emph default
8758 type 
8759 \family typewriter
8760 Ressler(1992)
8761 \family default
8762 , not 
8763 \family typewriter
8764 Ressler (1992)
8765 \family default
8766 .
8767  2) Entering the references at all is not obvious.
8768  The easiest thing is to start typing your first reference at the end of
8769  the document, then mark it as type 
8770 \family sans
8771 References
8772 \family default
8773 .
8774  That will put a small gray box in front of what you just typed.
8775  Click on the box to fill in the rest of the information.
8776  For new references, go to the end of an existing reference and press return.
8777  That will create a new line with its own box, etc.
8778 \end_layout
8779
8780 \begin_layout Subsubsection
8781 Including EPS files
8782 \end_layout
8783
8784 \begin_layout Standard
8785 Even though AASTeX provides its own figure commands (
8786 \family typewriter
8787
8788 \backslash
8789 plotone
8790 \family default
8791 , for example), I much prefer LaTeX's standard figure commands (with the
8792  default graphicx).
8793  You can insert the 
8794 \family typewriter
8795
8796 \backslash
8797 plotone
8798 \family default
8799 , etc.
8800 \begin_inset space ~
8801 \end_inset
8802
8803 commands as TeX code into a Figure Float box if you desire, but I never
8804  have much luck getting the layout right.
8805  With the standard graphics, LyX will insert a 
8806 \family typewriter
8807
8808 \backslash
8809 usepackage{graphicx}
8810 \family default
8811  command into the LaTeX preamble and handle the figures in the standard
8812  LaTeX2e way, interspersing the figures in the text.
8813  I believe ApJ accepts figures exactly this way now; AJ might still use
8814  the 
8815 \begin_inset Quotes eld
8816 \end_inset
8817
8818 stack everything at the end
8819 \begin_inset Quotes erd
8820 \end_inset
8821
8822  technique.
8823 \end_layout
8824
8825 \begin_layout Subsubsection
8826 Things I could have done, but didn't
8827 \end_layout
8828
8829 \begin_layout Standard
8830 There are a few 
8831 \begin_inset Quotes eld
8832 \end_inset
8833
8834 pretty
8835 \begin_inset Quotes erd
8836 \end_inset
8837
8838  things I could have implemented, but chose not to.
8839  For instance, I saw no point in double-spacing the text in the LyX window,
8840  even though it is double-spaced in the paper manuscript.
8841  Also, I chose not to make separate layouts for the preprint and preprint2
8842  styles.
8843  Since I assume you will spend most of your time in the plain manuscript
8844  mode anyway, I decided not to chew up more disk space with this.
8845  
8846 \end_layout
8847
8848 \begin_layout Subsection
8849 Final Caveat
8850 \end_layout
8851
8852 \begin_layout Standard
8853 Your mileage may vary.
8854  I've now had papers published by both ApJ and AJ that have had 98% of the
8855  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8856  cleanups.
8857  I have had no trouble with the submission process, and I'm sure the journals
8858  were never aware that there might be a difference.
8859  So, go forth and publish!
8860 \end_layout
8861
8862 \begin_layout Section
8863 AMS LaTeX
8864 \end_layout
8865
8866 \begin_layout Standard
8867 by 
8868 \noun on
8869 David Johnson
8870 \noun default
8871 ; updated by 
8872 \noun on
8873 Richard Heck
8874 \end_layout
8875
8876 \begin_layout Standard
8877 \begin_inset VSpace bigskip
8878 \end_inset
8879
8880
8881 \end_layout
8882
8883 \begin_layout Standard
8884 \noindent
8885 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8886  papers to be submitted to American Mathematical Society publications.
8887  The layouts are not tailored to a specific journal, but easily can be.
8888  You should refer to the AMS documentation for specific instructions for
8889  each journal (usually it will entail only changing a single line in the
8890  TeX output).
8891  That documentation is available on the Web at 
8892 \begin_inset Flex URL
8893 status open
8894
8895 \begin_layout Plain Layout
8896
8897 http://www.ams.org
8898 \end_layout
8899
8900 \end_inset
8901
8902  or by ftp at 
8903 \begin_inset Flex URL
8904 status open
8905
8906 \begin_layout Plain Layout
8907
8908 ftp://ftp.ams.org/pub/tex/amslatex/
8909 \end_layout
8910
8911 \end_inset
8912
8913 .
8914  These layouts are appropriate, and useful, for any mathematical writing.
8915  
8916 \end_layout
8917
8918 \begin_layout Standard
8919 There are two basic AMS LaTeX layouts: 
8920 \end_layout
8921
8922 \begin_layout Itemize
8923 amsart: The standard AMS article format.
8924 \end_layout
8925
8926 \begin_layout Itemize
8927 amsbook: the standard AMS book (really, monograph) format.
8928  
8929 \end_layout
8930
8931 \begin_layout Standard
8932 The layouts themselves contain only the minimum necessary to use the AMS
8933  classes.
8934  They do not, in particular, contain any of the `theorem' environments used
8935  for setting theorems, lemmas, and the like.
8936  These are contained, instead, in the 
8937 \begin_inset Flex Code
8938 status collapsed
8939
8940 \begin_layout Plain Layout
8941 Theorems (AMS)
8942 \end_layout
8943
8944 \end_inset
8945
8946  module, which is loaded by default when you select one of the AMS classes.
8947  (It can also be used with other classes and can be removed, if you would
8948  rather use something else.) Less commonly used environments are in the 
8949 \begin_inset Flex Code
8950 status collapsed
8951
8952 \begin_layout Plain Layout
8953 Theorems (AMS-Extended)
8954 \end_layout
8955
8956 \end_inset
8957
8958  module, which must be loaded manually.
8959 \end_layout
8960
8961 \begin_layout Standard
8962 By default, theorems and the like are numbered consecutively throughout
8963  the document, but this may be modified by loading the module 
8964 \begin_inset Flex Code
8965 status collapsed
8966
8967 \begin_layout Plain Layout
8968 Theorems (Order by Section)
8969 \end_layout
8970
8971 \end_inset
8972
8973  or, if you are using 
8974 \begin_inset Flex Code
8975 status collapsed
8976
8977 \begin_layout Plain Layout
8978 book (AMS)
8979 \end_layout
8980
8981 \end_inset
8982
8983 , the module 
8984 \begin_inset Flex Code
8985 status collapsed
8986
8987 \begin_layout Plain Layout
8988 Theorems (Order by Chapter)
8989 \end_layout
8990
8991 \end_inset
8992
8993 .
8994  These will number the results as 
8995 \begin_inset Formula $n.m$
8996 \end_inset
8997
8998 , where the first number refers to the section (or chapter) and the second
8999  refers to the total number of results so far in that section (or chapter).
9000  Many environments are also available unnumbered.
9001  These are indicated by an asterisk at the end.
9002  If you happen to want 
9003 \emph on
9004 only
9005 \emph default
9006  unnumbered results, the module 
9007 \begin_inset Flex Code
9008 status collapsed
9009
9010 \begin_layout Plain Layout
9011 Theorems (Starred)
9012 \end_layout
9013
9014 \end_inset
9015
9016  provides that option.
9017 \end_layout
9018
9019 \begin_layout Standard
9020 Note that these modules do not 
9021 \emph on
9022 have
9023 \emph default
9024  to be used with the AMS classes.
9025  It is perfectly possible to use the 
9026 \begin_inset Flex Code
9027 status collapsed
9028
9029 \begin_layout Plain Layout
9030 Theorems (AMS)
9031 \end_layout
9032
9033 \end_inset
9034
9035  module, and the others mentioned, with other classes, such as 
9036 \begin_inset Flex Code
9037 status collapsed
9038
9039 \begin_layout Plain Layout
9040 article
9041 \end_layout
9042
9043 \end_inset
9044
9045
9046 \begin_inset Flex Code
9047 status collapsed
9048
9049 \begin_layout Plain Layout
9050 report
9051 \end_layout
9052
9053 \end_inset
9054
9055
9056 \begin_inset Flex Code
9057 status collapsed
9058
9059 \begin_layout Plain Layout
9060 book (KOMA-script)
9061 \end_layout
9062
9063 \end_inset
9064
9065 , and so forth.
9066 \end_layout
9067
9068 \begin_layout Subsection
9069 What these layouts provide
9070 \end_layout
9071
9072 \begin_layout Standard
9073 There is a long list of included environments provided by these layouts.
9074  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9075  variety of `theorem' environments.
9076  However, the AMS recommends the environments that are available in LyX.
9077  
9078 \end_layout
9079
9080 \begin_layout Standard
9081 The following environments—as well as the standard environments, such as
9082  
9083 \begin_inset Flex Noun
9084 status collapsed
9085
9086 \begin_layout Plain Layout
9087 section
9088 \end_layout
9089
9090 \end_inset
9091
9092
9093 \begin_inset Flex Noun
9094 status collapsed
9095
9096 \begin_layout Plain Layout
9097 bibliography
9098 \end_layout
9099
9100 \end_inset
9101
9102
9103 \begin_inset Flex Noun
9104 status collapsed
9105
9106 \begin_layout Plain Layout
9107 title
9108 \end_layout
9109
9110 \end_inset
9111
9112
9113 \begin_inset Flex Noun
9114 status collapsed
9115
9116 \begin_layout Plain Layout
9117 author
9118 \end_layout
9119
9120 \end_inset
9121
9122 , and 
9123 \begin_inset Flex Noun
9124 status collapsed
9125
9126 \begin_layout Plain Layout
9127 date
9128 \end_layout
9129
9130 \end_inset
9131
9132 —are provided by 
9133 \begin_inset Flex Code
9134 status collapsed
9135
9136 \begin_layout Plain Layout
9137 article (AMS)
9138 \end_layout
9139
9140 \end_inset
9141
9142  and 
9143 \begin_inset Flex Code
9144 status collapsed
9145
9146 \begin_layout Plain Layout
9147 book (AMS)
9148 \end_layout
9149
9150 \end_inset
9151
9152 :
9153 \end_layout
9154
9155 \begin_layout Description
9156 Address This should be the author's permanent address.
9157 \end_layout
9158
9159 \begin_layout Description
9160 Current
9161 \begin_inset space ~
9162 \end_inset
9163
9164 Address This should be the author's temporary address at the time of submission,
9165  if different from the Address.
9166 \end_layout
9167
9168 \begin_layout Description
9169 Email Author's e-mail address
9170 \end_layout
9171
9172 \begin_layout Description
9173 URL Author's Web address, if desired.
9174 \end_layout
9175
9176 \begin_layout Description
9177 Keywords Key words or phrases used to identify specific topics discussed
9178  in the paper.
9179 \end_layout
9180
9181 \begin_layout Description
9182 Subjectclass These refer to the AMS Subject Classifications, published and
9183  described in 
9184 \emph on
9185 Mathematical Reviews
9186 \emph default
9187 .
9188  These are also available online at the AMS cites listed above.
9189 \end_layout
9190
9191 \begin_layout Description
9192 Thanks
9193 \end_layout
9194
9195 \begin_layout Description
9196 Dedicatory
9197 \end_layout
9198
9199 \begin_layout Description
9200 Translator
9201 \end_layout
9202
9203 \begin_layout Standard
9204 The following environments are provided by both the 
9205 \begin_inset Flex Code
9206 status collapsed
9207
9208 \begin_layout Plain Layout
9209 Theorems
9210 \end_layout
9211
9212 \end_inset
9213
9214  and 
9215 \begin_inset Flex Code
9216 status collapsed
9217
9218 \begin_layout Plain Layout
9219 Theorems (AMS)
9220 \end_layout
9221
9222 \end_inset
9223
9224  modules, in the latter case in both starred (unnumbered) and unstarred
9225  (numbered) versions.
9226  These same environments are provided only in the starred versions by the
9227  
9228 \begin_inset Flex Code
9229 status collapsed
9230
9231 \begin_layout Plain Layout
9232 Theorems (Starred)
9233 \end_layout
9234
9235 \end_inset
9236
9237  module:
9238 \end_layout
9239
9240 \begin_layout Theorem
9241 This is typically used for the statements of major results.
9242  
9243 \end_layout
9244
9245 \begin_layout Corollary*
9246 This is used for statements which follow fairly directly from previous statement
9247 s.
9248  Again, these can be major results.
9249  
9250 \end_layout
9251
9252 \begin_layout Lemma
9253 These are smaller results needed to prove other statements.
9254 \end_layout
9255
9256 \begin_layout Proposition
9257 These are less major results which (hopefully) add to the general theory
9258  being discussed.
9259 \end_layout
9260
9261 \begin_layout Conjecture
9262 These are statements provided without justification, which the author does
9263  not know how to prove, but which seem to be true (to the author, at least).
9264 \end_layout
9265
9266 \begin_layout Definition*
9267 Guess what this is for.
9268  The font is different for this environment than for the previous ones.
9269  
9270 \end_layout
9271
9272 \begin_layout Example*
9273 Used for examples illustrating proven results.
9274 \end_layout
9275
9276 \begin_layout Problem
9277 It's not really known what this is for.
9278  You should figure it out.
9279 \end_layout
9280
9281 \begin_layout Exercise*
9282 Write a description for this one.
9283 \end_layout
9284
9285 \begin_layout Remark
9286 This environment is also a type of theorem, usually a lesser sort of observation.
9287 \end_layout
9288
9289 \begin_layout Claim*
9290 Often used in the course of giving a proof of a larger result.
9291 \end_layout
9292
9293 \begin_layout Case
9294 Generally, these are used to break up long arguments, using specific instances
9295  of some condition.
9296  
9297 \end_layout
9298
9299 \begin_layout Case
9300 The numbering scheme for cases is on its own, not together with other numbered
9301  statements.
9302  
9303 \end_layout
9304
9305 \begin_layout Proof
9306 At the end of this environment, a QED symbol (usually a square, but it can
9307  vary with different styles) is placed.
9308  If you want to have other environments within this one—for example, Case
9309  environments—and have the QED symbol appear only after them, then the other
9310  environments need to be nested within the proof environment.
9311  See the section 
9312 \emph on
9313 Nesting Environments
9314 \emph default
9315  of the 
9316 \emph on
9317 User's Guide
9318 \emph default
9319  for information on nesting.
9320 \end_layout
9321
9322 \begin_layout Standard
9323 And these environments are provided by 
9324 \begin_inset Flex Code
9325 status collapsed
9326
9327 \begin_layout Plain Layout
9328 Theorems (AMS-Extended)
9329 \end_layout
9330
9331 \end_inset
9332
9333 :
9334 \end_layout
9335
9336 \begin_layout Criterion*
9337 A required condition.
9338 \end_layout
9339
9340 \begin_layout Algorithm*
9341 A general procedure to be used.
9342 \end_layout
9343
9344 \begin_layout Axiom*
9345 This is a property or statement taken as true within the system being discussed.
9346 \end_layout
9347
9348 \begin_layout Condition*
9349 Sometimes used to state a condition assumed within the present context of
9350  discussion.
9351 \end_layout
9352
9353 \begin_layout Note*
9354 Similar to a Remark.
9355 \end_layout
9356
9357 \begin_layout Notation*
9358 Used for the explanation of, yes, notation.
9359 \end_layout
9360
9361 \begin_layout Summary
9362 Do we really need to tell you? 
9363 \end_layout
9364
9365 \begin_layout Acknowledgement*
9366 Acknowledgement.
9367 \end_layout
9368
9369 \begin_layout Conclusion*
9370 Sometimes used at the end of a long train of argument.
9371 \end_layout
9372
9373 \begin_layout Fact
9374 Used in a way similar to Proposition, though perhaps lower on the scale.
9375 \end_layout
9376
9377 \begin_layout Standard
9378 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9379  fonts packages.
9380  They need to be available on your system in order to use these environments.
9381 \end_layout
9382
9383 \begin_layout Section
9384 AGU journals (
9385 \family sans
9386 aguplus
9387 \family default
9388 )
9389 \end_layout
9390
9391 \begin_layout Standard
9392 by 
9393 \shape smallcaps
9394 Martin Vermeer
9395 \end_layout
9396
9397 \begin_layout Subsection
9398 Description
9399 \end_layout
9400
9401 \begin_layout Standard
9402 These are the layout files for some of the journals of the American Geophysical
9403  Society.
9404  It is assumed that you have both the AGU's own class files and AGUplus
9405  installed (everything to be found at
9406 \begin_inset Flex URL
9407 status collapsed
9408
9409 \begin_layout Plain Layout
9410
9411 ftp://ftp.agu.org/journals/latex/journals
9412 \end_layout
9413
9414 \end_inset
9415
9416 ).
9417 \end_layout
9418
9419 \begin_layout Subsection
9420 New styles
9421 \end_layout
9422
9423 \begin_layout Standard
9424 Redefined are 
9425 \family sans
9426 Paragraph
9427 \family default
9428
9429 \family sans
9430 Paragraph*
9431 \family default
9432 .
9433  They are still called this in the LyX GUI, though their LaTeX equivalents
9434  in the AGU classes are 
9435 \family sans
9436 Subsubsubsection
9437 \family default
9438  and 
9439 \family sans
9440 Subsubsubsection*
9441 \family default
9442 .
9443 \end_layout
9444
9445 \begin_layout Standard
9446 Newly defined styles are 
9447 \family sans
9448 Left_Header
9449 \family default
9450
9451 \family sans
9452 Right_Header
9453 \family default
9454
9455 \family sans
9456 Received
9457 \family default
9458
9459 \family sans
9460 Revised
9461 \family default
9462
9463 \family sans
9464 Accepted
9465 \family default
9466
9467 \family sans
9468 CCC
9469 \family default
9470
9471 \family sans
9472 PaperId
9473 \family default
9474
9475 \family sans
9476 AuthorAddr
9477 \family default
9478
9479 \family sans
9480 SlugComment
9481 \family default
9482 .
9483  These are mostly manuscript attributes and defined in the AGU class documentati
9484 on.
9485 \end_layout
9486
9487 \begin_layout Standard
9488 I suspect this is still badly incomplete.
9489 \end_layout
9490
9491 \begin_layout Subsection
9492 New floats
9493 \end_layout
9494
9495 \begin_layout Standard
9496
9497 \family sans
9498 Planotable
9499 \family default
9500  and 
9501 \family sans
9502 Plate
9503 \family default
9504 .
9505  We also have a new 
9506 \family sans
9507 Table_Caption
9508 \family default
9509 .
9510 \end_layout
9511
9512 \begin_layout Subsection
9513 Supported journals
9514 \end_layout
9515
9516 \begin_layout Itemize
9517
9518 \emph on
9519 Journal of Geophysical Research
9520 \emph default
9521
9522 \family typewriter
9523 jgrga.layout
9524 \family default
9525  — Martin Vermeer
9526 \end_layout
9527
9528 \begin_layout Standard
9529 Add your own, it isn't so hard! Look at the 
9530 \family typewriter
9531 jgrga.layout
9532 \family default
9533  example and 
9534 \family typewriter
9535 aguplus.inc
9536 \family default
9537 .
9538 \end_layout
9539
9540 \begin_layout Subsection
9541 Bugs and things to remember
9542 \end_layout
9543
9544 \begin_layout Standard
9545 In order to use the new layouts, you must remember to do the following for
9546  a new document:
9547 \end_layout
9548
9549 \begin_layout Enumerate
9550
9551 \emph on
9552 Turn off babel
9553 \emph default
9554 .
9555  This can be done in the 
9556 \family sans
9557 Layout\SpecialChar \menuseparator
9558 Document
9559 \family default
9560  or 
9561 \family sans
9562 Document\SpecialChar \menuseparator
9563 Settings
9564 \family default
9565  menu item.
9566  (AGU articles are always in English, right? So 
9567 \emph on
9568 don't
9569 \emph default
9570  choose a language.)
9571 \end_layout
9572
9573 \begin_layout Enumerate
9574 Enter 
9575 \family typewriter
9576 jgrga
9577 \family default
9578  into the document's 
9579 \family sans
9580 Extra Options
9581 \family default
9582  field.
9583  (Yes, this is a bug.)
9584 \end_layout
9585
9586 \begin_layout Enumerate
9587 Make sure you use the 
9588 \family typewriter
9589 agu.bst
9590 \family default
9591  bibliography style, by entering 
9592 \family sans
9593 agu
9594 \family default
9595  into the second field of the BibTeX inset.
9596  None of the standard styles will do.
9597 \end_layout
9598
9599 \begin_layout Section
9600 Broadway
9601 \end_layout
9602
9603 \begin_layout Standard
9604 by 
9605 \shape smallcaps
9606 Garst Reese
9607 \end_layout
9608
9609 \begin_layout Subsection
9610 Introduction
9611 \end_layout
9612
9613 \begin_layout Standard
9614 Broadway is for writing plays.
9615  The format is more decorative than Hollywood, and much less standardized.
9616  This format should be suitable for workshops.
9617 \end_layout
9618
9619 \begin_layout Subsection
9620 Special problems
9621 \end_layout
9622
9623 \begin_layout Standard
9624 The same as in Hollywood.
9625 \end_layout
9626
9627 \begin_layout Subsection
9628 Special features
9629 \end_layout
9630
9631 \begin_layout Standard
9632 Insert the 
9633 \family sans
9634 Speaker
9635 \family default
9636  names as labels then cross-reference the label to insert the name.
9637  The cross-reference dialog will show the current cast of characters.
9638 \end_layout
9639
9640 \begin_layout Subsection
9641 Paper size and Margins
9642 \end_layout
9643
9644 \begin_layout Standard
9645 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9646 \end_layout
9647
9648 \begin_layout Subsection
9649 Environments
9650 \end_layout
9651
9652 \begin_layout Standard
9653 The following environments are available.
9654  You can use broadway.bind to get the bind keys shown at the right.
9655 \end_layout
9656
9657 \begin_layout Itemize
9658
9659 \family sans
9660 Standard
9661 \begin_inset Newline newline
9662 \end_inset
9663
9664
9665 \family default
9666 You should not have to use this, but it is here for anything that does not
9667  fit otherwise.
9668 \end_layout
9669
9670 \begin_layout Itemize
9671
9672 \family sans
9673 Narrative
9674 \begin_inset space \hfill{}
9675 \end_inset
9676
9677 M-z n
9678 \begin_inset Newline newline
9679 \end_inset
9680
9681
9682 \family default
9683 Used to describe stage setting and the action.
9684  First use of speaker names in all CAPs.
9685 \end_layout
9686
9687 \begin_layout Itemize
9688
9689 \family sans
9690 ACT
9691 \begin_inset space \hfill{}
9692 \end_inset
9693
9694 M-z a
9695 \begin_inset Newline newline
9696 \end_inset
9697
9698
9699 \family default
9700 Automatically numbered.
9701  On screen it will be arabic, but will print as Roman.
9702 \end_layout
9703
9704 \begin_layout Itemize
9705
9706 \family sans
9707 ACT*
9708 \begin_inset space \hfill{}
9709 \end_inset
9710
9711 M-z S at
9712 \begin_inset Newline newline
9713 \end_inset
9714
9715
9716 \family default
9717 Subtitle for 
9718 \family sans
9719 ACT.
9720
9721 \family default
9722  It is just centered text.
9723 \end_layout
9724
9725 \begin_layout Itemize
9726
9727 \family sans
9728 SCENE
9729 \begin_inset space \hfill{}
9730 \end_inset
9731
9732 M-z S-S
9733 \begin_inset Newline newline
9734 \end_inset
9735
9736
9737 \family default
9738 Not automatically numbered.
9739  You supply the number.
9740  This is because I couldn't figure out how.
9741 \end_layout
9742
9743 \begin_layout Itemize
9744
9745 \family sans
9746 AT_RISE:
9747 \begin_inset space \hfill{}
9748 \end_inset
9749
9750 M-z S-R
9751 \begin_inset Newline newline
9752 \end_inset
9753
9754
9755 \family default
9756 A special case of Narrative to describe the setting and action as the curtain
9757  rises.
9758 \end_layout
9759
9760 \begin_layout Itemize
9761
9762 \family sans
9763 Speaker
9764 \begin_inset space \hfill{}
9765 \end_inset
9766
9767 M-z s
9768 \begin_inset Newline newline
9769 \end_inset
9770
9771
9772 \family default
9773 The speaker's (actor's) title, centered in all CAPS.
9774 \end_layout
9775
9776 \begin_layout Itemize
9777
9778 \family sans
9779 Parenthetical
9780 \begin_inset space \hfill{}
9781 \end_inset
9782
9783 M-z p
9784 \begin_inset Newline newline
9785 \end_inset
9786
9787
9788 \family default
9789 Instructions to the speaker.
9790  The parentheses are automatically inserted.
9791  The ( will appear on screen, but both will be in the printed play.
9792  This environment is only used within 
9793 \family sans
9794 Dialogue
9795 \family default
9796 .
9797 \end_layout
9798
9799 \begin_layout Itemize
9800
9801 \family sans
9802 Dialogue
9803 \begin_inset space \hfill{}
9804 \end_inset
9805
9806 M-z d
9807 \begin_inset Newline newline
9808 \end_inset
9809
9810
9811 \family default
9812 What the Speaker says.
9813 \end_layout
9814
9815 \begin_layout Itemize
9816
9817 \family sans
9818 CURTAIN
9819 \begin_inset space \hfill{}
9820 \end_inset
9821
9822 M-z S-C
9823 \begin_inset Newline newline
9824 \end_inset
9825
9826
9827 \family default
9828 The curtain comes down.
9829 \end_layout
9830
9831 \begin_layout Itemize
9832
9833 \family sans
9834 Title
9835 \begin_inset space \hfill{}
9836 \end_inset
9837
9838 M-z S-T
9839 \end_layout
9840
9841 \begin_layout Itemize
9842
9843 \family sans
9844 Author
9845 \begin_inset space \hfill{}
9846 \end_inset
9847
9848 M-z S-A
9849 \end_layout
9850
9851 \begin_layout Itemize
9852
9853 \family sans
9854 Right_Address
9855 \begin_inset space \hfill{}
9856 \end_inset
9857
9858 M-z r
9859 \end_layout
9860
9861 \begin_layout Standard
9862 Hello there.
9863 \end_layout
9864
9865 \begin_layout Section
9866 Dinbrief
9867 \end_layout
9868
9869 \begin_layout Standard
9870 The document class 
9871 \family sans
9872 dinbrief
9873 \family default
9874  can be used to type letters according to German conventions.
9875  A template file is included in 
9876 \family typewriter
9877 .../lyx/share/templates
9878 \family default
9879  for you to use as a starting point.
9880 \end_layout
9881
9882 \begin_layout Section
9883 EGS journals (
9884 \family sans
9885 egs
9886 \family default
9887 )
9888 \end_layout
9889
9890 \begin_layout Standard
9891 by 
9892 \shape smallcaps
9893 Martin Vermeer
9894 \end_layout
9895
9896 \begin_layout Subsection
9897 Description
9898 \end_layout
9899
9900 \begin_layout Standard
9901 This is the layout file for the European Geophysical Society journals.
9902  The needed 
9903 \family typewriter
9904 egs.cls
9905 \family default
9906  can be downloaded from the web site of the EGS under 
9907 \begin_inset Flex URL
9908 status collapsed
9909
9910 \begin_layout Plain Layout
9911
9912 www.copernicus.org
9913 \end_layout
9914
9915 \end_inset
9916
9917 .
9918 \end_layout
9919
9920 \begin_layout Subsection
9921 New styles
9922 \end_layout
9923
9924 \begin_layout Standard
9925
9926 \family sans
9927 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9928  Accepted
9929 \family default
9930
9931 \family sans
9932 Offsets
9933 \family default
9934 .
9935  The current layout file is unfortunately very unmodular and would benefit
9936  from using the various 
9937 \family typewriter
9938 std*.inc
9939 \family default
9940  file inclusions.
9941 \end_layout
9942
9943 \begin_layout Section
9944 Elsevier Journals
9945 \end_layout
9946
9947 \begin_layout Standard
9948 See the LyX template file 
9949 \family typewriter
9950 elsarticle.lyx
9951 \family default
9952 .
9953  It contains all infos you need.
9954 \end_layout
9955
9956 \begin_layout Section
9957 Foils [aka 
9958 \family sans
9959 FoilTeX
9960 \family default
9961 ]
9962 \begin_inset CommandInset label
9963 LatexCommand label
9964 name "sec:foiltex"
9965
9966 \end_inset
9967
9968
9969 \end_layout
9970
9971 \begin_layout Standard
9972 by 
9973 \noun on
9974 Allan Rae
9975 \end_layout
9976
9977 \begin_layout Subsection
9978 Introduction
9979 \end_layout
9980
9981 \begin_layout Standard
9982 This section describes how to use LyX to make slides for overhead projectors.
9983  There are two document classes that can do this: the default slides class
9984  and the 
9985 \family sans
9986 FoilTeX
9987 \family default
9988  slides class.
9989  This section documents the latter.
9990 \end_layout
9991
9992 \begin_layout Standard
9993 I'm going to say this again, nice and clear, so that there's no misunderstanding
9994 :
9995 \end_layout
9996
9997 \begin_layout Standard
9998 \begin_inset VSpace bigskip
9999 \end_inset
10000
10001
10002 \end_layout
10003
10004 \begin_layout Standard
10005 \align center
10006
10007 \size large
10008 This section documents the class 
10009 \begin_inset Quotes eld
10010 \end_inset
10011
10012
10013 \family sans
10014 slides (FoilTeX)
10015 \family default
10016
10017 \begin_inset Quotes erd
10018 \end_inset
10019
10020  
10021 \emph on
10022 only.
10023 \end_layout
10024
10025 \begin_layout Standard
10026 \begin_inset VSpace bigskip
10027 \end_inset
10028
10029
10030 \end_layout
10031
10032 \begin_layout Standard
10033 If you're looking for the documentation for 
10034 \begin_inset Quotes eld
10035 \end_inset
10036
10037
10038 \family sans
10039 slides (default)
10040 \family default
10041
10042 \begin_inset Quotes erd
10043 \end_inset
10044
10045 , check out section
10046 \begin_inset space ~
10047 \end_inset
10048
10049
10050 \begin_inset CommandInset ref
10051 LatexCommand ref
10052 reference "sec:slitex"
10053
10054 \end_inset
10055
10056 .
10057  If your machine doesn't have the 
10058 \family sans
10059 foils
10060 \family default
10061  class [
10062 \begin_inset Quotes eld
10063 \end_inset
10064
10065
10066 \family sans
10067 slides (FoilTeX)
10068 \family default
10069
10070 \begin_inset Quotes erd
10071 \end_inset
10072
10073 ] installed, you'll probably have to use the default 
10074 \family sans
10075 slides
10076 \family default
10077  class, which isn't quite as good as 
10078 \family sans
10079 foils.
10080 \end_layout
10081
10082 \begin_layout Standard
10083 The 
10084 \family sans
10085 foils
10086 \family default
10087  class is designed for use with version 2.1 of the 
10088 \family sans
10089 foils.cls
10090 \family default
10091  LaTeX class file which is now an integral part of LaTeX2e.
10092 \end_layout
10093
10094 \begin_layout Subsection
10095 Getting Started
10096 \end_layout
10097
10098 \begin_layout Standard
10099 Obviously, to use this document class, you need to select 
10100 \begin_inset Quotes eld
10101 \end_inset
10102
10103
10104 \family sans
10105 slides (FoilTeX)
10106 \family default
10107
10108 \begin_inset Quotes erd
10109 \end_inset
10110
10111  from the 
10112 \family sans
10113 Class
10114 \family default
10115  entry in the 
10116 \family sans
10117 Document
10118 \begin_inset space ~
10119 \end_inset
10120
10121 Layout
10122 \family default
10123  dialog.
10124  There are some settings in the 
10125 \family sans
10126 Document
10127 \begin_inset space ~
10128 \end_inset
10129
10130 Layout
10131 \family default
10132  dialog that you should know about that are specific to this class:
10133 \end_layout
10134
10135 \begin_layout Itemize
10136 Don't change the options 
10137 \family sans
10138 Sides
10139 \family default
10140  and 
10141 \family sans
10142 Columns
10143 \family default
10144  on the 
10145 \family sans
10146 Document
10147 \begin_inset space ~
10148 \end_inset
10149
10150 Layout
10151 \family default
10152  dialog.
10153  They're ignored by the 
10154 \family sans
10155 foils
10156 \family default
10157  class.
10158 \end_layout
10159
10160 \begin_layout Itemize
10161 The default font size is 20
10162 \begin_inset space \thinspace{}
10163 \end_inset
10164
10165 pt with the other options being 17
10166 \begin_inset space \thinspace{}
10167 \end_inset
10168
10169 pt, 25
10170 \begin_inset space \thinspace{}
10171 \end_inset
10172
10173 pt and 30
10174 \begin_inset space \thinspace{}
10175 \end_inset
10176
10177 pt.
10178 \end_layout
10179
10180 \begin_layout Itemize
10181 The default font is 
10182 \family sans
10183 sans
10184 \family default
10185  
10186 \family sans
10187 serif
10188 \family default
10189  but all math equations are still typeset in the usual roman font.
10190 \end_layout
10191
10192 \begin_layout Itemize
10193
10194 \family sans
10195 FoilTeX
10196 \family default
10197  supports A4 and Letter paper sizes as well as a special size for working
10198  with 35
10199 \begin_inset space \thinspace{}
10200 \end_inset
10201
10202 mm slides.
10203  It doesn't support A5, B5, legal or executive paper sizes.
10204 \end_layout
10205
10206 \begin_layout Itemize
10207 Don't bother changing the 
10208 \family sans
10209 Float Placement
10210 \family default
10211  settings because they are ignored anyway.
10212  All floats appear where they are defined in the text.
10213 \end_layout
10214
10215 \begin_layout Itemize
10216 The 
10217 \family sans
10218 Pagestyle
10219 \family default
10220  setting behaves a bit differently for this class.
10221  
10222 \family sans
10223 FoilTeX
10224 \family default
10225  provides extensive footer and header capabilities including a user-defined
10226  logo.
10227  See section
10228 \begin_inset space ~
10229 \end_inset
10230
10231
10232 \begin_inset CommandInset ref
10233 LatexCommand ref
10234 reference "sec:foilfoot"
10235
10236 \end_inset
10237
10238  for more details.
10239  The title page is treated differently to all other pages in the document
10240  and is 
10241 \emph on
10242 always
10243 \emph default
10244  unnumbered and 
10245 \emph on
10246 always
10247 \emph default
10248  has the logo centered at the bottom of the page (if one is defined).
10249  The possible page style choices and what they do are as follows:
10250 \end_layout
10251
10252 \begin_deeper
10253 \begin_layout Labeling
10254 \labelwidthstring MMMMMMM
10255
10256 \family sans
10257 \series bold
10258 empty
10259 \family default
10260 \series default
10261  The final output contains no page numbers, or other headers or footers
10262  (except footnotes of course).
10263  
10264 \end_layout
10265
10266 \begin_layout Labeling
10267 \labelwidthstring MMMMMMM
10268
10269 \family sans
10270 \series bold
10271 plain
10272 \family default
10273 \series default
10274  The final output contains page numbers centered at the bottom of the page.
10275  No other headings or footers (other than footnotes).
10276 \end_layout
10277
10278 \begin_layout Labeling
10279 \labelwidthstring MMMMMMM
10280
10281 \series bold
10282 foilheadings
10283 \series default
10284  Page numbers in lower right corner.
10285  Additional headers and footers are also shown.
10286  This is also the default.
10287 \end_layout
10288
10289 \begin_layout Labeling
10290 \labelwidthstring MMMMMMM
10291
10292 \series bold
10293 fancy
10294 \series default
10295  Gives you access to the 
10296 \family sans
10297 fancyheadings
10298 \family default
10299  package although its use with 
10300 \family sans
10301 FoilTeX
10302 \family default
10303  is discouraged by the writer of the 
10304 \family sans
10305 FoilTeX
10306 \family default
10307  package because of some potential page layout clashes.
10308 \end_layout
10309
10310 \end_deeper
10311 \begin_layout Subsubsection
10312 Extra Options
10313 \end_layout
10314
10315 \begin_layout Standard
10316 The following options may be used in the extra class options in the 
10317 \family sans
10318 Document\SpecialChar \menuseparator
10319 Settings
10320 \family default
10321  dialog.
10322 \end_layout
10323
10324 \begin_layout Labeling
10325 \labelwidthstring MMMMMMx
10326
10327 \series bold
10328 35mmSlide
10329 \series default
10330  This sets up the page layout for 7.33
10331 \begin_inset space \thinspace{}
10332 \end_inset
10333
10334 in by 11
10335 \begin_inset space \thinspace{}
10336 \end_inset
10337
10338 in paper, which is about the same aspect ratio as a 35
10339 \begin_inset space \thinspace{}
10340 \end_inset
10341
10342 mm slide, making it a bit easier to work with this medium.
10343 \end_layout
10344
10345 \begin_layout Labeling
10346 \labelwidthstring MMMMMMx
10347
10348 \series bold
10349 headrule
10350 \series default
10351  Places a rule across the page below the header on every page except the
10352  title page.
10353 \end_layout
10354
10355 \begin_layout Labeling
10356 \labelwidthstring MMMMMMx
10357
10358 \series bold
10359 footrule
10360 \series default
10361  Places a rule across the page above the footer on every page except the
10362  title page.
10363 \end_layout
10364
10365 \begin_layout Labeling
10366 \labelwidthstring MMMMMMx
10367
10368 \series bold
10369 dvips
10370 \series default
10371  This is automatically set each time you create a new 
10372 \family sans
10373 foils
10374 \family default
10375  document.
10376  This option tells 
10377 \family sans
10378 FoilTeX
10379 \family default
10380  to use the dvips driver to rotate those pages that are set as landscape
10381  foils.
10382 \end_layout
10383
10384 \begin_layout Labeling
10385 \labelwidthstring MMMMMMx
10386
10387 \series bold
10388 landscape
10389 \series default
10390  Simply changes the page dimensions to those of a landscape page but doesn't
10391  do any rotation.
10392  Thus if you use this option you need to use an external program to rotate
10393  each page or feed your paper through your printer as landscape.
10394  Note that this option effectively reverses the roles of the 
10395 \family sans
10396 Foilhead
10397 \family default
10398  and 
10399 \family sans
10400 Rotatefoilhead
10401 \family default
10402  environments (don't worry these are described in the next section).
10403 \end_layout
10404
10405 \begin_layout Labeling
10406 \labelwidthstring MMMMMMx
10407
10408 \series bold
10409 leqno
10410 \series default
10411  Equation numbers on the left.
10412 \end_layout
10413
10414 \begin_layout Labeling
10415 \labelwidthstring MMMMMMx
10416
10417 \series bold
10418 fleqn
10419 \series default
10420  Flush-left equations.
10421 \end_layout
10422
10423 \begin_layout Subsection
10424 Supported Environments
10425 \end_layout
10426
10427 \begin_layout Standard
10428 Most of the environments commonly supported in other classes are also supported
10429  by the 
10430 \family sans
10431 foils
10432 \family default
10433  class.
10434  There are several additional environments provided by 
10435 \family sans
10436 FoilTeX
10437 \family default
10438  as well as a couple added by LyX.
10439  The following environments are shared with other classes:
10440 \end_layout
10441
10442 \begin_layout Standard
10443 \begin_inset ERT
10444 status open
10445
10446 \begin_layout Plain Layout
10447
10448
10449 \backslash
10450 begin{multicols}{2}
10451 \end_layout
10452
10453 \end_inset
10454
10455
10456 \end_layout
10457
10458 \begin_layout Itemize
10459
10460 \family sans
10461 Standard
10462 \end_layout
10463
10464 \begin_layout Itemize
10465
10466 \family sans
10467 Itemize
10468 \end_layout
10469
10470 \begin_layout Itemize
10471
10472 \family sans
10473 Enumerate
10474 \end_layout
10475
10476 \begin_layout Itemize
10477
10478 \family sans
10479 Description
10480 \end_layout
10481
10482 \begin_layout Itemize
10483
10484 \family sans
10485 List
10486 \end_layout
10487
10488 \begin_layout Itemize
10489
10490 \family sans
10491 LyX-Code
10492 \end_layout
10493
10494 \begin_layout Itemize
10495
10496 \family sans
10497 Verse
10498 \end_layout
10499
10500 \begin_layout Itemize
10501
10502 \family sans
10503 Quote
10504 \end_layout
10505
10506 \begin_layout Itemize
10507
10508 \family sans
10509 Quotation
10510 \end_layout
10511
10512 \begin_layout Itemize
10513
10514 \family sans
10515 Title
10516 \end_layout
10517
10518 \begin_layout Itemize
10519
10520 \family sans
10521 Author
10522 \end_layout
10523
10524 \begin_layout Itemize
10525
10526 \family sans
10527 Date
10528 \end_layout
10529
10530 \begin_layout Itemize
10531
10532 \family sans
10533 Abstract
10534 \end_layout
10535
10536 \begin_layout Itemize
10537
10538 \family sans
10539 Bibliography
10540 \end_layout
10541
10542 \begin_layout Itemize
10543
10544 \family sans
10545 Address
10546 \end_layout
10547
10548 \begin_layout Itemize
10549
10550 \family sans
10551 RightAddress
10552 \end_layout
10553
10554 \begin_layout Itemize
10555
10556 \family sans
10557 Caption
10558 \end_layout
10559
10560 \begin_layout Itemize
10561
10562 \family sans
10563 Comment
10564 \end_layout
10565
10566 \begin_layout Standard
10567 \begin_inset ERT
10568 status open
10569
10570 \begin_layout Plain Layout
10571
10572
10573 \backslash
10574 end{multicols}
10575 \end_layout
10576
10577 \end_inset
10578
10579
10580 \end_layout
10581
10582 \begin_layout Standard
10583 That is, all the major environments apart from the sectioning environments.
10584  Since foils are essentially self-contained sections, with a title and body,
10585  
10586 \family sans
10587 FoilTeX
10588 \family default
10589  provides specific commands for starting new foils and these are:
10590 \end_layout
10591
10592 \begin_layout Itemize
10593
10594 \family sans
10595 Foilhead
10596 \end_layout
10597
10598 \begin_layout Itemize
10599
10600 \family sans
10601 Rotatefoilhead
10602 \end_layout
10603
10604 \begin_layout Standard
10605 LyX also provides slightly modified versions of these two environments called:
10606 \end_layout
10607
10608 \begin_layout Itemize
10609
10610 \family sans
10611 ShortFoilhead
10612 \end_layout
10613
10614 \begin_layout Itemize
10615
10616 \family sans
10617 ShortRotatefoilhead
10618 \end_layout
10619
10620 \begin_layout Standard
10621 and the differences will be explained in the next section.
10622 \end_layout
10623
10624 \begin_layout Standard
10625 Since foils are often used in presenting ideas or new theorems and such
10626  
10627 \family sans
10628 FoilTeX
10629 \family default
10630  also provides a comprehensive box of goodies for presenting them:
10631 \end_layout
10632
10633 \begin_layout Standard
10634 \begin_inset ERT
10635 status open
10636
10637 \begin_layout Plain Layout
10638
10639
10640 \backslash
10641 begin{multicols}{2}
10642 \end_layout
10643
10644 \end_inset
10645
10646
10647 \end_layout
10648
10649 \begin_layout Itemize
10650
10651 \family sans
10652 Theorem
10653 \end_layout
10654
10655 \begin_layout Itemize
10656
10657 \family sans
10658 Lemma
10659 \end_layout
10660
10661 \begin_layout Itemize
10662
10663 \family sans
10664 Corollary
10665 \end_layout
10666
10667 \begin_layout Itemize
10668
10669 \family sans
10670 Proposition
10671 \end_layout
10672
10673 \begin_layout Itemize
10674
10675 \family sans
10676 Definition
10677 \end_layout
10678
10679 \begin_layout Itemize
10680
10681 \family sans
10682 Proof
10683 \end_layout
10684
10685 \begin_layout Itemize
10686
10687 \family sans
10688 Theorem*
10689 \end_layout
10690
10691 \begin_layout Itemize
10692
10693 \family sans
10694 Lemma*
10695 \end_layout
10696
10697 \begin_layout Itemize
10698
10699 \family sans
10700 Corollary*
10701 \end_layout
10702
10703 \begin_layout Itemize
10704
10705 \family sans
10706 Proposition*
10707 \end_layout
10708
10709 \begin_layout Itemize
10710
10711 \family sans
10712 Definition*
10713 \end_layout
10714
10715 \begin_layout Standard
10716 \begin_inset ERT
10717 status open
10718
10719 \begin_layout Plain Layout
10720
10721
10722 \backslash
10723 end{multicols}
10724 \end_layout
10725
10726 \end_inset
10727
10728
10729 \end_layout
10730
10731 \begin_layout Standard
10732 The starred versions are unnumbered while the unstarred versions are numbered.
10733  There are also two list environments added by LyX and these are:
10734 \end_layout
10735
10736 \begin_layout Itemize
10737
10738 \family sans
10739 TickList
10740 \end_layout
10741
10742 \begin_layout Itemize
10743
10744 \family sans
10745 CrossList
10746 \end_layout
10747
10748 \begin_layout Standard
10749
10750 \family sans
10751 FoilTeX
10752 \family default
10753  provides some powerful header and footer capabilities that are best set
10754  in the preamble although they may be set at any point in a document.
10755  If you want to change these settings in your document the best place to
10756  do so is at the very top of a foil, i.
10757 \begin_inset space \thinspace{}
10758 \end_inset
10759
10760 e.
10761 \emph on
10762
10763 \begin_inset space \space{}
10764 \end_inset
10765
10766
10767 \emph default
10768 straight after the foilhead.
10769 \end_layout
10770
10771 \begin_layout Standard
10772 For this purpose, the following command styles are provided [
10773 \shape smallcaps
10774 Martin Vermeer
10775 \shape default
10776 ]:
10777 \end_layout
10778
10779 \begin_layout Standard
10780 \begin_inset ERT
10781 status open
10782
10783 \begin_layout Plain Layout
10784
10785
10786 \backslash
10787 begin{multicols}{2}
10788 \end_layout
10789
10790 \end_inset
10791
10792
10793 \end_layout
10794
10795 \begin_layout Itemize
10796
10797 \family sans
10798 My
10799 \begin_inset space ~
10800 \end_inset
10801
10802 Logo
10803 \end_layout
10804
10805 \begin_layout Itemize
10806
10807 \family sans
10808 Restriction
10809 \end_layout
10810
10811 \begin_layout Itemize
10812
10813 \family sans
10814 Right
10815 \begin_inset space ~
10816 \end_inset
10817
10818 Footer
10819 \end_layout
10820
10821 \begin_layout Itemize
10822
10823 \family sans
10824 Right
10825 \begin_inset space ~
10826 \end_inset
10827
10828 Header
10829 \end_layout
10830
10831 \begin_layout Itemize
10832
10833 \family sans
10834 Left
10835 \begin_inset space ~
10836 \end_inset
10837
10838 Header
10839 \end_layout
10840
10841 \begin_deeper
10842 \begin_layout Standard
10843 \begin_inset space ~
10844 \end_inset
10845
10846
10847 \end_layout
10848
10849 \end_deeper
10850 \begin_layout Standard
10851 \begin_inset ERT
10852 status open
10853
10854 \begin_layout Plain Layout
10855
10856
10857 \backslash
10858 end{multicols}
10859 \end_layout
10860
10861 \end_inset
10862
10863
10864 \end_layout
10865
10866 \begin_layout Standard
10867 There are also a few commands provided by 
10868 \family sans
10869 FoilTeX
10870 \family default
10871  that aren't directly supported by LyX but I'll tell you what they do and
10872  how to use them in section
10873 \begin_inset space ~
10874 \end_inset
10875
10876
10877 \begin_inset CommandInset ref
10878 LatexCommand ref
10879 reference "sec:unsuppfoils"
10880
10881 \end_inset
10882
10883 .
10884 \end_layout
10885
10886 \begin_layout Subsection
10887 Building a Set of Foils
10888 \end_layout
10889
10890 \begin_layout Standard
10891 This section will give a simple introduction to using the different environments
10892  to build a set of foils.
10893  If you want to see an example set of foils, take a look at the 
10894 \family typewriter
10895 Foils.lyx
10896 \family default
10897  file you find in LyX's 
10898 \family typewriter
10899 examples
10900 \family default
10901  folder.
10902 \end_layout
10903
10904 \begin_layout Subsubsection
10905 Give It a Title Page
10906 \end_layout
10907
10908 \begin_layout Standard
10909 Unlike other classes that provide 
10910 \family sans
10911 Title
10912 \family default
10913
10914 \family sans
10915 Author
10916 \family default
10917
10918 \family sans
10919 Date
10920 \family default
10921  and 
10922 \family sans
10923 Abstract
10924 \family default
10925  environments, 
10926 \family sans
10927 foils
10928 \family default
10929  creates the title on a page of its own.
10930  If you leave out the 
10931 \family sans
10932 Date
10933 \family default
10934  environment LaTeX will substitute the current date (every time you regenerate
10935  the output).
10936 \end_layout
10937
10938 \begin_layout Subsubsection
10939 Start a New Foil
10940 \end_layout
10941
10942 \begin_layout Standard
10943 As I mentioned earlier, there are four ways of starting a new foil.
10944  For portrait foils you should use 
10945 \family sans
10946 Foilhead
10947 \family default
10948  or 
10949 \family sans
10950 ShortFoilhead.
10951
10952 \family default
10953  The difference between these two environments is the amount of space between
10954  the title of the foil (the foilhead) and the body of the foil.
10955 \end_layout
10956
10957 \begin_layout Standard
10958 Landscape foils are generated using the 
10959 \family sans
10960 Rotatefoilhead
10961 \family default
10962  and 
10963 \family sans
10964 ShortRotatefoilhead
10965 \family default
10966  environments.
10967  Again the only difference is the spacing between foilhead and body.
10968  Both of the short versions have 0.5 inches less separation between the foilhead
10969  and the body.
10970  
10971 \end_layout
10972
10973 \begin_layout Standard
10974 One problem with the support for landscape foils is the requirement that
10975  you have to use the 
10976 \family typewriter
10977 dvips
10978 \family default
10979  driver to generate the PostScript output otherwise the foils won't be rotated.
10980  It is possible to get landscape foils even if you haven't got the 
10981 \family typewriter
10982 dvips
10983 \family default
10984  driver provided you can feed your foils sideways through your printer ;-)
10985 \end_layout
10986
10987 \begin_layout Subsubsection
10988 Theorems, Lemmas, Proofs and more
10989 \end_layout
10990
10991 \begin_layout Standard
10992 Due to a small bug in LyX you can't have two of the same type of these environme
10993 nts directly following each other.
10994  They must be separated by something.
10995  If you try, you will just be extending the previous environment as if you
10996  had merged the two environments together.
10997  So, how do you get around this problem? The simplest option is to insert
10998  some text between the two environments or add a 
10999 \family sans
11000 LaTeX
11001 \family default
11002  environment between the two with just a 
11003 \begin_inset Quotes eld
11004 \end_inset
11005
11006
11007 \family typewriter
11008 %
11009 \family default
11010
11011 \begin_inset Quotes erd
11012 \end_inset
11013
11014  in it.
11015  This will force LyX to produce two separate environments and hence the
11016  correct LaTeX output.
11017  An example is provided in the example file included with the LyX distribution.
11018  Remember, this problem only occurs if you are trying to place two of the
11019  same type of theorem-like environments one directly after the other.
11020 \end_layout
11021
11022 \begin_layout Subsubsection
11023 Lists
11024 \end_layout
11025
11026 \begin_layout Standard
11027 You get all the commonly supported list styles found in other classes as
11028  well as two new ones.
11029  I'll only describe the new ones here.
11030  If you want to find out more about the other list environments check out
11031  the 
11032 \emph on
11033 User's Guide.
11034
11035 \emph default
11036  If you intend to use itemized lists you might also want to read about the
11037  
11038 \family sans
11039 Itemize
11040 \begin_inset space ~
11041 \end_inset
11042
11043 Bullet
11044 \begin_inset space ~
11045 \end_inset
11046
11047 Selection
11048 \family default
11049  dialog described above in section
11050 \begin_inset space ~
11051 \end_inset
11052
11053
11054 \begin_inset CommandInset ref
11055 LatexCommand ref
11056 reference "sec:bullet"
11057
11058 \end_inset
11059
11060 .
11061 \end_layout
11062
11063 \begin_layout Standard
11064 The two new list styles, 
11065 \family sans
11066 TickList
11067 \family default
11068  and 
11069 \family sans
11070 CrossList
11071 \family default
11072 , are designed to make it easier for you to create lists of do's and don'ts
11073  or right and wrong by providing dedicated environments that use a tick
11074  or a cross as the label of the list.
11075  These lists are in fact dedicated variants of the 
11076 \family sans
11077 Itemize
11078 \family default
11079  environment.
11080  They do however require that you have the 
11081 \family typewriter
11082 psnfss
11083 \family default
11084  packages installed.
11085 \end_layout
11086
11087 \begin_layout Subsubsection
11088 Figures and Tables
11089 \end_layout
11090
11091 \begin_layout Standard
11092
11093 \family sans
11094 FoilTeX
11095 \family default
11096  redefines the floating tables and figures so that they appear exactly where
11097  they are in the text rather than pushing them to the top of the page or
11098  to some user specified location.
11099  In fact if you change the float placement settings they are simply ignored.
11100 \end_layout
11101
11102 \begin_layout Subsubsection
11103 Page Headers and Footers
11104 \begin_inset CommandInset label
11105 LatexCommand label
11106 name "sec:foilfoot"
11107
11108 \end_inset
11109
11110
11111 \end_layout
11112
11113 \begin_layout Standard
11114
11115 \family sans
11116 My
11117 \begin_inset space ~
11118 \end_inset
11119
11120 Logo
11121 \family default
11122  and 
11123 \family sans
11124 Restriction
11125 \family default
11126  are two commands used to control the left-footer text string.
11127  The first is meant to allow you to include a graphic logo on your foils
11128  and defaults to 
11129 \begin_inset Quotes eld
11130 \end_inset
11131
11132 -Typeset by 
11133 \family sans
11134 FoilTeX
11135 \family default
11136 -
11137 \begin_inset Quotes erd
11138 \end_inset
11139
11140 .
11141  While the second is meant to provide a classification for the audience,
11142  
11143 \emph on
11144 e.
11145 \begin_inset space \thinspace{}
11146 \end_inset
11147
11148 g.
11149 \emph default
11150
11151 \begin_inset space \space{}
11152 \end_inset
11153
11154 Confidential.
11155  It is empty by default.
11156 \end_layout
11157
11158 \begin_layout Standard
11159 The remaining page corners can be filled by 
11160 \family sans
11161 Right
11162 \begin_inset space ~
11163 \end_inset
11164
11165 Footer
11166 \family default
11167  (which defaults to page numbers), 
11168 \family sans
11169 Right
11170 \begin_inset space ~
11171 \end_inset
11172
11173 Header
11174 \family default
11175  (top right) and 
11176 \family sans
11177 Left
11178 \begin_inset space ~
11179 \end_inset
11180
11181 Header
11182 \family default
11183  (top left).
11184 \end_layout
11185
11186 \begin_layout Subsection
11187 Unsupported 
11188 \family sans
11189 FoilTeX
11190 \family default
11191  Goodies
11192 \begin_inset CommandInset label
11193 LatexCommand label
11194 name "sec:unsuppfoils"
11195
11196 \end_inset
11197
11198
11199 \end_layout
11200
11201 \begin_layout Standard
11202 All the commands mentioned below need to be set in a 
11203 \family sans
11204 LaTeX
11205 \family default
11206  environment or as 
11207 \family sans
11208 TeX
11209 \family default
11210  within another environment.
11211 \end_layout
11212
11213 \begin_layout Subsubsection
11214 Lengths
11215 \end_layout
11216
11217 \begin_layout Standard
11218 All lengths are adjusted using the 
11219 \family typewriter
11220
11221 \backslash
11222 setlength{
11223 \family default
11224 \emph on
11225 lengthname
11226 \family typewriter
11227 \emph default
11228 }{
11229 \family default
11230 \emph on
11231 newlength
11232 \family typewriter
11233 \emph default
11234 }
11235 \family default
11236  command.
11237  Where 
11238 \emph on
11239 lengthname
11240 \emph default
11241  should be replaced by the name given to the length you want to change and
11242  
11243 \emph on
11244 newlength
11245 \emph default
11246  is the length value.
11247  All lengths should be specified in units of length such as inches (
11248 \family typewriter
11249 in
11250 \family default
11251 ), millimeters (
11252 \family typewriter
11253 mm
11254 \family default
11255 ) or points (
11256 \family typewriter
11257 pt
11258 \family default
11259 ) or relative to some document or font-based length such as 
11260 \family typewriter
11261
11262 \backslash
11263 textwidth
11264 \family default
11265 .
11266  
11267 \end_layout
11268
11269 \begin_layout Standard
11270 It's possible to change the spacing between a foilhead and the body of the
11271  foil by adjusting the length specified by 
11272 \family typewriter
11273
11274 \backslash
11275 foilheadskip
11276 \family default
11277 .
11278  For example, to make 
11279 \emph on
11280 all
11281 \emph default
11282  foilheads 0.5
11283 \begin_inset space \space{}
11284 \end_inset
11285
11286 in closer to their bodies put the following in the preamble: 
11287 \family typewriter
11288
11289 \backslash
11290 setlength{
11291 \backslash
11292 foilheadskip}{-0.5in}
11293 \end_layout
11294
11295 \begin_layout Standard
11296 The spacings around floats can be adjusted by setting these lengths:
11297 \end_layout
11298
11299 \begin_layout Labeling
11300 \labelwidthstring MMMMMMMMMMM
11301
11302 \family typewriter
11303
11304 \backslash
11305 abovefloatskip
11306 \family default
11307  Separation between the text and the top of the float
11308 \end_layout
11309
11310 \begin_layout Labeling
11311 \labelwidthstring MMMMMMMMMMM
11312
11313 \family typewriter
11314
11315 \backslash
11316 abovecaptionskip
11317 \family default
11318  Separation between the float and the caption
11319 \end_layout
11320
11321 \begin_layout Labeling
11322 \labelwidthstring MMMMMMMMMMM
11323
11324 \family typewriter
11325
11326 \backslash
11327 belowcaptionskip
11328 \family default
11329  Separation between the caption and the following text
11330 \end_layout
11331
11332 \begin_layout Labeling
11333 \labelwidthstring MMMMMMMMMMM
11334
11335 \family typewriter
11336
11337 \backslash
11338 captionwidth
11339 \family default
11340  You can make the captions narrower than the surrounding text by adjusting
11341  this length.
11342  Best done relative to 
11343 \family typewriter
11344
11345 \backslash
11346 textwidth
11347 \family default
11348 .
11349 \end_layout
11350
11351 \begin_layout Standard
11352 There are also several title page related lengths that you may find useful
11353  if you have a long title or several authors:
11354 \end_layout
11355
11356 \begin_layout Labeling
11357 \labelwidthstring MMMMMMMMMMM
11358
11359 \family typewriter
11360
11361 \backslash
11362 abovetitleskip
11363 \family default
11364  Separation from headers to 
11365 \family sans
11366 Title
11367 \end_layout
11368
11369 \begin_layout Labeling
11370 \labelwidthstring MMMMMMMMMMM
11371
11372 \family typewriter
11373
11374 \backslash
11375 titleauthorskip
11376 \family default
11377  between 
11378 \family sans
11379 Title
11380 \family default
11381  and 
11382 \family sans
11383 Author
11384 \family default
11385  environments
11386 \end_layout
11387
11388 \begin_layout Labeling
11389 \labelwidthstring MMMMMMMMMMM
11390
11391 \family typewriter
11392
11393 \backslash
11394 authorauthorskip
11395 \family default
11396  between multiple 
11397 \family sans
11398 Author
11399 \family default
11400  lines
11401 \end_layout
11402
11403 \begin_layout Labeling
11404 \labelwidthstring MMMMMMMMMMM
11405
11406 \family typewriter
11407
11408 \backslash
11409 authordateskip
11410 \family default
11411  between the 
11412 \family sans
11413 Author
11414 \family default
11415  and the 
11416 \family sans
11417 Date
11418 \end_layout
11419
11420 \begin_layout Labeling
11421 \labelwidthstring MMMMMMMMMMM
11422
11423 \family typewriter
11424
11425 \backslash
11426 dateabstractskip
11427 \family default
11428  between the 
11429 \family sans
11430 Date
11431 \family default
11432  and the 
11433 \family sans
11434 Abstract
11435 \end_layout
11436
11437 \begin_layout Standard
11438 The last length related command affects all the list environments.
11439  If you place 
11440 \family typewriter
11441
11442 \backslash
11443 zerolistvertdimens
11444 \family default
11445  
11446 \emph on
11447 inside
11448 \emph default
11449  a list environment then all the vertical spacing between the list items
11450  is removed.
11451  Note that this is a command not a length so it doesn't require 
11452 \family typewriter
11453
11454 \backslash
11455 setlength
11456 \family default
11457  like the stuff mentioned above.
11458 \end_layout
11459
11460 \begin_layout Subsubsection
11461 Headers and Footers
11462 \end_layout
11463
11464 \begin_layout Standard
11465 The 
11466 \family typewriter
11467
11468 \backslash
11469 LogoOn
11470 \family default
11471  and 
11472 \family typewriter
11473
11474 \backslash
11475 LogoOff
11476 \family default
11477  commands control whether the logo in the 
11478 \family sans
11479 MyLogo
11480 \family default
11481  definition appear on a given page.
11482  If you put 
11483 \family typewriter
11484
11485 \backslash
11486 LogoOff
11487 \family default
11488  in the preamble then none of the foils will have the logo on them.
11489  If you don't want the logo on a particular page place the 
11490 \family typewriter
11491
11492 \backslash
11493 LogoOff
11494 \family default
11495  directly after the foilhead of that page and the 
11496 \family typewriter
11497
11498 \backslash
11499 LogoOn
11500 \family default
11501  directly after the next foilhead.
11502 \end_layout
11503
11504 \begin_layout Standard
11505 If you decide to use the 
11506 \family sans
11507 fancy
11508 \family default
11509  page style setting in the 
11510 \family sans
11511 Document
11512 \begin_inset space ~
11513 \end_inset
11514
11515 Layout
11516 \family default
11517  dialog you should probably add 
11518 \family typewriter
11519
11520 \backslash
11521 let
11522 \backslash
11523 headwidth
11524 \backslash
11525 textwidth
11526 \family default
11527  to your preamble so headers and footers on landscape pages are correctly
11528  placed when rotated.
11529  This is due to some clashes between the page layouts provided by the 
11530 \family sans
11531 fancyheadings
11532 \family default
11533  package and the 
11534 \family sans
11535 foils
11536 \family default
11537  class.
11538 \end_layout
11539
11540 \begin_layout Section
11541 Hollywood (Hollywood spec scripts)
11542 \end_layout
11543
11544 \begin_layout Standard
11545 by 
11546 \shape smallcaps
11547 Garst Reese
11548 \end_layout
11549
11550 \begin_layout Subsection
11551 Introduction
11552 \end_layout
11553
11554 \begin_layout Standard
11555 Getting the format of a Hollywood script right is a 
11556 \begin_inset Quotes eld
11557 \end_inset
11558
11559 rite of passage.
11560 \begin_inset Quotes erd
11561 \end_inset
11562
11563  It is designed to make the readers focus on content and to be easy and
11564  familiar for the actors to read.
11565  Each page of a script should be one minute of film.
11566  Nothing goes in a script that you cannot see or hear on screen.
11567  The courier 12 pt font should be used throughout.
11568  No italics.
11569 \end_layout
11570
11571 \begin_layout Subsection
11572 Special problems
11573 \end_layout
11574
11575 \begin_layout Standard
11576 Speakers' lines should NEVER break in mid-sentence.
11577  If a speaker's lines continue over a page break, repeat the 
11578 \family sans
11579 Speaker
11580 \family default
11581  title followed by (Cont'd).
11582 \end_layout
11583
11584 \begin_layout Subsection
11585 Special features
11586 \end_layout
11587
11588 \begin_layout Standard
11589 Insert the 
11590 \family sans
11591 Speaker
11592 \family default
11593  names as labels then cross-reference the label to insert the name.
11594  The cross-reference dialog will show the current cast of characters.
11595  You can use this to insert the speaker name in narratives also.
11596 \end_layout
11597
11598 \begin_layout Subsection
11599 Paper size and Margins
11600 \end_layout
11601
11602 \begin_layout Standard
11603 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11604 \end_layout
11605
11606 \begin_layout Subsection
11607 Environments
11608 \end_layout
11609
11610 \begin_layout Standard
11611 The following environments are available.
11612  You can use hollywood.bind to get the bind keys shown at the right.
11613 \end_layout
11614
11615 \begin_layout Itemize
11616
11617 \family sans
11618 Standard
11619 \begin_inset Newline newline
11620 \end_inset
11621
11622
11623 \family default
11624 Used where nothing else works.
11625  Try to avoid it.
11626 \end_layout
11627
11628 \begin_layout Itemize
11629
11630 \family sans
11631 FADE_IN
11632 \family default
11633 :
11634 \begin_inset space \hfill{}
11635 \end_inset
11636
11637
11638 \family sans
11639 M-z S-I
11640 \family default
11641
11642 \begin_inset Newline newline
11643 \end_inset
11644
11645 Usually followed by something like 
11646 \begin_inset Quotes eld
11647 \end_inset
11648
11649 on Sally waking up.
11650 \begin_inset Quotes erd
11651 \end_inset
11652
11653
11654 \end_layout
11655
11656 \begin_layout Itemize
11657
11658 \family sans
11659 INT:
11660 \begin_inset space \hfill{}
11661 \end_inset
11662
11663 M-z i
11664 \begin_inset Newline newline
11665 \end_inset
11666
11667
11668 \family default
11669 Introduces a new INTERIOR camera set-up.
11670  Always followed by DAY or NIGHT, or something similar to define the lighting
11671  required.
11672  Everthing on this line in CAPS.
11673 \end_layout
11674
11675 \begin_layout Itemize
11676
11677 \family sans
11678 EXT:
11679 \begin_inset space \hfill{}
11680 \end_inset
11681
11682 M-z e
11683 \begin_inset Newline newline
11684 \end_inset
11685
11686
11687 \family default
11688 Introduces a new EXTERIOR camera set-up.
11689  Everthing on this line in CAPS.
11690 \end_layout
11691
11692 \begin_layout Itemize
11693
11694 \family sans
11695 Speaker
11696 \begin_inset space \hfill{}
11697 \end_inset
11698
11699 M-z s
11700 \begin_inset Newline newline
11701 \end_inset
11702
11703
11704 \family default
11705 The character speaking.
11706 \end_layout
11707
11708 \begin_layout Itemize
11709
11710 \family sans
11711 Parenthetical
11712 \begin_inset space \hfill{}
11713 \end_inset
11714
11715 M-z p
11716 \begin_inset Newline newline
11717 \end_inset
11718
11719
11720 \family default
11721 Instructions to the speaker.
11722  The () are automatically inserted, but only the ( will show in LyX.
11723  Both will be printed.
11724 \end_layout
11725
11726 \begin_layout Itemize
11727
11728 \family sans
11729 Dialogue
11730 \begin_inset space \hfill{}
11731 \end_inset
11732
11733 M-z d
11734 \begin_inset Newline newline
11735 \end_inset
11736
11737
11738 \family default
11739 What the 
11740 \family sans
11741 Speaker
11742 \family default
11743  says.
11744 \end_layout
11745
11746 \begin_layout Itemize
11747
11748 \family sans
11749 Transition
11750 \begin_inset space \hfill{}
11751 \end_inset
11752
11753 M-z t
11754 \begin_inset Newline newline
11755 \end_inset
11756
11757
11758 \family default
11759 Camera movement instruction.
11760  e.
11761 \begin_inset space \thinspace{}
11762 \end_inset
11763
11764 g.
11765 \begin_inset space \space{}
11766 \end_inset
11767
11768 CUT TO:
11769 \end_layout
11770
11771 \begin_layout Itemize
11772
11773 \family sans
11774 FADE OUT:
11775 \begin_inset space \hfill{}
11776 \end_inset
11777
11778 M-z S-I
11779 \end_layout
11780
11781 \begin_layout Itemize
11782
11783 \family sans
11784 Author
11785 \begin_inset space \hfill{}
11786 \end_inset
11787
11788 M-z S-A
11789 \end_layout
11790
11791 \begin_layout Itemize
11792
11793 \family sans
11794 Title
11795 \begin_inset space \hfill{}
11796 \end_inset
11797
11798 M-z S-T
11799 \end_layout
11800
11801 \begin_layout Itemize
11802
11803 \family sans
11804 Right_Address
11805 \begin_inset space \hfill{}
11806 \end_inset
11807
11808 M-z r
11809 \end_layout
11810
11811 \begin_layout Subsection
11812 Script jargon
11813 \end_layout
11814
11815 \begin_layout Itemize
11816 (O.S) — off screen
11817 \end_layout
11818
11819 \begin_layout Itemize
11820 (V.0) — voice over
11821 \end_layout
11822
11823 \begin_layout Itemize
11824 b.
11825 \begin_inset space \thinspace{}
11826 \end_inset
11827
11828 g.
11829  — background
11830 \end_layout
11831
11832 \begin_layout Itemize
11833 C.U.
11834  — close-up
11835 \end_layout
11836
11837 \begin_layout Itemize
11838 PAN — camera movement
11839 \end_layout
11840
11841 \begin_layout Itemize
11842 INSERT — cut to close-up of
11843 \end_layout
11844
11845 \begin_layout Section
11846 ijmpc and ijmpd
11847 \end_layout
11848
11849 \begin_layout Standard
11850 by 
11851 \noun on
11852 Panayotis Papasotiriou
11853 \end_layout
11854
11855 \begin_layout Subsection
11856 Overview
11857 \end_layout
11858
11859 \begin_layout Standard
11860 The ijmpc package is a set of macros that facilitates electronic manuscript
11861  submission to the 
11862 \emph on
11863 International Journal of Modern Physics C
11864 \emph default
11865 .
11866  Similarly, the ijmpd package is for creating manuscripts to be submitted
11867  to the 
11868 \emph on
11869 International Journal of Modern Physics D
11870 \emph default
11871 .
11872  Both journals are published by World Scientific.
11873  The corresponding document classes are named 
11874 \family typewriter
11875 ws-ijmpc.cls
11876 \family default
11877  and 
11878 \family typewriter
11879 ws-ijmpd.cls
11880 \family default
11881 , respectively.
11882  These files, together with instructions for the authors, can be downloaded
11883  from the sites 
11884 \begin_inset Flex URL
11885 status collapsed
11886
11887 \begin_layout Plain Layout
11888
11889 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11890 \end_layout
11891
11892 \end_inset
11893
11894  and 
11895 \begin_inset Flex URL
11896 status collapsed
11897
11898 \begin_layout Plain Layout
11899
11900 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11901 \end_layout
11902
11903 \end_inset
11904
11905 .
11906  Both packages are modified versions of the standard 
11907 \begin_inset Quotes eld
11908 \end_inset
11909
11910 article
11911 \begin_inset Quotes erd
11912 \end_inset
11913
11914  package, and they are almost (but not exactly) identical.
11915  Most of their features are supported by LyX.
11916  I have used LyX successfully to write articles submitted to both journals
11917  without any problem.
11918 \end_layout
11919
11920 \begin_layout Subsection
11921 Writing a paper
11922 \end_layout
11923
11924 \begin_layout Standard
11925 As usual, the easiest way to write a paper is to start with a template.
11926  Click on 
11927 \family sans
11928 File\SpecialChar \menuseparator
11929 New from
11930 \family default
11931  
11932 \family sans
11933 \bar under
11934 T
11935 \bar default
11936 emplate
11937 \family default
11938 , then choose the 
11939 \family typewriter
11940 ijmpc.lyx
11941 \family default
11942  or 
11943 \family typewriter
11944 ijmpd.lyx
11945 \family default
11946  template.
11947  This will give an (almost) empty document that includes the most common
11948  fields found in a manuscript.
11949  Simply overwrite the existing text (including the brackets, 
11950 \family typewriter
11951 <>
11952 \family default
11953 ) with your text.
11954  You should keep in mind the following remarks.
11955 \end_layout
11956
11957 \begin_layout Enumerate
11958 LyX won't let you change the font size and the page style of the document,
11959  because such modifications are not allowed by both packages.
11960 \end_layout
11961
11962 \begin_layout Enumerate
11963 The language of the document should not be changed.
11964  Before previewing your paper, be sure that the babel package is not used.
11965  To do this, click on 
11966 \family sans
11967 Tools\SpecialChar \menuseparator
11968 Preferences
11969 \family default
11970 , select the 
11971 \family sans
11972 Lang Opts
11973 \family default
11974  tab, deselect the 
11975 \family sans
11976 Use babel
11977 \family default
11978  checkbox in the language settings, and click on 
11979 \family sans
11980 Apply
11981 \family default
11982  (or 
11983 \family sans
11984 Save
11985 \family default
11986 , if you wish to make this change permanent).
11987 \end_layout
11988
11989 \begin_layout Enumerate
11990 The 
11991 \begin_inset Quotes eld
11992 \end_inset
11993
11994 Keywords
11995 \begin_inset Quotes erd
11996 \end_inset
11997
11998  style must be used to define keywords.
11999 \end_layout
12000
12001 \begin_layout Enumerate
12002 The ijmpc package provides a style named 
12003 \begin_inset Quotes eld
12004 \end_inset
12005
12006 Classification Codes
12007 \begin_inset Quotes erd
12008 \end_inset
12009
12010 , which can be used to define classification codes, such as PACS numbers.
12011  Note that this facility is not supported by the ijmpd package.
12012 \end_layout
12013
12014 \begin_layout Enumerate
12015 Several new environments are available: 
12016 \begin_inset Quotes eld
12017 \end_inset
12018
12019 Definition
12020 \begin_inset Quotes erd
12021 \end_inset
12022
12023
12024 \begin_inset Quotes eld
12025 \end_inset
12026
12027 Step
12028 \begin_inset Quotes erd
12029 \end_inset
12030
12031
12032 \begin_inset Quotes eld
12033 \end_inset
12034
12035 Example
12036 \begin_inset Quotes erd
12037 \end_inset
12038
12039
12040 \begin_inset Quotes eld
12041 \end_inset
12042
12043 Remark
12044 \begin_inset Quotes erd
12045 \end_inset
12046
12047
12048 \begin_inset Quotes eld
12049 \end_inset
12050
12051 Notation
12052 \begin_inset Quotes erd
12053 \end_inset
12054
12055
12056 \begin_inset Quotes eld
12057 \end_inset
12058
12059 Theorem
12060 \begin_inset Quotes erd
12061 \end_inset
12062
12063
12064 \begin_inset Quotes eld
12065 \end_inset
12066
12067 Proof
12068 \begin_inset Quotes erd
12069 \end_inset
12070
12071
12072 \begin_inset Quotes eld
12073 \end_inset
12074
12075 Corollary
12076 \begin_inset Quotes erd
12077 \end_inset
12078
12079
12080 \begin_inset Quotes eld
12081 \end_inset
12082
12083 Lemma
12084 \begin_inset Quotes erd
12085 \end_inset
12086
12087
12088 \begin_inset Quotes eld
12089 \end_inset
12090
12091 Proposition
12092 \begin_inset Quotes erd
12093 \end_inset
12094
12095
12096 \begin_inset Quotes eld
12097 \end_inset
12098
12099 Prop
12100 \begin_inset Quotes erd
12101 \end_inset
12102
12103
12104 \begin_inset Quotes eld
12105 \end_inset
12106
12107 Question
12108 \begin_inset Quotes erd
12109 \end_inset
12110
12111
12112 \begin_inset Quotes eld
12113 \end_inset
12114
12115 Claim
12116 \begin_inset Quotes erd
12117 \end_inset
12118
12119 , and 
12120 \begin_inset Quotes eld
12121 \end_inset
12122
12123 Conjecture
12124 \begin_inset Quotes erd
12125 \end_inset
12126
12127 .
12128  Their use is more or less obvious.
12129  LyX supports all these environments; it will use the proper label, text
12130  style, and numbering scheme for each of them.
12131 \end_layout
12132
12133 \begin_layout Enumerate
12134 Both packages use basic citations; the natbib package should not be used.
12135  In LyX, citation references are shown as usual; in the output, citations
12136  are shown as superscripts.
12137  If you want to use a citation as normal text, you should use the 
12138 \family typewriter
12139 refcite
12140 \family default
12141  command, e.
12142 \begin_inset space \thinspace{}
12143 \end_inset
12144
12145 g.
12146 \begin_inset space \space{}
12147 \end_inset
12148
12149
12150 \begin_inset Quotes eld
12151 \end_inset
12152
12153 See Ref.
12154 \begin_inset space \space{}
12155 \end_inset
12156
12157
12158 \family typewriter
12159
12160 \backslash
12161 refcite{key}
12162 \family default
12163
12164 \begin_inset Quotes erd
12165 \end_inset
12166
12167 .
12168 \end_layout
12169
12170 \begin_layout Enumerate
12171 There is no 
12172 \begin_inset Quotes eld
12173 \end_inset
12174
12175 Acknowledgments
12176 \begin_inset Quotes erd
12177 \end_inset
12178
12179  section in both packages.
12180  To put acknowledgments, just use the 
12181 \begin_inset Quotes eld
12182 \end_inset
12183
12184 Section*
12185 \begin_inset Quotes erd
12186 \end_inset
12187
12188  environment.
12189 \end_layout
12190
12191 \begin_layout Enumerate
12192 Appendices may be added to the paper, 
12193 \emph on
12194 after
12195 \emph default
12196  the Acknowledgments and 
12197 \shape italic
12198 before
12199 \shape default
12200  the References.
12201  LyX provides a special environment, called 
12202 \begin_inset Quotes eld
12203 \end_inset
12204
12205 Appendices Section
12206 \begin_inset Quotes erd
12207 \end_inset
12208
12209  which marks the beginning of the appendices.
12210  This environment should be left blank; it just sends a LaTeX command, but
12211  nothing is really printed.
12212  In LyX, the word 
12213 \begin_inset Quotes eld
12214 \end_inset
12215
12216 Appendix
12217 \begin_inset Quotes erd
12218 \end_inset
12219
12220  is printed with blue letters, as a signal that all sections after that
12221  point are appendices.
12222  To write an appendix, use the 
12223 \begin_inset Quotes eld
12224 \end_inset
12225
12226 Appendix
12227 \begin_inset Quotes erd
12228 \end_inset
12229
12230  environment.
12231  LyX will number each appendix with capital letters, as required by both
12232  journals.
12233  Note that 
12234 \begin_inset Quotes eld
12235 \end_inset
12236
12237 Appendices Section
12238 \begin_inset Quotes erd
12239 \end_inset
12240
12241  
12242 \emph on
12243 must
12244 \emph default
12245  be present before the first appendix; if not, all appendices will be numbered
12246  as normal sections in the output.
12247 \end_layout
12248
12249 \begin_layout Enumerate
12250 The ijmpc and the ijmpd packages use the 
12251 \family typewriter
12252 tbl
12253 \family default
12254  command to implement table captions.
12255  As a result, a table created by LyX is printed correctly, but its caption
12256  is ignored.
12257  However, you can use some TeX code to overcome this problem, so that captions
12258  are printed as expected.
12259  To do so, create a float table as usual, remove the caption, and replace
12260  it with the TeX code 
12261 \family typewriter
12262
12263 \backslash
12264 tbl{
12265 \emph on
12266 your table caption
12267 \emph default
12268 }{
12269 \family default
12270  (sic); you must also the TeX code 
12271 \family typewriter
12272 }
12273 \family default
12274  immediately after the tabular material.
12275  Study the example table included in the template files to see how this
12276  trick is implemented.
12277  Alternatively, If you need table captions, you should implement the whole
12278  table float in a 
12279 \family typewriter
12280 .tex
12281 \family default
12282  file, then include this file to the LyX document (
12283 \family sans
12284 Insert\SpecialChar \menuseparator
12285 File\SpecialChar \menuseparator
12286 Child
12287 \begin_inset space ~
12288 \end_inset
12289
12290 Document
12291 \family default
12292 ).
12293  Details on how to create a table float can be found in the files 
12294 \family typewriter
12295 ws-ijmpc.tex
12296 \family default
12297  and 
12298 \family typewriter
12299 ws-ijmpd.tex
12300 \family default
12301 , included in the corresponding packages.
12302 \end_layout
12303
12304 \begin_layout Subsection
12305 Preparing a paper for submission
12306 \end_layout
12307
12308 \begin_layout Standard
12309 Before you submit your paper you must export the LyX document as a LaTeX
12310  file (
12311 \family sans
12312 File\SpecialChar \menuseparator
12313 Export\SpecialChar \menuseparator
12314 LaTeX
12315 \family default
12316 )
12317 \begin_inset Foot
12318 status open
12319
12320 \begin_layout Plain Layout
12321 Actually you have the choice between LaTeX (plain) and pdflatex.
12322  If you intend to use pdflatex to prepare the paper, you should use the
12323  pdflatex option so that included graphics are converted to PDF format,
12324  ready for use by pdflatex.
12325 \end_layout
12326
12327 \end_inset
12328
12329 , then make the following changes to the resulting 
12330 \family typewriter
12331 .tex
12332 \family default
12333  file.
12334 \end_layout
12335
12336 \begin_layout Enumerate
12337 Remove the comment lines before the 
12338 \family typewriter
12339
12340 \backslash
12341 documentclass
12342 \family default
12343  command.
12344 \end_layout
12345
12346 \begin_layout Enumerate
12347 Remove everything between (and including) the 
12348 \family typewriter
12349
12350 \backslash
12351 makeatletter
12352 \family default
12353  and 
12354 \family typewriter
12355
12356 \backslash
12357 makeatother
12358 \family default
12359  commands, except for any commands you specifically put into the LaTeX preamble.
12360 \end_layout
12361
12362 \begin_layout Standard
12363 The modified 
12364 \family typewriter
12365 .tex
12366 \family default
12367  file should be saved and processed through LaTeX as many times as necessary.
12368  You may also want to check the resulting 
12369 \family typewriter
12370 .dvi
12371 \family default
12372  document.
12373 \end_layout
12374
12375 \begin_layout Subsection
12376 Use of TeX code
12377 \end_layout
12378
12379 \begin_layout Standard
12380 The use of TeX code is reduced to two commands, which must be placed at
12381  the top of the document.
12382  If you started writing your paper by using the 
12383 \family typewriter
12384 ijmpc.lyx
12385 \family default
12386  or the 
12387 \family typewriter
12388 ijmpd.lyx
12389 \family default
12390  template, the TeX code needed is already in its place; you usually don't
12391  need to delete it.
12392  You may only modify the first TeX code to specify the information printed
12393  to the top of odd and even pages (authors' names and short paper's title,
12394  respectively).
12395  This TeX code must have the form 
12396 \family typewriter
12397
12398 \backslash
12399 markboth{Authors' Names}{Short Paper's Title}
12400 \family default
12401 .
12402 \end_layout
12403
12404 \begin_layout Section
12405 iopart
12406 \end_layout
12407
12408 \begin_layout Standard
12409 by 
12410 \noun on
12411 Uwe Stöhr
12412 \end_layout
12413
12414 \begin_layout Subsection
12415 Overview
12416 \end_layout
12417
12418 \begin_layout Standard
12419 The iopart package provides a document class to create electronic manuscript
12420  submission to the journals published by the Institute of Physics.
12421  Instructions for the authors how to create a paper using the iopart class
12422  can be downloaded together with the iopart package from the site 
12423 \begin_inset Flex URL
12424 status collapsed
12425
12426 \begin_layout Plain Layout
12427
12428 ftp://ftp.iop.org/pub/journals/latex2e
12429 \end_layout
12430
12431 \end_inset
12432
12433 .
12434 \end_layout
12435
12436 \begin_layout Subsection
12437 Writing a paper
12438 \end_layout
12439
12440 \begin_layout Standard
12441 The easiest way to write a paper is to start with the file 
12442 \emph on
12443 IOP-article.lyx
12444 \emph default
12445  that is available in LyX's examples files folder.
12446  Open this file, save it under a new name, and start writing.
12447  The example file explains how to use the special text environments.
12448  Here are the most important advices:
12449 \end_layout
12450
12451 \begin_layout Itemize
12452 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12453  two options 
12454 \family sans
12455 Use AMS math package
12456 \family default
12457  in the document settings under 
12458 \family sans
12459 Math Options
12460 \family default
12461  are not used!
12462 \end_layout
12463
12464 \begin_layout Itemize
12465
12466 \size normal
12467 The title environment defines the kind of your paper.
12468  So use one of the following environments for the title:
12469 \end_layout
12470
12471 \begin_deeper
12472 \begin_layout Itemize
12473
12474 \family sans
12475 \size normal
12476 Title
12477 \family default
12478  for a Paper
12479 \end_layout
12480
12481 \begin_layout Itemize
12482
12483 \family sans
12484 \size normal
12485 Review
12486 \family default
12487  for a Review
12488 \end_layout
12489
12490 \begin_layout Itemize
12491
12492 \family sans
12493 \size normal
12494 Topical
12495 \family default
12496  for a Topical review
12497 \end_layout
12498
12499 \begin_layout Itemize
12500
12501 \family sans
12502 \size normal
12503 Comment
12504 \family default
12505  for a Comment
12506 \end_layout
12507
12508 \begin_layout Itemize
12509
12510 \family sans
12511 \size normal
12512 Note
12513 \family default
12514  for a Note
12515 \end_layout
12516
12517 \begin_layout Itemize
12518
12519 \family sans
12520 \size normal
12521 Paper
12522 \family default
12523  for a Paper (same as Title)
12524 \end_layout
12525
12526 \begin_layout Itemize
12527
12528 \family sans
12529 \size normal
12530 Prelim
12531 \family default
12532  for a Preliminary communication
12533 \end_layout
12534
12535 \begin_layout Itemize
12536
12537 \family sans
12538 \size normal
12539 Rapid
12540 \family default
12541  for a Rapid communication
12542 \end_layout
12543
12544 \begin_layout Itemize
12545
12546 \family sans
12547 \size normal
12548 Letter
12549 \family default
12550  for a Letter to the editor
12551 \end_layout
12552
12553 \end_deeper
12554 \begin_layout Itemize
12555
12556 \size normal
12557 All title environments except of 
12558 \family sans
12559 Letter
12560 \family default
12561  can have an optional short title.
12562 \end_layout
12563
12564 \begin_layout Itemize
12565 There is a general title environment 
12566 \family sans
12567 Article
12568 \family default
12569  which is not directly supported by the LyX.
12570  This can be used as TeX code when your document doesn't fit into one of
12571  the other title types.
12572 \end_layout
12573
12574 \begin_layout Standard
12575 For more informations like hints for special table and formula formatting,
12576  look at the IOP author guidelines.
12577 \end_layout
12578
12579 \begin_layout Section
12580 Kluwer
12581 \end_layout
12582
12583 \begin_layout Standard
12584 by 
12585 \noun on
12586 Panayotis Papasotiriou
12587 \end_layout
12588
12589 \begin_layout Subsection
12590 Overview
12591 \end_layout
12592
12593 \begin_layout Standard
12594 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12595  that facilitates electronic manuscript submission to the journals they
12596  publish.
12597  Most known of them (at least in my domain of interest) are 
12598 \emph on
12599 Astrophysics and Space Science
12600 \emph default
12601  and 
12602 \emph on
12603 Solar Physics
12604 \emph default
12605 , but there are many others (see a complete list at 
12606 \begin_inset Flex URL
12607 status open
12608
12609 \begin_layout Plain Layout
12610
12611 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12612 \end_layout
12613
12614 \end_inset
12615
12616 ).
12617  The Kluwer package may be downloaded from the site 
12618 \begin_inset Flex URL
12619 status collapsed
12620
12621 \begin_layout Plain Layout
12622
12623 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12624 \end_layout
12625
12626 \end_inset
12627
12628 .
12629  A complete user guide is contained in that package (but it can also be
12630  downloaded separately).
12631 \end_layout
12632
12633 \begin_layout Standard
12634 LyX supports many features of the package but not everything.
12635  However, the TeX code needed is reduced to some 
12636 \begin_inset Quotes eld
12637 \end_inset
12638
12639 peculiar
12640 \begin_inset Quotes erd
12641 \end_inset
12642
12643  commands of the package (see
12644 \begin_inset space ~
12645 \end_inset
12646
12647
12648 \begin_inset CommandInset ref
12649 LatexCommand ref
12650 reference "subsec:kluwer_peculiarities"
12651
12652 \end_inset
12653
12654 ).
12655  I have recently used LyX to write an article submitted to the 
12656 \emph on
12657 Astrophysics and Space Science
12658 \emph default
12659  without any problem.
12660 \end_layout
12661
12662 \begin_layout Subsection
12663 Writing a paper
12664 \end_layout
12665
12666 \begin_layout Standard
12667 The easiest way to write a paper is to start with the Kluwer template file.
12668  Click on 
12669 \family sans
12670 File\SpecialChar \menuseparator
12671 New from
12672 \family default
12673  
12674 \family sans
12675 Template
12676 \family default
12677 , then choose the 
12678 \family typewriter
12679 kluwer.lyx
12680 \family default
12681  template.
12682  This will give an (almost) empty document that includes the most common
12683  fields found in a manuscript and a short description of their use.
12684  As in most templates, simply overwrite the existing text (including the
12685  brackets, 
12686 \family typewriter
12687 <>
12688 \family default
12689 ) with the correct information.
12690 \end_layout
12691
12692 \begin_layout Subsection
12693 Preparing a paper for submission
12694 \end_layout
12695
12696 \begin_layout Standard
12697 As in the AASTeX package, before you submit your paper to a journal you
12698  must 
12699 \begin_inset Quotes eld
12700 \end_inset
12701
12702 postprocess
12703 \begin_inset Quotes erd
12704 \end_inset
12705
12706  it as follows.
12707 \end_layout
12708
12709 \begin_layout Enumerate
12710 Export your paper as a LaTeX file.
12711  To do this, click on 
12712 \family sans
12713 File\SpecialChar \menuseparator
12714 Export\SpecialChar \menuseparator
12715 LaTeX
12716 \family default
12717 .
12718  
12719 \end_layout
12720
12721 \begin_layout Enumerate
12722 Edit the resulting 
12723 \family typewriter
12724 .tex
12725 \family default
12726  file with a text editor and make the following changes
12727 \end_layout
12728
12729 \begin_deeper
12730 \begin_layout Enumerate
12731 remove the comment lines before the 
12732 \family typewriter
12733
12734 \backslash
12735 documentclass
12736 \family default
12737  command,
12738 \end_layout
12739
12740 \begin_layout Enumerate
12741 remove everything between (and including) the 
12742 \family typewriter
12743
12744 \backslash
12745 makeatletter
12746 \family default
12747  and 
12748 \family typewriter
12749
12750 \backslash
12751 makeatother
12752 \family default
12753  commands, except for any commands you specifically put into the LaTeX preamble.
12754 \end_layout
12755
12756 \begin_layout Standard
12757 Save the resulting 
12758 \family typewriter
12759 .tex
12760 \family default
12761  file.
12762 \end_layout
12763
12764 \end_deeper
12765 \begin_layout Enumerate
12766 Run the 
12767 \family typewriter
12768 .tex
12769 \family default
12770  file through LaTeX as many times as necessary (usually up to three).
12771 \end_layout
12772
12773 \begin_layout Enumerate
12774 View the resulting 
12775 \family typewriter
12776 .dvi
12777 \family default
12778  document using, e.
12779 \begin_inset space \thinspace{}
12780 \end_inset
12781
12782 g.
12783 \begin_inset space \space{}
12784 \end_inset
12785
12786
12787 \family sans
12788 xdvi
12789 \family default
12790 , and check if everything is OK (it should, if you didn't make any mistake).
12791 \end_layout
12792
12793 \begin_layout Subsection
12794 \begin_inset Quotes eld
12795 \end_inset
12796
12797 Peculiarities
12798 \begin_inset Quotes erd
12799 \end_inset
12800
12801  of the Kluwer package
12802 \begin_inset CommandInset label
12803 LatexCommand label
12804 name "subsec:kluwer_peculiarities"
12805
12806 \end_inset
12807
12808
12809 \end_layout
12810
12811 \begin_layout Standard
12812 The Kluwer package has the following 
12813 \begin_inset Quotes eld
12814 \end_inset
12815
12816 peculiarities
12817 \begin_inset Quotes erd
12818 \end_inset
12819
12820 .
12821 \end_layout
12822
12823 \begin_layout Enumerate
12824 It is possible to write multiple articles in the same LaTeX file
12825 \begin_inset Foot
12826 status collapsed
12827
12828 \begin_layout Plain Layout
12829 I can't imagine any good reason to do this.
12830 \end_layout
12831
12832 \end_inset
12833
12834 .
12835  Each article must be included in the environment 
12836 \begin_inset Quotes eld
12837 \end_inset
12838
12839 article
12840 \begin_inset Quotes erd
12841 \end_inset
12842
12843 .
12844  Unfortunately, this environment cannot be omitted, even if you write just
12845  one article.
12846  Therefore, each article starts with the command 
12847 \family typewriter
12848
12849 \backslash
12850 begin{article}
12851 \family default
12852  and, obviously, ends with the command 
12853 \family typewriter
12854
12855 \backslash
12856 end{article}
12857 \family default
12858 .
12859  Although this can be implemented in LyX, I didn't included it, since it
12860  looks ugly and can confuse the novice user.
12861  Therefore, you need to enter them directly and mark them as LaTeX code
12862  (the well-known 
12863 \begin_inset Quotes eld
12864 \end_inset
12865
12866 TeX code
12867 \begin_inset Quotes erd
12868 \end_inset
12869
12870 ).
12871 \end_layout
12872
12873 \begin_layout Enumerate
12874 Information given at the beginning of the article (i.
12875 \begin_inset space \thinspace{}
12876 \end_inset
12877
12878 e.
12879 \begin_inset space \space{}
12880 \end_inset
12881
12882 title, subtitle, author, institution, running title, running author, abstract
12883  and keywords) must be included in an environment called 
12884 \begin_inset Quotes eld
12885 \end_inset
12886
12887 opening
12888 \begin_inset Quotes erd
12889 \end_inset
12890
12891 .
12892  This is not implemented in LyX, so you must enter title, subtitle etc.
12893 \begin_inset space ~
12894 \end_inset
12895
12896 between two TeX code lines (
12897 \family typewriter
12898
12899 \backslash
12900 begin{opening}
12901 \family default
12902  and 
12903 \family typewriter
12904
12905 \backslash
12906 end{opening}
12907 \family default
12908 ).
12909 \end_layout
12910
12911 \begin_layout Enumerate
12912 According to the user manual, the label of each bibliography item must be
12913  written as 
12914 \family typewriter
12915
12916 \backslash
12917 protect
12918 \backslash
12919 citeauthoryear{
12920 \family default
12921 \emph on
12922 author(s)
12923 \family typewriter
12924 \emph default
12925 }{
12926 \family default
12927 \emph on
12928 year
12929 \family typewriter
12930 \emph default
12931 }
12932 \family default
12933 .
12934 \end_layout
12935
12936 \begin_layout Standard
12937 The 
12938 \family typewriter
12939 kluwer.lyx
12940 \family default
12941  template takes care of all these 
12942 \begin_inset Quotes eld
12943 \end_inset
12944
12945 peculiarities
12946 \begin_inset Quotes erd
12947 \end_inset
12948
12949 .
12950  If you start a new paper using this template you don't need to do anything
12951  special.
12952  Just 
12953 \end_layout
12954
12955 \begin_layout Enumerate
12956 don't delete the TeX code included in the template, and
12957 \end_layout
12958
12959 \begin_layout Enumerate
12960 copy the example bibliography item included in the template and modify it
12961  as necessary to enter new bibliography items.
12962 \end_layout
12963
12964 \begin_layout Section
12965 Koma-Script
12966 \end_layout
12967
12968 \begin_layout Standard
12969 by 
12970 \noun on
12971 Bernd Rellermeyer
12972 \end_layout
12973
12974 \begin_layout Subsection
12975 Overview
12976 \end_layout
12977
12978 \begin_layout Standard
12979 The LyX document classes 
12980 \emph on
12981 article (koma-script)
12982 \emph default
12983
12984 \emph on
12985 report (koma-script)
12986 \emph default
12987
12988 \emph on
12989 book
12990 \emph default
12991  
12992 \emph on
12993 (koma-script)
12994 \emph default
12995 , and 
12996 \emph on
12997 letter
12998 \emph default
12999  
13000 \emph on
13001 (koma-script)
13002 \emph default
13003  correspond to the LaTeX document classes 
13004 \family typewriter
13005 scrartcl.cls
13006 \family default
13007
13008 \family typewriter
13009 scrreprt.cls
13010 \family default
13011
13012 \family typewriter
13013 scrbook.cls
13014 \family default
13015 , and 
13016 \family typewriter
13017 scrlettr.cls
13018 \family default
13019 , resp.
13020 \begin_inset space ~
13021 \end_inset
13022
13023 of the Koma-Script family.
13024  They are replacements for the standard document classes 
13025 \family typewriter
13026 article.cls
13027 \family default
13028
13029 \family typewriter
13030 report.cls
13031 \family default
13032
13033 \family typewriter
13034 book.cls
13035 \family default
13036  and 
13037 \family typewriter
13038 letter.cls
13039 \family default
13040 , resp., and fit better to European typography conventions in a number of
13041  points.
13042 \end_layout
13043
13044 \begin_layout Itemize
13045 Standard character size is 11pt in 
13046 \emph on
13047 article (koma-script)
13048 \emph default
13049
13050 \emph on
13051 report (koma-script)
13052 \emph default
13053 , and 
13054 \emph on
13055 book (koma-script)
13056 \emph default
13057 , and 12pt in 
13058 \emph on
13059 letter (koma-script)
13060 \emph default
13061 .
13062 \end_layout
13063
13064 \begin_layout Itemize
13065 Headings, labels of the description environment, and a number of elements
13066  of the 
13067 \emph on
13068 letter (koma-script)
13069 \emph default
13070  document class are set in a bold sans serif font.
13071 \begin_inset Foot
13072 status collapsed
13073
13074 \begin_layout Plain Layout
13075 There is a big difference between the bold sans serif old cm fonts and new
13076  ec fonts, especially in the appearance of headings.
13077  In comparison, the ec bold sans serif fonts look a bit thin.
13078  Here the LaTeX package 
13079 \family typewriter
13080 cmsd.sty by
13081 \family default
13082  
13083 \shape smallcaps
13084 Walter Schmidt
13085 \shape default
13086  helps to produce the 
13087 \begin_inset Quotes eld
13088 \end_inset
13089
13090 usual
13091 \begin_inset Quotes erd
13092 \end_inset
13093
13094  appearance when using the ec fonts.
13095 \end_layout
13096
13097 \end_inset
13098
13099  The numbering of chapter headings is made in the same way as the numbering
13100  of section headings, that is without the extra line 
13101 \begin_inset Quotes eld
13102 \end_inset
13103
13104 Chapter\SpecialChar \ldots{}
13105
13106 \begin_inset Quotes erd
13107 \end_inset
13108
13109 .
13110  In addition, the appearance of the headings can be modified by using a
13111  number of options (in LyX to be entered in the field 
13112 \family sans
13113 Extra
13114 \begin_inset space ~
13115 \end_inset
13116
13117 Options
13118 \family default
13119  of the dialog 
13120 \family sans
13121 Layout\SpecialChar \menuseparator
13122 Document
13123 \family default
13124 ).
13125  
13126 \end_layout
13127
13128 \begin_layout Itemize
13129 The main means in the Koma-Script document classes to design the type area
13130  are the options 
13131 \family sans
13132 BCOR
13133 \family default
13134  and 
13135 \family sans
13136 DIV
13137 \family default
13138  (in LyX to be entered in the extra class options field in the dialog 
13139 \family sans
13140 Document\SpecialChar \menuseparator
13141 Settings
13142 \family default
13143 ).
13144  They make a clearer modification of page margins possible as do the options
13145  of the dialog 
13146 \family sans
13147 Document\SpecialChar \menuseparator
13148 Settings
13149 \family default
13150 .
13151  
13152 \end_layout
13153
13154 \begin_layout Itemize
13155 The LaTeX document classes of the Koma-Script family define a number of
13156  additional commands.
13157  Those part of it which makes sense in LyX is implemented in corresponding
13158  paragraph types.
13159 \end_layout
13160
13161 \begin_layout Standard
13162 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13163  can be found in the Koma-Script documentation 
13164 \emph on
13165 scrguide
13166 \emph default
13167  (German) and 
13168 \emph on
13169 scrguien
13170 \emph default
13171  (English).
13172 \end_layout
13173
13174 \begin_layout Subsection
13175 article (koma-script), report (koma-script), and book (koma-script)
13176 \end_layout
13177
13178 \begin_layout Standard
13179 The document classes 
13180 \emph on
13181 article (koma-script)
13182 \emph default
13183
13184 \emph on
13185 report (koma-script)
13186 \emph default
13187 , and 
13188 \emph on
13189 book
13190 \emph default
13191  
13192 \emph on
13193 (koma-script)
13194 \emph default
13195  are implemented in the layout files 
13196 \family typewriter
13197 scrartcl.layout
13198 \family default
13199
13200 \family typewriter
13201 scrreprt.layout
13202 \family default
13203 , and 
13204 \family typewriter
13205 scrbook.layout
13206 \family default
13207 , resp.
13208  They contain all the paragraph types of the corresponding standard document
13209  classes 
13210 \emph on
13211 article
13212 \emph default
13213
13214 \emph on
13215 report
13216 \emph default
13217 , and 
13218 \emph on
13219 book
13220 \emph default
13221 , resp., partly modified, with the exception of the LyX specific 
13222 \family sans
13223 List
13224 \family default
13225 -type, which is replaced by the new 
13226 \family sans
13227 Labeling
13228 \family default
13229 -type having the same functionality.
13230  Beside the 
13231 \family sans
13232 Labeling
13233 \family default
13234 -Type there is a number of new paragraph types added.
13235  They are 
13236 \emph on
13237 not
13238 \emph default
13239  part of 
13240 \emph on
13241 letter (koma-script)
13242 \emph default
13243 .
13244 \end_layout
13245
13246 \begin_layout Itemize
13247
13248 \family sans
13249 Addpart, Addchap
13250 \family default
13251
13252 \family sans
13253 Addsec
13254 \family default
13255 : are equivalents to 
13256 \family sans
13257 Part*, Chapter*
13258 \family default
13259  and 
13260 \family sans
13261 Section*
13262 \family default
13263 , resp., additionally inserting an entry in the table of contents.
13264  
13265 \family sans
13266 Addpart
13267 \family default
13268  and 
13269 \family sans
13270 Addchap
13271 \family default
13272  are not contained in 
13273 \emph on
13274 article (koma-script)
13275 \emph default
13276 .
13277 \end_layout
13278
13279 \begin_layout Itemize
13280
13281 \family sans
13282 Addchap*
13283 \family default
13284
13285 \family sans
13286 Addsec*
13287 \family default
13288 : behave exactly as 
13289 \family sans
13290 Addchap
13291 \family default
13292  and 
13293 \family sans
13294 Addsec
13295 \family default
13296 , resp., additionally clearing running heads.
13297  
13298 \family sans
13299 Addchap*
13300 \family default
13301  is not contained in 
13302 \emph on
13303 article (koma-script)
13304 \emph default
13305 .
13306 \begin_inset Foot
13307 status collapsed
13308
13309 \begin_layout Plain Layout
13310 There is also an 
13311 \family typewriter
13312
13313 \backslash
13314 addpart*
13315 \family default
13316  command in 
13317 \emph on
13318 book (koma-script)
13319 \emph default
13320  and in 
13321 \emph on
13322 report (koma-script)
13323 \emph default
13324 , but since this is identical to 
13325 \family sans
13326 Part*
13327 \family default
13328 , is has not been implemented in LyX.
13329 \end_layout
13330
13331 \end_inset
13332
13333
13334 \end_layout
13335
13336 \begin_layout Itemize
13337
13338 \family sans
13339 Minisec
13340 \family default
13341 : generates a heading directly above the following paragraph in the standard
13342  character size without affecting the structure of the document.
13343 \end_layout
13344
13345 \begin_layout Itemize
13346
13347 \family sans
13348 Captionabove
13349 \family default
13350  and 
13351 \family sans
13352 Captionbelow
13353 \family default
13354  are special captions which respect the different space settings needed
13355  for captions placed above or below an element (if you follow strict typographic
13356  rules, you might want to place table captions always above the table).
13357  You can also use the class option 
13358 \family typewriter
13359 tablecaptionsabove
13360 \family default
13361 , which will switch 
13362 \family sans
13363 caption
13364 \family default
13365  to 
13366 \family sans
13367 captionabove
13368 \family default
13369  for tables and 
13370 \family sans
13371 captionbelow
13372 \family default
13373  for figures.
13374  You need at least Koma-Script version 2.8q to use this.
13375 \end_layout
13376
13377 \begin_layout Itemize
13378
13379 \family sans
13380 Dictum
13381 \family default
13382 : can be used to set a bonmot, e.
13383 \begin_inset space \thinspace{}
13384 \end_inset
13385
13386 g.
13387 \begin_inset space \space{}
13388 \end_inset
13389
13390 at the beginning of a chapter.
13391  If you use the optional argument (
13392 \family sans
13393 Insert\SpecialChar \menuseparator
13394 Short
13395 \begin_inset space ~
13396 \end_inset
13397
13398 Title
13399 \family default
13400 ), you can insert the dictum's author there.
13401  Dictum and author are separated by a line.
13402  You need at least Koma-Script version 2.8q to use this.
13403  
13404 \family sans
13405 Dictum
13406 \family default
13407  is not contained in 
13408 \emph on
13409 article (koma-script)
13410 \emph default
13411 .
13412 \end_layout
13413
13414 \begin_layout Standard
13415 The following types, together with the standard types 
13416 \family sans
13417 Title
13418 \family default
13419
13420 \family sans
13421 Author
13422 \family default
13423 , and 
13424 \family sans
13425 Date
13426 \family default
13427 , form the title area of the document.
13428  They must be entered ahead of the first 
13429 \begin_inset Quotes eld
13430 \end_inset
13431
13432 ordinary
13433 \begin_inset Quotes erd
13434 \end_inset
13435
13436  paragraph.
13437 \begin_inset Foot
13438 status collapsed
13439
13440 \begin_layout Plain Layout
13441 The corresponding LaTeX commands must appear before the 
13442 \family typewriter
13443
13444 \backslash
13445 maketitle
13446 \family default
13447  command.
13448 \end_layout
13449
13450 \end_inset
13451
13452  When such a type is used more than once, the latter usage overwrites the
13453  former one, that means, for every type only the latest usage is valid.
13454  The order of the different types however has, like 
13455 \family sans
13456 Title
13457 \family default
13458
13459 \family sans
13460 Author
13461 \family default
13462 , and 
13463 \family sans
13464 Date
13465 \family default
13466 , no effect on the appearance of the produced document.
13467 \end_layout
13468
13469 \begin_layout Itemize
13470
13471 \family sans
13472 Subject
13473 \family default
13474 : produces a centered paragraph above the ordinary title (
13475 \family sans
13476 Title
13477 \family default
13478
13479 \family sans
13480 Author
13481 \family default
13482
13483 \family sans
13484 Date
13485 \family default
13486 ) for the subject of the document.
13487 \end_layout
13488
13489 \begin_layout Itemize
13490
13491 \family sans
13492 Publishers
13493 \family default
13494 : produces a centered paragraph below the ordinary title (
13495 \family sans
13496 Title
13497 \family default
13498
13499 \family sans
13500 Author
13501 \family default
13502
13503 \family sans
13504 Date
13505 \family default
13506 ) for the publishers' name.
13507 \end_layout
13508
13509 \begin_layout Itemize
13510
13511 \family sans
13512 Dedication
13513 \family default
13514 : in 
13515 \emph on
13516 report (koma-script)
13517 \emph default
13518  and 
13519 \emph on
13520 book (koma-script)
13521 \emph default
13522  produces a centered paragraph on its own page behind the title page, or
13523  in 
13524 \emph on
13525 article (koma-script)
13526 \emph default
13527  produces a centered paragraph below the ordinary title (
13528 \family sans
13529 Title
13530 \family default
13531
13532 \family sans
13533 Author
13534 \family default
13535
13536 \family sans
13537 Date
13538 \family default
13539
13540 \family sans
13541 Publishers
13542 \family default
13543 ) for a dedication.
13544 \end_layout
13545
13546 \begin_layout Itemize
13547
13548 \family sans
13549 Titlehead
13550 \family default
13551 : produces a left aligned paragraph above the ordinary title (
13552 \family sans
13553 Title
13554 \family default
13555
13556 \family sans
13557 Author
13558 \family default
13559
13560 \family sans
13561 Date
13562 \family default
13563
13564 \family sans
13565 Subject
13566 \family default
13567 ) for a document`s head.
13568 \end_layout
13569
13570 \begin_layout Itemize
13571
13572 \family sans
13573 Uppertitleback
13574 \family default
13575 : produces in a double-sided print in 
13576 \emph on
13577 report (koma-script)
13578 \emph default
13579  and 
13580 \emph on
13581 book (koma-script)
13582 \emph default
13583  a left-aligned paragraph at the top of the title page`s back or has no
13584  effect in a single-sided print or in 
13585 \emph on
13586 article (koma-script)
13587 \emph default
13588 .
13589 \end_layout
13590
13591 \begin_layout Itemize
13592
13593 \family sans
13594 Lowertitleback
13595 \family default
13596 : produces in a double-sided print in 
13597 \emph on
13598 report (koma-script)
13599 \emph default
13600  and 
13601 \emph on
13602 book (koma-script)
13603 \emph default
13604  a left-aligned paragraph at the bottom of the title page`s back or has
13605  no effect in a single-sided print or in 
13606 \emph on
13607 article (koma-script)
13608 \emph default
13609 .
13610 \end_layout
13611
13612 \begin_layout Itemize
13613
13614 \family sans
13615 Extratitle
13616 \family default
13617 : produces a special 
13618 \begin_inset Quotes eld
13619 \end_inset
13620
13621 dirty
13622 \begin_inset Quotes erd
13623 \end_inset
13624
13625  page ahead of the actual document containing a paragraph without special
13626  formatting.
13627 \end_layout
13628
13629 \begin_layout Standard
13630 The layout files for the document classes 
13631 \emph on
13632 article (koma-script)
13633 \emph default
13634
13635 \emph on
13636 report (koma-script)
13637 \emph default
13638 , and 
13639 \emph on
13640 book (koma-script)
13641 \emph default
13642  do include the file 
13643 \family typewriter
13644 scrmacros.inc
13645 \family default
13646 .
13647  This is thought of as a place to define your own types.
13648  Copy scrmacros
13649 \family typewriter
13650 .inc
13651 \family default
13652  in your personal layout directory and edit the file!
13653 \end_layout
13654
13655 \begin_layout Subsection
13656 letter (koma-script)
13657 \end_layout
13658
13659 \begin_layout Standard
13660 \noindent
13661 The document class 
13662 \emph on
13663 letter (koma-script)
13664 \emph default
13665  is implemented in the layout file 
13666 \family typewriter
13667 scrlettr.layout
13668 \family default
13669 .
13670  It contains all the paragraph types of the corresponding standard document
13671  class 
13672 \emph on
13673 letter
13674 \emph default
13675 , partly modified, with the exception of the LyX specific types 
13676 \family sans
13677 LyX-Code
13678 \family default
13679  and 
13680 \family sans
13681 Comment
13682 \family default
13683  and the 
13684 \family sans
13685 List
13686 \family default
13687  type, which is replaced by the new 
13688 \family sans
13689 Labeling
13690 \family default
13691  type.
13692  In addition, it contains, in contrast to the standard document class, the
13693  standard types 
13694 \family sans
13695 LaTeX
13696 \family default
13697
13698 \family sans
13699 Quotation
13700 \family default
13701
13702 \family sans
13703 Quote
13704 \family default
13705 , and 
13706 \family sans
13707 Verse
13708 \family default
13709 .
13710  Furthermore, there are a number of new letter specific types.
13711 \end_layout
13712
13713 \begin_layout Standard
13714 The appearance of the letter produced by this document class can be controlled
13715  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13716 \begin_inset Foot
13717 status collapsed
13718
13719 \begin_layout Plain Layout
13720 For example, the standard appearance of the letter`s heading, consisting
13721  of name and address, is quite self-willed.
13722  An 
13723 \begin_inset Quotes eld
13724 \end_inset
13725
13726 ordinary
13727 \begin_inset Quotes erd
13728 \end_inset
13729
13730  heading is produced by the following LaTeX commands in the preamble:
13731 \end_layout
13732
13733 \begin_layout LyX-Code
13734
13735 \backslash
13736 firsthead{
13737 \backslash
13738 parbox[b]{
13739 \backslash
13740 textwidth}
13741 \end_layout
13742
13743 \begin_layout LyX-Code
13744   {
13745 \backslash
13746 ignorespaces 
13747 \backslash
13748 fromname
13749 \backslash
13750
13751 \backslash
13752  
13753 \backslash
13754 ignorespaces 
13755 \backslash
13756 fromaddress}} 
13757 \end_layout
13758
13759 \begin_layout LyX-Code
13760
13761 \backslash
13762 nexthead{
13763 \backslash
13764 parbox[b]{
13765 \backslash
13766 textwidth}
13767 \end_layout
13768
13769 \begin_layout LyX-Code
13770   {
13771 \backslash
13772 ignorespaces 
13773 \backslash
13774 fromname 
13775 \backslash
13776 hfill 
13777 \backslash
13778 ignorespaces 
13779 \backslash
13780 pagename
13781 \backslash
13782  
13783 \backslash
13784 thepage}}
13785 \end_layout
13786
13787 \end_inset
13788
13789  A detailed German description of such LaTeX commands can be found in the
13790  Koma-Script documentation 
13791 \emph on
13792 scrguide
13793 \emph default
13794 .
13795  With it, the letter's author can produce his personal letter layout.
13796 \end_layout
13797
13798 \begin_layout Standard
13799 The types 
13800 \family sans
13801 Letter
13802 \family default
13803  and 
13804 \family sans
13805 Opening
13806 \family default
13807  define the beginning of the letter and must be used in every letter.
13808  To emphasize them in the LyX document class, they are marked with the letter
13809  
13810 \shape italic
13811 L
13812 \shape default
13813  or 
13814 \shape italic
13815 O
13816 \shape default
13817 , resp.
13818 \begin_inset space ~
13819 \end_inset
13820
13821 in the left margin.
13822  It is possible to write any number of letters in one file.
13823  An 
13824 \family sans
13825 Opening
13826 \family default
13827  type produces a new letter using the same addressee and a 
13828 \family sans
13829 Letter
13830 \family default
13831  type produces a new addressee.
13832  The types 
13833 \family sans
13834 Closing
13835 \family default
13836
13837 \family sans
13838 PS
13839 \family default
13840
13841 \family sans
13842 CC
13843 \family default
13844 , and 
13845 \family sans
13846 Encl
13847 \family default
13848  are ordinary paragraph types and can also be used several times in one
13849  and the same letter.
13850 \end_layout
13851
13852 \begin_layout Itemize
13853
13854 \family sans
13855 Letter
13856 \family default
13857 : produces a paragraph for the addressee and implicitly defines the beginning
13858  of the letter.
13859 \end_layout
13860
13861 \begin_layout Itemize
13862
13863 \family sans
13864 Opening
13865 \family default
13866 : produces a paragraph for the form of address and implicitly produces a
13867  new letter.
13868 \end_layout
13869
13870 \begin_layout Itemize
13871
13872 \family sans
13873 Closing
13874 \family default
13875 : produces a paragraph for a close.
13876 \end_layout
13877
13878 \begin_layout Itemize
13879
13880 \family sans
13881 PS
13882 \family default
13883 : produces a paragraph for a postscript.
13884 \end_layout
13885
13886 \begin_layout Itemize
13887
13888 \family sans
13889 CC
13890 \family default
13891 : produces a paragraph for a distribution list.
13892 \end_layout
13893
13894 \begin_layout Itemize
13895
13896 \family sans
13897 Encl
13898 \family default
13899 : produces a paragraph for enclosures.
13900 \end_layout
13901
13902 \begin_layout Standard
13903 The types 
13904 \family sans
13905 Name
13906 \family default
13907
13908 \family sans
13909 Signature
13910 \family default
13911
13912 \family sans
13913 Address
13914 \family default
13915
13916 \family sans
13917 Telephone
13918 \family default
13919
13920 \family sans
13921 Place
13922 \family default
13923
13924 \family sans
13925 Backaddress
13926 \family default
13927
13928 \family sans
13929 Specialmail
13930 \family default
13931
13932 \family sans
13933 Location
13934 \family default
13935
13936 \family sans
13937 Title
13938 \family default
13939 , and 
13940 \family sans
13941 Subject
13942 \family default
13943  are input types provided with a label to enter information, which will
13944  be processed by the document class.
13945 \begin_inset Foot
13946 status open
13947
13948 \begin_layout Plain Layout
13949 It could be seen as a matter of inconsequence, that the types 
13950 \family sans
13951 Letter
13952 \family default
13953  and 
13954 \family sans
13955 Opening
13956 \family default
13957  described above are not such input types as well.
13958  Because of the special meaning of those types, however, I have implemented
13959  them as ordinary paragraph types with a one letter mark in the left margin.
13960  Moreover, it would affect my feeling of symmetry, if the 
13961 \family sans
13962 Opening
13963 \family default
13964  type and the 
13965 \family sans
13966 Closing
13967 \family default
13968  type had such a serious different appearance.
13969 \end_layout
13970
13971 \end_inset
13972
13973  The types must be used ahead of the corresponding 
13974 \family sans
13975 Opening
13976 \family default
13977  type.
13978 \end_layout
13979
13980 \begin_layout Standard
13981 An implementation of these types in a WYSIWYG fashion does not seem to make
13982  sense, because the real appearance of the produced letter does not only
13983  depend on the usage of the particular type, but also on other factors.
13984  For example, a signature entered in the 
13985 \family sans
13986 Signature
13987 \family default
13988  type will in the standard behavior appear in the produced letter only,
13989  when in the same letter also a 
13990 \family sans
13991 Closing
13992 \family default
13993  type is used.
13994  The entered value of the 
13995 \family sans
13996 Telephone
13997 \family default
13998  type will in the standard behavior not appear in the produced letter at
13999  all.
14000  The possibility to design the letter`s heading freely is already indicated
14001  in a footnote above.
14002 \end_layout
14003
14004 \begin_layout Standard
14005 The input types can also be used as empty paragraphs.
14006  This makes sense e.
14007 \begin_inset space \thinspace{}
14008 \end_inset
14009
14010 g.
14011 \begin_inset space \space{}
14012 \end_inset
14013
14014 for the 
14015 \family sans
14016 Signature
14017 \family default
14018  type.
14019  If the 
14020 \family sans
14021 Signature
14022 \family default
14023  type is not used at all, in the standard behavior the value of the 
14024 \family sans
14025 Name
14026 \family default
14027  type is used as signature, whereas if an empty 
14028 \family sans
14029 Signature
14030 \family default
14031  type is used, no signature value is defined.
14032 \end_layout
14033
14034 \begin_layout Standard
14035 By using the input types it is possible to write a letter template, containing
14036  filled input types with your personal dates (name, address, etc.) and empty
14037  input types for other dates you want to enter.
14038 \end_layout
14039
14040 \begin_layout Itemize
14041
14042 \family sans
14043 Name
14044 \family default
14045 : sender's name, in the standard behavior appears as a centered paragraph
14046  in small caps in the letter`s heading.
14047 \end_layout
14048
14049 \begin_layout Itemize
14050
14051 \family sans
14052 Signature
14053 \family default
14054 : sender's signature, in the standard behavior appears below the 
14055 \family sans
14056 Closing
14057 \family default
14058  type.
14059  If no 
14060 \family sans
14061 Signature
14062 \family default
14063  type is used, the value of the 
14064 \family sans
14065 Name
14066 \family default
14067  type appears instead.
14068 \end_layout
14069
14070 \begin_layout Itemize
14071
14072 \family sans
14073 Address
14074 \family default
14075 : sender's address, in the standard behavior appears in a centered paragraph
14076  in the letter`s heading below the sender's name.
14077 \end_layout
14078
14079 \begin_layout Itemize
14080
14081 \family sans
14082 Telephone
14083 \family default
14084 : sender's telephone number, in the standard behavior only sets the LaTeX
14085  variable 
14086 \family typewriter
14087
14088 \backslash
14089 telephonenum
14090 \family default
14091 .
14092 \end_layout
14093
14094 \begin_layout Itemize
14095
14096 \family sans
14097 Place
14098 \family default
14099 : place of the letter`s making.
14100 \end_layout
14101
14102 \begin_layout Itemize
14103
14104 \family sans
14105 Date
14106 \family default
14107 : date of the letter`s making.
14108  
14109 \family sans
14110 Place
14111 \family default
14112  and 
14113 \family sans
14114 Date
14115 \family default
14116 , in the standard behavior, produce the place and the date in a right-aligned
14117  line below the addressee's field.
14118  If an empty 
14119 \family sans
14120 Date
14121 \family default
14122  type is used, neither place nor date appear, independent of the value of
14123  the 
14124 \family sans
14125 Place
14126 \family default
14127  type.
14128  If no 
14129 \family sans
14130 Date
14131 \family default
14132  type is used, the date of the letter `s production is used.
14133 \end_layout
14134
14135 \begin_layout Itemize
14136
14137 \family sans
14138 Backaddress
14139 \family default
14140 : sender`s back address, in the standard behavior appears above the addressee's
14141  field in a small sans serif font.
14142 \end_layout
14143
14144 \begin_layout Itemize
14145
14146 \family sans
14147 Specialmail
14148 \family default
14149 : special mail information, in the standard behavior appears underlined
14150  above the addressee's field below the back address.
14151 \end_layout
14152
14153 \begin_layout Itemize
14154
14155 \family sans
14156 Location
14157 \family default
14158 : additional information, in the standard behavior appears on right side
14159  below the addressee`s field.
14160 \end_layout
14161
14162 \begin_layout Itemize
14163
14164 \family sans
14165 Title
14166 \family default
14167 : the letter's title, in the standard behavior appears in a big, bold, sans
14168  serif font above the subject.
14169 \end_layout
14170
14171 \begin_layout Itemize
14172
14173 \family sans
14174 Subject
14175 \family default
14176 : the letter's subject, in the standard behavior appears in a bold font
14177  above the 
14178 \family sans
14179 Opening
14180 \family default
14181  paragraph.
14182 \end_layout
14183
14184 \begin_layout Standard
14185 The types 
14186 \family sans
14187 Yourref
14188 \family default
14189
14190 \family sans
14191 Yourmail
14192 \family default
14193
14194 \family sans
14195 Myref
14196 \family default
14197
14198 \family sans
14199 Customer
14200 \family default
14201 , and 
14202 \family sans
14203 Invoice
14204 \family default
14205  produce a business letter like line above the 
14206 \family sans
14207 Title
14208 \family default
14209  line containing the fields 
14210 \begin_inset Quotes eld
14211 \end_inset
14212
14213 Your ref.
14214 \begin_inset Quotes erd
14215 \end_inset
14216
14217
14218 \begin_inset Quotes eld
14219 \end_inset
14220
14221 Your letter of
14222 \begin_inset Quotes erd
14223 \end_inset
14224
14225
14226 \begin_inset Quotes eld
14227 \end_inset
14228
14229 Our ref.
14230 \begin_inset Quotes erd
14231 \end_inset
14232
14233
14234 \begin_inset Quotes eld
14235 \end_inset
14236
14237 Customer no.
14238 \begin_inset Quotes erd
14239 \end_inset
14240
14241
14242 \begin_inset Quotes eld
14243 \end_inset
14244
14245 Invoice no.
14246 \begin_inset Quotes erd
14247 \end_inset
14248
14249 , and 
14250 \begin_inset Quotes eld
14251 \end_inset
14252
14253 Date
14254 \begin_inset Quotes erd
14255 \end_inset
14256
14257 .
14258  For the date field, the value of the 
14259 \family sans
14260 Date
14261 \family default
14262  type is used.
14263  If one of these 
14264 \begin_inset Quotes eld
14265 \end_inset
14266
14267 business letter types
14268 \begin_inset Quotes erd
14269 \end_inset
14270
14271  is used, the value of the 
14272 \family sans
14273 Place
14274 \family default
14275  type however does not appear, but only the LaTeX variable 
14276 \family typewriter
14277
14278 \backslash
14279 fromplace
14280 \family default
14281  is set.
14282  The ordinary output of place and date in a right-aligned line below the
14283  addressee`s field is suppressed.
14284  The types are implemented as input types provided with a label and must
14285  be used ahead of the corresponding 
14286 \family sans
14287 Opening
14288 \family default
14289  type.
14290 \end_layout
14291
14292 \begin_layout Itemize
14293
14294 \family sans
14295 Yourref
14296 \family default
14297 : Your ref.
14298 \end_layout
14299
14300 \begin_layout Itemize
14301
14302 \family sans
14303 Yourmail
14304 \family default
14305 : Your letter of.
14306 \end_layout
14307
14308 \begin_layout Itemize
14309
14310 \family sans
14311 Myref
14312 \family default
14313 : Our ref.
14314 \end_layout
14315
14316 \begin_layout Itemize
14317
14318 \family sans
14319 Customer
14320 \family default
14321 : Customer no.
14322 \end_layout
14323
14324 \begin_layout Itemize
14325
14326 \family sans
14327 Invoice
14328 \family default
14329 : Invoice no.
14330 \end_layout
14331
14332 \begin_layout Subsection
14333 The new letter class: letter (koma-script v.2)
14334 \end_layout
14335
14336 \begin_layout Standard
14337 by 
14338 \noun on
14339 Jürgen Spitzmüller
14340 \end_layout
14341
14342 \begin_layout Standard
14343 \begin_inset VSpace medskip
14344 \end_inset
14345
14346
14347 \end_layout
14348
14349 \begin_layout Standard
14350 \noindent
14351 Koma-Script version 2.8 has introduced a new letter class 
14352 \family typewriter
14353 scrlttr2
14354 \family default
14355  which supersedes the now unsupported 
14356 \family typewriter
14357 scrlettr
14358 \family default
14359 .
14360  It has — on the LaTeX side — a completely new interface and is not compatible
14361  with the old class.
14362  Therefore, LyX supports both, though it is recommended you use the new
14363  class.
14364 \end_layout
14365
14366 \begin_layout Standard
14367 This class covers the same functionality as 
14368 \emph on
14369 letter (koma-script),
14370 \emph default
14371  and a few more.
14372  The basic items are 
14373 \family sans
14374 Address
14375 \family default
14376  (receiver's address, same as 
14377 \family sans
14378 Letter
14379 \family default
14380  in the old layout), 
14381 \family sans
14382 Opening
14383 \family default
14384 , and 
14385 \family sans
14386 Closing
14387 \family default
14388 .
14389  
14390 \family sans
14391 NextAddress
14392 \family default
14393  will start a new letter (i.
14394 \begin_inset space \thinspace{}
14395 \end_inset
14396
14397 e.
14398 \begin_inset space \space{}
14399 \end_inset
14400
14401 you can write several letters per document).
14402  New elements are sender's 
14403 \family sans
14404 E-Mail
14405 \family default
14406
14407 \family sans
14408 URL
14409 \family default
14410
14411 \family sans
14412 Fax
14413 \family default
14414
14415 \family sans
14416 Bank
14417 \family default
14418  and the possibility to use a 
14419 \family sans
14420 Logo
14421 \family default
14422  (via 
14423 \family sans
14424 Insert\SpecialChar \menuseparator
14425 Graphics
14426 \family default
14427 ) in the header.
14428 \end_layout
14429
14430 \begin_layout Standard
14431 The biggest improvement is, though, that the letter's layout is configurable
14432  to meet almost any needs.
14433  This can be done via the preamble or with a special style file (Letter
14434  Class Option, extension 
14435 \family typewriter
14436 *.lco
14437 \family default
14438 ), that will be read in as a class option.
14439 \begin_inset Foot
14440 status collapsed
14441
14442 \begin_layout Plain Layout
14443 The KOMA package comes with some default 
14444 \family typewriter
14445 *.lco
14446 \family default
14447  files.
14448  There is, for instance, a 
14449 \family typewriter
14450 DIN.lco
14451 \family default
14452  file that follows german typesetting rules, or a 
14453 \family typewriter
14454 KOMAold.lco
14455 \family default
14456  that provides the default layout of the old 
14457 \family typewriter
14458 scrlettr
14459 \family default
14460  class.
14461  The latter can be loaded with the class option 
14462 \family typewriter
14463 KOMAold
14464 \family default
14465 , inserted via the 
14466 \family sans
14467 \bar under
14468 L
14469 \bar default
14470 ayout\SpecialChar \menuseparator
14471
14472 \bar under
14473 D
14474 \bar default
14475 ocument\SpecialChar \menuseparator
14476 Extra Options
14477 \family default
14478  field.
14479 \end_layout
14480
14481 \end_inset
14482
14483  Have a look at the 
14484 \emph on
14485 koma-letter2
14486 \emph default
14487  template that is included in LyX for examples.
14488  A detailed description is to be found in the Koma-Script documentation
14489  (
14490 \emph on
14491 scrguide
14492 \emph default
14493 ).
14494 \end_layout
14495
14496 \begin_layout Subsection
14497 Problems
14498 \end_layout
14499
14500 \begin_layout Standard
14501 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14502  some problems.
14503 \end_layout
14504
14505 \begin_layout Itemize
14506 The chapter number of a 
14507 \family sans
14508 Chapter
14509 \family default
14510  type appears on a line of its own above the chapter heading instead of
14511  appearing in the same line ahead of it.
14512  The cause for that is the LyX internal behavior for the labeltype 
14513 \family sans
14514 Counter_Chapter
14515 \family default
14516  in the layout file.
14517 \end_layout
14518
14519 \begin_layout Itemize
14520 The headings of the types 
14521 \family sans
14522 Addchap
14523 \family default
14524  and 
14525 \family sans
14526 Addsec
14527 \family default
14528  are only put in the 
14529 \begin_inset Quotes eld
14530 \end_inset
14531
14532 true
14533 \begin_inset Quotes erd
14534 \end_inset
14535
14536  LaTeX table of contents, but not in the LyX table of contents (
14537 \family sans
14538 Document\SpecialChar \menuseparator
14539 Table
14540 \begin_inset space ~
14541 \end_inset
14542
14543 of
14544 \begin_inset space ~
14545 \end_inset
14546
14547 Contents
14548 \family default
14549 ).
14550 \end_layout
14551
14552 \begin_layout Itemize
14553 The paragraphs in a 
14554 \emph on
14555 letter
14556 \emph default
14557  document class appear in a skip separation mode, not indented.
14558  This is the standard behavior, no special LaTeX commands are needed for
14559  that.
14560  But in the 
14561 \family sans
14562 Document\SpecialChar \menuseparator
14563 Settings
14564 \family default
14565  dialog the corresponding radio button indicates 
14566 \family sans
14567 Indent
14568 \family default
14569 .
14570  A 
14571 \family sans
14572 Skip
14573 \family default
14574  value always has the effect that extra LaTeX commands are inserted in the
14575  document to produce the gap, which is not what is wanted in this case.
14576 \end_layout
14577
14578 \begin_layout Section
14579 Memoir
14580 \end_layout
14581
14582 \begin_layout Standard
14583 By 
14584 \noun on
14585 Jürgen Spitzmüller
14586 \end_layout
14587
14588 \begin_layout Subsection
14589 Overview
14590 \end_layout
14591
14592 \begin_layout Standard
14593 Memoir is a very powerful and constantly evolving class.
14594  It has been designed with regard to fictional and non-fictional literature.
14595  Its aim is to let the user have maximum control over the typesetting of
14596  his document.
14597  Memoir is based on the standard book class, but it can also emulate the
14598  article class (see below).
14599 \end_layout
14600
14601 \begin_layout Standard
14602 Peter Wilson, the developer of Memoir, is known as the author of lots of
14603  useful packages in the LaTeX world.
14604  Most of them have been merged with Memoir.
14605  Therefore, it is much easier to layout the table of contents, appendices,
14606  chapter designs and such.
14607  LyX, though, does not support all of these goodies natively.
14608  Some of them might be added to forthcoming releases
14609 \begin_inset Foot
14610 status collapsed
14611
14612 \begin_layout Plain Layout
14613 You are invited to send suggestions to 
14614 \begin_inset Flex URL
14615 status collapsed
14616
14617 \begin_layout Plain Layout
14618
14619 lyx-devel@lists.lyx.org
14620 \end_layout
14621
14622 \end_inset
14623
14624 .
14625 \end_layout
14626
14627 \end_inset
14628
14629 , lots will probably never be supported, due to the limitations of LyX's
14630  framework.
14631  Of course you can still use all features with the help of some native LaTeX
14632  commands (TeX code
14633 \begin_inset Foot
14634 status collapsed
14635
14636 \begin_layout Plain Layout
14637 Cf.
14638 \begin_inset ERT
14639 status collapsed
14640
14641 \begin_layout Plain Layout
14642
14643
14644 \backslash
14645  
14646 \end_layout
14647
14648 \end_inset
14649
14650 section
14651 \begin_inset space ~
14652 \end_inset
14653
14654
14655 \begin_inset CommandInset ref
14656 LatexCommand ref
14657 reference "sec:Inserting-TeX-Code"
14658
14659 \end_inset
14660
14661  for details.
14662 \end_layout
14663
14664 \end_inset
14665
14666 ).
14667  In this section, we can only list those features that are natively supported
14668  by LyX.
14669  For detailed descriptions (and for the rest of features) we recommend you
14670  have a look at the detailed manual of the Memoir class
14671 \begin_inset Foot
14672 status collapsed
14673
14674 \begin_layout Plain Layout
14675 Cf.
14676 \begin_inset ERT
14677 status collapsed
14678
14679 \begin_layout Plain Layout
14680
14681
14682 \backslash
14683  
14684 \end_layout
14685
14686 \end_inset
14687
14688
14689 \begin_inset Flex URL
14690 status collapsed
14691
14692 \begin_layout Plain Layout
14693
14694 CTAN:/macros/latex/memoir/memman.pdf
14695 \end_layout
14696
14697 \end_inset
14698
14699 .
14700 \end_layout
14701
14702 \end_inset
14703
14704 , which is not only a user guide for the class, but also both a comprehensive
14705  description on good typesetting and a superb example for good typesetting
14706  itself.
14707 \end_layout
14708
14709 \begin_layout Subsection
14710 Basic features and restrictions
14711 \end_layout
14712
14713 \begin_layout Standard
14714 Memoir supports basically all features of the standard book classes.
14715  There are, however, some differences, as follows:
14716 \end_layout
14717
14718 \begin_layout Description
14719 Font
14720 \begin_inset space ~
14721 \end_inset
14722
14723 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14724 \end_layout
14725
14726 \begin_layout Description
14727 Page
14728 \begin_inset space ~
14729 \end_inset
14730
14731 style: The fancy page style is not supported, due to a command clash between
14732  Memoir and the fancyhdr package (they both define a command with the same
14733  name, which confuses LaTeX).
14734  Instead, Memoir comes with a number of its own page styles (see 
14735 \family sans
14736 Layout\SpecialChar \menuseparator
14737 Document\SpecialChar \menuseparator
14738 Page
14739 \begin_inset space ~
14740 \end_inset
14741
14742 Style
14743 \family default
14744 ).
14745  If you want to use these for the chapter pages, you have to use the command
14746  
14747 \family typewriter
14748
14749 \backslash
14750 chapterstyle
14751 \family default
14752  in the main text or in preamble (e.
14753 \begin_inset space \thinspace{}
14754 \end_inset
14755
14756 g.
14757 \begin_inset space \space{}
14758 \end_inset
14759
14760
14761 \family typewriter
14762
14763 \backslash
14764 chapterstyle{companion}
14765 \family default
14766 ).
14767 \end_layout
14768
14769 \begin_layout Description
14770 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14771  optional argument in the standard classes.
14772  With this, you can specify an alternative version of the title for the
14773  table of contents and the headers (for instance, if the title is too long).
14774  In LyX, you can do this via 
14775 \family sans
14776 Insert\SpecialChar \menuseparator
14777 Short
14778 \begin_inset space ~
14779 \end_inset
14780
14781 Title
14782 \family default
14783  at the beginning of a chapter/section.
14784  Memoir features a second optional argument and thus separates the table
14785  of contents from the header.
14786  You can define three variants of a title with this: one for the main text,
14787  one for the table of contents, and one for the headers.
14788  Simply insert two optional arguments if you need this feature, the first
14789  one containing the short title for the Table of Contents, the second one
14790  containing an alternative short title for the headers.
14791 \end_layout
14792
14793 \begin_layout Description
14794 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14795  of contents, the list of figures and the list of table start a new page
14796  automatically.
14797  Memoir does not follow this route.
14798  You have to insert a page break yourself, if you want to have one.
14799 \end_layout
14800
14801 \begin_layout Description
14802 Titlepage: For some unknown reason, Memoir uses pagination on the title
14803  page (in the standard classes, title pages are 
14804 \begin_inset Quotes eld
14805 \end_inset
14806
14807 empty
14808 \begin_inset Quotes erd
14809 \end_inset
14810
14811 ).
14812  If you want an empty title page, type 
14813 \family typewriter
14814
14815 \backslash
14816 aliaspagestyle{title}{empty}
14817 \family default
14818  in the preamble.
14819 \end_layout
14820
14821 \begin_layout Description
14822 Article: With the class option 
14823 \emph on
14824 article
14825 \emph default
14826  (to be inserted in 
14827 \family sans
14828 Layout\SpecialChar \menuseparator
14829 Document\SpecialChar \menuseparator
14830 Extra
14831 \begin_inset space ~
14832 \end_inset
14833
14834 Options
14835 \family default
14836 ), you can emulate article style.
14837  That is, counters (footnotes, figures, tables etc.) will not be reset on
14838  new chapters, chapters don't start a new page (but are—in contrary to 
14839 \begin_inset Quotes eld
14840 \end_inset
14841
14842 real
14843 \begin_inset Quotes erd
14844 \end_inset
14845
14846  article classes—still allowed), parts, though, use their own page, as in
14847  book.
14848 \end_layout
14849
14850 \begin_layout Description
14851 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14852  font commands, which have been used in the old LaTeX version 2.09 (e.
14853 \begin_inset space \thinspace{}
14854 \end_inset
14855
14856 g.
14857 \begin_inset space \space{}
14858 \end_inset
14859
14860
14861 \family typewriter
14862
14863 \backslash
14864 rm
14865 \family default
14866
14867 \family typewriter
14868
14869 \backslash
14870 it
14871 \family default
14872 ).
14873  It produces an error and stops LaTeX whenever such a command appears.
14874  The class option 
14875 \emph on
14876 oldfontcommands
14877 \emph default
14878  reallows the commands and spits out warnings instead (which does at least
14879  not stop LaTeX).
14880  Since a lot of packages and particularly BibTeX style files are still using
14881  those commands, we have decided to use this option by default.
14882 \end_layout
14883
14884 \begin_layout Subsection
14885 Extra features
14886 \end_layout
14887
14888 \begin_layout Standard
14889 We will only describe the features supported by LyX (which is not much currently
14890 ).
14891  Please consult the Memoir manual
14892 \begin_inset Foot
14893 status collapsed
14894
14895 \begin_layout Plain Layout
14896 Cf.
14897 \begin_inset ERT
14898 status collapsed
14899
14900 \begin_layout Plain Layout
14901
14902
14903 \backslash
14904  
14905 \end_layout
14906
14907 \end_inset
14908
14909
14910 \begin_inset Flex URL
14911 status collapsed
14912
14913 \begin_layout Plain Layout
14914
14915 CTAN:/macros/latex/memoir/memman.pdf
14916 \end_layout
14917
14918 \end_inset
14919
14920 .
14921 \end_layout
14922
14923 \end_inset
14924
14925  for details.
14926 \end_layout
14927
14928 \begin_layout Description
14929 Abstract: You may wonder why an abstract is an extra feature.
14930  Well, it is in book class.
14931  Usually books don't have abstracts.
14932  Memoir, however, has.
14933  You can use it wherever and how often you like.
14934 \end_layout
14935
14936 \begin_layout Description
14937 Chapterprecis: You may know this older typesetting style: The contents of
14938  a chapter are summarized below the title and also in the table of contents
14939  (e.
14940 \begin_inset space \thinspace{}
14941 \end_inset
14942
14943 g.
14944 \begin_inset space \space{}
14945 \end_inset
14946
14947
14948 \emph on
14949 Our hero arrives in Troia; he loses some friends; he finds others
14950 \emph default
14951 ).
14952  Chapterprecis does exactly this.
14953  It is therefore only sensible below a chapter.
14954 \end_layout
14955
14956 \begin_layout Description
14957 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14958  The epigraph environment provides an elegant way of typesetting such a
14959  motto.
14960  The motto itself (text) and its author (source) are divided by a short
14961  line.
14962  Unfortunately, we have to fool LyX a bit here again, since the environment
14963  needs two arguments (text and source).
14964  In this case, we have to use curly brackets (in TeX mode) between the two
14965  arguments: 
14966 \emph on
14967 <smart slogan>
14968 \emph default
14969  
14970 \family typewriter
14971 }{
14972 \family default
14973  
14974 \emph on
14975 <author of the slogan>.
14976 \end_layout
14977
14978 \begin_layout Description
14979 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14980  complex figurative poems).
14981  LyX can only support a few of them.
14982  One is poemtitle, which is a centered title for poems, which will also
14983  be added to the table of contents (verse is the standard environment for
14984  poems.
14985  Memoir has some enhanced versions of verse, but you need to use TeX code,
14986  because they have to be nested inside regular verse environments, which
14987  is not possible with LyX).
14988 \end_layout
14989
14990 \begin_layout Description
14991 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14992 \end_layout
14993
14994 \begin_layout Section
14995 Article (mwart), book (mwbk) and report (mwrep)
14996 \begin_inset Argument
14997 status collapsed
14998
14999 \begin_layout Plain Layout
15000 The 
15001 \family typewriter
15002 mw
15003 \family default
15004  Classes
15005 \end_layout
15006
15007 \end_inset
15008
15009
15010 \end_layout
15011
15012 \begin_layout Standard
15013 by 
15014 \noun on
15015 Tomasz Luczak
15016 \end_layout
15017
15018 \begin_layout Standard
15019 The LyX document classes 
15020 \emph on
15021 article (mwart)
15022 \emph default
15023
15024 \emph on
15025 report (mwrep)
15026 \emph default
15027  and 
15028 \emph on
15029 book
15030 \emph default
15031  
15032 \emph on
15033 (mwbk)
15034 \emph default
15035  correspond to the LaTeX document classes 
15036 \family typewriter
15037 mwart.cls
15038 \family default
15039
15040 \family typewriter
15041 mwrep.cls
15042 \family default
15043  and 
15044 \family typewriter
15045 mwbk.cls
15046 \family default
15047 , resp.
15048  They are replacements for the standard document classes 
15049 \family typewriter
15050 article.cls
15051 \family default
15052
15053 \family typewriter
15054 report.cls
15055 \family default
15056  and 
15057 \family typewriter
15058 book.cls
15059 \family default
15060 , resp., and fit better to Polish typography conventions in a number of points.
15061  
15062 \end_layout
15063
15064 \begin_layout Standard
15065 Basic differences:
15066 \end_layout
15067
15068 \begin_layout Itemize
15069 Unnumbered titles (with star, e.
15070 \begin_inset space \thinspace{}
15071 \end_inset
15072
15073 g.
15074 \begin_inset space \space{}
15075 \end_inset
15076
15077
15078 \family sans
15079 Section*
15080 \family default
15081 ) are added into table of contents,
15082 \end_layout
15083
15084 \begin_layout Itemize
15085 Additional page styles:
15086 \end_layout
15087
15088 \begin_deeper
15089 \begin_layout Description
15090 uheadings header with separated lines,
15091 \end_layout
15092
15093 \begin_layout Description
15094 myheadings custom header, contents headers via commands: 
15095 \family typewriter
15096
15097 \backslash
15098 markright
15099 \family default
15100  and 
15101 \family typewriter
15102
15103 \backslash
15104 markboth
15105 \family default
15106 ,
15107 \end_layout
15108
15109 \begin_layout Description
15110 myuheadings custom header with separated lines,
15111 \end_layout
15112
15113 \begin_layout Description
15114 outer page number is placed on outer side of page
15115 \end_layout
15116
15117 \end_deeper
15118 \begin_layout Itemize
15119 Options 
15120 \end_layout
15121
15122 \begin_deeper
15123 \begin_layout Description
15124 rmheadings serif titles — default,
15125 \end_layout
15126
15127 \begin_layout Description
15128 sfheadings sansserif titles,
15129 \end_layout
15130
15131 \begin_layout Description
15132 authortitle on title page first placed is author next title — default,
15133 \end_layout
15134
15135 \begin_layout Description
15136 titleauthor on title page first placed is title next author,
15137 \end_layout
15138
15139 \begin_layout Description
15140 withmarginpar reserve place on page for margins.
15141 \end_layout
15142
15143 \end_deeper
15144 \begin_layout Section
15145 Paper
15146 \end_layout
15147
15148 \begin_layout Standard
15149 The document class 
15150 \family sans
15151 paper
15152 \family default
15153  provides an alternative to the standard 
15154 \family sans
15155 article
15156 \family default
15157  class.
15158  It provides similar functionality, but you might prefer this layout with
15159  sans serif sections, headings, and more.
15160 \end_layout
15161
15162 \begin_layout Section
15163 RevTeX4
15164 \end_layout
15165
15166 \begin_layout Standard
15167 by 
15168 \noun on
15169 Amir Karger
15170 \end_layout
15171
15172 \begin_layout Standard
15173 \begin_inset VSpace bigskip
15174 \end_inset
15175
15176
15177 \end_layout
15178
15179 \begin_layout Standard
15180 \noindent
15181 The 
15182 \family sans
15183 Revtex
15184 \begin_inset space ~
15185 \end_inset
15186
15187 4
15188 \family default
15189  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15190 \begin_inset Formula $\beta$
15191 \end_inset
15192
15193  release of May, 1999) class.
15194 \end_layout
15195
15196 \begin_layout Standard
15197 LyX has a 
15198 \family sans
15199 Revtex
15200 \family default
15201  textclass, which works with RevTeX 3.1.
15202  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15203  That means that it doesn't interact very well with LyX, which requires
15204  LaTeX2e, although it has been kludged to work.
15205  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15206  LyX with the 
15207 \family sans
15208 RevTeX
15209 \begin_inset space ~
15210 \end_inset
15211
15212 4
15213 \family default
15214  textclass should also be pretty easy to use.
15215 \end_layout
15216
15217 \begin_layout Standard
15218 These documents are supposed to be used in 
15219 \emph on
15220 addition
15221 \emph default
15222  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15223  macros, and assume you'll know what to put in the preamble if necessary.
15224 \end_layout
15225
15226 \begin_layout Subsection
15227 Installation
15228 \end_layout
15229
15230 \begin_layout Standard
15231 All you need to do is install RevTeX 4, as described in the package's README
15232  file.
15233  The package can be found at The RevTeX 4 Web Site 
15234 \begin_inset Flex URL
15235 status collapsed
15236
15237 \begin_layout Plain Layout
15238
15239 http://publish.aps.org/revtex4/
15240 \end_layout
15241
15242 \end_inset
15243
15244 .
15245  Install it somewhere that LaTeX can see it.
15246  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15247  (i.
15248 \begin_inset space \thinspace{}
15249 \end_inset
15250
15251 e.
15252 \begin_inset space \space{}
15253 \end_inset
15254
15255 not the directory where you installed the class file.) Then, if you reconfigure
15256  LyX, it will find the class file and let you use the RevTeX4 textclass.
15257 \end_layout
15258
15259 \begin_layout Standard
15260 Probably the easiest way to get started is either to import a RevTeX 4 document
15261  using 
15262 \family typewriter
15263 tex2lyx
15264 \family default
15265 , or to use the 
15266 \family sans
15267 Revtex
15268 \begin_inset space ~
15269 \end_inset
15270
15271 4
15272 \family default
15273  template, found in the templates directory.
15274 \end_layout
15275
15276 \begin_layout Subsection
15277 Preamble Matter
15278 \end_layout
15279
15280 \begin_layout Standard
15281 Optional arguments to 
15282 \family typewriter
15283
15284 \backslash
15285 documentclass
15286 \family default
15287 , like 
15288 \begin_inset Quotes eld
15289 \end_inset
15290
15291 preprint
15292 \begin_inset Quotes erd
15293 \end_inset
15294
15295  and 
15296 \begin_inset Quotes eld
15297 \end_inset
15298
15299 aps
15300 \begin_inset Quotes erd
15301 \end_inset
15302
15303 , go in the 
15304 \family sans
15305 E
15306 \bar under
15307 x
15308 \bar default
15309 tra
15310 \begin_inset space ~
15311 \end_inset
15312
15313 Options
15314 \family default
15315  field in the 
15316 \family sans
15317 Document
15318 \begin_inset space ~
15319 \end_inset
15320
15321 Layout
15322 \family default
15323  dialog, as usual.
15324  Remember that in RevTeX, at least one optional argument is required! 
15325 \end_layout
15326
15327 \begin_layout Standard
15328 Other preamble matter, like 
15329 \family typewriter
15330
15331 \backslash
15332 draft
15333 \family default
15334  etc.
15335 \begin_inset space ~
15336 \end_inset
15337
15338 goes in the 
15339 \family sans
15340 LaTeX
15341 \begin_inset space ~
15342 \end_inset
15343
15344 Preamble
15345 \family default
15346  dialog, also as usual.
15347 \end_layout
15348
15349 \begin_layout Subsection
15350 Layouts
15351 \end_layout
15352
15353 \begin_layout Standard
15354 The layouts basically correspond to the commands in RevTeX4.0.
15355  For example, the Email layout corresponds to 
15356 \family typewriter
15357
15358 \backslash
15359 email{}
15360 \family default
15361 .
15362  Note that (at least as of RevTeX 4.0 Beta), the 
15363 \family sans
15364 Address
15365 \family default
15366  and 
15367 \family sans
15368 Affiliation
15369 \family default
15370  layouts are exactly equivalent, so you shouldn't need to use both.
15371 \begin_inset Foot
15372 status collapsed
15373
15374 \begin_layout Plain Layout
15375 In case you're curious, both were included so that 
15376 \family typewriter
15377 tex2lyx
15378 \family default
15379  would be able to translate both 
15380 \family typewriter
15381
15382 \backslash
15383 address
15384 \family default
15385  and 
15386 \family typewriter
15387
15388 \backslash
15389 affiliation
15390 \family default
15391 .
15392 \end_layout
15393
15394 \end_inset
15395
15396
15397 \end_layout
15398
15399 \begin_layout Subsection
15400 Important Notes
15401 \end_layout
15402
15403 \begin_layout Standard
15404 There are a couple of important unique aspects of RevTeX 4 which might cause
15405  bugs that will be even more confusing in LyX.
15406 \end_layout
15407
15408 \begin_layout Standard
15409 In RevTeX, the 
15410 \family typewriter
15411
15412 \backslash
15413 thanks
15414 \family default
15415  command goes 
15416 \emph on
15417 outside
15418 \emph default
15419  the 
15420 \family typewriter
15421
15422 \backslash
15423 author
15424 \family default
15425  command.
15426  The LyX equivalent is that there is a separate Thanks layout.
15427  Do 
15428 \emph on
15429 not
15430 \emph default
15431  write footnotes in the 
15432 \family sans
15433 Author
15434 \family default
15435  layout, or weird things may happen.
15436  See the RevTeX 4 documentation for more details.
15437 \end_layout
15438
15439 \begin_layout Standard
15440 Also, the 
15441 \family sans
15442 Author
15443 \begin_inset space ~
15444 \end_inset
15445
15446 Email
15447 \family default
15448
15449 \family sans
15450 Author
15451 \begin_inset space ~
15452 \end_inset
15453
15454 URL
15455 \family default
15456 , and 
15457 \family sans
15458 Thanks
15459 \family default
15460  layouts must be placed 
15461 \emph on
15462 in between
15463 \emph default
15464  the 
15465 \family sans
15466 Author
15467 \family default
15468  layout and the corresponding 
15469 \family sans
15470 Address
15471 \family default
15472  (or equivalent 
15473 \family sans
15474 Affiliation
15475 \family default
15476 ) layout.
15477  If you put the 
15478 \family sans
15479 Thanks
15480 \family default
15481  after the 
15482 \family sans
15483 Address
15484 \family default
15485 , the LaTeX won't compile.
15486 \end_layout
15487
15488 \begin_layout Subsection
15489 Drawbacks
15490 \end_layout
15491
15492 \begin_layout Standard
15493 The main problem with this layout is that you can't use the optional arguments
15494  to layouts like Email and Title.
15495  (The problem is not unique to this layout; you can't use optional arguments
15496  to the Section layouts either.) This means that after you export that file
15497  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15498  need to edit the LaTeX file with a text editor to add the optional arguments
15499  to set, e.
15500 \begin_inset space \thinspace{}
15501 \end_inset
15502
15503 g.
15504 \begin_inset space \space{}
15505 \end_inset
15506
15507 the running title for the page headers.
15508  Lacking these layouts makes the 
15509 \family typewriter
15510
15511 \backslash
15512 altaffiliation
15513 \family default
15514  (and the equivalent 
15515 \family typewriter
15516
15517 \backslash
15518 altaddress
15519 \family default
15520 ) useless, so the corresponding layouts don't exist, and will have to be
15521  added by hand.
15522 \begin_inset Foot
15523 status collapsed
15524
15525 \begin_layout Plain Layout
15526
15527 \emph on
15528 Note from JMarc:
15529 \emph default
15530  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15531  has not been updated yet to take advantage of it.
15532 \end_layout
15533
15534 \end_inset
15535
15536  
15537 \end_layout
15538
15539 \begin_layout Section
15540 Springer Journals (
15541 \family sans
15542 svjour
15543 \family default
15544 )
15545 \end_layout
15546
15547 \begin_layout Standard
15548 by 
15549 \noun on
15550 Martin Vermeer
15551 \end_layout
15552
15553 \begin_layout Subsection
15554 Description
15555 \end_layout
15556
15557 \begin_layout Standard
15558 These are the layout files for some of the journal formats used by Springer
15559  Verlag and listed on 
15560 \begin_inset Flex URL
15561 status collapsed
15562
15563 \begin_layout Plain Layout
15564
15565 http://www.springer.de/author/tex/help-journals.html
15566 \end_layout
15567
15568 \end_inset
15569
15570 , where you should also go to fetch the class files (yes, these are LaTeX2e
15571  now!).
15572  It is a modular system: the things common to all journals are implemented
15573  in 
15574 \family typewriter
15575 svjour.inc
15576 \family default
15577 , which journal-specific layout files (such as, e.
15578 \begin_inset space \thinspace{}
15579 \end_inset
15580
15581 g.
15582 \begin_inset space \space{}
15583 \end_inset
15584
15585
15586 \family typewriter
15587 svjog.layout
15588 \family default
15589  for Journal of Geodesy) can include.
15590 \end_layout
15591
15592 \begin_layout Standard
15593 This means that implementing support for any other Springer journal on this
15594  list is as simple as writing your own 
15595 \family typewriter
15596 sv
15597 \family default
15598 <myjournal>
15599 \family typewriter
15600 .layout
15601 \family default
15602  file following the outline given in 
15603 \family typewriter
15604 svjog.layout
15605 \family default
15606 .
15607  
15608 \end_layout
15609
15610 \begin_layout Standard
15611 It is reasonably well tested only for the Journal of Geodesy.
15612  
15613 \family typewriter
15614 svjour
15615 \family default
15616  and 
15617 \family typewriter
15618 svjog
15619 \family default
15620  come with the standard LyX distribution.
15621  Install the relevant class file (downloaded from Springer) in a proper
15622  directory, reconfigure LaTeX (in the teTeX case by running 
15623 \family typewriter
15624 texhash
15625 \family default
15626 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15627  and it should work.
15628 \end_layout
15629
15630 \begin_layout Subsection
15631 New styles
15632 \end_layout
15633
15634 \begin_layout Standard
15635 A large number of theorem-like styles — 
15636 \family sans
15637 Claim, Conjecture,
15638 \family default
15639  
15640 \family sans
15641 \SpecialChar \ldots{}
15642 Theorem
15643 \family default
15644 .
15645 \end_layout
15646
15647 \begin_layout Standard
15648
15649 \family sans
15650 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15651  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15652 \family default
15653 .
15654  See the Springer class file documentation for details.
15655 \end_layout
15656
15657 \begin_layout Subsection
15658 Supported journals
15659 \end_layout
15660
15661 \begin_layout Itemize
15662
15663 \emph on
15664 Journal of Geodesy
15665 \emph default
15666
15667 \family typewriter
15668 svjog.layout
15669 \family default
15670  — Martin Vermeer
15671 \end_layout
15672
15673 \begin_layout Itemize
15674
15675 \emph on
15676 Probability Theory and Related Fields
15677 \emph default
15678
15679 \family typewriter
15680 svprobth.layout
15681 \family default
15682  — Jean-Marc Lasgouttes
15683 \end_layout
15684
15685 \begin_layout Standard
15686 Add your own, it isn't so hard!
15687 \end_layout
15688
15689 \begin_layout Subsection
15690 Credits
15691 \end_layout
15692
15693 \begin_layout Standard
15694 These files are partly based on the older 
15695 \family typewriter
15696 ejour2.layout
15697 \family default
15698 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15699  file from Springer.
15700  All this, and the 
15701 \family typewriter
15702 ejour2
15703 \family default
15704  layout, are now defunct.
15705  Jean-Marc Lasgouttes helped out big in making me find my way around the
15706  LyX layout file mechanism.
15707 \end_layout
15708
15709 \begin_layout Subsection
15710 Bugs
15711 \end_layout
15712
15713 \begin_layout Standard
15714 Probably.
15715  But probably less than in the old hacked-LaTeX 
15716 \family typewriter
15717 ejour2
15718 \family default
15719 .
15720 \end_layout
15721
15722 \begin_layout Standard
15723 Limitations e.
15724 \begin_inset space \thinspace{}
15725 \end_inset
15726
15727 g.: does not display the number for theorem-like layouts, just #.
15728 \end_layout
15729
15730 \begin_layout Section
15731 Slides [aka 
15732 \noun on
15733 SliTeX
15734 \noun default
15735 ]
15736 \begin_inset CommandInset label
15737 LatexCommand label
15738 name "sec:slitex"
15739
15740 \end_inset
15741
15742
15743 \end_layout
15744
15745 \begin_layout Standard
15746 by 
15747 \noun on
15748 John Weiss
15749 \noun default
15750  
15751 \end_layout
15752
15753 \begin_layout Subsection
15754 Introduction
15755 \end_layout
15756
15757 \begin_layout Standard
15758 This section describes how to use LyX to make slides for overhead projectors.
15759  There are two document classes that can do this: the default slides class
15760  and the 
15761 \family sans
15762 FoilTeX
15763 \family default
15764  slides class.
15765  This section documents the former.
15766 \end_layout
15767
15768 \begin_layout Standard
15769 I'm going to say this again, nice and clear, so that there's no misunderstanding
15770 :
15771 \end_layout
15772
15773 \begin_layout Standard
15774 \begin_inset VSpace bigskip
15775 \end_inset
15776
15777
15778 \end_layout
15779
15780 \begin_layout Standard
15781 \align center
15782
15783 \size large
15784 This section documents the class 
15785 \begin_inset Quotes eld
15786 \end_inset
15787
15788
15789 \family sans
15790 slides (default)
15791 \family default
15792
15793 \begin_inset Quotes erd
15794 \end_inset
15795
15796  
15797 \emph on
15798 only.
15799 \end_layout
15800
15801 \begin_layout Standard
15802 \begin_inset VSpace bigskip
15803 \end_inset
15804
15805
15806 \end_layout
15807
15808 \begin_layout Standard
15809 If you're looking for the documentation for 
15810 \begin_inset Quotes eld
15811 \end_inset
15812
15813
15814 \family sans
15815 slides (FoilTeX)
15816 \family default
15817
15818 \begin_inset Quotes erd
15819 \end_inset
15820
15821 , check out section
15822 \begin_inset space ~
15823 \end_inset
15824
15825
15826 \begin_inset CommandInset ref
15827 LatexCommand ref
15828 reference "sec:foiltex"
15829
15830 \end_inset
15831
15832 .
15833  The 
15834 \family sans
15835 foils
15836 \family default
15837  class [
15838 \begin_inset Quotes eld
15839 \end_inset
15840
15841
15842 \family sans
15843 slides (FoilTeX)
15844 \family default
15845
15846 \begin_inset Quotes erd
15847 \end_inset
15848
15849 ] is actually somewhat better than the default 
15850 \family sans
15851 slides
15852 \family default
15853  class,
15854 \begin_inset Foot
15855 status collapsed
15856
15857 \begin_layout Plain Layout
15858 \SpecialChar \ldots{}
15859 or so I've been told repeatedly by its advocates.
15860  Having never used it, I have no idea if this claim is true or not.
15861 \end_layout
15862
15863 \end_inset
15864
15865  which this section documents.
15866 \end_layout
15867
15868 \begin_layout Standard
15869 This class is the LaTeX2e improvement of the old 
15870 \noun on
15871 SliTeX
15872 \noun default
15873  package.
15874  Every LaTeX2e distribution includes this class [which I'll just refer to
15875  as 
15876 \begin_inset Quotes eld
15877 \end_inset
15878
15879
15880 \family sans
15881 slides
15882 \family default
15883
15884 \begin_inset Quotes erd
15885 \end_inset
15886
15887  from now on], so you're bound to have it.
15888  As I noted earlier, there are other classes, such as 
15889 \family sans
15890 foils
15891 \family default
15892 , which also produce slides for overhead projectors and do a better job
15893  at it.
15894  However, there are some things which 
15895 \family sans
15896 slides
15897 \family default
15898  can do which the others can't, such as generate overlays.
15899  Read on to learn more!
15900 \end_layout
15901
15902 \begin_layout Subsection
15903 Getting Started
15904 \begin_inset CommandInset label
15905 LatexCommand label
15906 name "sec:slidesetup"
15907
15908 \end_inset
15909
15910
15911 \end_layout
15912
15913 \begin_layout Standard
15914 Obviously, to use this document class, you need to select 
15915 \begin_inset Quotes eld
15916 \end_inset
15917
15918
15919 \family sans
15920 slides (default)
15921 \family default
15922
15923 \begin_inset Quotes erd
15924 \end_inset
15925
15926  from the class list in the 
15927 \family sans
15928 Document\SpecialChar \menuseparator
15929 Settings
15930 \family default
15931  dialog.
15932  There are some other special things you should know about this class:
15933 \end_layout
15934
15935 \begin_layout Itemize
15936 Don't bother changing the options 
15937 \family sans
15938 Sides and Columns
15939 \family default
15940 .
15941  They're not supported by the 
15942 \family sans
15943 slides
15944 \family default
15945  class, anyways.
15946 \end_layout
15947
15948 \begin_layout Itemize
15949 The option 
15950 \family sans
15951 Page
15952 \begin_inset space ~
15953 \end_inset
15954
15955 style
15956 \family default
15957  behaves a bit differently for this class.
15958  The possible choices and what they do are as follows:
15959 \end_layout
15960
15961 \begin_deeper
15962 \begin_layout Description
15963
15964 \family sans
15965 plain
15966 \family default
15967  The final output contains page numbers in the lower right corner.
15968 \end_layout
15969
15970 \begin_layout Description
15971
15972 \family sans
15973 headings
15974 \family default
15975  Like 
15976 \family sans
15977 plain
15978 \family default
15979 , but also prints out any time markers you've put in.
15980  This is the default.
15981 \end_layout
15982
15983 \begin_layout Description
15984
15985 \family sans
15986 empty
15987 \family default
15988  The final output contains no page numbers, time markers, or alignment markers.
15989 \end_layout
15990
15991 \end_deeper
15992 \begin_layout Itemize
15993 The 
15994 \family sans
15995 slides
15996 \family default
15997  class has an extra option: 
15998 \family typewriter
15999 clock
16000 \family default
16001 .
16002  To use it, put 
16003 \begin_inset Quotes eld
16004 \end_inset
16005
16006
16007 \family typewriter
16008 clock
16009 \family default
16010
16011 \begin_inset Quotes erd
16012 \end_inset
16013
16014  in the extra class options.
16015 \end_layout
16016
16017 \begin_deeper
16018 \begin_layout Standard
16019 Using this options allows you to add time markers to 
16020 \family sans
16021 Note
16022 \family default
16023 s.
16024  See section
16025 \begin_inset space ~
16026 \end_inset
16027
16028
16029 \begin_inset CommandInset ref
16030 LatexCommand ref
16031 reference "sec:slideNote"
16032
16033 \end_inset
16034
16035  for more details.
16036 \end_layout
16037
16038 \end_deeper
16039 \begin_layout Standard
16040 You can also use the template file 
16041 \begin_inset Quotes eld
16042 \end_inset
16043
16044
16045 \family typewriter
16046 slides.lyx
16047 \family default
16048
16049 \begin_inset Quotes erd
16050 \end_inset
16051
16052  to automatically set up a document to use the 
16053 \family sans
16054 slides
16055 \family default
16056  class [using 
16057 \family sans
16058 File\SpecialChar \menuseparator
16059 New
16060 \begin_inset space ~
16061 \end_inset
16062
16063 from
16064 \begin_inset space ~
16065 \end_inset
16066
16067 Template
16068 \family default
16069  to open your new document].
16070  The template file also contains some examples of the special paragraph
16071  environments used by this class.
16072  I'll describe those next.
16073 \end_layout
16074
16075 \begin_layout Subsection
16076 Paragraph Environments
16077 \end_layout
16078
16079 \begin_layout Subsubsection
16080 Supported Environments
16081 \end_layout
16082
16083 \begin_layout Standard
16084 The first thing you'll notice when you start up a new 
16085 \family sans
16086 slides
16087 \family default
16088  document is the font size and type: it's the equivalent of the size 
16089 \begin_inset Quotes eld
16090 \end_inset
16091
16092
16093 \family sans
16094 Largest
16095 \family default
16096
16097 \begin_inset Quotes erd
16098 \end_inset
16099
16100  in the 
16101 \family sans
16102 Sans
16103 \begin_inset space ~
16104 \end_inset
16105
16106 Serif
16107 \family default
16108  font.
16109  This is also what's used in the output.
16110  Think of this as a 
16111 \begin_inset Quotes eld
16112 \end_inset
16113
16114 visual cue
16115 \begin_inset Quotes erd
16116 \end_inset
16117
16118  to remind you that this is a slide.
16119  Your final slides will use a larger font; ergo, you'll have less space.
16120  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16121 \end_layout
16122
16123 \begin_layout Standard
16124 The next thing that becomes obvious is the changes to the paragraph environment
16125  pull-down box [at the far-left end of the toolbar].
16126  Most of the paragraph environments you're used to seeing are missing.
16127  There are also five new ones.
16128  That's because the 
16129 \family sans
16130 slides
16131 \family default
16132  class itself only supports certain paragraph environments:
16133 \end_layout
16134
16135 \begin_layout Itemize
16136
16137 \family sans
16138 Standard
16139 \end_layout
16140
16141 \begin_layout Itemize
16142
16143 \family sans
16144 Itemize
16145 \end_layout
16146
16147 \begin_layout Itemize
16148
16149 \family sans
16150 Enumerate
16151 \end_layout
16152
16153 \begin_layout Itemize
16154
16155 \family sans
16156 Description
16157 \end_layout
16158
16159 \begin_layout Itemize
16160
16161 \family sans
16162 List
16163 \end_layout
16164
16165 \begin_layout Itemize
16166
16167 \family sans
16168 Quotation
16169 \end_layout
16170
16171 \begin_layout Itemize
16172
16173 \family sans
16174 Quote
16175 \end_layout
16176
16177 \begin_layout Itemize
16178
16179 \family sans
16180 Verse
16181 \end_layout
16182
16183 \begin_layout Itemize
16184
16185 \family sans
16186 Caption
16187 \end_layout
16188
16189 \begin_layout Itemize
16190
16191 \family sans
16192 LyX-Code
16193 \end_layout
16194
16195 \begin_layout Itemize
16196
16197 \family sans
16198 Comment
16199 \end_layout
16200
16201 \begin_layout Standard
16202 All of the other standard environments, including the section-heading environmen
16203 ts, aren't used in the 
16204 \family sans
16205 slides
16206 \family default
16207  class.
16208 \end_layout
16209
16210 \begin_layout Standard
16211 On the other hand, you'll notice the following new environments:
16212 \end_layout
16213
16214 \begin_layout Itemize
16215
16216 \family sans
16217 Slide
16218 \end_layout
16219
16220 \begin_layout Itemize
16221
16222 \family sans
16223 Overlay
16224 \end_layout
16225
16226 \begin_layout Itemize
16227
16228 \family sans
16229 Note
16230 \end_layout
16231
16232 \begin_layout Itemize
16233
16234 \family sans
16235 InvisibleText
16236 \end_layout
16237
16238 \begin_layout Itemize
16239
16240 \family sans
16241 VisibleText
16242 \end_layout
16243
16244 \begin_layout Standard
16245 These five are kind of quirky, due to a 
16246 \begin_inset Quotes eld
16247 \end_inset
16248
16249 feature
16250 \begin_inset Quotes erd
16251 \end_inset
16252
16253  in LyX.
16254  You see, LyX doesn't permit you to nest any other paragraph environment
16255  into an empty environment.
16256  Now, that's fine and dandy, but it means that you wouldn't be able to start
16257  a slide with anything except plain text.
16258  To deal with this, I've performed a little 
16259 \begin_inset Quotes eld
16260 \end_inset
16261
16262 LaTeX magic.
16263 \begin_inset Quotes erd
16264 \end_inset
16265
16266  
16267 \end_layout
16268
16269 \begin_layout Subsubsection
16270 Quirks of the New Environments
16271 \begin_inset CommandInset label
16272 LatexCommand label
16273 name "sec:slideQuirk"
16274
16275 \end_inset
16276
16277
16278 \end_layout
16279
16280 \begin_layout Standard
16281 All five of the new paragraph environments are somewhat quirky due to inherent
16282  limitiations in the current version of LyX.
16283  As I just mentioned, LyX forbids environments that begin with another environme
16284 nt.
16285  To get around this, the 
16286 \family sans
16287 Slide
16288 \family default
16289  environment isn't a paragraph environment as described in the 
16290 \emph on
16291 User's Guide
16292 \emph default
16293 .
16294  
16295 \end_layout
16296
16297 \begin_layout Standard
16298 You should consider 
16299 \family sans
16300 Slide
16301 \family default
16302
16303 \family sans
16304 Overlay
16305 \family default
16306 , and 
16307 \family sans
16308 Note
16309 \family default
16310  to be 
16311 \begin_inset Quotes eld
16312 \end_inset
16313
16314 pseudo-environments.
16315 \begin_inset Quotes erd
16316 \end_inset
16317
16318  They look like a section heading or a 
16319 \begin_inset Quotes eld
16320 \end_inset
16321
16322
16323 \family sans
16324 Caption
16325 \family default
16326 ,
16327 \begin_inset Quotes erd
16328 \end_inset
16329
16330  but really begin a [and, if necessary, end the previous] paragraph environment.
16331  Likewise, treat 
16332 \family sans
16333 InvisibleText
16334 \family default
16335  and 
16336 \family sans
16337 VisibleText
16338 \family default
16339  as 
16340 \begin_inset Quotes eld
16341 \end_inset
16342
16343 pseudo-commands.
16344 \begin_inset Quotes erd
16345 \end_inset
16346
16347  These two perform some action.
16348 \end_layout
16349
16350 \begin_layout Standard
16351 A common feature of all five environments, 
16352 \family sans
16353 Slide
16354 \family default
16355
16356 \family sans
16357 Overlay
16358 \family default
16359
16360 \family sans
16361 Note
16362 \family default
16363
16364 \family sans
16365 InvisibleText
16366 \family default
16367  and 
16368 \family sans
16369 VisibleText
16370 \family default
16371 , is a rather long-ish label.
16372  The text following this label — ordinarily the contents of the paragraph
16373  environment — is utterly irrelevant for 
16374 \family sans
16375 Slide
16376 \family default
16377
16378 \family sans
16379 Overlay
16380 \family default
16381
16382 \family sans
16383 Note
16384 \family default
16385
16386 \family sans
16387 InvisibleText
16388 \family default
16389  and 
16390 \family sans
16391 VisibleText
16392 \family default
16393 .
16394  LyX completely ignores it.
16395  In fact, you can leave these five environments completely empty.
16396  
16397 \end_layout
16398
16399 \begin_layout Standard
16400 While you don't 
16401 \emph on
16402 have
16403 \emph default
16404  to put any text after the rather long-ish label, you might want to.
16405  This could be a short description of the contents of the 
16406 \family sans
16407 Slide
16408 \family default
16409 , for example.
16410  In that case, enter your descriptive comment and hit 
16411 \family sans
16412 Return
16413 \family default
16414  as you normally would.
16415 \end_layout
16416
16417 \begin_layout Standard
16418 If, on the other hand, you don't want to enter any descriptive text, you'll
16419  hit another LyX quirk.
16420  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16421  environment until you put something in the old one.
16422  So, do this:
16423 \end_layout
16424
16425 \begin_layout Itemize
16426 Start entering the text that will 
16427 \emph on
16428 follow
16429 \emph default
16430  the new 
16431 \family sans
16432 Slide
16433 \family default
16434
16435 \family sans
16436 Overlay
16437 \family default
16438
16439 \family sans
16440 Note
16441 \family default
16442
16443 \family sans
16444 InvisibleText
16445 \family default
16446  or 
16447 \family sans
16448 VisibleText
16449 \family default
16450 .
16451  
16452 \end_layout
16453
16454 \begin_layout Itemize
16455 Now move to the beginning of that paragraph.
16456  
16457 \end_layout
16458
16459 \begin_layout Itemize
16460 Next, hit 
16461 \family sans
16462 Return
16463 \family default
16464 .
16465  
16466 \end_layout
16467
16468 \begin_layout Itemize
16469 Finally, change this new, empty paragraph to a 
16470 \family sans
16471 Slide
16472 \family default
16473
16474 \family sans
16475 Overlay
16476 \family default
16477
16478 \family sans
16479 Note
16480 \family default
16481
16482 \family sans
16483 InvisibleText
16484 \family default
16485  or 
16486 \family sans
16487 VisibleText
16488 \family default
16489 .
16490  
16491 \end_layout
16492
16493 \begin_layout Standard
16494 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16495
16496 \end_layout
16497
16498 \begin_layout Subsection
16499 Making a Presentation with 
16500 \family sans
16501 Slide
16502 \family default
16503
16504 \family sans
16505 Overlay
16506 \family default
16507  and 
16508 \family sans
16509 Note
16510 \end_layout
16511
16512 \begin_layout Subsubsection
16513 Using the 
16514 \family sans
16515 Slide
16516 \family default
16517  Environment
16518 \end_layout
16519
16520 \begin_layout Standard
16521 If you're expecting this section to teach you how to actually make a presentatio
16522 n, you'll be sorely disappointed.
16523  Naturally, I'll describe all of the ways the 
16524 \family sans
16525 slides
16526 \family default
16527  class can assist you in preparing the materials for a presentation.
16528  Filling in the contents, however, is up to you.
16529  [Then again, that 
16530 \emph on
16531 is
16532 \emph default
16533  the LyX philosophy.]
16534 \end_layout
16535
16536 \begin_layout Standard
16537 Choosing the 
16538 \family sans
16539 Slide
16540 \family default
16541  environment [in the manner described in section
16542 \begin_inset space ~
16543 \end_inset
16544
16545
16546 \begin_inset CommandInset ref
16547 LatexCommand ref
16548 reference "sec:slideQuirk"
16549
16550 \end_inset
16551
16552 ] tells LyX to begin a new slide [duh].
16553  The label for this environment/
16554 \begin_inset Quotes erd
16555 \end_inset
16556
16557 pseudo-command
16558 \begin_inset Quotes erd
16559 \end_inset
16560
16561  is an 
16562 \begin_inset Quotes eld
16563 \end_inset
16564
16565 ASCII line,
16566 \begin_inset Quotes erd
16567 \end_inset
16568
16569  in cool blue, followed by the label, 
16570 \begin_inset Quotes eld
16571 \end_inset
16572
16573 NewSlide:
16574 \begin_inset Quotes erd
16575 \end_inset
16576
16577 .
16578  Any text or paragraph environments that follow this one go on the new slide.
16579  It's that simple.
16580 \end_layout
16581
16582 \begin_layout Standard
16583 Slides are probably the only time you'll need to forcibly end pages in LyX
16584  (this can be specified in the 
16585 \family sans
16586 Paragraph Layout
16587 \family default
16588  dialog).
16589  In fact, you'll want to, once you finish entering the contents of one slide.
16590  If you've entered more text than can physically fit on a slide, the extra
16591  overflows onto a new slide.
16592  I don't recommend doing this, however, since the overflow slide won't have
16593  any page number on it.
16594  Furthermore, it may interfere with any 
16595 \family sans
16596 Overlay
16597 \family default
16598  you've made to accompany the oversized 
16599 \family sans
16600 Slide
16601 \family default
16602 .
16603 \end_layout
16604
16605 \begin_layout Standard
16606 The 
16607 \family sans
16608 Overlay
16609 \family default
16610  and 
16611 \family sans
16612 Note
16613 \family default
16614  environments work the same way as the 
16615 \family sans
16616 Slide
16617 \family default
16618  environment.
16619  They both create an 
16620 \begin_inset Quotes eld
16621 \end_inset
16622
16623 ASCII line
16624 \begin_inset Quotes erd
16625 \end_inset
16626
16627  followed by a label [
16628 \begin_inset Quotes eld
16629 \end_inset
16630
16631 NewOverlay:
16632 \begin_inset Quotes erd
16633 \end_inset
16634
16635  and 
16636 \begin_inset Quotes eld
16637 \end_inset
16638
16639 NewNote:
16640 \begin_inset Quotes erd
16641 \end_inset
16642
16643 , respectively].
16644  The color is a stunning magenta instead of blue, and the 
16645 \begin_inset Quotes eld
16646 \end_inset
16647
16648 ASCII line
16649 \begin_inset Quotes erd
16650 \end_inset
16651
16652  will look different, in style and in length.
16653  The label fonts of all three also differ from one another.
16654 \end_layout
16655
16656 \begin_layout Standard
16657 As with a 
16658 \family sans
16659 Slide
16660 \family default
16661 , if the contents of a 
16662 \family sans
16663 Note
16664 \family default
16665  or 
16666 \family sans
16667 Overlay
16668 \family default
16669  exceed the physical size of a slide or sheet of paper, the extra will overflow
16670  onto a new sheet.
16671  Again, you should avoid this.
16672  It defeats the whole purpose of 
16673 \family sans
16674 Note
16675 \family default
16676 s and 
16677 \family sans
16678 Overlay
16679 \family default
16680 s.
16681 \end_layout
16682
16683 \begin_layout Subsubsection
16684 Using 
16685 \family sans
16686 Overlay
16687 \family default
16688  with 
16689 \family sans
16690 Slide
16691 \end_layout
16692
16693 \begin_layout Standard
16694 The idea behind an 
16695 \family sans
16696 Overlay
16697 \family default
16698  is a slide that sits atop another slide.
16699  Perhaps you wish to discuss a figure on the main 
16700 \family sans
16701 Slide
16702 \family default
16703  before displaying the text associated with it.
16704  One way to accomplish this is tape a flap of dark paper over the part of
16705  the 
16706 \family sans
16707 Slide
16708 \family default
16709  you want to display later.
16710  This method fails, however, if you wish to overlap one graph with another,
16711  for example.
16712  You would then have to fumble while speaking to align the two separate,
16713  overlapping 
16714 \family sans
16715 Slide
16716 \family default
16717 s to align the two graphs.
16718  The use of an 
16719 \family sans
16720 Overlay
16721 \family default
16722  environment in both cases makes life much easier.
16723 \end_layout
16724
16725 \begin_layout Standard
16726 Each 
16727 \family sans
16728 Overlay
16729 \family default
16730  receives the page number of its 
16731 \begin_inset Quotes eld
16732 \end_inset
16733
16734 parent
16735 \begin_inset Quotes erd
16736 \end_inset
16737
16738  
16739 \family sans
16740 Slide
16741 \family default
16742 , appended by 
16743 \begin_inset Quotes eld
16744 \end_inset
16745
16746
16747 \family typewriter
16748 -a
16749 \family default
16750
16751 \begin_inset Quotes erd
16752 \end_inset
16753
16754 .
16755 \begin_inset Foot
16756 status collapsed
16757
16758 \begin_layout Plain Layout
16759 Presumably, mutliple 
16760 \family sans
16761 Overlay
16762 \family default
16763 s would have 
16764 \begin_inset Quotes eld
16765 \end_inset
16766
16767
16768 \family typewriter
16769 -a
16770 \family default
16771
16772 \begin_inset Quotes erd
16773 \end_inset
16774
16775
16776 \begin_inset Quotes eld
16777 \end_inset
16778
16779
16780 \family typewriter
16781 -b
16782 \family default
16783
16784 \begin_inset Quotes erd
16785 \end_inset
16786
16787
16788 \begin_inset Quotes eld
16789 \end_inset
16790
16791
16792 \family typewriter
16793 -c
16794 \family default
16795
16796 \begin_inset Quotes erd
16797 \end_inset
16798
16799 , etc.
16800 \begin_inset space ~
16801 \end_inset
16802
16803 appended to the page number of the parent 
16804 \family sans
16805 Slide
16806 \family default
16807 .
16808  
16809 \end_layout
16810
16811 \end_inset
16812
16813  Clearly, you want the contents of both the 
16814 \family sans
16815 Slide
16816 \family default
16817  and the 
16818 \family sans
16819 Overlay
16820 \family default
16821  to each fit on a single physical slide! You should probably consider an
16822  
16823 \family sans
16824 Overlay
16825 \family default
16826  as 
16827 \begin_inset Quotes eld
16828 \end_inset
16829
16830 part of
16831 \begin_inset Quotes erd
16832 \end_inset
16833
16834  a 
16835 \family sans
16836 Slide
16837 \family default
16838 .
16839  Indeed, the LyX 
16840 \family sans
16841 slides
16842 \family default
16843  class provides a visual cue for this: the label at the start of an 
16844 \family sans
16845 Overlay
16846 \family default
16847  is shorter than that at the start of a 
16848 \family sans
16849 Slide
16850 \family default
16851 .
16852  Lastly, when you generate printable output, you'll find alignment markers
16853  in all four corners of both the 
16854 \family sans
16855 Overlay
16856 \family default
16857  page and its parent 
16858 \family sans
16859 Slide
16860 \family default
16861 .
16862  These will assist you in lining up the two physical slides.
16863 \end_layout
16864
16865 \begin_layout Standard
16866 The major problem in overlaying two slides is aligning the contents of the
16867  two transparencies.
16868  How much space should you leave for that graph on the second slide? Worse
16869  still, what if you want a graph and a sentence on second slide, but there
16870  is text on the main transparency that goes in between them? You could try
16871  and insert vertical space of the right size.
16872  The better way is to use 
16873 \family sans
16874 InvisibleText
16875 \family default
16876  and 
16877 \family sans
16878 VisibleText
16879 \family default
16880 .
16881 \end_layout
16882
16883 \begin_layout Standard
16884 As their names imply, 
16885 \family sans
16886 InvisibleText
16887 \family default
16888  and 
16889 \family sans
16890 VisibleText
16891 \family default
16892  are two command-like paragraph environments that make all subsequent text
16893  invisible and visible, respectively.
16894  Note from section
16895 \begin_inset space ~
16896 \end_inset
16897
16898
16899 \begin_inset CommandInset ref
16900 LatexCommand ref
16901 reference "sec:slideQuirk"
16902
16903 \end_inset
16904
16905  that you don't place anything 
16906 \emph on
16907 into
16908 \emph default
16909  these two environments, however.
16910  When you create an 
16911 \family sans
16912 InvisibleText
16913 \family default
16914 , it inserts a centered, sky-blue label into the page reading 
16915 \begin_inset Quotes eld
16916 \end_inset
16917
16918 <Invisible Text Follows>
16919 \begin_inset Quotes erd
16920 \end_inset
16921
16922 .
16923  For paragraphs following this label, the parts of the 
16924 \family sans
16925 Slide
16926 \family default
16927  [or 
16928 \family sans
16929 Overlay
16930 \family default
16931 ; it doesn't matter which] where they would be contain instead blank space.
16932  
16933 \end_layout
16934
16935 \begin_layout Standard
16936 For 
16937 \family sans
16938 VisibleText
16939 \family default
16940 , the corresponding centered label is 
16941 \begin_inset Quotes eld
16942 \end_inset
16943
16944 <Visible Text Follows>
16945 \begin_inset Quotes erd
16946 \end_inset
16947
16948  in blazing green.
16949  Paragraphs following this label behave normally.
16950  Note that the beginning of a new 
16951 \family sans
16952 Slide
16953 \family default
16954
16955 \family sans
16956 Overlay
16957 \family default
16958 , or 
16959 \family sans
16960 Note
16961 \family default
16962  automatically shuts off an 
16963 \family sans
16964 InvisibleText
16965 \family default
16966 .
16967  It's therefore not necessary to use 
16968 \family sans
16969 VisibleText
16970 \family default
16971  at the end of a 
16972 \family sans
16973 Slide
16974 \family default
16975 .
16976 \end_layout
16977
16978 \begin_layout Standard
16979 By now, it should be obvious how to create overlay transparencies using
16980  the proper combination of 
16981 \family sans
16982 InvisibleText
16983 \family default
16984  and 
16985 \family sans
16986 VisibleText
16987 \family default
16988  on a 
16989 \family sans
16990 Slide
16991 \family default
16992  and 
16993 \family sans
16994 Overlay
16995 \family default
16996 :
16997 \end_layout
16998
16999 \begin_layout Enumerate
17000 Create a 
17001 \family sans
17002 Slide
17003 \family default
17004 , including everything that will appear on it, whether on the main slide
17005  or on the 
17006 \family sans
17007 Overlay
17008 \family default
17009 .
17010 \end_layout
17011
17012 \begin_layout Enumerate
17013 Before each figure or paragraph that will appear only on the 
17014 \family sans
17015 Overlay
17016 \family default
17017 , insert an 
17018 \family sans
17019 InvisibleText
17020 \family default
17021  environment.
17022  If necessary, insert a 
17023 \family sans
17024 VisibleText
17025 \family default
17026  environment after the 
17027 \family sans
17028 Overlay
17029 \family default
17030 -only text.
17031 \end_layout
17032
17033 \begin_layout Enumerate
17034 Start an 
17035 \family sans
17036 Overlay
17037 \family default
17038  immediately following the 
17039 \family sans
17040 Slide
17041 \family default
17042 .
17043 \end_layout
17044
17045 \begin_layout Enumerate
17046 Copy the contents of this 
17047 \family sans
17048 Slide
17049 \family default
17050  into the 
17051 \family sans
17052 Overlay
17053 \family default
17054 .
17055 \end_layout
17056
17057 \begin_layout Enumerate
17058 Within the 
17059 \family sans
17060 Overlay
17061 \family default
17062 , change all of the 
17063 \family sans
17064 InvisibleText
17065 \family default
17066  lines to 
17067 \family sans
17068 VisibleText
17069 \family default
17070  and vice-versa.
17071 \end_layout
17072
17073 \begin_layout Standard
17074 That's it.
17075  You've just made an 
17076 \family sans
17077 Overlay
17078 \family default
17079 .
17080 \end_layout
17081
17082 \begin_layout Standard
17083 There's one problem with the way I've designed the LyX 
17084 \family sans
17085 slides
17086 \family default
17087  class: you can't make text in the middle of a paragraph invisible, nor
17088  make text in the middle of an invisible paragraph visible again.
17089  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17090 \begin_inset Foot
17091 status collapsed
17092
17093 \begin_layout Plain Layout
17094 The commands of interest are: 
17095 \end_layout
17096
17097 \begin_layout Itemize
17098
17099 \family typewriter
17100 {
17101 \backslash
17102 invisible \SpecialChar \ldots{}
17103  }
17104 \end_layout
17105
17106 \begin_layout Itemize
17107
17108 \family typewriter
17109 {
17110 \backslash
17111 visible \SpecialChar \ldots{}
17112  }
17113 \end_layout
17114
17115 \begin_layout Plain Layout
17116 \SpecialChar \ldots{}
17117 and need to be marked as TeX.
17118  The text whose 
17119 \begin_inset Quotes eld
17120 \end_inset
17121
17122 visibility
17123 \begin_inset Quotes erd
17124 \end_inset
17125
17126  you wish to change goes in between the brackets [and after the 
17127 \family typewriter
17128
17129 \backslash
17130 invisible
17131 \family default
17132  or 
17133 \family typewriter
17134
17135 \backslash
17136 visible
17137 \family default
17138  command].
17139  If you don't know how to mark text as TeX, see the appropriate section
17140  of the 
17141 \emph on
17142 User's Guide
17143 \emph default
17144 .
17145 \end_layout
17146
17147 \end_inset
17148
17149
17150 \end_layout
17151
17152 \begin_layout Subsubsection
17153 Using 
17154 \family sans
17155 Note
17156 \family default
17157  with 
17158 \family sans
17159 Slide
17160 \family default
17161
17162 \begin_inset CommandInset label
17163 LatexCommand label
17164 name "sec:slideNote"
17165
17166 \end_inset
17167
17168
17169 \end_layout
17170
17171 \begin_layout Standard
17172 Like an 
17173 \family sans
17174 Overlay
17175 \family default
17176 , a 
17177 \family sans
17178 Note
17179 \family default
17180  is associated with a 
17181 \begin_inset Quotes eld
17182 \end_inset
17183
17184 parent
17185 \begin_inset Quotes erd
17186 \end_inset
17187
17188  
17189 \family sans
17190 Slide
17191 \family default
17192 .
17193  Here, too, the LyX 
17194 \family sans
17195 slides
17196 \family default
17197  class provides visual cues.
17198  The label for a 
17199 \family sans
17200 Note
17201 \family default
17202  is shorter than that of a 
17203 \family sans
17204 Slide
17205 \family default
17206  [yet longer than that of an 
17207 \family sans
17208 Overlay
17209 \family default
17210 ] and, like the label of an 
17211 \family sans
17212 Overlay
17213 \family default
17214  is shockingly magenta.
17215  Additionally, the printed 
17216 \family sans
17217 Note
17218 \family default
17219  has the page number of its 
17220 \begin_inset Quotes eld
17221 \end_inset
17222
17223 parent
17224 \begin_inset Quotes erd
17225 \end_inset
17226
17227  
17228 \family sans
17229 Slide
17230 \family default
17231 , appended by 
17232 \begin_inset Quotes eld
17233 \end_inset
17234
17235
17236 \family typewriter
17237 -
17238 \family default
17239 1
17240 \begin_inset Quotes erd
17241 \end_inset
17242
17243
17244 \begin_inset Quotes eld
17245 \end_inset
17246
17247
17248 \family typewriter
17249 -
17250 \family default
17251 2
17252 \begin_inset Quotes erd
17253 \end_inset
17254
17255
17256 \begin_inset Quotes eld
17257 \end_inset
17258
17259
17260 \family typewriter
17261 -
17262 \family default
17263 3
17264 \begin_inset Quotes erd
17265 \end_inset
17266
17267 , etc.
17268  You can have multiple 
17269 \family sans
17270 Note
17271 \family default
17272 s associated with a single 
17273 \family sans
17274 Slide
17275 \family default
17276 , and, as with 
17277 \family sans
17278 Slide
17279 \family default
17280  and 
17281 \family sans
17282 Overlay
17283 \family default
17284 , you'll probably want to break up long 
17285 \family sans
17286 Note
17287 \family default
17288 s so that they fit on a single sheet of paper.
17289 \end_layout
17290
17291 \begin_layout Standard
17292 The purpose of a 
17293 \family sans
17294 Note
17295 \family default
17296  is obvious: it contains anything additional you might want to say about
17297  a 
17298 \family sans
17299 Slide
17300 \family default
17301 .
17302  It could also be used as a sheet of reminders for a particular 
17303 \family sans
17304 Slide
17305 \family default
17306 .
17307  In the case of the latter, you might want to make use of time markers.
17308  Currently, the LyX 
17309 \family sans
17310 slides
17311 \family default
17312  class has no 
17313 \begin_inset Quotes eld
17314 \end_inset
17315
17316 native
17317 \begin_inset Quotes erd
17318 \end_inset
17319
17320  support for time markers, a 
17321 \noun on
17322 SliTeX
17323 \noun default
17324  feature.
17325  So, you'll have to resort to using the LaTeX codes.
17326 \end_layout
17327
17328 \begin_layout Standard
17329 To use time markers, you'll need to specify the extra class option 
17330 \begin_inset Quotes eld
17331 \end_inset
17332
17333
17334 \family typewriter
17335 clock
17336 \family default
17337
17338 \begin_inset Quotes erd
17339 \end_inset
17340
17341  [see section
17342 \begin_inset space ~
17343 \end_inset
17344
17345
17346 \begin_inset CommandInset ref
17347 LatexCommand ref
17348 reference "sec:slidesetup"
17349
17350 \end_inset
17351
17352 ].
17353  This option turns on timing marks, which will appear in the lower-left-hand
17354  corner of every 
17355 \family sans
17356 Note
17357 \family default
17358  you generate.
17359  To set what appears in the time marker, you use the LaTeX commands 
17360 \begin_inset Quotes eld
17361 \end_inset
17362
17363
17364 \family typewriter
17365
17366 \backslash
17367 settime{}
17368 \family default
17369
17370 \begin_inset Quotes erd
17371 \end_inset
17372
17373  and 
17374 \begin_inset Quotes eld
17375 \end_inset
17376
17377
17378 \family typewriter
17379
17380 \backslash
17381 addtime{}
17382 \family default
17383
17384 \begin_inset Quotes erd
17385 \end_inset
17386
17387 .
17388  The arguments of both commands are time measured in seconds.
17389  
17390 \begin_inset Quotes eld
17391 \end_inset
17392
17393
17394 \family typewriter
17395
17396 \backslash
17397 settime{}
17398 \family default
17399
17400 \begin_inset Quotes erd
17401 \end_inset
17402
17403  sets the time marker to a given time.
17404  
17405 \begin_inset Quotes eld
17406 \end_inset
17407
17408
17409 \family typewriter
17410
17411 \backslash
17412 addtime{}
17413 \family default
17414
17415 \begin_inset Quotes erd
17416 \end_inset
17417
17418  increments the time marker by the specified amount.
17419  Using time markers and 
17420 \family sans
17421 Note
17422 \family default
17423 s in this fashion, you can remind yourself how much time to spend on a particula
17424
17425 \family sans
17426 Slide
17427 \family default
17428 .
17429 \end_layout
17430
17431 \begin_layout Standard
17432 There's one last feature to describe.
17433  Clearly, you'd like to print out all of your 
17434 \family sans
17435 Slide
17436 \family default
17437 s and 
17438 \family sans
17439 Overlay
17440 \family default
17441 s on transparencies while printing all of your 
17442 \family sans
17443 Note
17444 \family default
17445 s on plain paper.
17446  However, a 
17447 \family sans
17448 Note
17449 \family default
17450  
17451 \emph on
17452 must
17453 \emph default
17454  follow the 
17455 \family sans
17456 Slide
17457 \family default
17458  with which it is associated.
17459  What's a person to do?
17460 \end_layout
17461
17462 \begin_layout Standard
17463 Luckily, there are two LaTeX commands that allow you to select what to print
17464  out.
17465  Both must be placed into the preamble of your document.
17466  The command 
17467 \begin_inset Quotes eld
17468 \end_inset
17469
17470
17471 \family typewriter
17472
17473 \backslash
17474 onlyslides{
17475 \backslash
17476 slides}
17477 \family default
17478
17479 \begin_inset Quotes erd
17480 \end_inset
17481
17482  will cause the output to contain only the 
17483 \family sans
17484 Slide
17485 \family default
17486 s and 
17487 \family sans
17488 Overlay
17489 \family default
17490 s.
17491  Correspondingly, the command 
17492 \begin_inset Quotes eld
17493 \end_inset
17494
17495
17496 \family typewriter
17497
17498 \backslash
17499 onlynotes{
17500 \backslash
17501 notes}
17502 \family default
17503
17504 \begin_inset Quotes erd
17505 \end_inset
17506
17507  prevents the output of anything but 
17508 \family sans
17509 Note
17510 \family default
17511 s.
17512  I'd advise placing both commands in the preamble and initially comment
17513  both out.
17514  You can then preview your entire presentation as you write.
17515  When you're done writing, you can then uncomment one of the two to select
17516  what you want to print.
17517  I like to uncomment 
17518 \begin_inset Quotes eld
17519 \end_inset
17520
17521
17522 \family typewriter
17523
17524 \backslash
17525 onlyslides{
17526 \backslash
17527 slides}
17528 \family default
17529
17530 \begin_inset Quotes erd
17531 \end_inset
17532
17533  , print to a file with 
17534 \begin_inset Quotes eld
17535 \end_inset
17536
17537
17538 \family typewriter
17539 -slides
17540 \family default
17541
17542 \begin_inset Quotes erd
17543 \end_inset
17544
17545  in its name, comment it back out, then uncomment 
17546 \begin_inset Quotes eld
17547 \end_inset
17548
17549
17550 \family typewriter
17551
17552 \backslash
17553 onlynotes{
17554 \backslash
17555 notes}
17556 \family default
17557
17558 \begin_inset Quotes erd
17559 \end_inset
17560
17561  and print to a 
17562 \begin_inset Quotes eld
17563 \end_inset
17564
17565
17566 \family typewriter
17567 *-notes.ps
17568 \family default
17569
17570 \begin_inset Quotes erd
17571 \end_inset
17572
17573  file.
17574  I can then send either file to a printer, loading transparencies or plain
17575  paper as appropriate.
17576 \end_layout
17577
17578 \begin_layout Standard
17579 You can also provide other arguments to the 
17580 \begin_inset Quotes eld
17581 \end_inset
17582
17583
17584 \family typewriter
17585
17586 \backslash
17587 onlyslides{}
17588 \family default
17589
17590 \begin_inset Quotes erd
17591 \end_inset
17592
17593  and 
17594 \begin_inset Quotes eld
17595 \end_inset
17596
17597
17598 \family typewriter
17599
17600 \backslash
17601 onlynotes{}
17602 \family default
17603
17604 \begin_inset Quotes erd
17605 \end_inset
17606
17607  commands.
17608  See a good LaTeX book for details.
17609 \end_layout
17610
17611 \begin_layout Subsection
17612 The 
17613 \family sans
17614 slides
17615 \family default
17616  Class Template File
17617 \end_layout
17618
17619 \begin_layout Standard
17620 I have also provided a template file, 
17621 \begin_inset Quotes eld
17622 \end_inset
17623
17624
17625 \family typewriter
17626 slides.lyx
17627 \family default
17628
17629 \begin_inset Quotes erd
17630 \end_inset
17631
17632 , with the 
17633 \family sans
17634 slides
17635 \family default
17636  class.
17637  To use it, begin your new presentation with 
17638 \family sans
17639 \bar under
17640 F
17641 \bar default
17642 ile\SpecialChar \menuseparator
17643 New
17644 \begin_inset space ~
17645 \end_inset
17646
17647 from
17648 \begin_inset space ~
17649 \end_inset
17650
17651
17652 \bar under
17653 T
17654 \bar default
17655 emplate
17656 \family default
17657 .
17658  Your new LyX presentation file will contain an example 
17659 \family sans
17660 Slide
17661 \family default
17662  – 
17663 \family sans
17664 Overlay
17665 \family default
17666  – 
17667 \family sans
17668 Note
17669 \family default
17670  triplet.
17671  The 
17672 \family sans
17673 Slide
17674 \family default
17675  and 
17676 \family sans
17677 Overlay
17678 \family default
17679  additionally contain an example of the use of 
17680 \family sans
17681 InvisibleText
17682 \family default
17683  and 
17684 \family sans
17685 VisibleText
17686 \family default
17687 .
17688  Lastly, the preamble will contain:
17689 \end_layout
17690
17691 \begin_layout LyX-Code
17692 % Uncomment to print out only slides and overlays
17693 \end_layout
17694
17695 \begin_layout LyX-Code
17696 %
17697 \end_layout
17698
17699 \begin_layout LyX-Code
17700 %
17701 \backslash
17702 onlyslides{
17703 \backslash
17704 slides}
17705 \begin_inset Newline newline
17706 \end_inset
17707
17708  
17709 \end_layout
17710
17711 \begin_layout LyX-Code
17712 % Uncomment to print out only notes
17713 \end_layout
17714
17715 \begin_layout LyX-Code
17716 %
17717 \end_layout
17718
17719 \begin_layout LyX-Code
17720 %
17721 \backslash
17722 onlynotes{
17723 \backslash
17724 notes}
17725 \end_layout
17726
17727 \begin_layout Standard
17728 One final thing: I created this class to support the LaTeX2e 
17729 \begin_inset Quotes eld
17730 \end_inset
17731
17732
17733 \noun on
17734 SliTeX
17735 \noun default
17736  emulation
17737 \begin_inset Quotes erd
17738 \end_inset
17739
17740  class, one of the built-in LaTeX2e classes.
17741  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17742  built-in slide class.
17743  It's here if you want it or need it.
17744  There exist other LaTeX2e classes for creating presentations, such as the
17745  
17746 \family sans
17747 Foils
17748 \family default
17749  class [see section
17750 \begin_inset space ~
17751 \end_inset
17752
17753
17754 \begin_inset CommandInset ref
17755 LatexCommand ref
17756 reference "sec:foiltex"
17757
17758 \end_inset
17759
17760 ] or the 
17761 \begin_inset Quotes eld
17762 \end_inset
17763
17764
17765 \family typewriter
17766 seminar
17767 \family default
17768
17769 \begin_inset Quotes erd
17770 \end_inset
17771
17772  package [present on some TeX distributions].
17773  The latter is not yet supported under LyX.
17774 \begin_inset Foot
17775 status collapsed
17776
17777 \begin_layout Plain Layout
17778 Perhaps you can take on the task\SpecialChar \ldots{}
17779
17780 \end_layout
17781
17782 \end_inset
17783
17784  I know nothing about these other classes.
17785  Try them out to see what sort of alternative they provide.
17786 \end_layout
17787
17788 \begin_layout Chapter
17789 LyX Features needing Extra Software
17790 \end_layout
17791
17792 \begin_layout Section
17793 Checking TeX
17794 \end_layout
17795
17796 \begin_layout Standard
17797 by 
17798 \noun on
17799 Asger Alstrup
17800 \end_layout
17801
17802 \begin_layout Subsection
17803 Introduction
17804 \end_layout
17805
17806 \begin_layout Standard
17807 If you have the 
17808 \family typewriter
17809 chktex
17810 \family default
17811  program installed
17812 \begin_inset Foot
17813 status collapsed
17814
17815 \begin_layout Plain Layout
17816
17817 \family typewriter
17818 chktex
17819 \family default
17820  is not yet available when you are using the LaTeX distribution MiKTeX.
17821 \end_layout
17822
17823 \end_inset
17824
17825 , you'll find in the 
17826 \family sans
17827 Tools
17828 \family default
17829  menu the entry: 
17830 \family sans
17831 Check
17832 \begin_inset space ~
17833 \end_inset
17834
17835 TeX
17836 \family default
17837 .
17838  You can get 
17839 \family typewriter
17840 chktex
17841 \family default
17842  from CTAN, 
17843 \begin_inset CommandInset href
17844 LatexCommand href
17845 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17846
17847 \end_inset
17848
17849 .
17850 \end_layout
17851
17852 \begin_layout Standard
17853 The 
17854 \family sans
17855 ChkTeX
17856 \family default
17857  package is a program that was written by 
17858 \begin_inset Flex Noun
17859 status collapsed
17860
17861 \begin_layout Plain Layout
17862 Jens T.
17863 \begin_inset space ~
17864 \end_inset
17865
17866 Berger Thielemann
17867 \end_layout
17868
17869 \end_inset
17870
17871  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17872  and easy to forget.
17873  The program runs over your LaTeX file, checks the integrity of the file,
17874  and flags some common errors.
17875  In other technical words, it is 
17876 \family typewriter
17877 lint
17878 \family default
17879  for LaTeX.
17880 \end_layout
17881
17882 \begin_layout Standard
17883 Well, what is a syntax checker doing in LyX which is supposed to produce
17884  correct LaTeX anyways? The answer is simple: Just as 
17885 \family typewriter
17886 Lint
17887 \family default
17888  not only checks the 
17889 \emph on
17890 syntax
17891 \emph default
17892  of C programs, but also does 
17893 \emph on
17894 semantic
17895 \emph default
17896  checks for type-errors, 
17897 \family sans
17898 ChkTeX
17899 \family default
17900  catches some common 
17901 \emph on
17902 typographic
17903 \emph default
17904  errors, in addition to the syntactical ones.
17905  Specifically, 
17906 \family sans
17907 ChkTeX
17908 \family default
17909  is capable of detecting several common errors, such as
17910 \end_layout
17911
17912 \begin_layout Itemize
17913 Ellipsis detection:
17914 \begin_inset Newline newline
17915 \end_inset
17916
17917 Use \SpecialChar \ldots{}
17918  instead of ...
17919 \end_layout
17920
17921 \begin_layout Itemize
17922 No space in front of/after parenthesis:
17923 \begin_inset Newline newline
17924 \end_inset
17925
17926 ( wrong spacing )
17927 \end_layout
17928
17929 \begin_layout Itemize
17930 Enforcement of normal space after common abbreviations:
17931 \begin_inset Newline newline
17932 \end_inset
17933
17934 e.
17935 \begin_inset space \thinspace{}
17936 \end_inset
17937
17938 g.
17939 \begin_inset space \space{}
17940 \end_inset
17941
17942 is too wide spacing.
17943 \end_layout
17944
17945 \begin_layout Itemize
17946 Enforcement of end-of-sentence space when the last sentence ends with a
17947  capital letter:
17948 \begin_inset Newline newline
17949 \end_inset
17950
17951 This is a TEST.
17952  And this is wrong spacing.
17953 \end_layout
17954
17955 \begin_layout Itemize
17956 Space in front of labels and similar commands:
17957 \begin_inset Newline newline
17958 \end_inset
17959
17960 The label should stick right up to the text to avoid falling to a wrong
17961  page.
17962  
17963 \begin_inset CommandInset label
17964 LatexCommand label
17965 name "sec:chktex"
17966
17967 \end_inset
17968
17969  
17970 \begin_inset Foot
17971 status collapsed
17972
17973 \begin_layout Plain Layout
17974 This footnote is in danger of falling off to a wrong page
17975 \end_layout
17976
17977 \end_inset
17978
17979  The label is separated too much.
17980 \end_layout
17981
17982 \begin_layout Itemize
17983 Space in front of references, instead of hard spaces:
17984 \begin_inset Newline newline
17985 \end_inset
17986
17987 If you have bad luck, the text will break right between the referenced text
17988  and reference number, and that's a pity.
17989  See section 
17990 \begin_inset CommandInset ref
17991 LatexCommand ref
17992 reference "sec:chktex"
17993
17994 \end_inset
17995
17996 .
17997 \end_layout
17998
17999 \begin_layout Itemize
18000 Use of 
18001 \begin_inset Quotes eld
18002 \end_inset
18003
18004 x
18005 \begin_inset Quotes erd
18006 \end_inset
18007
18008  instead of 
18009 \begin_inset Formula $\times$
18010 \end_inset
18011
18012  between numbers:
18013 \begin_inset Newline newline
18014 \end_inset
18015
18016 2x2 looks cheap compared to 
18017 \begin_inset Formula $2\times2$
18018 \end_inset
18019
18020 .
18021 \end_layout
18022
18023 \begin_layout Standard
18024 and more \SpecialChar \ldots{}
18025  It is an invaluable tool when you are 
18026 \begin_inset Quotes eld
18027 \end_inset
18028
18029 finishing up
18030 \begin_inset Quotes erd
18031 \end_inset
18032
18033  your document before printing, and you should run it right after the obligatory
18034  spelling check, and before you go fine tuning the typesetting.
18035 \end_layout
18036
18037 \begin_layout Subsection
18038 How to use it
18039 \end_layout
18040
18041 \begin_layout Standard
18042 If you have the program installed, usage is as simple as choosing 
18043 \family sans
18044 Tools\SpecialChar \menuseparator
18045 Check
18046 \begin_inset space ~
18047 \end_inset
18048
18049 TeX
18050 \family default
18051 .
18052  This will make LyX generate a LaTeX file of your document, start 
18053 \family sans
18054 ChkTeX
18055 \family default
18056  to check it, and then make LyX insert 
18057 \begin_inset Quotes eld
18058 \end_inset
18059
18060 error boxes
18061 \begin_inset Quotes erd
18062 \end_inset
18063
18064  with the warnings from 
18065 \family sans
18066 ChkTeX
18067 \family default
18068 , if there were any.
18069  The warnings will be placed close to the point of the mistake, and you
18070  can quickly find them by using the 
18071 \family sans
18072 Navigate\SpecialChar \menuseparator
18073 Error
18074 \family default
18075  menu item, or the shortcut key 
18076 \family sans
18077 C-g
18078 \family default
18079  from the default 
18080 \family typewriter
18081 cua
18082 \family default
18083  bind file.
18084  Open the error boxes by clicking on them with the mouse, or use the shortcut
18085  key 
18086 \family sans
18087 C-i
18088 \family default
18089  from 
18090 \family typewriter
18091 cua
18092 \family default
18093  bindings, or the corresponding 
18094 \family sans
18095 C-o
18096 \family default
18097  for the alternate 
18098 \family typewriter
18099 emacs
18100 \family default
18101  bind file.
18102  Read the warning and correct the mistake, if it is a mistake.
18103  If you have trouble understanding what the warning is about, you can safely
18104  ignore it.
18105  Remember that there is a hidden layer between the document on screen and
18106  the technical details in invoking 
18107 \family sans
18108 ChkTeX
18109 \family default
18110 , and this gap can make some warnings seem arcane or just plain silly.
18111 \end_layout
18112
18113 \begin_layout Standard
18114 This document is an excellent testing bed for the feature, and it should
18115  provide quite a few warnings for you to fiddle with.
18116  Since computers are only so smart, expect most of the warnings to be false
18117  alarms, though.
18118 \end_layout
18119
18120 \begin_layout Subsection
18121 How to fine tune it
18122 \end_layout
18123
18124 \begin_layout Standard
18125 Sometimes, you'll find that 
18126 \family sans
18127 ChkTeX
18128 \family default
18129  makes more noise than suits your mood.
18130  Then you can choose not to use it, wait until your mood changes, or try
18131  to customize 
18132 \family sans
18133 ChkTeX
18134 \family default
18135  to get better along with you.
18136 \end_layout
18137
18138 \begin_layout Standard
18139 Although 
18140 \family sans
18141 ChkTeX
18142 \family default
18143  
18144 \emph on
18145 is
18146 \emph default
18147  very configurable and extensible, you shouldn't expect to solve all problems
18148  with 
18149 \family sans
18150 ChkTeX
18151 \family default
18152  in LyX this way.
18153  Since LyX has to generate a somewhat special LaTeX file to be able to match
18154  the line numbers from the 
18155 \family sans
18156 ChkTeX
18157 \family default
18158  output
18159 \begin_inset Foot
18160 status collapsed
18161
18162 \begin_layout Plain Layout
18163 You can inspect the specific output from 
18164 \family sans
18165 chktex
18166 \family default
18167  by using 
18168 \family sans
18169 Edit\SpecialChar \menuseparator
18170 View
18171 \begin_inset space ~
18172 \end_inset
18173
18174 LaTeX
18175 \begin_inset space ~
18176 \end_inset
18177
18178 Log
18179 \family default
18180  right after a 
18181 \family sans
18182 chktex
18183 \family default
18184  run.
18185 \end_layout
18186
18187 \end_inset
18188
18189  to the internal document structure, some of the warnings will not appear
18190  correctly.
18191  There are two things you can do about this:
18192 \end_layout
18193
18194 \begin_layout Itemize
18195 Fine tune the 
18196 \family sans
18197 ChkTeX
18198 \family default
18199  invocation command line in 
18200 \begin_inset Flex MenuItem
18201 status collapsed
18202
18203 \begin_layout Plain Layout
18204 Tools\SpecialChar \menuseparator
18205 Preferences\SpecialChar \menuseparator
18206 Output\SpecialChar \menuseparator
18207 LaTeX\SpecialChar \menuseparator
18208 CheckTeX command
18209 \end_layout
18210
18211 \end_inset
18212
18213 , or the global 
18214 \family sans
18215 ChkTeX
18216 \family default
18217  installation configuration file (usually with the file 
18218 \family typewriter
18219 chktexrc
18220 \family default
18221 ).
18222  See below to learn what warnings can be enabled and disabled on the command
18223  line.
18224 \end_layout
18225
18226 \begin_layout Itemize
18227 Export your document as a raw LaTeX file using 
18228 \family sans
18229 File\SpecialChar \menuseparator
18230 Export\SpecialChar \menuseparator
18231 LaTeX
18232 \family default
18233  and run 
18234 \family typewriter
18235 chktex
18236 \family default
18237  manually on that.
18238  Invoked in this way, it can be a hassle to find the corresponding place
18239  in the document inside LyX, but with a little patience, you should be able
18240  to do it.
18241 \end_layout
18242
18243 \begin_layout Standard
18244 Here follows the warning messages that can be enabled and disabled in 
18245 \family sans
18246 Preferences
18247 \family default
18248 .
18249  Use 
18250 \family typewriter
18251 -n#
18252 \family default
18253  to disable a warning, and 
18254 \family typewriter
18255 -w#
18256 \family default
18257  to enable a warning.
18258  The emphasized entries are disabled by default, because the default is
18259  "
18260 \family typewriter
18261 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18262 \family default
18263 ".
18264 \end_layout
18265
18266 \begin_layout Standard
18267 Notice that you should only use the options that enable and disable warnings,
18268  because LyX relies on some of the other command line parameters to be set
18269  in a specific way to have a chance to communicate with 
18270 \family typewriter
18271 chktex
18272 \family default
18273 .
18274 \end_layout
18275
18276 \begin_layout Enumerate
18277
18278 \size small
18279 \emph on
18280 Command terminated with space.
18281 \end_layout
18282
18283 \begin_layout Enumerate
18284
18285 \size small
18286 Non-breaking space (
18287 \begin_inset Quotes eld
18288 \end_inset
18289
18290
18291 \family typewriter
18292 ~
18293 \family default
18294
18295 \begin_inset Quotes erd
18296 \end_inset
18297
18298 ) should have been used.
18299 \end_layout
18300
18301 \begin_layout Enumerate
18302
18303 \size small
18304 \emph on
18305 You should enclose the previous parenthesis with 
18306 \begin_inset Quotes eld
18307 \end_inset
18308
18309
18310 \family typewriter
18311 {}
18312 \family default
18313
18314 \begin_inset Quotes erd
18315 \end_inset
18316
18317 .
18318 \end_layout
18319
18320 \begin_layout Enumerate
18321
18322 \size small
18323 Italic correction (
18324 \begin_inset Quotes eld
18325 \end_inset
18326
18327
18328 \family typewriter
18329
18330 \backslash
18331 /
18332 \family default
18333
18334 \begin_inset Quotes erd
18335 \end_inset
18336
18337 ) found in non-italic buffer.
18338 \end_layout
18339
18340 \begin_layout Enumerate
18341
18342 \size small
18343 Italic correction (
18344 \begin_inset Quotes eld
18345 \end_inset
18346
18347
18348 \family typewriter
18349
18350 \backslash
18351 /
18352 \family default
18353
18354 \begin_inset Quotes erd
18355 \end_inset
18356
18357 ) found more than once.
18358 \end_layout
18359
18360 \begin_layout Enumerate
18361
18362 \size small
18363 \emph on
18364 No italic correction (
18365 \begin_inset Quotes eld
18366 \end_inset
18367
18368
18369 \family typewriter
18370
18371 \backslash
18372 /
18373 \family default
18374
18375 \begin_inset Quotes erd
18376 \end_inset
18377
18378 ) found.
18379 \end_layout
18380
18381 \begin_layout Enumerate
18382
18383 \size small
18384 Accent command 
18385 \begin_inset Quotes eld
18386 \end_inset
18387
18388
18389 \family typewriter
18390 cmd
18391 \family default
18392
18393 \begin_inset Quotes erd
18394 \end_inset
18395
18396  needs use of 
18397 \begin_inset Quotes eld
18398 \end_inset
18399
18400
18401 \family typewriter
18402 cmd
18403 \family default
18404
18405 \begin_inset Quotes erd
18406 \end_inset
18407
18408 .
18409 \end_layout
18410
18411 \begin_layout Enumerate
18412
18413 \size small
18414 Wrong length of dash may have been used.
18415 \end_layout
18416
18417 \begin_layout Enumerate
18418
18419 \size small
18420 \emph on
18421 \begin_inset Quotes eld
18422 \end_inset
18423
18424
18425 \family typewriter
18426 %s
18427 \family default
18428
18429 \begin_inset Quotes erd
18430 \end_inset
18431
18432  expected, found 
18433 \begin_inset Quotes eld
18434 \end_inset
18435
18436
18437 \family typewriter
18438 %s
18439 \family default
18440
18441 \begin_inset Quotes erd
18442 \end_inset
18443
18444 .
18445 \end_layout
18446
18447 \begin_layout Enumerate
18448
18449 \size small
18450 Solo 
18451 \begin_inset Quotes eld
18452 \end_inset
18453
18454
18455 \family typewriter
18456 %s
18457 \family default
18458
18459 \begin_inset Quotes erd
18460 \end_inset
18461
18462  found.
18463 \end_layout
18464
18465 \begin_layout Enumerate
18466
18467 \size small
18468 You should use 
18469 \begin_inset Quotes eld
18470 \end_inset
18471
18472
18473 \family typewriter
18474 %s
18475 \family default
18476
18477 \begin_inset Quotes erd
18478 \end_inset
18479
18480  to achieve an ellipsis.
18481 \end_layout
18482
18483 \begin_layout Enumerate
18484
18485 \size small
18486 Inter-word spacing (
18487 \begin_inset Quotes eld
18488 \end_inset
18489
18490
18491 \family typewriter
18492
18493 \backslash
18494
18495 \family default
18496  
18497 \begin_inset Quotes eld
18498 \end_inset
18499
18500 ) should perhaps be used.
18501 \end_layout
18502
18503 \begin_layout Enumerate
18504
18505 \size small
18506 Inter-sentence spacing (
18507 \begin_inset Quotes eld
18508 \end_inset
18509
18510
18511 \family typewriter
18512
18513 \backslash
18514 @
18515 \family default
18516
18517 \begin_inset Quotes erd
18518 \end_inset
18519
18520 ) should perhaps be used.
18521 \end_layout
18522
18523 \begin_layout Enumerate
18524
18525 \size small
18526 Could not find argument for command.
18527 \end_layout
18528
18529 \begin_layout Enumerate
18530
18531 \size small
18532 No match found for 
18533 \begin_inset Quotes eld
18534 \end_inset
18535
18536
18537 \family typewriter
18538 %s
18539 \family default
18540
18541 \begin_inset Quotes erd
18542 \end_inset
18543
18544 .
18545 \end_layout
18546
18547 \begin_layout Enumerate
18548
18549 \size small
18550 Math mode still on at end of LaTeX file.
18551 \end_layout
18552
18553 \begin_layout Enumerate
18554
18555 \size small
18556 Number of 
18557 \begin_inset Quotes eld
18558 \end_inset
18559
18560
18561 \family typewriter
18562 char
18563 \family default
18564
18565 \begin_inset Quotes erd
18566 \end_inset
18567
18568  doesn't match the number of 
18569 \begin_inset Quotes eld
18570 \end_inset
18571
18572
18573 \family typewriter
18574 char
18575 \family default
18576
18577 \begin_inset Quotes erd
18578 \end_inset
18579
18580 .
18581 \end_layout
18582
18583 \begin_layout Enumerate
18584
18585 \size small
18586 You should use either 
18587 \family typewriter
18588
18589 \begin_inset Quotes eld
18590 \end_inset
18591
18592
18593 \family default
18594  or 
18595 \family typewriter
18596
18597 \begin_inset Quotes erd
18598 \end_inset
18599
18600
18601 \family default
18602  as an alternative to 
18603 \begin_inset Quotes eld
18604 \end_inset
18605
18606
18607 \family typewriter
18608 "
18609 \family default
18610
18611 \begin_inset Quotes erd
18612 \end_inset
18613
18614 .
18615 \end_layout
18616
18617 \begin_layout Enumerate
18618
18619 \size small
18620 You should use "
18621 \family typewriter
18622 '
18623 \family default
18624 " (ASCII 39) instead of "
18625 \family typewriter
18626 ´
18627 \family default
18628 " (ASCII 180).
18629 \end_layout
18630
18631 \begin_layout Enumerate
18632
18633 \size small
18634 User-specified pattern found.
18635 \end_layout
18636
18637 \begin_layout Enumerate
18638
18639 \size small
18640 This command might not be intended.
18641 \end_layout
18642
18643 \begin_layout Enumerate
18644
18645 \size small
18646 \emph on
18647 Comment displayed.
18648 \end_layout
18649
18650 \begin_layout Enumerate
18651
18652 \size small
18653 Either 
18654 \family typewriter
18655 ''
18656 \backslash
18657 ,'
18658 \family default
18659  or 
18660 \family typewriter
18661 '
18662 \backslash
18663 ,''
18664 \family default
18665  will look better.
18666 \end_layout
18667
18668 \begin_layout Enumerate
18669
18670 \size small
18671 Delete this space to maintain correct page references.
18672 \end_layout
18673
18674 \begin_layout Enumerate
18675
18676 \size small
18677 \emph on
18678 You might wish to put this between a pair of 
18679 \begin_inset Quotes eld
18680 \end_inset
18681
18682
18683 \family typewriter
18684 {}
18685 \family default
18686
18687 \begin_inset Quotes erd
18688 \end_inset
18689
18690 .
18691 \end_layout
18692
18693 \begin_layout Enumerate
18694
18695 \size small
18696 You ought to remove spaces in front of punctuation.
18697 \end_layout
18698
18699 \begin_layout Enumerate
18700
18701 \size small
18702 Could not execute LaTeX command.
18703 \end_layout
18704
18705 \begin_layout Enumerate
18706
18707 \size small
18708 Don't use 
18709 \family typewriter
18710
18711 \backslash
18712 /
18713 \family default
18714  in front of small punctuation.
18715 \end_layout
18716
18717 \begin_layout Enumerate
18718
18719 \family typewriter
18720 \size small
18721 $
18722 \backslash
18723 times$
18724 \family default
18725  may look prettier here.
18726 \end_layout
18727
18728 \begin_layout Enumerate
18729
18730 \size small
18731 \emph on
18732 Multiple spaces detected in output.
18733 \end_layout
18734
18735 \begin_layout Enumerate
18736
18737 \size small
18738 This text may be ignored.
18739 \end_layout
18740
18741 \begin_layout Enumerate
18742
18743 \size small
18744 Use 
18745 \family typewriter
18746
18747 \begin_inset Quotes eld
18748 \end_inset
18749
18750
18751 \family default
18752  to begin quotation, not 
18753 \family typewriter
18754 '
18755 \family default
18756 .
18757 \end_layout
18758
18759 \begin_layout Enumerate
18760
18761 \size small
18762 Use 
18763 \family typewriter
18764 '
18765 \family default
18766  to end quotation, not 
18767 \family typewriter
18768
18769 \begin_inset Quotes eld
18770 \end_inset
18771
18772
18773 \family default
18774 .
18775 \end_layout
18776
18777 \begin_layout Enumerate
18778
18779 \size small
18780 Don't mix quotes.
18781 \end_layout
18782
18783 \begin_layout Enumerate
18784
18785 \size small
18786 You should perhaps use 
18787 \begin_inset Quotes eld
18788 \end_inset
18789
18790
18791 \family typewriter
18792 cmd
18793 \family default
18794
18795 \begin_inset Quotes erd
18796 \end_inset
18797
18798  instead.
18799 \end_layout
18800
18801 \begin_layout Enumerate
18802
18803 \size small
18804 You should put a space in front of/after parenthesis.
18805 \end_layout
18806
18807 \begin_layout Enumerate
18808
18809 \size small
18810 You should avoid spaces in front of/after parenthesis.
18811 \end_layout
18812
18813 \begin_layout Enumerate
18814
18815 \size small
18816 \emph on
18817 You should not use punctuation in front of/after quotes.
18818 \end_layout
18819
18820 \begin_layout Enumerate
18821
18822 \size small
18823 Double space found.
18824 \end_layout
18825
18826 \begin_layout Enumerate
18827
18828 \size small
18829 You should put punctuation outside inner/inside display math mode.
18830 \end_layout
18831
18832 \begin_layout Enumerate
18833
18834 \size small
18835 You ought to not use primitive TeX in LaTeX code.
18836 \end_layout
18837
18838 \begin_layout Enumerate
18839
18840 \size small
18841 You should remove spaces in front of 
18842 \begin_inset Quotes eld
18843 \end_inset
18844
18845
18846 \family typewriter
18847 %s
18848 \family default
18849
18850 \begin_inset Quotes erd
18851 \end_inset
18852
18853
18854 \end_layout
18855
18856 \begin_layout Enumerate
18857
18858 \size small
18859 \begin_inset Quotes eld
18860 \end_inset
18861
18862
18863 \family typewriter
18864 %s
18865 \family default
18866
18867 \begin_inset Quotes erd
18868 \end_inset
18869
18870  is normally not followed by 
18871 \begin_inset Quotes eld
18872 \end_inset
18873
18874
18875 \family typewriter
18876 %c
18877 \family default
18878
18879 \begin_inset Quotes erd
18880 \end_inset
18881
18882 .
18883 \end_layout
18884
18885 \begin_layout Standard
18886 In later versions of LyX, we hope to provide a more complete interface to
18887  this tool (and it's smaller cousin 
18888 \family typewriter
18889 lacheck
18890 \family default
18891 ) to exploit the full power of it.
18892  But it's not exactly useless as it is now: go try it on one of your existing
18893  documents of a certain length and be surprised.
18894 \end_layout
18895
18896 \begin_layout Section
18897 Version Control in LyX
18898 \end_layout
18899
18900 \begin_layout Standard
18901 by
18902 \noun on
18903  Lars Gullik Bjønnes 
18904 \noun default
18905 and 
18906 \noun on
18907 Pavel Sanda
18908 \end_layout
18909
18910 \begin_layout Subsection
18911 Introduction
18912 \end_layout
18913
18914 \begin_layout Standard
18915 LyX supports some of the most basic RCS/CVS/SVN commands.
18916  If you need something a bit more sophisticated you will have to do that
18917  manually in a terminal.
18918 \end_layout
18919
18920 \begin_layout Standard
18921 Also note that CVS support is not as good as subversion support so we advise
18922  using SVN instead.
18923  A good place to start learning Subversion is SVN Book
18924 \begin_inset Foot
18925 status open
18926
18927 \begin_layout Plain Layout
18928 \begin_inset CommandInset href
18929 LatexCommand href
18930 target "http://svnbook.red-bean.com/"
18931
18932 \end_inset
18933
18934
18935 \end_layout
18936
18937 \end_inset
18938
18939 .
18940  In the case of RCS you should read 
18941 \begin_inset Quotes eld
18942 \end_inset
18943
18944 rcsintro
18945 \begin_inset Quotes erd
18946 \end_inset
18947
18948  (a man file, read it with 
18949 \family typewriter
18950 man rcsintro
18951 \family default
18952 ).
18953  This file describes all the basic features of RCS.
18954  You should especially notice the comment about a RCS directory, and the
18955  notion of a master RCS file (the file ending in 
18956 \family typewriter
18957 ,v
18958 \family default
18959 ).
18960 \end_layout
18961
18962 \begin_layout Standard
18963 Before you begin to use the version control features in LyX, you should
18964  be familiar with RCS/CVS/SVN usage.
18965  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18966  package—no guarantees are made for older versions.
18967  Most of the log messages are not currently displayed after operations —
18968  you can check them in the Messages pane if unsure.
18969  Regular users of version control will appreciate VC toolbar, which can
18970  be enabled via 
18971 \family sans
18972 View\SpecialChar \menuseparator
18973 Toolbars\SpecialChar \menuseparator
18974 Version
18975 \begin_inset space ~
18976 \end_inset
18977
18978 Control
18979 \family default
18980 .
18981 \end_layout
18982
18983 \begin_layout Standard
18984 For introducing your own external commands consult vc-command in the manual
18985  of LyX functions.
18986 \end_layout
18987
18988 \begin_layout Subsection
18989 RCS commands in LyX
18990 \end_layout
18991
18992 \begin_layout Standard
18993 The following sections describe the RCS commands supported by LyX.
18994  You can find them in the 
18995 \family sans
18996 File\SpecialChar \menuseparator
18997 Version
18998 \begin_inset space ~
18999 \end_inset
19000
19001 Control
19002 \family default
19003  submenu.
19004  LyX was tested against RCS 5.7/5.8
19005 \begin_inset Foot
19006 status open
19007
19008 \begin_layout Plain Layout
19009 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
19010  in order to work properly with LyX.
19011  In particular time zone (TZ) should be set and more importantly RCSINIT
19012  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
19013  expects archive to be found in file.lyx,v within the original document directory.
19014  See also README shipped with Windows RCS binaries.
19015 \end_layout
19016
19017 \end_inset
19018
19019 .
19020 \end_layout
19021
19022 \begin_layout Subsubsection
19023
19024 \family sans
19025 Register
19026 \end_layout
19027
19028 \begin_layout Standard
19029 If your document is not under revision control, this is the only item shown
19030  in the menu.
19031  And if it is under revision control, the 
19032 \family sans
19033 Register
19034 \family default
19035  item is not visible.
19036  
19037 \end_layout
19038
19039 \begin_layout Standard
19040 This command registers your document with RCS (unless you are under the
19041  directory managed by CVS)\SpecialChar \@.
19042  You are asked interactively to supply an initial
19043  description of the document.
19044  The document is now set in Read-Only mode and you have to 
19045 \family sans
19046 Check
19047 \begin_inset space ~
19048 \end_inset
19049
19050 Out
19051 \begin_inset space ~
19052 \end_inset
19053
19054 For
19055 \begin_inset space ~
19056 \end_inset
19057
19058 Edit
19059 \family default
19060 , before making any changes to it.
19061  A document under revision control has a 
19062 \begin_inset Quotes eld
19063 \end_inset
19064
19065 [RCS:<version> <locker>]
19066 \begin_inset Quotes erd
19067 \end_inset
19068
19069  item tagged to the filename in the minibuffer.
19070 \end_layout
19071
19072 \begin_layout Standard
19073 RCS command that is run: 
19074 \family typewriter
19075 ci -q -u -i -t-"<initial description>" <file-name>
19076 \end_layout
19077
19078 \begin_layout Standard
19079 Read 
19080 \family typewriter
19081 man ci
19082 \family default
19083  to understand the switches.
19084  
19085 \end_layout
19086
19087 \begin_layout Subsubsection
19088
19089 \family sans
19090 Check In Changes
19091 \end_layout
19092
19093 \begin_layout Standard
19094 When you are finished editing a file, you check in your changes.
19095  When you do this, you are asked for a description of the changes.
19096  This is stored in the history log.
19097  The version number is bumped, your changes are applied to the master RCS
19098  file, the document is unlocked and set to Read-Only mode.
19099  
19100 \end_layout
19101
19102 \begin_layout Standard
19103 RCS command: 
19104 \family typewriter
19105 ci -q -u -m"<description>" <file-name>
19106 \end_layout
19107
19108 \begin_layout Subsubsection
19109
19110 \family sans
19111 Check Out For Edit
19112 \end_layout
19113
19114 \begin_layout Standard
19115 By doing this you lock the document so that only you can edit it.
19116  This will also make the document Read-Write only for you.
19117  You will usually continue editing for a while and when you are finished
19118  you check in your changes.
19119  The status line is changed to reflect that you have locked the file.
19120  
19121 \end_layout
19122
19123 \begin_layout Standard
19124 RCS command: 
19125 \family typewriter
19126 co -q -l <file-name>
19127 \end_layout
19128
19129 \begin_layout Subsubsection
19130
19131 \family sans
19132 Revert To Repository Version
19133 \end_layout
19134
19135 \begin_layout Standard
19136 This will discard all changes made to the document since the last check
19137  in.
19138  You get a warning before changes are discarded.
19139 \end_layout
19140
19141 \begin_layout Standard
19142 RCS command: 
19143 \family typewriter
19144 co -f -u<version> <file-name>
19145 \end_layout
19146
19147 \begin_layout Subsubsection
19148
19149 \family sans
19150 Undo Last Checkin
19151 \end_layout
19152
19153 \begin_layout Standard
19154 This makes as if the last check in never happened.
19155  No changes are made to the document loaded into LyX, but the last version
19156  is removed from the master RCS file.
19157  
19158 \end_layout
19159
19160 \begin_layout Standard
19161 RCS command: 
19162 \family typewriter
19163 rcs -o<version> <file-name>
19164 \end_layout
19165
19166 \begin_layout Subsubsection
19167
19168 \family sans
19169 Show History
19170 \end_layout
19171
19172 \begin_layout Standard
19173 This shows the complete history of the RCS document.
19174  The output of 
19175 \family typewriter
19176 rlog <file-name>
19177 \family default
19178  is shown in a browser.
19179  See 
19180 \family typewriter
19181 man rlog
19182 \family default
19183  for more info.
19184 \end_layout
19185
19186 \begin_layout Subsubsection
19187 Revision info
19188 \end_layout
19189
19190 \begin_layout Standard
19191 LyX supports RCS version number, author name, date and time of last commit.
19192  All those are extracted from 
19193 \family typewriter
19194 rlog -r <file-name>
19195 \family default
19196 .
19197  For other details see 
19198 \begin_inset CommandInset ref
19199 LatexCommand ref
19200 reference "sub:VCS-Revision-Information"
19201
19202 \end_inset
19203
19204  for details.
19205 \end_layout
19206
19207 \begin_layout Subsection
19208 CVS commands in LyX
19209 \end_layout
19210
19211 \begin_layout Standard
19212 A subset of CVS operations is supported by LyX.
19213  You can find the commands in the 
19214 \family sans
19215 File\SpecialChar \menuseparator
19216 Version
19217 \begin_inset space ~
19218 \end_inset
19219
19220 Control
19221 \family default
19222  submenu.
19223  The version control system SVN is more powerful, so please use it instead
19224  of CVS if possible.
19225 \end_layout
19226
19227 \begin_layout Subsubsection
19228
19229 \family sans
19230 General CVS usage
19231 \end_layout
19232
19233 \begin_layout Standard
19234 If you start from scratch with CVS you have to create your repository and
19235  checkout the working copy with external tools.
19236  If you're using a client-server setup you may need to login before doing
19237  the first repository checkout.
19238 \end_layout
19239
19240 \begin_layout Standard
19241 If your documents are under revision control and others are using the same
19242  repository problems arise when different changes to the same document at
19243  the same location happen.
19244  Standard CVS repositories doesn't operate with a file locking mechanism.
19245  This may be surprising, but conflicts only occur if people disagree on
19246  the proper content of the same part of a document.
19247  So, if co-workers are used to communicate regularly, these conflicts occur
19248  rarely.
19249  If they don't communicate they have a fundamental problem anyway.
19250  Nevertheless some people like to work with so called 
19251 \begin_inset Quotes eld
19252 \end_inset
19253
19254 reserved checkouts
19255 \begin_inset Quotes erd
19256 \end_inset
19257
19258 .
19259  If they do so the working copy of all files is readonly when checked out
19260  first and the user starts editing after using a special command to make
19261  the working copy writable.
19262  When the changes are checked in the working copy returns to readonly state.
19263  With LyX one has to edit the 
19264 \begin_inset Flex Code
19265 status collapsed
19266
19267 \begin_layout Plain Layout
19268 .cvsrc
19269 \end_layout
19270
19271 \end_inset
19272
19273  file and add the line 
19274 \begin_inset Flex Code
19275 status collapsed
19276
19277 \begin_layout Plain Layout
19278 cvs -r
19279 \end_layout
19280
19281 \end_inset
19282
19283  to work with reserved checkouts.
19284  The benefit is the possibility to see who is using a writable copy of some
19285  document.
19286  It's not guaranteed only one user makes a copy writable.
19287 \end_layout
19288
19289 \begin_layout Standard
19290 LyX tries to guess if you're using reserved or non-reserved checkouts.
19291  If your working copy is readonly or it is writable and an additional copy
19292  of your document exists in the CVS/Base sub-directory a reserved otherwise
19293  a non-reserved checkout is assumed.
19294  When a reserved checkout is detected you have to use 
19295 \begin_inset Flex MenuItem
19296 status collapsed
19297
19298 \begin_layout Plain Layout
19299 Check Out
19300 \end_layout
19301
19302 \end_inset
19303
19304  to make your working copy writable if it's readonly.
19305  After doing so the 
19306 \begin_inset Flex MenuItem
19307 status collapsed
19308
19309 \begin_layout Plain Layout
19310 Check In
19311 \end_layout
19312
19313 \end_inset
19314
19315  operation is possible and that makes your working copy readonly again after
19316  transferring your changes to the repository.
19317 \end_layout
19318
19319 \begin_layout Standard
19320 More information about CVS can be found here 
19321 \begin_inset Flex URL
19322 status collapsed
19323
19324 \begin_layout Plain Layout
19325
19326 http://www.nongnu.org/cvs
19327 \end_layout
19328
19329 \end_inset
19330
19331  and here 
19332 \begin_inset Flex URL
19333 status collapsed
19334
19335 \begin_layout Plain Layout
19336
19337 http://ximbiot.com/cvs
19338 \end_layout
19339
19340 \end_inset
19341
19342 .
19343 \end_layout
19344
19345 \begin_layout Standard
19346 Read 
19347 \family typewriter
19348 man cvs
19349 \family default
19350  to understand the sub-commands and the switches mentioned below.
19351 \end_layout
19352
19353 \begin_layout Subsubsection
19354
19355 \family sans
19356 Register
19357 \end_layout
19358
19359 \begin_layout Standard
19360 If your document is not under revision control, this is the only item shown
19361  in the menu.
19362  And if it is under revision control, the 
19363 \family sans
19364 \bar under
19365 R
19366 \bar default
19367 egister
19368 \family default
19369  item is not visible.
19370  
19371 \end_layout
19372
19373 \begin_layout Standard
19374 This command registers in CVS your document 
19375 \begin_inset Flex Strong
19376 status collapsed
19377
19378 \begin_layout Plain Layout
19379
19380 \emph on
19381 only
19382 \end_layout
19383
19384 \end_inset
19385
19386  in the case you have already the documents directory under CVS control
19387  (in particular 
19388 \family typewriter
19389 CVS/Entries
19390 \family default
19391  file exists).
19392  This means you have to create or checkout the archive by yourself using
19393  external tools.
19394  (In case you forget that step LyX registers the document with RCS.)
19395 \end_layout
19396
19397 \begin_layout Standard
19398 Then you are asked interactively to supply an initial description of the
19399  document.
19400  Don't forget that registered file is not yet checked in.
19401 \end_layout
19402
19403 \begin_layout Standard
19404 CVS command that is run: 
19405 \family typewriter
19406 cvs -q add -m"<entered message>" "<file-name>"
19407 \end_layout
19408
19409 \begin_layout Standard
19410 The term 
19411 \family typewriter
19412 "<file-name>"
19413 \family default
19414  above and for all other CVS commands is an abbreviation for 
19415 \begin_inset Quotes eld
19416 \end_inset
19417
19418 change the current working directory to file location and use the file name
19419  without path component as argument
19420 \begin_inset Quotes erd
19421 \end_inset
19422
19423 .
19424 \end_layout
19425
19426 \begin_layout Subsubsection
19427
19428 \family sans
19429 Check In Changes
19430 \end_layout
19431
19432 \begin_layout Standard
19433 When you are finished editing a file, you commit your changes.
19434  When you do this and you had changed the document, you are asked for a
19435  description of the changes.
19436  After that changes are written to the repository.
19437  In case you didn't change the document and a reserved checkout is detected
19438  the reservation made on 
19439 \begin_inset Flex MenuItem
19440 status collapsed
19441
19442 \begin_layout Plain Layout
19443 Check Out
19444 \end_layout
19445
19446 \end_inset
19447
19448  is undone.
19449 \end_layout
19450
19451 \begin_layout Labeling
19452 \labelwidthstring 00.00.0000
19453 CVS
19454 \begin_inset space ~
19455 \end_inset
19456
19457 command: 
19458 \begin_inset space ~
19459 \end_inset
19460
19461
19462 \begin_inset Newline newline
19463 \end_inset
19464
19465
19466 \begin_inset Flex Code
19467 status collapsed
19468
19469 \begin_layout Plain Layout
19470 cvs 
19471 \family typewriter
19472 -q commit -m"<description>" "<file-name>"
19473 \end_layout
19474
19475 \end_inset
19476
19477  or
19478 \begin_inset Newline newline
19479 \end_inset
19480
19481
19482 \begin_inset Flex Code
19483 status collapsed
19484
19485 \begin_layout Plain Layout
19486 cvs -q unedit 
19487 \family typewriter
19488 "<file-name>"
19489 \end_layout
19490
19491 \end_inset
19492
19493
19494 \end_layout
19495
19496 \begin_layout Subsubsection
19497
19498 \family sans
19499 Check Out Changes
19500 \end_layout
19501
19502 \begin_layout Standard
19503 When you are sharing a repository with others, you may have to incorporate
19504  their changes into your working copy.
19505 \end_layout
19506
19507 \begin_layout Standard
19508 CVS command: 
19509 \family typewriter
19510 cvs -q update "<file-name>"
19511 \end_layout
19512
19513 \begin_layout Standard
19514 If a readonly checkout is detected the working copy is made writable and
19515  reserved.
19516 \end_layout
19517
19518 \begin_layout Standard
19519 CVS command: 
19520 \family typewriter
19521 cvs -q edit "<file-name>"
19522 \end_layout
19523
19524 \begin_layout Subsubsection
19525
19526 \family sans
19527 Revert To Repository Version
19528 \end_layout
19529
19530 \begin_layout Standard
19531 This will discard all changes made to the document since the last check
19532  in.
19533  You get a warning before changes are discarded.
19534  Firstly the file is deleted, secondly CVS update command is run.
19535 \end_layout
19536
19537 \begin_layout Standard
19538 CVS command: 
19539 \family typewriter
19540 cvs -q update "<file-name>"
19541 \end_layout
19542
19543 \begin_layout Standard
19544 If a reserved checkout is detected and the working copy has no changes only
19545  the reservation is undone.
19546 \end_layout
19547
19548 \begin_layout Standard
19549 CVS command: 
19550 \family typewriter
19551 cvs -q unedit "<file-name>"
19552 \end_layout
19553
19554 \begin_layout Subsubsection
19555 Update of the local directory checkout from repository
19556 \end_layout
19557
19558 \begin_layout Standard
19559 Once your documents gets more complex, containing sub-documents and pictures,
19560  including external 
19561 \begin_inset Flex Code
19562 status collapsed
19563
19564 \begin_layout Plain Layout
19565 .tex
19566 \end_layout
19567
19568 \end_inset
19569
19570  files and so on using version control becomes more complicated.
19571  LyX supports updating the whole tree in which resides the document.
19572  This become especially useful once you cooperate with people which neither
19573  have detailed knowledge about CVS usage nor they have ambition to commit
19574  additional material to the repository.
19575  You have to organize the files structure so that all external files are
19576  in the same directory or subdirectories of the document.
19577  It's good practice anyway to store multipart documents in an extra directory.
19578 \end_layout
19579
19580 \begin_layout Standard
19581 The 
19582 \begin_inset Flex Code
19583 status collapsed
19584
19585 \begin_layout Plain Layout
19586 Update local directory from repository
19587 \end_layout
19588
19589 \end_inset
19590
19591  command updates the whole directory.
19592  If local changes are detected user is warned before update starts.
19593  In case of merge conflicts both versions of the conflicting document parts
19594  are placed in the final document.
19595  You have to review and correct the result of the merge.
19596  You'll find the conflicts enclosed in pairs of 
19597 \begin_inset Flex Code
19598 status collapsed
19599
19600 \begin_layout Plain Layout
19601 <<<<<<<
19602 \end_layout
19603
19604 \end_inset
19605
19606  and 
19607 \begin_inset Flex Code
19608 status collapsed
19609
19610 \begin_layout Plain Layout
19611 >>>>>>>
19612 \end_layout
19613
19614 \end_inset
19615
19616  separated by 
19617 \begin_inset Flex Code
19618 status collapsed
19619
19620 \begin_layout Plain Layout
19621 =======
19622 \end_layout
19623
19624 \end_inset
19625
19626 .
19627  The first part is your version as before the update operation with the
19628  document name prepended.
19629  The second one is the repository version with the version number after
19630  the sequence of 
19631 \begin_inset Flex Code
19632 status collapsed
19633
19634 \begin_layout Plain Layout
19635 >
19636 \end_layout
19637
19638 \end_inset
19639
19640  signs.
19641 \end_layout
19642
19643 \begin_layout Labeling
19644 \labelwidthstring 00.00.0000
19645 CVS
19646 \begin_inset space ~
19647 \end_inset
19648
19649 commands: 
19650 \begin_inset space ~
19651 \end_inset
19652
19653
19654 \begin_inset Newline newline
19655 \end_inset
19656
19657
19658 \begin_inset Flex Code
19659 status collapsed
19660
19661 \begin_layout Plain Layout
19662 cd $path; cvs diff 
19663 \family typewriter
19664 "."
19665 \end_layout
19666
19667 \end_inset
19668
19669  (Ask if changes are detected.)
19670 \begin_inset Newline newline
19671 \end_inset
19672
19673
19674 \begin_inset Flex Code
19675 status collapsed
19676
19677 \begin_layout Plain Layout
19678 cd $path; cvs -q update 
19679 \family typewriter
19680 "."
19681 \end_layout
19682
19683 \end_inset
19684
19685
19686 \end_layout
19687
19688 \begin_layout Standard
19689 where 
19690 \begin_inset Flex Code
19691 status collapsed
19692
19693 \begin_layout Plain Layout
19694 $path
19695 \end_layout
19696
19697 \end_inset
19698
19699  stands for the path to the document.
19700 \end_layout
19701
19702 \begin_layout Subsubsection
19703
19704 \family sans
19705 Show History
19706 \end_layout
19707
19708 \begin_layout Standard
19709 This shows the complete history of the CVS document.
19710  The output of 
19711 \family typewriter
19712 cvs log "<file-name>"
19713 \family default
19714  is shown in a browser.
19715 \end_layout
19716
19717 \begin_layout Subsection
19718 SVN commands in LyX
19719 \end_layout
19720
19721 \begin_layout Standard
19722 SVN is now partially supported by LyX.
19723  You can find the commands in the 
19724 \family sans
19725 File\SpecialChar \menuseparator
19726 Version
19727 \begin_inset space ~
19728 \end_inset
19729
19730 Control
19731 \family default
19732  submenu.
19733  Please note that if you use password protected access to repository via
19734  ssh, you will be asked in terminal window.
19735  LyX was tested against SVN 1.5 and 1.6
19736 \begin_inset Foot
19737 status open
19738
19739 \begin_layout Plain Layout
19740 Most of the commands will work with 1.4 too, see 
19741 \begin_inset CommandInset ref
19742 LatexCommand ref
19743 reference "sub:SVN-Repo-Update"
19744
19745 \end_inset
19746
19747 .
19748 \end_layout
19749
19750 \end_inset
19751
19752
19753 \end_layout
19754
19755 \begin_layout Subsubsection
19756
19757 \family sans
19758 Register
19759 \end_layout
19760
19761 \begin_layout Standard
19762 If your document is not under revision control, this is the only item shown
19763  in the menu.
19764  And if it is under revision control, the 
19765 \family sans
19766 \bar under
19767 R
19768 \bar default
19769 egister
19770 \family default
19771  item is not visible.
19772  
19773 \end_layout
19774
19775 \begin_layout Standard
19776 This command registers in SVN your document ONLY in case you have already
19777  the documents directory under SVN control (in particular 
19778 \family typewriter
19779 .svn/entries
19780 \family default
19781  file exists).
19782  This means you have to checkout the archive by yourself.
19783  
19784 \end_layout
19785
19786 \begin_layout Standard
19787 Then you are asked interactively to supply an initial description of the
19788  document.
19789  Don't forget that registered file is not yet commited.
19790 \end_layout
19791
19792 \begin_layout Standard
19793 SVN command that is run: 
19794 \family typewriter
19795 svn add -q 
19796 \begin_inset Quotes eld
19797 \end_inset
19798
19799 <file-name>
19800 \begin_inset Quotes erd
19801 \end_inset
19802
19803
19804 \end_layout
19805
19806 \begin_layout Standard
19807 Read 
19808 \family typewriter
19809 man svn
19810 \family default
19811  to understand the switches.
19812  
19813 \end_layout
19814
19815 \begin_layout Subsubsection
19816
19817 \family sans
19818 Check In Changes
19819 \end_layout
19820
19821 \begin_layout Standard
19822 When you are finished editing a file, you commit your changes.
19823  When you do this, you are asked for a description of the changes.
19824  After that changes are commited.
19825 \end_layout
19826
19827 \begin_layout Standard
19828 SVN command:
19829 \begin_inset Foot
19830 status collapsed
19831
19832 \begin_layout Plain Layout
19833 In case locking is not enabled.
19834  See Section 
19835 \begin_inset CommandInset ref
19836 LatexCommand ref
19837 reference "subsec:SVN-File-Locking"
19838
19839 \end_inset
19840
19841 .
19842 \end_layout
19843
19844 \end_inset
19845
19846  
19847 \family typewriter
19848 svn commit -q -m"<description>" <file-name>
19849 \end_layout
19850
19851 \begin_layout Subsubsection
19852
19853 \family sans
19854 Check Out For Edit
19855 \end_layout
19856
19857 \begin_layout Standard
19858 Updates the changes of this file from the repository.
19859  Be sure you understand SVN merging and conflicts resolving before using
19860  this function, because all conflicts has to be resolved manually by you!
19861 \end_layout
19862
19863 \begin_layout Standard
19864 SVN command:
19865 \begin_inset Foot
19866 status collapsed
19867
19868 \begin_layout Plain Layout
19869 Ditto.
19870 \end_layout
19871
19872 \end_inset
19873
19874  
19875 \family typewriter
19876 svn update --non-interactive 
19877 \begin_inset Quotes eld
19878 \end_inset
19879
19880 <file-name>
19881 \begin_inset Quotes erd
19882 \end_inset
19883
19884
19885 \end_layout
19886
19887 \begin_layout Subsubsection
19888
19889 \family sans
19890 Revert To Repository Version
19891 \end_layout
19892
19893 \begin_layout Standard
19894 This will discard all changes made to the document since the last check
19895  in.
19896  You get a warning before changes are discarded.
19897  
19898 \end_layout
19899
19900 \begin_layout Standard
19901 SVN command: 
19902 \family typewriter
19903 svn revert -q 
19904 \begin_inset Quotes eld
19905 \end_inset
19906
19907 <file-name>
19908 \begin_inset Quotes erd
19909 \end_inset
19910
19911
19912 \end_layout
19913
19914 \begin_layout Subsubsection
19915 \begin_inset CommandInset label
19916 LatexCommand label
19917 name "sub:SVN-Repo-Update"
19918
19919 \end_inset
19920
19921 Update of the local directory checkout from repository
19922 \begin_inset Foot
19923 status collapsed
19924
19925 \begin_layout Plain Layout
19926 Note that this command will work only with subversion 
19927 \begin_inset Formula $\geqq1.5$
19928 \end_inset
19929
19930
19931 \end_layout
19932
19933 \end_inset
19934
19935
19936 \end_layout
19937
19938 \begin_layout Standard
19939 All the commands above have one shortcomming - they deal with the current
19940  document only.
19941  Once your document contains pictures, includes external 
19942 \begin_inset Flex Code
19943 status collapsed
19944
19945 \begin_layout Plain Layout
19946 .tex
19947 \end_layout
19948
19949 \end_inset
19950
19951  files and so on administration becomes more complicated.
19952  LyX now supports updating the whole tree in which resides the document
19953 \begin_inset Foot
19954 status collapsed
19955
19956 \begin_layout Plain Layout
19957 One need to organize the files structure so that all external files are
19958  in the same directory or subdirectories of the document.
19959  
19960 \end_layout
19961
19962 \end_inset
19963
19964 .
19965  This become especially useful once you cooperate with people which neither
19966  know about subversion management nor they have ambition to commit additional
19967  material to the repository.
19968  
19969 \end_layout
19970
19971 \begin_layout Standard
19972 \begin_inset Flex Code
19973 status collapsed
19974
19975 \begin_layout Plain Layout
19976 Update local directory from repository
19977 \end_layout
19978
19979 \end_inset
19980
19981  command updates the whole directory and in case of merge conflicts local
19982  version of the files are left, so no unintended data loss occurs.
19983  If local changes are detected user is warned before update starts.
19984 \end_layout
19985
19986 \begin_layout Labeling
19987 \labelwidthstring 00.00.0000
19988 SVN
19989 \begin_inset space ~
19990 \end_inset
19991
19992 commands: 
19993 \begin_inset space ~
19994 \end_inset
19995
19996
19997 \begin_inset Newline newline
19998 \end_inset
19999
20000
20001 \begin_inset Flex Code
20002 status collapsed
20003
20004 \begin_layout Plain Layout
20005 svn diff $path
20006 \end_layout
20007
20008 \end_inset
20009
20010  (Ask if changes are detected.)
20011 \begin_inset Newline newline
20012 \end_inset
20013
20014
20015 \begin_inset Flex Code
20016 status collapsed
20017
20018 \begin_layout Plain Layout
20019 svn update --accept mine-full $path
20020 \end_layout
20021
20022 \end_inset
20023
20024
20025 \end_layout
20026
20027 \begin_layout Standard
20028 where 
20029 \begin_inset Flex Code
20030 status collapsed
20031
20032 \begin_layout Plain Layout
20033 $path
20034 \end_layout
20035
20036 \end_inset
20037
20038  stands for the path to the document.
20039 \end_layout
20040
20041 \begin_layout Subsubsection
20042
20043 \family sans
20044 Show History
20045 \end_layout
20046
20047 \begin_layout Standard
20048 This shows the complete history of the SVN document.
20049  The output of 
20050 \family typewriter
20051 svn log 
20052 \begin_inset Quotes eld
20053 \end_inset
20054
20055 <file-name>
20056 \begin_inset Quotes erd
20057 \end_inset
20058
20059
20060 \family default
20061  is shown in a browser.
20062 \end_layout
20063
20064 \begin_layout Subsubsection
20065 File Locking
20066 \begin_inset CommandInset label
20067 LatexCommand label
20068 name "subsec:SVN-File-Locking"
20069
20070 \end_inset
20071
20072
20073 \end_layout
20074
20075 \begin_layout Standard
20076 The file exchange through various revision control systems brings the problem
20077  of merge conflicts in case two different users try to edit the same (parts
20078  of) document.
20079  When such a conflict happens it needs manual resolving and one reasonable
20080  alternative is to provide some kind of locking mechanism, which guarantees
20081  that only one user is allowed to edit file at the given time.
20082 \end_layout
20083
20084 \begin_layout Standard
20085 SVN has two such mechanisms to provide mutual exclusivity for file access
20086  - locks and automatic setting of write permissions (see sec.
20087  
20088 \begin_inset CommandInset ref
20089 LatexCommand ref
20090 reference "subsec:Automatical-Locking-Property"
20091
20092 \end_inset
20093
20094 ) based on 
20095 \begin_inset Flex Code
20096 status collapsed
20097
20098 \begin_layout Plain Layout
20099 svn:needs-lock
20100 \end_layout
20101
20102 \end_inset
20103
20104  file svn property
20105 \begin_inset Foot
20106 status open
20107
20108 \begin_layout Plain Layout
20109 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20110 \end_layout
20111
20112 \end_inset
20113
20114 .
20115  If this property is detected for a given document LyX starts to use SVN
20116  locks for document editing automatically and the whole check-in/out mechanism
20117  switches to the same regimen as for RCS.
20118  This in particular means there are two different modes of file use in LyX:
20119 \end_layout
20120
20121 \begin_layout Itemize
20122 Unlocked state.
20123  The loaded file is in the read-only mode.
20124  For editing on needs to check-out.
20125  
20126 \emph on
20127 Check-out
20128 \emph default
20129  consists of updating from the repository and gaining write lock.
20130  If the lock is not possible to obtain, we remain in unlocked state.
20131 \end_layout
20132
20133 \begin_layout Itemize
20134 Locked state.
20135  The loaded file is in the 'normal' edit mode.
20136  No other user is allowed to edit the file.
20137  
20138 \emph on
20139 Check-in
20140 \emph default
20141  consists of commiting changes and releasing write-lock.
20142  If no changes have been made to the document, no commit will be produced
20143 \begin_inset Foot
20144 status collapsed
20145
20146 \begin_layout Plain Layout
20147 Don't be puzzled by the fact that you will be asked for commit message anyway.
20148 \end_layout
20149
20150 \end_inset
20151
20152  and only the write-lock will be released.
20153 \end_layout
20154
20155 \begin_layout Standard
20156 SVN commands:
20157 \end_layout
20158
20159 \begin_layout Labeling
20160 \labelwidthstring 00.00.0000
20161 Check-in:
20162 \family typewriter
20163  svn commit -q -m"<description>" "<file-name>"
20164 \begin_inset Newline newline
20165 \end_inset
20166
20167 svn unlock "<file-name>"
20168 \end_layout
20169
20170 \begin_layout Labeling
20171 \labelwidthstring 00.00.0000
20172 Check-out: 
20173 \family typewriter
20174 svn update "<file-name>"
20175 \begin_inset Newline newline
20176 \end_inset
20177
20178 svn lock "<file-name>"
20179 \end_layout
20180
20181 \begin_layout Subsubsection
20182
20183 \family typewriter
20184 \begin_inset CommandInset label
20185 LatexCommand label
20186 name "subsec:Automatical-Locking-Property"
20187
20188 \end_inset
20189
20190
20191 \family default
20192 Automatic Locking Property
20193 \end_layout
20194
20195 \begin_layout Standard
20196 The above mentioned automatic setting of write permissions of the .lyx file
20197  can be set through
20198 \family sans
20199 \bar under
20200  F
20201 \bar default
20202 ile\SpecialChar \menuseparator
20203
20204 \bar under
20205 V
20206 \bar default
20207 ersion
20208 \begin_inset space ~
20209 \end_inset
20210
20211 Control\SpecialChar \menuseparator
20212
20213 \bar under
20214 T
20215 \bar default
20216 oggle locking property
20217 \family default
20218 .
20219  This command is active only when the file is not locked on the svn server
20220  (i.e.
20221  you need to check-out before proceeding).
20222 \end_layout
20223
20224 \begin_layout Labeling
20225 \labelwidthstring 00.00.0000
20226 SVN
20227 \begin_inset space ~
20228 \end_inset
20229
20230 commands:
20231 \end_layout
20232
20233 \begin_layout Labeling
20234 \labelwidthstring 00.00.0000
20235 Set:
20236 \family typewriter
20237  svn propset svn:needs-lock ON "<file-name>"
20238 \end_layout
20239
20240 \begin_layout Labeling
20241 \labelwidthstring 00.00.0000
20242 Unset: 
20243 \family typewriter
20244 svn propdel svn:needs-lock "<file-name>"
20245 \end_layout
20246
20247 \begin_layout Subsubsection
20248 \begin_inset CommandInset label
20249 LatexCommand label
20250 name "sub:VCS-Revision-Information"
20251
20252 \end_inset
20253
20254 Revision Information in Documents
20255 \end_layout
20256
20257 \begin_layout Standard
20258 There are more possibilities how to activate revision information in our
20259  document.
20260 \end_layout
20261
20262 \begin_layout Itemize
20263 LyX supports directly:
20264 \end_layout
20265
20266 \begin_deeper
20267 \begin_layout Itemize
20268 tree revision information (
20269 \begin_inset Flex Code
20270 status collapsed
20271
20272 \begin_layout Plain Layout
20273 vcs-tree-revision
20274 \end_layout
20275
20276 \end_inset
20277
20278 ).
20279  The result is the output of the 
20280 \begin_inset Flex Code
20281 status collapsed
20282
20283 \begin_layout Plain Layout
20284 svnversion
20285 \end_layout
20286
20287 \end_inset
20288
20289  command, the following table gives you an idea, how to read the results.
20290 \end_layout
20291
20292 \begin_layout Standard
20293 \align center
20294 \begin_inset Tabular
20295 <lyxtabular version="3" rows="6" columns="2">
20296 <features rotate="0" tabularvalignment="middle">
20297 <column alignment="center" valignment="top" width="0">
20298 <column alignment="center" valignment="top" width="0">
20299 <row>
20300 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20301 \begin_inset Text
20302
20303 \begin_layout Plain Layout
20304 Output
20305 \end_layout
20306
20307 \end_inset
20308 </cell>
20309 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20310 \begin_inset Text
20311
20312 \begin_layout Plain Layout
20313 Meaning
20314 \end_layout
20315
20316 \end_inset
20317 </cell>
20318 </row>
20319 <row>
20320 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20321 \begin_inset Text
20322
20323 \begin_layout Plain Layout
20324 4123:4168
20325 \end_layout
20326
20327 \end_inset
20328 </cell>
20329 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20330 \begin_inset Text
20331
20332 \begin_layout Plain Layout
20333 mixed revision working copy
20334 \end_layout
20335
20336 \end_inset
20337 </cell>
20338 </row>
20339 <row>
20340 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20341 \begin_inset Text
20342
20343 \begin_layout Plain Layout
20344 4168M
20345 \end_layout
20346
20347 \end_inset
20348 </cell>
20349 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20350 \begin_inset Text
20351
20352 \begin_layout Plain Layout
20353 modified working copy
20354 \end_layout
20355
20356 \end_inset
20357 </cell>
20358 </row>
20359 <row>
20360 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20361 \begin_inset Text
20362
20363 \begin_layout Plain Layout
20364 4123S
20365 \end_layout
20366
20367 \end_inset
20368 </cell>
20369 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20370 \begin_inset Text
20371
20372 \begin_layout Plain Layout
20373 switched working copy
20374 \end_layout
20375
20376 \end_inset
20377 </cell>
20378 </row>
20379 <row>
20380 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20381 \begin_inset Text
20382
20383 \begin_layout Plain Layout
20384 4123P
20385 \end_layout
20386
20387 \end_inset
20388 </cell>
20389 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20390 \begin_inset Text
20391
20392 \begin_layout Plain Layout
20393 partial working copy, from a sparse checkout
20394 \end_layout
20395
20396 \end_inset
20397 </cell>
20398 </row>
20399 <row>
20400 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20401 \begin_inset Text
20402
20403 \begin_layout Plain Layout
20404 4123:4168MS
20405 \end_layout
20406
20407 \end_inset
20408 </cell>
20409 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20410 \begin_inset Text
20411
20412 \begin_layout Plain Layout
20413 mixed revision, modified, switched working copy
20414 \end_layout
20415
20416 \end_inset
20417 </cell>
20418 </row>
20419 </lyxtabular>
20420
20421 \end_inset
20422
20423
20424 \end_layout
20425
20426 \begin_layout Itemize
20427 file revision information.
20428  The result comes from parsing the output of 
20429 \begin_inset Flex Code
20430 status collapsed
20431
20432 \begin_layout Plain Layout
20433 svn
20434 \begin_inset space ~
20435 \end_inset
20436
20437 info
20438 \begin_inset space ~
20439 \end_inset
20440
20441 --xml
20442 \begin_inset space ~
20443 \end_inset
20444
20445 file.lyx
20446 \end_layout
20447
20448 \end_inset
20449
20450 .
20451  Supported flags are:
20452 \end_layout
20453
20454 \begin_deeper
20455 \begin_layout Itemize
20456 version number of the last commit (
20457 \begin_inset Flex Code
20458 status collapsed
20459
20460 \begin_layout Plain Layout
20461 vcs-revision
20462 \end_layout
20463
20464 \end_inset
20465
20466 )
20467 \end_layout
20468
20469 \begin_layout Itemize
20470 author of the last commit (
20471 \begin_inset Flex Code
20472 status collapsed
20473
20474 \begin_layout Plain Layout
20475 vcs-author
20476 \end_layout
20477
20478 \end_inset
20479
20480 )
20481 \end_layout
20482
20483 \begin_layout Itemize
20484 date of the last commit (
20485 \begin_inset Flex Code
20486 status collapsed
20487
20488 \begin_layout Plain Layout
20489 vcs-date
20490 \end_layout
20491
20492 \end_inset
20493
20494 )
20495 \end_layout
20496
20497 \begin_layout Itemize
20498 time of the last commit (
20499 \begin_inset Flex Code
20500 status collapsed
20501
20502 \begin_layout Plain Layout
20503 vcs-time
20504 \end_layout
20505
20506 \end_inset
20507
20508 )
20509 \end_layout
20510
20511 \end_deeper
20512 \begin_layout Standard
20513 You can obtain this info via InsetInfo (e.g.
20514  
20515 \begin_inset Flex Code
20516 status collapsed
20517
20518 \begin_layout Plain Layout
20519 info-insert buffer vcs-date
20520 \end_layout
20521
20522 \end_inset
20523
20524 ).
20525  The information will be available only when you have the file stored under
20526  svn managment (i.e.
20527  the 
20528 \begin_inset Flex Code
20529 status collapsed
20530
20531 \begin_layout Plain Layout
20532 .svn
20533 \end_layout
20534
20535 \end_inset
20536
20537  directory is available with your document).
20538 \end_layout
20539
20540 \end_deeper
20541 \begin_layout Itemize
20542 Another---a hacking one---possibility is to use svn keywords
20543 \begin_inset Foot
20544 status collapsed
20545
20546 \begin_layout Plain Layout
20547 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20548 \end_layout
20549
20550 \end_inset
20551
20552 .
20553  In short -- you set file keywords property (e.g.
20554  
20555 \family sans
20556 svn propset svn:keywords 'Rev' file.lyx
20557 \family default
20558 ) and then paste keyword TeX code
20559 \begin_inset Foot
20560 status collapsed
20561
20562 \begin_layout Plain Layout
20563 This is an easy way how to ensure that LyX won't break the line in the middle
20564  of keyword tag.
20565 \end_layout
20566
20567 \end_inset
20568
20569  tag in your document (e.g.
20570  
20571 \begin_inset ERT
20572 status open
20573
20574 \begin_layout Plain Layout
20575
20576 $Rev$
20577 \end_layout
20578
20579 \end_inset
20580
20581 ).
20582  This way svn client will automatically substitute revision number (e.g.
20583  
20584 \begin_inset ERT
20585 status open
20586
20587 \begin_layout Plain Layout
20588
20589 $Rev: 59 $
20590 \end_layout
20591
20592 \end_inset
20593
20594 ) after each update and commit.
20595  There are more problems with this approach.
20596  Firstly, the '$' character is used in TeX world for math equations, so
20597  any occurence of math formula 
20598 \begin_inset Formula $Rev$
20599 \end_inset
20600
20601  become 
20602 \begin_inset Formula $Rev:59$
20603 \end_inset
20604
20605  in your LyX document.
20606  Similarly for other keywords like Id, Date, Author, etc.
20607  Secondly svn output is dependent on your locales, so its very easy that
20608  svn would produce some problematic strings once Date is used.
20609  Thirdly you get the whole 'Rev: 59' string in your document instead of
20610  the plain number.
20611  Until subversion implements user's custom keywords it will be hard to use
20612  this approach reliably or let LyX to support it directly.
20613 \end_layout
20614
20615 \begin_layout Subsection
20616 SVN and Windows Environment
20617 \end_layout
20618
20619 \begin_layout Quote
20620 My inclination is to say that if the user cannot figure out the command
20621  line operations on their own fairly quickly, they would be well advised
20622  to use TortoiseSVN.
20623  ---P.
20624  A.
20625  Rubin
20626 \end_layout
20627
20628 \begin_layout Subsubsection
20629 Preparation
20630 \end_layout
20631
20632 \begin_layout Standard
20633 In addition to installing LyX, and having access to a Subversion repository,
20634  the user will need to install the Subversion client program.
20635  A Windows installer for the client program is available from 
20636 \begin_inset CommandInset href
20637 LatexCommand href
20638 name "CollabNet"
20639 target "http://www.collab.net/nonav/downloads/subversion/"
20640
20641 \end_inset
20642
20643 .
20644  The user may also want to install 
20645 \begin_inset CommandInset href
20646 LatexCommand href
20647 name "TortoiseSVN"
20648 target "http://tortoisesvn.tigris.org/"
20649
20650 \end_inset
20651
20652 , which integrates Subversion operations into the context (rightclick) menu
20653  of Windows Explorer.
20654  Operations done outside LyX will typically be more convenient using the
20655  Explorer context menu.
20656  Note that TortoiseSVN is not a replacement for the client program, which
20657  is what LyX itself will use.
20658 \end_layout
20659
20660 \begin_layout Subsubsection
20661 Bringing a document under Subversion control
20662 \end_layout
20663
20664 \begin_layout Standard
20665 Before a LyX document can be brought under version control in Subversion,
20666  its parent directory needs to be under version control.
20667  If the document is being added to a project already in the repository,
20668  this is accomplished by checking the project out to the directory where
20669  the new document will be placed.
20670  If the project itself is not yet under version control (for instance, if
20671  this document starts a new project), the directory must be imported into
20672  the repository.
20673  This is done outside LyX.
20674  Both import and checkout are easily accomplished from the Explorer context
20675  menu using TortoiseSVN, or alternatively can be done using the command
20676  line client at a DOS prompt.
20677  The procedure for importing the project using TortoiseSVN is described
20678  below, assuming an existing repository and a new project being started
20679  in 
20680 \family typewriter
20681 C:
20682 \backslash
20683 new project
20684 \family default
20685 .
20686  For information on using the Subversion client program, run 
20687 \family typewriter
20688 svn --help 
20689 \family default
20690 in a DOS shell.
20691 \end_layout
20692
20693 \begin_layout Enumerate
20694 Locate 
20695 \family typewriter
20696 C:
20697 \backslash
20698 new project 
20699 \family default
20700 in Windows Explorer, right click it, and select 
20701 \family typewriter
20702 TortoiseSVN > Repo-browser
20703 \family default
20704 .
20705  If necessary, adjust the URL for the repository, then click OK.
20706 \end_layout
20707
20708 \begin_layout Enumerate
20709 Right click the level of the repository under which you want to place the
20710  new project folder (typically the top level) and click 
20711 \family typewriter
20712 Create folder\SpecialChar \ldots{}
20713
20714 \family default
20715  Supply a name for the project folder and click OK.
20716  Add a message for the log file if desired, then click OK again.
20717  The new project folder should appear in the repository.
20718  Finally, click OK again to exit the repository browser.
20719 \end_layout
20720
20721 \begin_layout Enumerate
20722 Once again right click 
20723 \family typewriter
20724 C:
20725 \backslash
20726 new project
20727 \family default
20728 , this time selecting SVN Checkout\SpecialChar \ldots{}
20729  Select the URL of the project folder
20730  you just created in the repository, and set the checkout directory to 
20731 \family typewriter
20732 C:
20733 \backslash
20734 new project.
20735
20736 \family default
20737  Click OK.
20738  You will be warned about a non-empty folder; click OK to proceed.
20739  You should now have a 
20740 \family typewriter
20741 .svn
20742 \family default
20743  directory under 
20744 \family typewriter
20745 C:
20746 \backslash
20747 new project.
20748 \end_layout
20749
20750 \begin_layout Enumerate
20751 Create or open your document in LyX and click 
20752 \family sans
20753 \bar under
20754 F
20755 \bar default
20756 ile\SpecialChar \menuseparator
20757
20758 \bar under
20759 V
20760 \bar default
20761 ersion
20762 \begin_inset space ~
20763 \end_inset
20764
20765 Control\SpecialChar \menuseparator
20766
20767 \bar under
20768 R
20769 \bar default
20770 egister.
20771  
20772 \family default
20773 Add a log message and click OK to commit the document to version control.
20774 \end_layout
20775
20776 \begin_layout Standard
20777 From this point onward, you should have full functionality in the 
20778 \family sans
20779 \bar under
20780 F
20781 \bar default
20782 ile\SpecialChar \menuseparator
20783
20784 \bar under
20785 V
20786 \bar default
20787 ersion
20788 \begin_inset space ~
20789 \end_inset
20790
20791 Control
20792 \family default
20793  menu.
20794  You also have the option of checking the document in and out, viewing its
20795  history, etc.
20796  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20797  client program from a command prompt.
20798 \end_layout
20799
20800 \begin_layout Subsubsection
20801 SSH tunnel used with SVN under Windows
20802 \end_layout
20803
20804 \begin_layout Standard
20805 Compared with Linux setting up an svn client to communicate over ssh under
20806  Windows is a rather troublesome task.
20807  We will at least offer some hints how to setup the client side but prior
20808  knowledge about ssh and the Windows command line is needed, also be prepared
20809  for a great deal of frustration\SpecialChar \ldots{}
20810
20811 \end_layout
20812
20813 \begin_layout Enumerate
20814 Get an svn client for windows, as described in the previous sections.
20815  When it is a fresh install run some svn command (e.g.
20816  
20817 \begin_inset Flex Code
20818 status collapsed
20819
20820 \begin_layout Plain Layout
20821 svn --version
20822 \end_layout
20823
20824 \end_inset
20825
20826 ) to create config files, which you will need to change later on.
20827 \end_layout
20828
20829 \begin_layout Enumerate
20830 Choose an ssh client for Windows.
20831  There are several possibilities, we will use the one from Putty tools
20832 \begin_inset Foot
20833 status open
20834
20835 \begin_layout Plain Layout
20836 \begin_inset Flex URL
20837 status collapsed
20838
20839 \begin_layout Plain Layout
20840
20841 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20842 \end_layout
20843
20844 \end_inset
20845
20846
20847 \end_layout
20848
20849 \end_inset
20850
20851 .
20852  You will need to set the connection up so that the client doesn't ask for
20853  any password from you.
20854  To keep things easy we will use only keys without any additional password
20855  protection etc.
20856 \end_layout
20857
20858 \begin_deeper
20859 \begin_layout Enumerate
20860 Generate keys by 
20861 \begin_inset Flex Code
20862 status collapsed
20863
20864 \begin_layout Plain Layout
20865 puttygen
20866 \end_layout
20867
20868 \end_inset
20869
20870 .
20871  Save your private .ppk key file and put the public one on the server side.
20872  If the SVN server runs on Linux, note that the format of the public key
20873  is not compatible with Linux openssh and you will need to direcly copy-paste
20874  the key from the “
20875 \emph on
20876 Public key for pasting into OpenSSH authorized_keys file
20877 \emph default
20878 :” edit field into the server's 
20879 \begin_inset Flex Code
20880 status collapsed
20881
20882 \begin_layout Plain Layout
20883 ~/.ssh/authorized_keys
20884 \end_layout
20885
20886 \end_inset
20887
20888  / 
20889 \begin_inset Flex Code
20890 status collapsed
20891
20892 \begin_layout Plain Layout
20893 authorized_keys2
20894 \end_layout
20895
20896 \end_inset
20897
20898  file.
20899 \end_layout
20900
20901 \begin_layout Enumerate
20902 Get the Putty's 
20903 \begin_inset Flex Code
20904 status collapsed
20905
20906 \begin_layout Plain Layout
20907 plink
20908 \end_layout
20909
20910 \end_inset
20911
20912 .
20913  In the SVN config file
20914 \begin_inset Foot
20915 status collapsed
20916
20917 \begin_layout Plain Layout
20918 Exact path depends on Windows version, usually somewhere around 
20919 \begin_inset Flex Code
20920 status collapsed
20921
20922 \begin_layout Plain Layout
20923 c:
20924 \backslash
20925 Documents and Settings
20926 \backslash
20927 user
20928 \backslash
20929 Application Data
20930 \backslash
20931 Subversion
20932 \backslash
20933 config
20934 \end_layout
20935
20936 \end_inset
20937
20938  / 
20939 \begin_inset Flex Code
20940 status collapsed
20941
20942 \begin_layout Plain Layout
20943 AppData
20944 \backslash
20945 Roaming
20946 \backslash
20947 Subversion
20948 \end_layout
20949
20950 \end_inset
20951
20952 .
20953 \end_layout
20954
20955 \end_inset
20956
20957 , section [tunnels], setup ssh command, e.g.
20958  
20959 \begin_inset Flex Code
20960 status collapsed
20961
20962 \begin_layout Plain Layout
20963 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20964 \end_layout
20965
20966 \end_inset
20967
20968 .
20969 \begin_inset Foot
20970 status collapsed
20971
20972 \begin_layout Plain Layout
20973 It will usually take a lot of time to get exact command right and it depends
20974  on many things.
20975  For example do not have some remote server saved as a default session in
20976  Putty etc.
20977  If things fail, try to connect via plink without SVN first.
20978 \end_layout
20979
20980 \end_inset
20981
20982
20983 \end_layout
20984
20985 \end_deeper
20986 \begin_layout Enumerate
20987 Checkout the SVN archive, e.g.
20988  
20989 \begin_inset Flex Code
20990 status collapsed
20991
20992 \begin_layout Plain Layout
20993 svn co svn+ssh://user@server/repository_path
20994 \end_layout
20995
20996 \end_inset
20997
20998 .
20999 \end_layout
21000
21001 \begin_layout Subsubsection
21002 End-of-Line Conversions
21003 \end_layout
21004
21005 \begin_layout Standard
21006 When the collaborators are mixing Linux and Windows environments, LyX will
21007  use different line endings inside the .lyx files.
21008  This is not a problem as far as LyX functionality is concerned, but the
21009  commit diffs will be huge and merge-conflicts prone.
21010  Fortunately SVN itself knows
21011 \begin_inset Foot
21012 status collapsed
21013
21014 \begin_layout Plain Layout
21015 \begin_inset Flex URL
21016 status collapsed
21017
21018 \begin_layout Plain Layout
21019
21020 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21021 \end_layout
21022
21023 \end_inset
21024
21025
21026 \end_layout
21027
21028 \end_inset
21029
21030  how to deal with CR/LF problems when switching .lyx files to the 
21031 \begin_inset Flex Code
21032 status collapsed
21033
21034 \begin_layout Plain Layout
21035 native
21036 \end_layout
21037
21038 \end_inset
21039
21040  mode.
21041 \begin_inset Foot
21042 status collapsed
21043
21044 \begin_layout Plain Layout
21045 For the lazy guys: 
21046 \begin_inset Flex Code
21047 status collapsed
21048
21049 \begin_layout Plain Layout
21050 svn propset svn:eol-style native FILE_NAME
21051 \end_layout
21052
21053 \end_inset
21054
21055
21056 \end_layout
21057
21058 \end_inset
21059
21060
21061 \end_layout
21062
21063 \begin_layout Subsection
21064 Further tuning
21065 \end_layout
21066
21067 \begin_layout Standard
21068 With the recent addition of the vc-command function LyX power users are
21069  allowed to create their own commands for revision control.
21070 \end_layout
21071
21072 \begin_layout Standard
21073 As an example you can see how two TortoiseSVN commands could be integrated
21074  directly:
21075 \end_layout
21076
21077 \begin_layout Description
21078 Commit: 
21079 \begin_inset Flex Code
21080 status collapsed
21081
21082 \begin_layout Plain Layout
21083 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21084 \end_layout
21085
21086 \end_inset
21087
21088
21089 \end_layout
21090
21091 \begin_layout Description
21092 Revert: 
21093 \begin_inset Flex Code
21094 status collapsed
21095
21096 \begin_layout Plain Layout
21097 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21098 \end_layout
21099
21100 \end_inset
21101
21102
21103 \end_layout
21104
21105 \begin_layout Subsection
21106 Version control and Document comparison
21107 \end_layout
21108
21109 \begin_layout Standard
21110 One of the typical uses of version control is to inspect the changes between
21111  revisions, usually by creating 
21112 \begin_inset Flex Code
21113 status collapsed
21114
21115 \begin_layout Plain Layout
21116 diff
21117 \end_layout
21118
21119 \end_inset
21120
21121  dumps.
21122  While this is useful for plain text files, it is much less useful in the
21123  case of LyX files, which have more a complicated structure.
21124  Hence we provide binding to the Document comparison feature.
21125  There are two ways of calling this feature - either by direct call of 
21126 \begin_inset Flex Code
21127 status collapsed
21128
21129 \begin_layout Plain Layout
21130 VC_COMPARE
21131 \end_layout
21132
21133 \end_inset
21134
21135  LyX function (for details see LyX functions manual) or by icon/menu item
21136  
21137 \begin_inset Flex MenuItem
21138 status collapsed
21139
21140 \begin_layout Plain Layout
21141 Compare with older revision...
21142 \end_layout
21143
21144 \end_inset
21145
21146 .
21147  One can either compare two chosen revisions of the document or he can simply
21148  compare the current version of edited text with older revisions (where
21149  '
21150 \begin_inset Flex MenuItem
21151 status collapsed
21152
21153 \begin_layout Plain Layout
21154 0
21155 \end_layout
21156
21157 \end_inset
21158
21159 ' revisions back means comparison of the edited file with last commited
21160  revision).
21161  
21162 \end_layout
21163
21164 \begin_layout Standard
21165 This feature is supported for SVN and RCS though due to the more complicated
21166  versioning scheme of RCS there is a constraint -- when addressing the revisions
21167  in dialog, numbers always point to the last number in RCS revision number,
21168  i.e.
21169  '35' in '1.2.35'.
21170 \end_layout
21171
21172 \begin_layout Section
21173 Literate Programming
21174 \end_layout
21175
21176 \begin_layout Standard
21177 Updated by 
21178 \noun on
21179 Kayvan Sylvan 
21180 \noun default
21181 (kayvan@sylvan.com)
21182 \noun on
21183
21184 \noun default
21185 original documentation written by 
21186 \noun on
21187 Edmar Wienskoski Jr.
21188
21189 \noun default
21190  (edmar-w-jr@technologist.com)
21191 \end_layout
21192
21193 \begin_layout Subsection
21194 Introduction
21195 \end_layout
21196
21197 \begin_layout Standard
21198 The main purpose of this documentation is to show you how to use LyX for
21199  literate programming, where it is assumed that you are familiar with this
21200  programming technique, and know what 
21201 \begin_inset Quotes eld
21202 \end_inset
21203
21204 tangling
21205 \begin_inset Quotes erd
21206 \end_inset
21207
21208  and 
21209 \begin_inset Quotes eld
21210 \end_inset
21211
21212 weaving
21213 \begin_inset Quotes erd
21214 \end_inset
21215
21216  means.
21217  If that is not the case, please follow the web links provided in the following
21218  sections.
21219  There is a lot of good documentation out there covering old development
21220  history to the latest tools tips.
21221 \end_layout
21222
21223 \begin_layout Standard
21224 It is also assumed that you are familiar with LyX itself to a point that
21225  you are comfortable changing your LyX preferences, and X resources file.
21226  If that is not the case please refer to other LyX documentation to cover
21227  your specific needs.
21228 \end_layout
21229
21230 \begin_layout Subsection
21231 Literate Programming
21232 \end_layout
21233
21234 \begin_layout Standard
21235 From the Literate Programming FAQ: 
21236 \end_layout
21237
21238 \begin_layout Quotation
21239 Literate programming is the combination of documentation and source together
21240  in a fashion suited for reading by human beings.
21241  In fact, literate programs should be enjoyable reading, even inviting!
21242  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21243  and documentation in a single file.
21244  Literate programming tools then parse the file to produce either readable
21245  documentation or compilable source.
21246  The WEB style of literate programming was created by D.
21247 \begin_inset space \thinspace{}
21248 \end_inset
21249
21250 E.
21251  Knuth during the development of his TeX typesetting software.
21252  
21253 \end_layout
21254
21255 \begin_layout Standard
21256 Another excerpt says:
21257 \end_layout
21258
21259 \begin_layout Quotation
21260
21261 \emph on
21262 How is literate programming different from verbose commenting?
21263 \end_layout
21264
21265 \begin_layout Quotation
21266 There are three distinguishing characteristics.
21267  In order of importance, they are: 
21268 \end_layout
21269
21270 \begin_deeper
21271 \begin_layout Itemize
21272 flexible order of elaboration 
21273 \end_layout
21274
21275 \begin_layout Itemize
21276 automatic support for browsing 
21277 \end_layout
21278
21279 \begin_layout Itemize
21280 typeset documentation, especially diagrams and mathematics 
21281 \end_layout
21282
21283 \end_deeper
21284 \begin_layout Standard
21285 Now that I sparked your curiosity, take a look in the references.
21286 \end_layout
21287
21288 \begin_layout Subsubsection
21289 References
21290 \end_layout
21291
21292 \begin_layout Standard
21293 The complete Literate Programming FAQ can be found at:
21294 \end_layout
21295
21296 \begin_layout Quote
21297 Literate Programming FAQ 
21298 \begin_inset Flex URL
21299 status collapsed
21300
21301 \begin_layout Plain Layout
21302
21303 http://www.literateprogramming.com/lpfaq.pdf
21304 \end_layout
21305
21306 \end_inset
21307
21308
21309 \end_layout
21310
21311 \begin_layout Standard
21312 The FAQ lists 23 (twenty three!) different literate programming tools.
21313  Where some are specialized or 
21314 \begin_inset Quotes eld
21315 \end_inset
21316
21317 tailored
21318 \begin_inset Quotes erd
21319 \end_inset
21320
21321  for particular programming languages, while other have general scope.
21322  I selected 
21323 \noun on
21324 Noweb
21325 \noun default
21326  for my own use for several reasons:
21327 \end_layout
21328
21329 \begin_layout Itemize
21330 It can generate the documentation either in LaTeX or HTML.
21331 \end_layout
21332
21333 \begin_layout Itemize
21334 It has a open architecture, i.
21335 \begin_inset space \thinspace{}
21336 \end_inset
21337
21338 e.
21339 \begin_inset space \space{}
21340 \end_inset
21341
21342 it is easy to plug in new filters and to perform special processing that
21343  you may need.
21344  
21345 \end_layout
21346
21347 \begin_layout Itemize
21348 There is a good selection of filters available already (the HTML is one
21349  of them).
21350 \end_layout
21351
21352 \begin_layout Itemize
21353 It is free.
21354 \end_layout
21355
21356 \begin_layout Standard
21357 The Noweb web page can be found at: 
21358 \end_layout
21359
21360 \begin_layout Quote
21361 Noweb home page 
21362 \begin_inset Flex URL
21363 status collapsed
21364
21365 \begin_layout Plain Layout
21366
21367 http://www.cs.virginia.edu/~nr/noweb/
21368 \end_layout
21369
21370 \end_inset
21371
21372
21373 \end_layout
21374
21375 \begin_layout Standard
21376 Starting from there you can reach many other interesting links and even
21377  some literate program examples.
21378 \end_layout
21379
21380 \begin_layout Subsection
21381 LyX and Literate Programming
21382 \change_inserted 274215730 1350434640
21383  with Noweb
21384 \change_unchanged
21385
21386 \end_layout
21387
21388 \begin_layout Standard
21389 The LyX support for Literate Programming is provided by using the generic
21390  LyX converters mechanism.
21391  This support is provided in a 
21392 \begin_inset Quotes eld
21393 \end_inset
21394
21395 Noweb independent
21396 \begin_inset Quotes erd
21397 \end_inset
21398
21399  way, i.
21400 \begin_inset space \thinspace{}
21401 \end_inset
21402
21403 e.
21404 \begin_inset space \space{}
21405 \end_inset
21406
21407 you will be able to use this new LyX feature with some other literate programmin
21408 g tool of your choice by just changing your LyX preferences.
21409 \end_layout
21410
21411 \begin_layout Subsubsection
21412 Generating documents and code (weaving and tangling)
21413 \end_layout
21414
21415 \begin_layout Paragraph
21416 Selecting the document class
21417 \end_layout
21418
21419 \begin_layout Standard
21420 If you have installed Noweb and LyX successfully, whenever you open a new
21421  document or try to change the document class of an existing one, you will
21422  find that there are three new document classes available:
21423 \end_layout
21424
21425 \begin_layout Itemize
21426 Article (Noweb)
21427 \end_layout
21428
21429 \begin_layout Itemize
21430 Book (Noweb)
21431 \end_layout
21432
21433 \begin_layout Itemize
21434 Report (Noweb)
21435 \end_layout
21436
21437 \begin_layout Standard
21438 You must select one of them to create your literate documents from.
21439  
21440 \end_layout
21441
21442 \begin_layout Standard
21443 Note that literate documents are not limited to these three classes.
21444  New classes can be generated from other styles like letter or in combination
21445  with other class variations like Article (AMS).
21446  If you have special needs that cannot be covered by one of the existing
21447  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21448  will arrange to insert a new entry, or teach you how to do it.
21449 \begin_inset Foot
21450 status collapsed
21451
21452 \begin_layout Plain Layout
21453 It is very simple, it involves the creation of a file with four lines, and
21454  re-running of the auto configuration.
21455 \end_layout
21456
21457 \end_inset
21458
21459  Moreover, if you use a literate tool other than Noweb you may need to create
21460  a new set of document classes for it.
21461 \end_layout
21462
21463 \begin_layout Paragraph
21464 Typing code in
21465 \end_layout
21466
21467 \begin_layout Standard
21468 LyX enables you to write code with a layout named 
21469 \noun on
21470 Scrap
21471 \noun default
21472 .
21473 \begin_inset Foot
21474 status collapsed
21475
21476 \begin_layout Plain Layout
21477 The equivalent Noweb term is 
21478 \begin_inset Quotes eld
21479 \end_inset
21480
21481 Chunk
21482 \begin_inset Quotes erd
21483 \end_inset
21484
21485 .
21486  For historical reasons, I got used to the term 
21487 \begin_inset Quotes eld
21488 \end_inset
21489
21490 scrap
21491 \begin_inset Quotes erd
21492 \end_inset
21493
21494  introduced by other literate tool named Nuweb, which I used for many years
21495  before rendering myself to Noweb.
21496 \end_layout
21497
21498 \end_inset
21499
21500  Noweb delimits scraps like this:
21501 \end_layout
21502
21503 \begin_layout LyX-Code
21504 <<My scrap>>=
21505 \end_layout
21506
21507 \begin_layout LyX-Code
21508   code
21509 \end_layout
21510
21511 \begin_layout LyX-Code
21512   more code
21513 \end_layout
21514
21515 \begin_layout LyX-Code
21516   even more code
21517 \end_layout
21518
21519 \begin_layout LyX-Code
21520   @
21521 \end_layout
21522
21523 \begin_layout Standard
21524 The problem is that whatever is written in between the << and the 
21525 \family typewriter
21526 @
21527 \family default
21528  must be taken literally, i.
21529 \begin_inset space \thinspace{}
21530 \end_inset
21531
21532 e.
21533 \begin_inset space \space{}
21534 \end_inset
21535
21536 LyX should be prevented from making any special interpretation of what has
21537  been written.
21538  This is handled by a special layout named Scrap, that works like a normal
21539  paragraph but has a free spacing capability.
21540 \end_layout
21541
21542 \begin_layout Standard
21543 The down
21544 \change_deleted 274215730 1350432842
21545  
21546 \change_unchanged
21547 side of the Scrap paragraph layout is that consecutive paragraphs of code
21548  will be spaced with one empty line in the source code and also in the printed
21549  documentation.
21550  The work around is to enter each line of code within a single Scrap, with
21551  a newline (ctrl-return).
21552  The example above will look like this:
21553 \begin_inset Foot
21554 status collapsed
21555
21556 \begin_layout Plain Layout
21557 If you have a printed version of this document you will not see any difference
21558  between the previous example and this one.
21559 \end_layout
21560
21561 \end_inset
21562
21563
21564 \end_layout
21565
21566 \begin_layout LyX-Code
21567 <<My scrap>>=
21568 \begin_inset Newline newline
21569 \end_inset
21570
21571   code
21572 \begin_inset Newline newline
21573 \end_inset
21574
21575   more code
21576 \begin_inset Newline newline
21577 \end_inset
21578
21579   even more code
21580 \begin_inset Newline newline
21581 \end_inset
21582
21583   @
21584 \end_layout
21585
21586 \begin_layout Standard
21587 This layout works fine.
21588  The only real inconvenience is that you have to type ctrl-return instead
21589  of a plain return.
21590 \begin_inset Foot
21591 status collapsed
21592
21593 \begin_layout Plain Layout
21594 It is in my list of 
21595 \begin_inset Quotes eld
21596 \end_inset
21597
21598 improvements
21599 \begin_inset Quotes erd
21600 \end_inset
21601
21602  to fix that.
21603 \end_layout
21604
21605 \end_inset
21606
21607
21608 \end_layout
21609
21610 \begin_layout Standard
21611 As a special note, you can also use the 
21612 \begin_inset Quotes eld
21613 \end_inset
21614
21615 %def
21616 \begin_inset Quotes erd
21617 \end_inset
21618
21619  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21620 rence:
21621 \end_layout
21622
21623 \begin_layout LyX-Code
21624 <<My scrap>>=
21625 \begin_inset Newline newline
21626 \end_inset
21627
21628   def some_function(args):
21629 \begin_inset Newline newline
21630 \end_inset
21631
21632     "This is the doc string for this function."
21633 \begin_inset Newline newline
21634 \end_inset
21635
21636     print "My args: ", args
21637 \end_layout
21638
21639 \begin_layout LyX-Code
21640 @ %def some_function
21641 \end_layout
21642
21643 \begin_layout Standard
21644 For an example of this usage and the resulting cross-reference output, look
21645  at the Literate python program in 
21646 \emph on
21647 LIBDIR/examples/listerrors.lyx
21648 \emph default
21649  which should make this all clear.
21650 \end_layout
21651
21652 \begin_layout Paragraph
21653 Generating the documentation
21654 \end_layout
21655
21656 \begin_layout Standard
21657 At this point you already have a new document file with a proper document
21658  class, and with some code and text on it.
21659  How do I print it? The answer is simple, you select 
21660 \family sans
21661 View\SpecialChar \menuseparator
21662 DVI,
21663 \family default
21664  etc.
21665  Just like you would do for a plain document.
21666  No special procedure is required.
21667 \end_layout
21668
21669 \begin_layout Standard
21670 To help orientate you, I will now explain what happens inside LyX:
21671 \end_layout
21672
21673 \begin_layout Enumerate
21674 When the 
21675 \family sans
21676 Update\SpecialChar \menuseparator
21677 DVI
21678 \family default
21679  menu option is chosen, a LaTeX file is generated.
21680  
21681 \end_layout
21682
21683 \begin_deeper
21684 \begin_layout Standard
21685 If the document is of any literate class the generated file will be named
21686  with an extension name defined by the 
21687 \begin_inset Quotes eld
21688 \end_inset
21689
21690 literate
21691 \begin_inset Quotes erd
21692 \end_inset
21693
21694  format (defined in the Preferences panel), otherwise the file will have
21695  the usual 
21696 \family typewriter
21697 .tex
21698 \family default
21699  extension.
21700 \end_layout
21701
21702 \end_deeper
21703 \begin_layout Enumerate
21704 Note that the only difference so far is in the name of the file, no special
21705  processing is required by LyX.
21706  Given that you formatted the code using the Scrap layout that, by itself,
21707  takes care of the business.
21708 \end_layout
21709
21710 \begin_layout Enumerate
21711 If the document is of any literate class LyX will then use the internal
21712  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21713 \begin_inset Foot
21714 status collapsed
21715
21716 \begin_layout Plain Layout
21717 The converters are defined in the 
21718 \family sans
21719 Tools\SpecialChar \menuseparator
21720 Preferences
21721 \family default
21722  panel, under the 
21723 \begin_inset Quotes eld
21724 \end_inset
21725
21726 Conversion
21727 \begin_inset Quotes erd
21728 \end_inset
21729
21730  tab.
21731  See section 
21732 \emph on
21733 Converters
21734 \emph default
21735  of the 
21736 \emph on
21737 Customization
21738 \emph default
21739  manual for general information about converters.
21740 \end_layout
21741
21742 \end_inset
21743
21744  to generate the LaTeX file.
21745 \end_layout
21746
21747 \begin_deeper
21748 \begin_layout Standard
21749 Otherwise it will just skip this step.
21750 \end_layout
21751
21752 \end_deeper
21753 \begin_layout Enumerate
21754 Finally, LaTeX is invoked and the regular post processing continues as in
21755  a plain document.
21756 \end_layout
21757
21758 \begin_layout Standard
21759 Independence from a particular 
21760 \begin_inset Quotes eld
21761 \end_inset
21762
21763 literate tool
21764 \begin_inset Quotes erd
21765 \end_inset
21766
21767  is easily achieved by changing the commands that are run by the various
21768  converters.
21769 \end_layout
21770
21771 \begin_layout Paragraph
21772 Generating the code
21773 \end_layout
21774
21775 \begin_layout Standard
21776 When the build menu option is chosen or the corresponding button in the
21777  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21778  Next, LyX invokes the 
21779 \family typewriter
21780 Noweb->Program
21781 \family default
21782  converter.
21783  This converter needs to be defined by the user and is not installed by
21784  default, though the Program format is.
21785  This converter (like any other converter) will have two parts:
21786 \end_layout
21787
21788 \begin_layout Enumerate
21789 The converter program itself.
21790  This program performs the conversion from the one format to the other (in
21791  this case, from the Noweb format to the Program pseudo-format).
21792 \end_layout
21793
21794 \begin_layout Enumerate
21795 The error log parser.
21796  This is a program whose sole purpose is to rewrite error messages in a
21797  format that LyX understands.
21798  This makes it possible for LyX to place error boxes in the right places
21799  in the file buffer.
21800 \end_layout
21801
21802 \begin_layout Standard
21803 The first part, the 
21804 \begin_inset Quotes eld
21805 \end_inset
21806
21807 Converter
21808 \begin_inset Quotes erd
21809 \end_inset
21810
21811  setting, should be set to 
21812 \begin_inset Quotes eld
21813 \end_inset
21814
21815
21816 \family typewriter
21817 build-script $$i
21818 \family default
21819  $$r
21820 \begin_inset Quotes erd
21821 \end_inset
21822
21823 .
21824  This basically means that LyX will call 
21825 \begin_inset Quotes eld
21826 \end_inset
21827
21828 build-script
21829 \begin_inset Quotes erd
21830 \end_inset
21831
21832  (a program or script) with the name of the Noweb file (normally a file
21833  in the LyX temp directory) and the directory path of the original LyX file.
21834  
21835 \end_layout
21836
21837 \begin_layout Standard
21838 This is an implementation of 
21839 \begin_inset Quotes eld
21840 \end_inset
21841
21842 build-script
21843 \begin_inset Quotes erd
21844 \end_inset
21845
21846  that you can place in a directory on your path:
21847 \end_layout
21848
21849 \begin_layout LyX-Code
21850 #!/bin/sh
21851 \end_layout
21852
21853 \begin_layout LyX-Code
21854 #
21855 \end_layout
21856
21857 \begin_layout LyX-Code
21858 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 NOWEB_OUTPUT_DIR=$2 sh
21859 \end_layout
21860
21861 \begin_layout Standard
21862 The next part of the converter setting is the 
21863 \begin_inset Quotes eld
21864 \end_inset
21865
21866 Flags
21867 \begin_inset Quotes erd
21868 \end_inset
21869
21870  which is to be set to 
21871 \begin_inset Quotes eld
21872 \end_inset
21873
21874
21875 \family typewriter
21876 parselog=$$s/scripts/listerrors
21877 \family default
21878
21879 \begin_inset Quotes erd
21880 \end_inset
21881
21882 .
21883  This will run any errors that are generated by the 
21884 \begin_inset Quotes eld
21885 \end_inset
21886
21887 build-script
21888 \begin_inset Quotes erd
21889 \end_inset
21890
21891  process through the 
21892 \begin_inset Quotes eld
21893 \end_inset
21894
21895 listerrors
21896 \begin_inset Quotes erd
21897 \end_inset
21898
21899  program.
21900 \end_layout
21901
21902 \begin_layout Standard
21903 The build will normally take place in LyX's temporary directory, so the
21904  files produced by the conversion will be in that directory.
21905  LyX will copy out what it regards as the `main' file, but the 
21906 \family typewriter
21907 Noweb->Program
21908 \family default
21909  conversion may produce several files, and so most of these would then be
21910  deleted when LyX was closed.
21911  This is why we pass in the NOWEB_OUTPUT_DIR environment variable so that
21912  the build-script scrap can place the generated files in that location.
21913 \end_layout
21914
21915 \begin_layout Paragraph
21916 Build instructions in the document
21917 \end_layout
21918
21919 \begin_layout Standard
21920 The last piece of the integration between LyX and noweb is the 
21921 \begin_inset Quotes eld
21922 \end_inset
21923
21924 build-script
21925 \begin_inset Quotes erd
21926 \end_inset
21927
21928  scrap.
21929  Generally, the instructions for building your program should be embedded
21930  in a scrap of its own.
21931  The noweb-specific 
21932 \begin_inset Quotes eld
21933 \end_inset
21934
21935 build-script
21936 \begin_inset Quotes erd
21937 \end_inset
21938
21939  above uses the notangle command to look for this scrap (called 
21940 \begin_inset Quotes eld
21941 \end_inset
21942
21943 build-script
21944 \begin_inset Quotes erd
21945 \end_inset
21946
21947 ) and runs its contents through 
21948 \begin_inset Quotes eld
21949 \end_inset
21950
21951 sh
21952 \begin_inset Quotes erd
21953 \end_inset
21954
21955 .
21956 \end_layout
21957
21958 \begin_layout Standard
21959 Typically, such a scrap would look something like this:
21960 \end_layout
21961
21962 \begin_layout LyX-Code
21963 <<build-script>>=
21964 \begin_inset Newline newline
21965 \end_inset
21966
21967 #!/bin/sh
21968 \begin_inset Newline newline
21969 \end_inset
21970
21971
21972 \begin_inset Newline newline
21973 \end_inset
21974
21975 if [ -z "${NOWEB_SOURCE}" ]
21976 \begin_inset Newline newline
21977 \end_inset
21978
21979 then
21980 \begin_inset Newline newline
21981 \end_inset
21982
21983   NOWEB_SOURCE=myfile.nw
21984 \begin_inset Newline newline
21985 \end_inset
21986
21987 fi
21988 \begin_inset Newline newline
21989 \end_inset
21990
21991 [...
21992  code to extract files ...
21993  use NOWEB_OUTPUT_DIR here ...]
21994 \begin_inset Newline newline
21995 \end_inset
21996
21997 [...
21998  code to compile files ...]
21999 \begin_inset Newline newline
22000 \end_inset
22001
22002 @
22003 \end_layout
22004
22005 \begin_layout Standard
22006 Look in 
22007 \emph on
22008 LIBDIR/examples/listerrors.lyx
22009 \emph default
22010  or in 
22011 \emph on
22012 LIBDIR/examples/Literate.lyx
22013 \emph default
22014  which implement two versions of the 
22015 \begin_inset Quotes eld
22016 \end_inset
22017
22018 listerrors
22019 \begin_inset Quotes erd
22020 \end_inset
22021
22022  program for some illustrations of how all of these pieces go together or
22023  in 
22024 \emph on
22025 LIBDIR/examples/noweb2lyx.lyx.
22026
22027 \emph default
22028  Interestingly, these three files show off the language-indepence of the
22029  LyX literate programming support since they are written in Python, C and
22030  Perl respectively.
22031 \end_layout
22032
22033 \begin_layout Subsubsection
22034 Configuring LyX
22035 \end_layout
22036
22037 \begin_layout Standard
22038 All the Literate Programming support is configured by the 
22039 \family sans
22040 Tools\SpecialChar \menuseparator
22041 Preferences
22042 \family default
22043  panel in the 
22044 \begin_inset Quotes eld
22045 \end_inset
22046
22047 File Handling
22048 \begin_inset Quotes erd
22049 \end_inset
22050
22051  tab.
22052  The important parts are:
22053 \end_layout
22054
22055 \begin_layout Description
22056 the
22057 \begin_inset space ~
22058 \end_inset
22059
22060
22061 \begin_inset Quotes eld
22062 \end_inset
22063
22064 NoWeb
22065 \begin_inset Quotes erd
22066 \end_inset
22067
22068
22069 \begin_inset space ~
22070 \end_inset
22071
22072 format Set up via the File Formats tab, this is where the Noweb-specific
22073  pieces are set up.
22074  The 
22075 \family sans
22076 GUI Name
22077 \family default
22078  is set to 
22079 \family typewriter
22080 NoWeb
22081 \family default
22082 , the file extension is set to 
22083 \family typewriter
22084 .nw
22085 \family default
22086 .
22087  This tells LyX to create a file with a 
22088 \family typewriter
22089 .nw
22090 \family default
22091  extension in the first step of the conversion process.
22092 \end_layout
22093
22094 \begin_layout Description
22095 the
22096 \begin_inset space ~
22097 \end_inset
22098
22099
22100 \family sans
22101 Program
22102 \family default
22103
22104 \begin_inset space ~
22105 \end_inset
22106
22107 format This is an empty format whose sole purpose is to be the endpoint
22108  of a conversion (which then allows us to set up a converter for it).
22109 \end_layout
22110
22111 \begin_layout Description
22112
22113 \family sans
22114 NoWeb
22115 \family default
22116 ->
22117 \family sans
22118 LaTeX
22119 \family default
22120  This converter performs the 
22121 \begin_inset Quotes eld
22122 \end_inset
22123
22124 weaving
22125 \begin_inset Quotes erd
22126 \end_inset
22127
22128  of the literate document.
22129  For Noweb, it is set to 
22130 \begin_inset Quotes eld
22131 \end_inset
22132
22133
22134 \family typewriter
22135 noweave -delay -index $$i > $$o
22136 \family default
22137
22138 \begin_inset Quotes erd
22139 \end_inset
22140
22141
22142 \end_layout
22143
22144 \begin_layout Description
22145
22146 \family sans
22147 NoWeb
22148 \family default
22149 ->
22150 \family sans
22151 Program
22152 \family default
22153  This performs the 
22154 \begin_inset Quotes eld
22155 \end_inset
22156
22157 tangling step
22158 \begin_inset Quotes erd
22159 \end_inset
22160
22161 .
22162  As stated above, the Converter is set to 
22163 \begin_inset Quotes eld
22164 \end_inset
22165
22166
22167 \family typewriter
22168 build-script $$i
22169 \family default
22170  $$r
22171 \begin_inset Quotes erd
22172 \end_inset
22173
22174 , with Flags set to 
22175 \begin_inset Quotes eld
22176 \end_inset
22177
22178
22179 \family typewriter
22180 parselog=$$s/scripts/listerrors
22181 \family default
22182
22183 \begin_inset Quotes erd
22184 \end_inset
22185
22186 .
22187 \end_layout
22188
22189 \begin_layout Subsubsection
22190 Debug extensions
22191 \end_layout
22192
22193 \begin_layout Standard
22194 There is also a new function implemented in the LyX server, the 
22195 \begin_inset Quotes eld
22196 \end_inset
22197
22198 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22199  
22200 \end_layout
22201
22202 \begin_layout Standard
22203 When debugging code with ddd/gdb, it is possible to invoke a text editor
22204  at the current execution position with a single key stroke.
22205  The default ddd configuration for that is shift-ctrl-V.
22206  It happens that you can define the editor command line invocation in ddd
22207  by accessing the 
22208 \family sans
22209 Edit\SpecialChar \menuseparator
22210 Preferences\SpecialChar \menuseparator
22211 Helpers
22212 \family default
22213  dialog and changing the "Edit Sources" entry.
22214 \end_layout
22215
22216 \begin_layout Standard
22217 I take advantage of the new
22218 \change_inserted 274215730 1350432999
22219 ly
22220 \change_unchanged
22221  created LyX server function and this ddd feature, and set 
22222 \begin_inset Quotes eld
22223 \end_inset
22224
22225 Edit Sources
22226 \begin_inset Quotes erd
22227 \end_inset
22228
22229  to:
22230 \end_layout
22231
22232 \begin_layout LyX-Code
22233 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22234 \end_layout
22235
22236 \begin_layout Standard
22237 With this, whenever you are using ddd and find a point in the program that
22238  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22239  ddd 
22240 \change_deleted 274215730 1350433047
22241 you
22242 \change_inserted 274215730 1350433047
22243 will
22244 \change_unchanged
22245  forward this information to LyX through the LyX server and then the LyX
22246  window will show the same file with the cursor at the same position ddd
22247  was pointing to.
22248  No more guessing or long scrolling to locate a point in the program back
22249  from debugging !
22250 \end_layout
22251
22252 \begin_layout Standard
22253 Note however that you must enable the LyX server to get this feature working
22254  (it is disabled by default).
22255  You can enable it in 
22256 \family sans
22257 Preferences
22258 \family default
22259  (tabs 
22260 \family sans
22261 Inputs
22262 \family default
22263
22264 \family sans
22265 Paths
22266 \family default
22267 ) by entering in the 
22268 \family sans
22269 LyXserver pipe
22270 \family default
22271  a path like 
22272 \begin_inset Quotes eld
22273 \end_inset
22274
22275
22276 \family typewriter
22277 /home/<your-home-directory>/.lyx/lyxpipe
22278 \family default
22279
22280 \begin_inset Quotes erd
22281 \end_inset
22282
22283
22284 \end_layout
22285
22286 \begin_layout Standard
22287 Read the LyX server documentation in the 
22288 \emph on
22289 Customization Manual
22290 \emph default
22291  for further information.
22292 \end_layout
22293
22294 \begin_layout Subsubsection
22295 Toolbar extensions
22296 \end_layout
22297
22298 \begin_layout Standard
22299 There are six new buttons that can be added to your LyX toolbar.
22300  Five of these buttons are short cuts to layout styles: 
22301 \family sans
22302 Standard
22303 \family default
22304
22305 \family sans
22306 Section
22307 \family default
22308
22309 \family sans
22310 LaTeX
22311 \family default
22312
22313 \family sans
22314 LyX-Code
22315 \family default
22316 , and 
22317 \family sans
22318 Scrap
22319 \family default
22320 .
22321  The last one is a short cut to the 
22322 \begin_inset Quotes eld
22323 \end_inset
22324
22325 Build Program
22326 \begin_inset Quotes erd
22327 \end_inset
22328
22329  File menu entry.
22330  
22331 \end_layout
22332
22333 \begin_layout Standard
22334 LyX has a range of buttons that are available for tool bar customization.
22335  In my toolbar I like to combine the six short cuts above with two more:
22336  One for 
22337 \family sans
22338 View
22339 \family default
22340 \SpecialChar \menuseparator
22341
22342 \family sans
22343 Update
22344 \family default
22345 \SpecialChar \menuseparator
22346
22347 \family sans
22348 DVI
22349 \family default
22350  and the other for 
22351 \family sans
22352 View\SpecialChar \menuseparator
22353 DVI
22354 \family default
22355  File menu entries.
22356  Here is how it looks like:
22357 \end_layout
22358
22359 \begin_layout LyX-Code
22360 Toolbar
22361 \end_layout
22362
22363 \begin_layout LyX-Code
22364   Layouts
22365 \end_layout
22366
22367 \begin_layout LyX-Code
22368   Icon "layout Standard"
22369 \end_layout
22370
22371 \begin_layout LyX-Code
22372   Icon "layout Section"
22373 \end_layout
22374
22375 \begin_layout LyX-Code
22376   Icon "layout LaTeX"
22377 \end_layout
22378
22379 \begin_layout LyX-Code
22380   Icon "layout LyX-Code"
22381 \end_layout
22382
22383 \begin_layout LyX-Code
22384   Icon "layout Scrap"
22385 \end_layout
22386
22387 \begin_layout LyX-Code
22388   Separator
22389 \end_layout
22390
22391 \begin_layout LyX-Code
22392   Icon "buffer-view"
22393 \end_layout
22394
22395 \begin_layout LyX-Code
22396   Icon "buffer-typeset"
22397 \end_layout
22398
22399 \begin_layout LyX-Code
22400   Icon "build-program"
22401 \end_layout
22402
22403 \begin_layout LyX-Code
22404   Separator
22405 \end_layout
22406
22407 \begin_layout LyX-Code
22408 .
22409 \end_layout
22410
22411 \begin_layout LyX-Code
22412 .
22413 \end_layout
22414
22415 \begin_layout LyX-Code
22416 .
22417 \end_layout
22418
22419 \begin_layout LyX-Code
22420 End
22421 \end_layout
22422
22423 \begin_layout Subsubsection
22424 Colors customization
22425 \end_layout
22426
22427 \begin_layout Standard
22428 There are a number of colors in LyX that can be customized in 
22429 \family sans
22430 Preferences
22431 \family default
22432 .
22433  One of the things that bothers people is the LaTeX font color.
22434  The default color is red, since the scraps uses LaTeX font, and there is
22435  a lot of scraps in literate documents, you may get tired of seeing everything
22436  in red.
22437  You can change it by going to the tabs 
22438 \family sans
22439 Look&Feel
22440 \family default
22441
22442 \family sans
22443 Colors.
22444 \end_layout
22445
22446 \begin_layout Standard
22447 The next thing is the visible presence of the newline character in the screen.
22448  You can choose the color of this particular character and make it blend
22449  in the background.
22450  I recommend you choosing a color that is close to the background but not
22451  equal, that way you still can see it is there, but it is not bothering
22452  you anymore.
22453
22454 \change_deleted 274215730 1350434691
22455  
22456 \change_inserted 274215730 1350434708
22457
22458 \end_layout
22459
22460 \begin_layout Subsection
22461
22462 \change_inserted 274215730 1350434732
22463 LyX and knitr/Sweave
22464 \end_layout
22465
22466 \begin_layout Standard
22467
22468 \change_inserted 274215730 1350434777
22469 Support for knitr and Sweave is documented in the knitr.lyx example file
22470  and in the Sweave manual (in the Help > Specific Manuals submenu).
22471 \change_unchanged
22472
22473 \end_layout
22474
22475 \begin_layout Chapter
22476 Special features
22477 \end_layout
22478
22479 \begin_layout Standard
22480 You can do everything with LyX that you can do with LaTeX.
22481  However, LyX cannot support every LaTeX feature directly.
22482  But you can always use TeX Code.
22483  This chapter shows you some more special things you might want to use.
22484  For other special things you can do with figures, tables, floats, boxes
22485  and notes, have a look at the 
22486 \emph on
22487 Embedded
22488 \begin_inset space ~
22489 \end_inset
22490
22491 Objects
22492 \emph default
22493  manual.
22494 \end_layout
22495
22496 \begin_layout Section
22497 Multiple Text Columns
22498 \end_layout
22499
22500 \begin_layout Standard
22501 This feature is independent of the option 
22502 \family sans
22503 Two-column document
22504 \family default
22505  in the document settings under 
22506 \family sans
22507 Text Layout
22508 \family default
22509 .
22510  If you want to have 2
22511 \begin_inset space ~
22512 \end_inset
22513
22514 columns for the whole document, it is recommended to use the 
22515 \family sans
22516 Two-column document
22517 \family default
22518  option.
22519  For all other cases use this feature.
22520 \end_layout
22521
22522 \begin_layout Standard
22523 To use multiple text columns in your document, you have to load the module
22524  
22525 \family sans
22526 Multiple Columns
22527 \family default
22528  (menu 
22529 \family sans
22530 Document\SpecialChar \menuseparator
22531 Settings\SpecialChar \menuseparator
22532 Modules
22533 \family default
22534 ) and must have the LaTeX-package 
22535 \series bold
22536 multicol
22537 \series default
22538
22539 \begin_inset Index idx
22540 status collapsed
22541
22542 \begin_layout Plain Layout
22543 LaTeX-packages ! multicol
22544 \end_layout
22545
22546 \end_inset
22547
22548  installed.
22549 \end_layout
22550
22551 \begin_layout Standard
22552 Footnotes within multiple columns will be placed at the bottom of the page
22553  and not under each column.
22554  Within the different columns you can use everything, with the limitation
22555  that for floats you need to use the float option 
22556 \family sans
22557 Span columns
22558 \family default
22559 .
22560 \end_layout
22561
22562 \begin_layout Subsection
22563 Basics
22564 \end_layout
22565
22566 \begin_layout Standard
22567 If you want to have 2
22568 \begin_inset space ~
22569 \end_inset
22570
22571 columns in your text, use the style 
22572 \family sans
22573 Begin Multiple Columns
22574 \family default
22575  where the columns should start.
22576  The content of the style is the number of the columns, so in this case
22577  use a 
22578 \begin_inset Quotes eld
22579 \end_inset
22580
22581 2
22582 \begin_inset Quotes erd
22583 \end_inset
22584
22585 .
22586  At the point where the columns should end use the style 
22587 \family sans
22588 End Multiple Columns
22589 \family default
22590  and keep it empty.
22591 \end_layout
22592
22593 \begin_layout Standard
22594 Here is an example:
22595 \end_layout
22596
22597 \begin_layout Begin Multiple Columns
22598 2
22599 \end_layout
22600
22601 \begin_layout Standard
22602 \noindent
22603
22604 \series bold
22605 \size small
22606 The Adventure of the Empty House
22607 \series default
22608
22609 \begin_inset Newline newline
22610 \end_inset
22611
22612 by 
22613 \noun on
22614 Sir Arthur Conan Doyle
22615 \end_layout
22616
22617 \begin_layout Standard
22618
22619 \size small
22620 It was in the spring of the year 1894 that all London was interested, and
22621  the fashionable world dismayed, by the murder of the Honourable Ronald
22622  Adair under most unusual and inexplicable circumstances.
22623  The public has already learned those particulars of the crime which came
22624  out in the police investigation, but a good deal was suppressed upon that
22625  occasion, since the case for the prosecution was so overwhelmingly strong
22626  that it was not necessary to bring forward all the facts.
22627  Only now, at the end of nearly ten years, am I allowed to supply those
22628  missing links which make up the whole of that remarkable chain.
22629  The crime was of interest in itself, but that interest was as nothing to
22630  me compared to the inconceivable sequel, which afforded me the greatest
22631  shock and surprise of any event in my adventurous life.
22632  Even now, after this long interval, I find myself thrilling as I think
22633  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22634 ty which utterly submerged my mind.
22635  Let me say to that public, which has shown some interest in those glimpses
22636  which I have occasionally given them of the thoughts and actions of a very
22637  remarkable man, that they are not to blame me if I have not shared my knowledge
22638  with them, for I should have considered it my first duty to do so, had
22639  I not been barred by a positive prohibition from his own lips, which was
22640  only withdrawn upon the third of last month.
22641 \end_layout
22642
22643 \begin_layout End Multiple Columns
22644
22645 \end_layout
22646
22647 \begin_layout Standard
22648 Here is an example with 3
22649 \begin_inset space ~
22650 \end_inset
22651
22652 columns:
22653 \end_layout
22654
22655 \begin_layout Begin Multiple Columns
22656 3
22657 \end_layout
22658
22659 \begin_layout Standard
22660
22661 \size footnotesize
22662 It can be imagined that my close intimacy with Sherlock Holmes had interested
22663  me deeply in crime, and that after his disappearance I never failed to
22664  read with care the various problems which came before the public.
22665  And I even attempted, more than once, for my own private satisfaction,
22666  to employ his methods in their solution, though with indifferent success.
22667  There was none, however, which appealed to me like this tragedy of Ronald
22668  Adair.
22669  As I read the evidence at the inquest, which led up to a verdict of willful
22670  murder against some person or persons unknown, I realized more clearly
22671  than I had ever done the loss which the community had sustained by the
22672  death of Sherlock Holmes.
22673  There were points about this strange business which would, I was sure,
22674  have specially appealed to him, and the efforts of the police would have
22675  been supplemented, or more probably anticipated, by the trained observation
22676  and the alert mind of the first criminal agent in Europe.
22677  All day, as I drove upon my round, I turned over the case in my mind and
22678  found no explanation which appeared to me to be adequate.
22679  At the risk of telling a twice-told tale, I will recapitulate the facts
22680  as they were known to the public at the conclusion of the inquest.
22681 \end_layout
22682
22683 \begin_layout End Multiple Columns
22684
22685 \end_layout
22686
22687 \begin_layout Standard
22688 You can have up to 10
22689 \begin_inset space ~
22690 \end_inset
22691
22692 columns if you want to, but that might not be very pleasant for the readers
22693  of your document.
22694 \end_layout
22695
22696 \begin_layout Standard
22697 \begin_inset Newpage newpage
22698 \end_inset
22699
22700
22701 \end_layout
22702
22703 \begin_layout Subsection
22704 Columns inside Columns
22705 \end_layout
22706
22707 \begin_layout Standard
22708 You can also have columns inside columns:
22709 \end_layout
22710
22711 \begin_layout Begin Multiple Columns
22712 2
22713 \end_layout
22714
22715 \begin_layout Standard
22716
22717 \size footnotesize
22718 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22719  at that time governor of one of the Australian colonies.
22720  Adair's mother had returned from Australia to undergo the operation for
22721  cataract, and she, her son Ronald, and her daughter Hilda were living together
22722  at 427 Park Lane.
22723 \end_layout
22724
22725 \begin_layout Begin Multiple Columns
22726 2
22727 \end_layout
22728
22729 \begin_layout Standard
22730
22731 \size footnotesize
22732 The youth moved in the best society–had, so far as was known, no enemies
22733  and no particular vices.
22734  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22735  had been broken off by mutual consent some months before, and there was
22736  no sign that it had left any very profound feeling behind it.
22737  For the rest {sic} the man's life moved in a narrow and conventional circle,
22738  for his habits were quiet and his nature unemotional.
22739  Yet it was upon this easy-going young aristocrat that death came, in most
22740  strange and unexpected form, between the hours of ten and eleven-twenty
22741  on the night of March 30, 1894.
22742 \end_layout
22743
22744 \begin_layout End Multiple Columns
22745
22746 \end_layout
22747
22748 \begin_layout Standard
22749
22750 \size footnotesize
22751 Ronald Adair was fond of cards–playing continually, but never for such stakes
22752  as would hurt him.
22753  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22754  It was shown that, after dinner on the day of his death, he had played
22755  a rubber of whist at the latter club.
22756  He had also played there in the afternoon.
22757
22758 \size default
22759  
22760 \size footnotesize
22761 The evidence of those who had played with him– Mr.
22762  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22763  and that there was a fairly equal fall of the cards.
22764  Adair might have lost five pounds, but not more.
22765  His fortune was a considerable one, and such a loss could not in any way
22766  affect him.
22767  He had played nearly every day at one club or other, but he was a cautious
22768  player, and usually rose a winner.
22769  It came out in evidence that, in partnership with Colonel Moran, he had
22770  actually won as much as four hundred and twenty pounds in a sitting, some
22771  weeks before, from Godfrey Milner and Lord Balmoral.
22772  So much for his recent history as it came out at the inquest.
22773 \end_layout
22774
22775 \begin_layout End Multiple Columns
22776
22777 \end_layout
22778
22779 \begin_layout Subsection
22780 Advanced Examples
22781 \end_layout
22782
22783 \begin_layout Standard
22784 The examples in this section show some more special features of multiple
22785  columns.
22786 \end_layout
22787
22788 \begin_layout Standard
22789 For more features of multiple columns, have a look at the documentation
22790  of the LaTeX-package 
22791 \series bold
22792 multicol
22793 \series default
22794
22795 \begin_inset Index idx
22796 status collapsed
22797
22798 \begin_layout Plain Layout
22799 LaTeX-packages ! multicol
22800 \end_layout
22801
22802 \end_inset
22803
22804
22805 \begin_inset CommandInset citation
22806 LatexCommand cite
22807 key "multicol"
22808
22809 \end_inset
22810
22811 .
22812 \end_layout
22813
22814 \begin_layout Subsubsection
22815 Preface
22816 \end_layout
22817
22818 \begin_layout Standard
22819 To add a preface text for multiple columns, add the command
22820 \end_layout
22821
22822 \begin_layout Standard
22823
22824 \series bold
22825 }[
22826 \end_layout
22827
22828 \begin_layout Standard
22829 as TeX Code behind the number of columns in the
22830 \family sans
22831  Begin Multiple Columns
22832 \family default
22833  style.
22834  Behind the command follows the preface text.
22835  At the end of the style use the command
22836 \end_layout
22837
22838 \begin_layout Standard
22839
22840 \series bold
22841 ]{
22842 \end_layout
22843
22844 \begin_layout Standard
22845 as TeX Code.
22846  An example with some preface text:
22847 \end_layout
22848
22849 \begin_layout Standard
22850 \begin_inset VSpace bigskip
22851 \end_inset
22852
22853
22854 \end_layout
22855
22856 \begin_layout Begin Multiple Columns
22857 2
22858 \begin_inset ERT
22859 status collapsed
22860
22861 \begin_layout Plain Layout
22862
22863 }[
22864 \end_layout
22865
22866 \end_inset
22867
22868 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22869
22870 \begin_inset ERT
22871 status collapsed
22872
22873 \begin_layout Plain Layout
22874
22875 ]{
22876 \end_layout
22877
22878 \end_inset
22879
22880
22881 \end_layout
22882
22883 \begin_layout Standard
22884
22885 \size small
22886 On the evening of the crime, he returned from the club exactly at ten.
22887  His mother and sister were out spending the evening with a relation.
22888  The servant deposed that she heard him enter the front room on the second
22889  floor, generally used as his sitting-room.
22890  She had lit a fire there, and as it smoked she had opened the window.
22891  No sound was heard from the room until eleven-twenty, the hour of the return
22892  of Lady Maynooth and her daughter.
22893  Desiring to say good-night, she attempted to enter her son's room.
22894  The door was locked on the inside, and no answer could be got to their
22895  cries and knocking.
22896  Help was obtained, and the door forced.
22897  The unfortunate young man was found lying near the table.
22898  His head had been horribly mutilated by an expanding revolver bullet, but
22899  no weapon of any sort was to be found in the room.
22900 \end_layout
22901
22902 \begin_layout End Multiple Columns
22903
22904 \end_layout
22905
22906 \begin_layout Standard
22907 You can also use a section heading as the preface if you use a section command
22908  as TeX Code behind the first TeX Code.
22909  For example the command
22910 \end_layout
22911
22912 \begin_layout Standard
22913
22914 \series bold
22915
22916 \backslash
22917 subsection{subsection title}
22918 \end_layout
22919
22920 \begin_layout Standard
22921 creates a subsection.
22922  In this example the preface is a subsubsection:
22923 \end_layout
22924
22925 \begin_layout Begin Multiple Columns
22926 2
22927 \begin_inset ERT
22928 status collapsed
22929
22930 \begin_layout Plain Layout
22931
22932 }[
22933 \end_layout
22934
22935 \end_inset
22936
22937
22938 \begin_inset ERT
22939 status collapsed
22940
22941 \begin_layout Plain Layout
22942
22943
22944 \backslash
22945 subsubsection{
22946 \end_layout
22947
22948 \end_inset
22949
22950 This is a subsubsection heading as a preface
22951 \begin_inset ERT
22952 status collapsed
22953
22954 \begin_layout Plain Layout
22955
22956 }
22957 \end_layout
22958
22959 \end_inset
22960
22961
22962 \begin_inset ERT
22963 status collapsed
22964
22965 \begin_layout Plain Layout
22966
22967 ]{
22968 \end_layout
22969
22970 \end_inset
22971
22972
22973 \end_layout
22974
22975 \begin_layout Standard
22976
22977 \size small
22978 A minute examination of the circumstances served only to make the case more
22979  complex.
22980  In the first place, no reason could be given why the young man should have
22981  fastened the door upon the inside.
22982  There was the possibility that the murderer had done this, and had afterwards
22983  escaped by the window.
22984  The drop was at least twenty feet, however, and a bed of crocuses in full
22985  bloom lay beneath.
22986  Neither the flowers nor the earth showed any sign of having been disturbed,
22987  nor were there any marks upon the narrow strip of grass which separated
22988  the house from the road.
22989  Apparently, therefore, it was the young man himself who had fastened the
22990  door.
22991  But how did he come by his death? No one could have climbed up to the window
22992  without leaving traces.
22993  Suppose a man had fired through the window, he would indeed be a remarkable
22994  shot who could with a revolver inflict so deadly a wound.
22995  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22996  a hundred yards of the house.
22997  No one had heard a shot.
22998 \end_layout
22999
23000 \begin_layout End Multiple Columns
23001
23002 \end_layout
23003
23004 \begin_layout Standard
23005 If there is less vertical space left on the page at the beginning of the
23006  multiple columns than needed for 6
23007 \begin_inset space ~
23008 \end_inset
23009
23010 text lines, a page break will be inserted before the multiple columns.
23011  Depending on the number of lines of the preface text, you might want to
23012  change this value.
23013  It is determined by inserting the command
23014 \end_layout
23015
23016 \begin_layout Standard
23017
23018 \series bold
23019 ][number
23020 \backslash
23021 baselineskip
23022 \end_layout
23023
23024 \begin_layout Standard
23025 as TeX Code behind the preface definition but before the final 
23026 \series bold
23027 ]{
23028 \series default
23029  command.
23030  
23031 \emph on
23032 number
23033 \emph default
23034  is hereby the number of text lines.
23035  In this example the space is set to 7
23036 \begin_inset space ~
23037 \end_inset
23038
23039 text lines:
23040 \end_layout
23041
23042 \begin_layout Begin Multiple Columns
23043 2
23044 \begin_inset ERT
23045 status collapsed
23046
23047 \begin_layout Plain Layout
23048
23049 }[
23050 \end_layout
23051
23052 \end_inset
23053
23054
23055 \begin_inset ERT
23056 status collapsed
23057
23058 \begin_layout Plain Layout
23059
23060
23061 \backslash
23062 subsubsection{
23063 \end_layout
23064
23065 \end_inset
23066
23067 This is the sectioning command
23068 \begin_inset Newline newline
23069 \end_inset
23070
23071 as a preface and
23072 \begin_inset Newline newline
23073 \end_inset
23074
23075 with multiple text lines
23076 \begin_inset ERT
23077 status collapsed
23078
23079 \begin_layout Plain Layout
23080
23081 }
23082 \end_layout
23083
23084 \end_inset
23085
23086
23087 \begin_inset ERT
23088 status collapsed
23089
23090 \begin_layout Plain Layout
23091
23092 ][7
23093 \backslash
23094 baselineskip
23095 \end_layout
23096
23097 \end_inset
23098
23099
23100 \begin_inset ERT
23101 status collapsed
23102
23103 \begin_layout Plain Layout
23104
23105 ]{
23106 \end_layout
23107
23108 \end_inset
23109
23110
23111 \end_layout
23112
23113 \begin_layout Standard
23114
23115 \size small
23116 On the evening of the crime, he returned from the club exactly at ten.
23117  His mother and sister were out spending the evening with a relation.
23118  The servant deposed that she heard him enter the front room on the second
23119  floor, generally used as his sitting-room.
23120  She had lit a fire there, and as it smoked she had opened the window.
23121  No sound was heard from the room until eleven-twenty, the hour of the return
23122  of Lady Maynooth and her daughter.
23123  Desiring to say good-night, she attempted to enter her son's room.
23124  The door was locked on the inside, and no answer could be got to their
23125  cries and knocking.
23126  Help was obtained, and the door forced.
23127  The unfortunate young man was found lying near the table.
23128  His head had been horribly mutilated by an expanding revolver bullet, but
23129  no weapon of any sort was to be found in the room.
23130 \end_layout
23131
23132 \begin_layout End Multiple Columns
23133
23134 \end_layout
23135
23136 \begin_layout Subsubsection
23137 Surrounding Space
23138 \end_layout
23139
23140 \begin_layout Standard
23141 The amount of space before and after multiple columns can be changed by
23142  changing the length 
23143 \series bold
23144
23145 \backslash
23146 multicolsep
23147 \series default
23148 .
23149  For example the command
23150 \end_layout
23151
23152 \begin_layout Standard
23153
23154 \series bold
23155
23156 \backslash
23157 setlength{
23158 \backslash
23159 multicolsep}{3cm}
23160 \end_layout
23161
23162 \begin_layout Standard
23163 in TeX Code changes its value to 3
23164 \begin_inset space \thinspace{}
23165 \end_inset
23166
23167 cm.
23168  The change must be made before the multiple columns' start.
23169  The predefined value is 13
23170 \begin_inset space \thinspace{}
23171 \end_inset
23172
23173 pt.
23174 \end_layout
23175
23176 \begin_layout Standard
23177 For this example 
23178 \series bold
23179
23180 \backslash
23181 multicolsep
23182 \series default
23183  was set to 2.5
23184 \begin_inset space \thinspace{}
23185 \end_inset
23186
23187 cm:
23188 \end_layout
23189
23190 \begin_layout Standard
23191 \begin_inset ERT
23192 status open
23193
23194 \begin_layout Plain Layout
23195
23196
23197 \backslash
23198 setlength{
23199 \backslash
23200 multicolsep}{2.5cm}
23201 \end_layout
23202
23203 \end_inset
23204
23205
23206 \end_layout
23207
23208 \begin_layout Begin Multiple Columns
23209 2
23210 \end_layout
23211
23212 \begin_layout Standard
23213
23214 \size small
23215 All day I turned these facts over in my mind, endeavouring to hit upon some
23216  theory which could reconcile them all, and to find that line of least resistanc
23217 e which my poor friend had declared to be the starting-point of every investigat
23218 ion.
23219  I confess that I made little progress.
23220  In the evening I strolled across the Park, and found myself about six o'clock
23221  at the Oxford Street end of Park Lane.
23222  A group of loafers upon the pavements, all staring up at a particular window,
23223  directed me to the house which I had come to see.
23224  A tall, thin man with coloured glasses, whom I strongly suspected of being
23225  a plain-clothes detective, was pointing out some theory of his own, while
23226  the others crowded round to listen to what he said.
23227  I got as near him as I could, but his observations seemed to me to be absurd,
23228  so I withdrew again in some disgust.
23229  As I did so I struck against an elderly, deformed man, who had been behind
23230  me, and I knocked down several books which he was carrying.
23231 \end_layout
23232
23233 \begin_layout End Multiple Columns
23234
23235 \end_layout
23236
23237 \begin_layout Standard
23238 \begin_inset Note Greyedout
23239 status open
23240
23241 \begin_layout Plain Layout
23242
23243 \series bold
23244 Note:
23245 \series default
23246  The values you set with 
23247 \series bold
23248
23249 \backslash
23250 setlength
23251 \series default
23252  will be used for all following multiple columns until you change them again.
23253 \end_layout
23254
23255 \end_inset
23256
23257
23258 \end_layout
23259
23260 \begin_layout Standard
23261 \begin_inset ERT
23262 status collapsed
23263
23264 \begin_layout Plain Layout
23265
23266
23267 \backslash
23268 setlength{
23269 \backslash
23270 multicolsep}{13pt}
23271 \end_layout
23272
23273 \end_inset
23274
23275
23276 \begin_inset Note Note
23277 status collapsed
23278
23279 \begin_layout Plain Layout
23280 go back to the default
23281 \end_layout
23282
23283 \end_inset
23284
23285
23286 \end_layout
23287
23288 \begin_layout Standard
23289 \begin_inset Newpage newpage
23290 \end_inset
23291
23292
23293 \end_layout
23294
23295 \begin_layout Subsubsection
23296 Column Separation
23297 \end_layout
23298
23299 \begin_layout Standard
23300 The width of the columns is automatically calculated, but you can modify
23301  the space between the columns.
23302  This is done by changing the length 
23303 \series bold
23304
23305 \backslash
23306 columnsep
23307 \series default
23308 .
23309  Its predefined value is 10
23310 \begin_inset space \thinspace{}
23311 \end_inset
23312
23313 pt.
23314  Here is an example where 
23315 \series bold
23316
23317 \backslash
23318 columnsep
23319 \series default
23320  is set to 3
23321 \begin_inset space \thinspace{}
23322 \end_inset
23323
23324 cm:
23325 \end_layout
23326
23327 \begin_layout Standard
23328 \begin_inset ERT
23329 status open
23330
23331 \begin_layout Plain Layout
23332
23333
23334 \backslash
23335 setlength{
23336 \backslash
23337 columnsep}{3cm}
23338 \end_layout
23339
23340 \end_inset
23341
23342
23343 \end_layout
23344
23345 \begin_layout Begin Multiple Columns
23346 2
23347 \end_layout
23348
23349 \begin_layout Standard
23350
23351 \size small
23352 My observations of No.
23353 \begin_inset space \space{}
23354 \end_inset
23355
23356 427 Park Lane did little to clear up the problem in which I was interested.
23357  The house was separated from the street by a low wall and railing, the
23358  whole not more than five feet high.
23359  It was perfectly easy, therefore, for anyone to get into the garden, but
23360  the window was entirely inaccessible, since there was no water pipe or
23361  anything which could help the most active man to climb it.
23362  More puzzled than ever, I retraced my steps to Kensington.
23363  I had not been in my study five minutes when the maid entered to say that
23364  a person desired to see me.
23365  To my astonishment it was none other than my strange old book collector,
23366  his sharp, wizened face peering out from a frame of white hair, and his
23367  precious volumes, a dozen of them at least, wedged under his right arm.
23368 \end_layout
23369
23370 \begin_layout End Multiple Columns
23371
23372 \end_layout
23373
23374 \begin_layout Standard
23375 \begin_inset ERT
23376 status collapsed
23377
23378 \begin_layout Plain Layout
23379
23380
23381 \backslash
23382 setlength{
23383 \backslash
23384 columnsep}{10pt}
23385 \end_layout
23386
23387 \end_inset
23388
23389
23390 \begin_inset Note Note
23391 status collapsed
23392
23393 \begin_layout Plain Layout
23394 go back to the default
23395 \end_layout
23396
23397 \end_inset
23398
23399
23400 \end_layout
23401
23402 \begin_layout Subsubsection
23403 Vertical Lines
23404 \end_layout
23405
23406 \begin_layout Standard
23407 Between the columns a rule with a width of the length 
23408 \series bold
23409
23410 \backslash
23411 columnseprule
23412 \series default
23413  is placed.
23414  If this rule width is set to 0
23415 \begin_inset space \thinspace{}
23416 \end_inset
23417
23418 pt (this is the default), the rule is suppressed.
23419  In the following example the line is 2
23420 \begin_inset space \thinspace{}
23421 \end_inset
23422
23423 pt wide:
23424 \end_layout
23425
23426 \begin_layout Standard
23427 \begin_inset ERT
23428 status open
23429
23430 \begin_layout Plain Layout
23431
23432
23433 \backslash
23434 setlength{
23435 \backslash
23436 columnseprule}{2pt}
23437 \end_layout
23438
23439 \end_inset
23440
23441
23442 \end_layout
23443
23444 \begin_layout Begin Multiple Columns
23445 2
23446 \end_layout
23447
23448 \begin_layout Standard
23449
23450 \size small
23451 \begin_inset Quotes eld
23452 \end_inset
23453
23454 You're surprised to see me, sir,
23455 \begin_inset Quotes erd
23456 \end_inset
23457
23458  said he, in a strange, croaking voice.
23459 \end_layout
23460
23461 \begin_layout Standard
23462
23463 \size small
23464 I acknowledged that I was.
23465 \end_layout
23466
23467 \begin_layout Standard
23468
23469 \size small
23470 \begin_inset Quotes eld
23471 \end_inset
23472
23473 Well, I've a conscience, sir, and when I chanced to see you go into this
23474  house, as I came hobbling after you, I thought to myself, I'll just step
23475  in and see that kind gentleman, and tell him that if I was a bit gruff
23476  in my manner there was not any harm meant, and that I am much obliged to
23477  him for picking up my books.
23478 \begin_inset Quotes erd
23479 \end_inset
23480
23481
23482 \end_layout
23483
23484 \begin_layout Standard
23485
23486 \size small
23487 \begin_inset Quotes eld
23488 \end_inset
23489
23490 You make too much of a trifle,
23491 \begin_inset Quotes erd
23492 \end_inset
23493
23494  said I.
23495  
23496 \begin_inset Quotes eld
23497 \end_inset
23498
23499 May I ask how you knew who I was?
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 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23513  you'll find my little bookshop at the corner of Church Street, and very
23514  happy to see you, I am sure.
23515  Maybe you collect yourself, sir.
23516  Here's 
23517 \noun on
23518 British
23519 \begin_inset space ~
23520 \end_inset
23521
23522 Birds
23523 \noun default
23524 , and 
23525 \noun on
23526 Catullus
23527 \noun default
23528 , and 
23529 \noun on
23530 The Holy War
23531 \noun default
23532 --a bargain, every one of them.
23533  With five volumes you could just fill that gap on that second shelf.
23534  It looks untidy, does it not, sir?
23535 \begin_inset Quotes erd
23536 \end_inset
23537
23538
23539 \end_layout
23540
23541 \begin_layout End Multiple Columns
23542
23543 \end_layout
23544
23545 \begin_layout Standard
23546 \begin_inset ERT
23547 status collapsed
23548
23549 \begin_layout Plain Layout
23550
23551
23552 \backslash
23553 setlength{
23554 \backslash
23555 columnseprule}{0pt}
23556 \end_layout
23557
23558 \end_inset
23559
23560
23561 \begin_inset Note Note
23562 status collapsed
23563
23564 \begin_layout Plain Layout
23565 go back to the default
23566 \end_layout
23567
23568 \end_inset
23569
23570
23571 \end_layout
23572
23573 \begin_layout Standard
23574 \begin_inset Newpage newpage
23575 \end_inset
23576
23577
23578 \end_layout
23579
23580 \begin_layout Section
23581 Non-standard Paragraph Shapes
23582 \end_layout
23583
23584 \begin_layout Standard
23585 \begin_inset ERT
23586 status collapsed
23587
23588 \begin_layout Plain Layout
23589
23590
23591 \backslash
23592 begin{sloppypar}
23593 \end_layout
23594
23595 \end_inset
23596
23597
23598 \end_layout
23599
23600 \begin_layout Standard
23601 \begin_inset ERT
23602 status collapsed
23603
23604 \begin_layout Plain Layout
23605
23606
23607 \backslash
23608 newdimen
23609 \backslash
23610 varunit 
23611 \end_layout
23612
23613 \begin_layout Plain Layout
23614
23615
23616 \backslash
23617 setlength{
23618 \backslash
23619 varunit}{4.5in}
23620 \end_layout
23621
23622 \end_inset
23623
23624
23625 \end_layout
23626
23627 \begin_layout Standard
23628 \noindent
23629 \begin_inset ERT
23630 status collapsed
23631
23632 \begin_layout Plain Layout
23633
23634
23635 \backslash
23636 parshape 19 0.45
23637 \backslash
23638 varunit 0.332
23639 \backslash
23640 varunit
23641 \end_layout
23642
23643 \begin_layout Plain Layout
23644
23645 0.40
23646 \backslash
23647 varunit 0.300
23648 \backslash
23649 varunit
23650 \end_layout
23651
23652 \begin_layout Plain Layout
23653
23654 0.35
23655 \backslash
23656 varunit 0.293
23657 \backslash
23658 varunit
23659 \end_layout
23660
23661 \begin_layout Plain Layout
23662
23663 0.30
23664 \backslash
23665 varunit 0.300
23666 \backslash
23667 varunit
23668 \end_layout
23669
23670 \begin_layout Plain Layout
23671
23672 0.25
23673 \backslash
23674 varunit 0.317
23675 \backslash
23676 varunit
23677 \end_layout
23678
23679 \begin_layout Plain Layout
23680
23681 0.20
23682 \backslash
23683 varunit 0.342
23684 \backslash
23685 varunit
23686 \end_layout
23687
23688 \begin_layout Plain Layout
23689
23690 0.15
23691 \backslash
23692 varunit 0.373
23693 \backslash
23694 varunit
23695 \end_layout
23696
23697 \begin_layout Plain Layout
23698
23699 0.10
23700 \backslash
23701 varunit 0.410
23702 \backslash
23703 varunit
23704 \end_layout
23705
23706 \begin_layout Plain Layout
23707
23708 0.05
23709 \backslash
23710 varunit 0.453
23711 \backslash
23712 varunit
23713 \end_layout
23714
23715 \begin_layout Plain Layout
23716
23717 0.00
23718 \backslash
23719 varunit 0.500
23720 \backslash
23721 varunit
23722 \end_layout
23723
23724 \begin_layout Plain Layout
23725
23726 0.05
23727 \backslash
23728 varunit 0.453
23729 \backslash
23730 varunit
23731 \end_layout
23732
23733 \begin_layout Plain Layout
23734
23735 0.10
23736 \backslash
23737 varunit 0.410
23738 \backslash
23739 varunit
23740 \end_layout
23741
23742 \begin_layout Plain Layout
23743
23744 0.15
23745 \backslash
23746 varunit 0.373
23747 \backslash
23748 varunit
23749 \end_layout
23750
23751 \begin_layout Plain Layout
23752
23753 0.20
23754 \backslash
23755 varunit 0.342
23756 \backslash
23757 varunit
23758 \end_layout
23759
23760 \begin_layout Plain Layout
23761
23762 0.25
23763 \backslash
23764 varunit 0.317
23765 \backslash
23766 varunit
23767 \end_layout
23768
23769 \begin_layout Plain Layout
23770
23771 0.30
23772 \backslash
23773 varunit 0.300
23774 \backslash
23775 varunit
23776 \end_layout
23777
23778 \begin_layout Plain Layout
23779
23780 0.35
23781 \backslash
23782 varunit 0.293
23783 \backslash
23784 varunit
23785 \end_layout
23786
23787 \begin_layout Plain Layout
23788
23789 0.40
23790 \backslash
23791 varunit 0.300
23792 \backslash
23793 varunit
23794 \end_layout
23795
23796 \begin_layout Plain Layout
23797
23798 0.45
23799 \backslash
23800 varunit 0.332
23801 \backslash
23802 varunit
23803 \end_layout
23804
23805 \begin_layout Plain Layout
23806
23807 \end_layout
23808
23809 \end_inset
23810
23811 There are times when the tyranny of rectangular paragraphs must be overthrown.
23812  In such situations, a call to the delightful plain TeX command 
23813 \family typewriter
23814
23815 \backslash
23816 parshape
23817 \family default
23818  is called for.
23819  As you can see, completely arbitrary shapes can be laid out with a suitable
23820  set of line length definitions.
23821  While this parshape may look a bit silly and useless, one could conceive
23822  of situations such as finely tuned dropped capitals, word wrapping around
23823  non-rectangular graphics, etc.
23824  which will benefit from such handcrafting.
23825 \end_layout
23826
23827 \begin_layout Standard
23828 \begin_inset VSpace bigskip
23829 \end_inset
23830
23831
23832 \end_layout
23833
23834 \begin_layout Standard
23835 The syntax is 
23836 \family typewriter
23837
23838 \backslash
23839 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23840  #nindent #nlength
23841 \family default
23842 , where 
23843 \family typewriter
23844 numlines
23845 \family default
23846  is the number of lines of text which define the paragraph.
23847  If there turn out to be fewer lines, the shape is truncated; if there are
23848  more, the excess lines have the same dimensions as the last line of the
23849  definition.
23850  The 
23851 \family typewriter
23852 #nindent
23853 \family default
23854  and 
23855 \family typewriter
23856 #nlength
23857 \family default
23858  entries specify the indentation of the line from the left margin, and the
23859  length of the line as measured from that point.
23860  The shape applies only to the current paragraph; everything is reset to
23861  normal for the next paragraph.
23862 \end_layout
23863
23864 \begin_layout Standard
23865 \begin_inset ERT
23866 status collapsed
23867
23868 \begin_layout Plain Layout
23869
23870
23871 \backslash
23872 end{sloppypar}
23873 \end_layout
23874
23875 \end_inset
23876
23877
23878 \end_layout
23879
23880 \begin_layout Bibliography
23881 \begin_inset CommandInset bibitem
23882 LatexCommand bibitem
23883 key "multicol"
23884
23885 \end_inset
23886
23887 Documentation of the LaTeX-package 
23888 \begin_inset CommandInset href
23889 LatexCommand href
23890 name "multicol"
23891 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23892
23893 \end_inset
23894
23895
23896 \begin_inset Index idx
23897 status collapsed
23898
23899 \begin_layout Plain Layout
23900 LaTeX-packages ! multicol
23901 \end_layout
23902
23903 \end_inset
23904
23905
23906 \end_layout
23907
23908 \end_body
23909 \end_document