]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Additional.lyx: remove some unused references to squash LaTeX warnings
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 416
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % used for multi-column text
37 \usepackage{multicol}
38
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
41 \end_preamble
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
44 \begin_modules
45 logicalmkup
46 theorems-ams
47 theorems-ams-extended
48 multicol
49 \end_modules
50 \maintain_unincluded_children false
51 \begin_local_layout
52 Format 7
53 InsetLayout CharStyle:MenuItem
54 LyxType               charstyle
55 LabelString           menu
56 LatexType             command
57 LatexName             menuitem
58 Font
59 Family              Sans
60 EndFont
61 Preamble
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
63 EndPreamble
64 End
65 \end_local_layout
66 \language english
67 \language_package default
68 \inputencoding auto
69 \fontencoding global
70 \font_roman default
71 \font_sans default
72 \font_typewriter default
73 \font_default_family default
74 \use_non_tex_fonts false
75 \font_sc false
76 \font_osf false
77 \font_sf_scale 100
78 \font_tt_scale 100
79
80 \graphics default
81 \default_output_format default
82 \output_sync 0
83 \bibtex_command default
84 \index_command default
85 \paperfontsize 12
86 \spacing single
87 \use_hyperref true
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
92 \pdf_bookmarks true
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
96 \pdf_breaklinks false
97 \pdf_pdfborder false
98 \pdf_colorlinks true
99 \pdf_backref false
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \papersize default
103 \use_geometry false
104 \use_amsmath 1
105 \use_esint 0
106 \use_mhchem 1
107 \use_mathdots 1
108 \use_undertilde 1
109 \cite_engine basic
110 \use_bibtopic false
111 \use_indices false
112 \paperorientation portrait
113 \suppress_date false
114 \use_refstyle 0
115 \notefontcolor #0000ff
116 \index Index
117 \shortcut idx
118 \color #008000
119 \end_index
120 \secnumdepth 3
121 \tocdepth 3
122 \paragraph_separation indent
123 \paragraph_indentation default
124 \quotes_language english
125 \papercolumns 1
126 \papersides 2
127 \paperpagestyle headings
128 \tracking_changes false
129 \output_changes false
130 \html_math_output 0
131 \html_css_as_file 0
132 \html_be_strict true
133 \end_header
134
135 \begin_body
136
137 \begin_layout Title
138 Additional LyX Features
139 \end_layout
140
141 \begin_layout Subtitle
142 Version 2.0.x
143 \end_layout
144
145 \begin_layout Author
146 by the LyX Team
147 \begin_inset Foot
148 status collapsed
149
150 \begin_layout Plain Layout
151 \noindent
152 Principal maintainer of this file is
153 \noun on
154  Richard Heck
155 \noun default
156 .
157  If you have comments or error corrections, please send them to the LyX
158  Documentation mailing list, 
159 \begin_inset Flex Code
160 status collapsed
161
162 \begin_layout Plain Layout
163 \noindent
164 <lyx-docs@lists.lyx.org>
165 \end_layout
166
167 \end_inset
168
169 .
170 \end_layout
171
172 \end_inset
173
174
175 \end_layout
176
177 \begin_layout Standard
178 \begin_inset CommandInset toc
179 LatexCommand tableofcontents
180
181 \end_inset
182
183
184 \end_layout
185
186 \begin_layout Chapter
187 Introduction
188 \end_layout
189
190 \begin_layout Standard
191 This manual is essentially Part II of the 
192 \emph on
193 User's Guide\SpecialChar \@.
194
195 \emph default
196  The reason for separating this document out is simple: the 
197 \emph on
198 User's Guide
199 \emph default
200  is already quite lengthy, and it contains information on all of the basic
201  features one needs to know in order to prepare most documents.
202  However, the LyX Team has worked to make LyX extensible through various
203  configuration files and external packages.
204  That means that if you want to support the Fizzwizzle LaTeX package, you
205  can create a layout file (or module) for it without having to alter LyX
206  itself.
207  We've already had contributions of several new features this way, and some
208  of them are documented here.
209  There are also some more `advanced' features, such as how to control the
210  presentation of bibliographies and how to work with multi-part documents,
211  that are not covered in the 
212 \emph on
213 User's Guide
214 \emph default
215  and are discussed here.
216 \end_layout
217
218 \begin_layout Standard
219 This manual also documents some special features, like fax support, version
220  control, and SGML support, which require additional software to work properly.
221  There is also a chapter on LyX's support for HTML.
222  And lastly, there's a chapter of LaTeX tools and tips, things you can use
223  to spruce up your documents by directly using the powerful features of
224  LaTeX.
225  After all, LyX 
226 \emph on
227 is
228 \emph default
229  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
230 \end_layout
231
232 \begin_layout Standard
233 If you haven't read the 
234 \emph on
235 Introduction
236 \emph default
237  yet, you are definitely in the wrong manual.
238  The 
239 \emph on
240 Introduction
241 \emph default
242  is the first place to go, since it describes the notation and format of
243  all of the manuals.
244  You should also be thoroughly familiar with the 
245 \emph on
246 User's Guide
247 \emph default
248  and all of the basic features of LyX before attempting to read this one.
249 \end_layout
250
251 \begin_layout Standard
252 Since many of the topics in this manual depend heavily on LyX's interaction
253  with LaTeX, this first chapter covers the inner workings of LyX and how
254  to direct LyX to generate exactly the LaTeX code you want.
255  It is obviously for more seasoned LyX users.
256 \end_layout
257
258 \begin_layout Chapter
259 LyX and LaTeX
260 \end_layout
261
262 \begin_layout Section
263 How LyX Uses LaTeX
264 \end_layout
265
266 \begin_layout Standard
267 This chapter is for both TeX-nicians and the LaTeX-curious.
268  In it, we'll explain how LyX and LaTeX work together to produce printable
269  output.
270  This is the only place in any of the manuals where we assume you know something
271  about LaTeX.
272 \end_layout
273
274 \begin_layout Standard
275 At one time, LyX was called a 
276 \begin_inset Quotes eld
277 \end_inset
278
279 WYSIWYM frontend to LaTeX,
280 \begin_inset Quotes erd
281 \end_inset
282
283  but that's no longer true.
284  There are frontends to LaTeX out there.
285 \begin_inset Foot
286 status collapsed
287
288 \begin_layout Plain Layout
289 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
290  There are also the LaTeX modes for vi and emacs, of course.
291 \end_layout
292
293 \end_inset
294
295  These are basically text editors with the ability to run LaTeX and mark
296  any errors in the file you're editing.
297  Although LyX 
298 \emph on
299 is
300 \emph default
301  an editor, and it 
302 \emph on
303 does
304 \emph default
305  run LaTeX, and it also indicates errors in the file, it also does much,
306  much more.
307  For one thing, you don't need to know LaTeX to use LyX effectively.
308  And LyX has added its own extensions to LaTeX.
309  Try the following sometime: select 
310 \begin_inset Flex MenuItem
311 status collapsed
312
313 \begin_layout Plain Layout
314 Export\SpecialChar \menuseparator
315 LaTeX
316 \end_layout
317
318 \end_inset
319
320  from the 
321 \begin_inset Flex MenuItem
322 status collapsed
323
324 \begin_layout Plain Layout
325 File
326 \end_layout
327
328 \end_inset
329
330  menu (or 
331 \begin_inset Flex MenuItem
332 status collapsed
333
334 \begin_layout Plain Layout
335 View\SpecialChar \menuseparator
336 Source
337 \end_layout
338
339 \end_inset
340
341 ), then look at the preamble of the resulting 
342 \begin_inset Flex Code
343 status collapsed
344
345 \begin_layout Plain Layout
346 .tex
347 \end_layout
348
349 \end_inset
350
351  file.
352  You'll notice a variety of new macros defined specifically by LyX.
353  These macros are defined automatically, according to the features you use
354  in the document.
355 \end_layout
356
357 \begin_layout Standard
358 There are several commands that automatically invoke LaTeX.
359  They are:
360 \end_layout
361
362 \begin_layout Itemize
363 \begin_inset Flex MenuItem
364 status collapsed
365
366 \begin_layout Plain Layout
367 View\SpecialChar \menuseparator
368 View
369 \end_layout
370
371 \end_inset
372
373
374 \end_layout
375
376 \begin_layout Itemize
377 \begin_inset Flex MenuItem
378 status collapsed
379
380 \begin_layout Plain Layout
381 View\SpecialChar \menuseparator
382 Update
383 \end_layout
384
385 \end_inset
386
387
388 \end_layout
389
390 \begin_layout Itemize
391 \begin_inset Flex MenuItem
392 status collapsed
393
394 \begin_layout Plain Layout
395 File\SpecialChar \menuseparator
396 Print
397 \end_layout
398
399 \end_inset
400
401
402 \end_layout
403
404 \begin_layout Itemize
405 \begin_inset Flex MenuItem
406 status collapsed
407
408 \begin_layout Plain Layout
409 File\SpecialChar \menuseparator
410 Fax
411 \end_layout
412
413 \end_inset
414
415
416 \end_layout
417
418 \begin_layout Standard
419 They will only invoke LaTeX if the file has changed since the last time
420  LaTeX was run.
421  
422 \end_layout
423
424 \begin_layout Standard
425 When LyX runs LaTeX on the file you're editing, it performs these steps:
426 \end_layout
427
428 \begin_layout Enumerate
429 Convert the document to LaTeX and save to a file with the extension 
430 \begin_inset Flex Code
431 status collapsed
432
433 \begin_layout Plain Layout
434 .tex
435 \end_layout
436
437 \end_inset
438
439  in place of 
440 \begin_inset Flex Code
441 status collapsed
442
443 \begin_layout Plain Layout
444 .lyx
445 \end_layout
446
447 \end_inset
448
449 .
450 \end_layout
451
452 \begin_layout Enumerate
453 Run LaTeX on the 
454 \begin_inset Flex Code
455 status collapsed
456
457 \begin_layout Plain Layout
458 .tex
459 \end_layout
460
461 \end_inset
462
463  file (maybe several times), and run any other commands (such as 
464 \begin_inset Flex Code
465 status collapsed
466
467 \begin_layout Plain Layout
468 bibtex
469 \end_layout
470
471 \end_inset
472
473  or 
474 \begin_inset Flex Code
475 status collapsed
476
477 \begin_layout Plain Layout
478 makeindex
479 \end_layout
480
481 \end_inset
482
483 ) needed to compile the LaTeX file.
484 \end_layout
485
486 \begin_layout Enumerate
487 If there are any errors, show the error log.
488 \end_layout
489
490 \begin_layout Standard
491 If you have run LaTeX using 
492 \begin_inset Flex MenuItem
493 status collapsed
494
495 \begin_layout Plain Layout
496 View
497 \bar under
498 \SpecialChar \menuseparator
499
500 \bar default
501 DVI
502 \end_layout
503
504 \end_inset
505
506 , LyX then runs a DVI viewer to display the DVI-file.
507  If you have used 
508 \begin_inset Flex MenuItem
509 status collapsed
510
511 \begin_layout Plain Layout
512 View
513 \bar under
514 \SpecialChar \menuseparator
515
516 \bar default
517 PostScript
518 \end_layout
519
520 \end_inset
521
522 , LyX performs further steps:
523 \end_layout
524
525 \begin_layout Itemize
526 Run 
527 \begin_inset Flex Code
528 status collapsed
529
530 \begin_layout Plain Layout
531 dvips
532 \end_layout
533
534 \end_inset
535
536  to convert the DVI file to PostScript.
537 \end_layout
538
539 \begin_layout Itemize
540 Run a PostScript viewer, such as 
541 \begin_inset Flex Code
542 status collapsed
543
544 \begin_layout Plain Layout
545 ghostview
546 \end_layout
547
548 \end_inset
549
550 , to display the PostScript file.
551 \end_layout
552
553 \begin_layout Standard
554 LyX does similar things when viewing, or exporting, other formats.
555 \end_layout
556
557 \begin_layout Section
558 Translating LaTeX files into LyX
559 \end_layout
560
561 \begin_layout Standard
562 You can import a LaTeX file into LyX by using the 
563 \begin_inset Flex MenuItem
564 status collapsed
565
566 \begin_layout Plain Layout
567 File\SpecialChar \menuseparator
568 Import\SpecialChar \menuseparator
569 LaTeX
570 \end_layout
571
572 \end_inset
573
574  command in LyX.
575  This will call a program named 
576 \begin_inset Flex Code
577 status collapsed
578
579 \begin_layout Plain Layout
580 tex2lyx
581 \end_layout
582
583 \end_inset
584
585  which will create a file 
586 \begin_inset Flex Code
587 status collapsed
588
589 \begin_layout Plain Layout
590 foo.lyx
591 \end_layout
592
593 \end_inset
594
595  from the file 
596 \begin_inset Flex Code
597 status collapsed
598
599 \begin_layout Plain Layout
600 foo.tex
601 \end_layout
602
603 \end_inset
604
605 .
606  LyX will then open that file.
607 \begin_inset Foot
608 status collapsed
609
610 \begin_layout Plain Layout
611 \begin_inset Flex Code
612 status collapsed
613
614 \begin_layout Plain Layout
615 tex2lyx
616 \end_layout
617
618 \end_inset
619
620  can also be run from the command line, of course.
621 \end_layout
622
623 \end_inset
624
625
626 \end_layout
627
628 \begin_layout Standard
629 \begin_inset Flex Code
630 status collapsed
631
632 \begin_layout Plain Layout
633 tex2lyx
634 \end_layout
635
636 \end_inset
637
638  will translate most legal LaTeX, but not everything.
639  It will put things it doesn't understand into TeX code, so after translating
640  a file with 
641 \begin_inset Flex Code
642 status collapsed
643
644 \begin_layout Plain Layout
645 tex2lyx
646 \end_layout
647
648 \end_inset
649
650 , you can look for TeX code and hand-edit it until it looks right.
651 \end_layout
652
653 \begin_layout Standard
654 If you don't know what TeX code is, read the next section.
655 \end_layout
656
657 \begin_layout Section
658 \begin_inset CommandInset label
659 LatexCommand label
660 name "sec:Inserting-TeX-Code"
661
662 \end_inset
663
664 Inserting TeX Code into LyX Documents 
665 \end_layout
666
667 \begin_layout Standard
668 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
669  You can always insert TeX code into any LyX document.
670  LyX cannot, and will never be able to, display every possible LaTeX construct.
671  If ever you need to insert LaTeX commands into your LyX document, you can
672  use the 
673 \begin_inset Flex Code
674 status collapsed
675
676 \begin_layout Plain Layout
677 TeX Code
678 \end_layout
679
680 \end_inset
681
682  box, which you can insert into your document with 
683 \begin_inset Flex MenuItem
684 status collapsed
685
686 \begin_layout Plain Layout
687 Insert\SpecialChar \menuseparator
688 TeX Code
689 \end_layout
690
691 \end_inset
692
693 .
694 \end_layout
695
696 \begin_layout Standard
697 Here's an example of inserting LaTeX commands in a LyX document.
698  The code looks like this:
699 \end_layout
700
701 \begin_layout LyX-Code
702
703 \backslash
704 begin{tabular}{ll}
705 \begin_inset Newline newline
706 \end_inset
707
708
709 \backslash
710 begin{minipage}{5cm}
711 \begin_inset Newline newline
712 \end_inset
713
714 This is an example for a minipage environment.
715  You 
716 \begin_inset Newline newline
717 \end_inset
718
719 can put nearly everything in it, even (non-floating) 
720 \begin_inset Newline newline
721 \end_inset
722
723 figures and tables.
724  
725 \begin_inset Newline newline
726 \end_inset
727
728
729 \backslash
730 end{minipage}
731 \begin_inset Newline newline
732 \end_inset
733
734 &
735 \begin_inset Newline newline
736 \end_inset
737
738
739 \backslash
740 begin{minipage}{5cm}
741 \begin_inset Newline newline
742 \end_inset
743
744
745 \backslash
746 begin{verbatim}
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 This ...
757  
758 \begin_inset Newline newline
759 \end_inset
760
761
762 \backslash
763 end{minipage}
764 \begin_inset Newline newline
765 \end_inset
766
767
768 \backslash
769 end{verbatim}
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{tabular}
782 \end_layout
783
784 \begin_layout LyX-Code
785
786 \end_layout
787
788 \begin_layout Standard
789 The 
790 \begin_inset Flex Code
791 status collapsed
792
793 \begin_layout Plain Layout
794 TeX Code
795 \end_layout
796
797 \end_inset
798
799  box containing this text is directly after this paragraph.
800  Those of you reading the manual in LyX will only see the TeX code inset.
801  Those reading a printed version of the manuals will see the actual results:
802 \end_layout
803
804 \begin_layout Standard
805 \begin_inset ERT
806 status collapsed
807
808 \begin_layout Plain Layout
809
810
811 \backslash
812 begin{tabular}{ll}
813 \end_layout
814
815 \begin_layout Plain Layout
816
817
818 \backslash
819 begin{minipage}{5cm}
820 \end_layout
821
822 \begin_layout Plain Layout
823
824 This is an example for a minipage environment.
825  You can put nearly everything in it, even (non-floating) figures and tables.
826  
827 \end_layout
828
829 \begin_layout Plain Layout
830
831
832 \backslash
833 end{minipage}
834 \end_layout
835
836 \begin_layout Plain Layout
837
838 &
839 \end_layout
840
841 \begin_layout Plain Layout
842
843
844 \backslash
845 begin{minipage}{5cm}
846 \end_layout
847
848 \begin_layout Plain Layout
849
850
851 \backslash
852 begin{verbatim}
853 \end_layout
854
855 \begin_layout Plain Layout
856
857
858 \backslash
859 begin{minipage}{5cm}
860 \end_layout
861
862 \begin_layout Plain Layout
863
864 This ...
865  
866 \end_layout
867
868 \begin_layout Plain Layout
869
870
871 \backslash
872 end{minipage}
873 \end_layout
874
875 \begin_layout Plain Layout
876
877
878 \backslash
879 end{verbatim}
880 \end_layout
881
882 \begin_layout Plain Layout
883
884
885 \backslash
886 end{minipage}
887 \end_layout
888
889 \begin_layout Plain Layout
890
891
892 \backslash
893 end{tabular}
894 \end_layout
895
896 \end_inset
897
898
899 \end_layout
900
901 \begin_layout Standard
902 In addition to using TeX code, you can also create a separate file containing
903  some complex LaTeX structure and then use 
904 \begin_inset Flex MenuItem
905 status collapsed
906
907 \begin_layout Plain Layout
908 Insert\SpecialChar \menuseparator
909 Child
910 \begin_inset space ~
911 \end_inset
912
913 Document
914 \end_layout
915
916 \end_inset
917
918  to include your file (you should select the type 
919 \begin_inset Flex Code
920 status collapsed
921
922 \begin_layout Plain Layout
923 Input
924 \end_layout
925
926 \end_inset
927
928 ).
929  We recommend that you only do this if you have a 
930 \begin_inset Flex Code
931 status collapsed
932
933 \begin_layout Plain Layout
934 .tex
935 \end_layout
936
937 \end_inset
938
939  file which you 
940 \emph on
941 know
942 \emph default
943  works already.
944  Otherwise, you'll have a big job tracking down LaTeX errors.
945 \end_layout
946
947 \begin_layout Standard
948 There are a few last points to emphasize:
949 \end_layout
950
951 \begin_layout Itemize
952 LyX 
953 \emph on
954 does not
955 \emph default
956  check if your LaTeX code is correct.
957 \end_layout
958
959 \begin_layout Itemize
960 Beware reinventing the wheel.
961 \end_layout
962
963 \begin_layout Standard
964 On that last point, LyX does have quite a few features tucked into it, and
965  more are coming.
966  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
967  feature before you decide you have to do it by hand.
968  Moreover, there are numerous LaTeX packages out there to do all sorts of
969  things, from labels to envelopes to fancy multipage tables.
970  Check out 
971 \begin_inset CommandInset href
972 LatexCommand href
973 name "CTAN"
974 target "http://www.ctan.org/"
975
976 \end_inset
977
978  for details.
979 \end_layout
980
981 \begin_layout Standard
982 If you do need to do some wild and fancy things within your document, be
983  sure to check out a good LaTeX book for assistance.
984  There are a number of them listed in the bibliography of the 
985 \emph on
986 User's Guide
987 \emph default
988 .
989 \end_layout
990
991 \begin_layout Section
992 LyX and the LaTeX Preamble
993 \end_layout
994
995 \begin_layout Subsection
996 About the LaTeX Preamble
997 \end_layout
998
999 \begin_layout Standard
1000 If you already know LaTeX, there is no need to explain here what the preamble
1001  is good for.
1002  If you don't, the following will give you some ideas—we recommend again
1003  that you consult a LaTeX book for further information.
1004  In any case, you should read the points below, because they explain what
1005  you can do and what you don't need to do in the LaTeX preamble of a LyX
1006  document.
1007 \end_layout
1008
1009 \begin_layout Standard
1010 The LaTeX preamble comes at the very beginning of a document, 
1011 \emph on
1012 before
1013 \emph default
1014  the text.
1015  It serves to:
1016 \end_layout
1017
1018 \begin_layout Itemize
1019 Declare the document class.
1020  
1021 \begin_inset Newline newline
1022 \end_inset
1023
1024 LyX already does this for you.
1025  If you're a seasoned LaTeX-nician, and you have a custom document class
1026  you want to use, check out the 
1027 \emph on
1028 Customization Manual
1029 \emph default
1030  for information on how to make LyX interface to it.
1031 \end_layout
1032
1033 \begin_layout Itemize
1034 Declare the usage of packages.
1035  
1036 \begin_inset Newline newline
1037 \end_inset
1038
1039 LaTeX packages provide special commands, which are only available within
1040  a document when the package has been declared in the preamble.
1041  For example, the package 
1042 \begin_inset Flex Code
1043 status collapsed
1044
1045 \begin_layout Plain Layout
1046 indentfirst
1047 \end_layout
1048
1049 \end_inset
1050
1051  forces all paragraphs to be indented.
1052  There are other packages for labels, envelopes, margins, etc.
1053  
1054 \end_layout
1055
1056 \begin_layout Itemize
1057 Set counters, variables, lengths and widths.
1058  
1059 \begin_inset Newline newline
1060 \end_inset
1061
1062 There are several LaTeX counters and variables which 
1063 \emph on
1064 must
1065 \emph default
1066  be set globally from within the preamble in order to have the desired effect.
1067  (There are variables which you can set and reset inside the document, too.)
1068  Margins are a good example of something which must be set in the preamble.
1069  Another example is the label format for lists.
1070  You can actually set these just about anywhere, but it's best to do it
1071  just once, inside the preamble.
1072 \end_layout
1073
1074 \begin_layout Itemize
1075 Declare user defined commands (with 
1076 \begin_inset Flex Code
1077 status collapsed
1078
1079 \begin_layout Plain Layout
1080
1081 \backslash
1082 newcommand
1083 \end_layout
1084
1085 \end_inset
1086
1087  or 
1088 \begin_inset Flex Code
1089 status collapsed
1090
1091 \begin_layout Plain Layout
1092
1093 \backslash
1094 renewcommand
1095 \end_layout
1096
1097 \end_inset
1098
1099 ).
1100 \begin_inset Newline newline
1101 \end_inset
1102
1103 These are abbreviations for LaTeX commands which appear very often inside
1104  a document.
1105  Although the preamble is a good place to declare such commands, they 
1106 \emph on
1107 can
1108 \emph default
1109  be declared anywhere (before they are used for the first time, of course).
1110  This can be useful if there is a lot of raw LaTeX code in your document,
1111  which normally should not be the case.
1112 \end_layout
1113
1114 \begin_layout Standard
1115 LyX adds its own set of definitions to the preamble of the 
1116 \begin_inset Flex Code
1117 status collapsed
1118
1119 \begin_layout Plain Layout
1120 .tex
1121 \end_layout
1122
1123 \end_inset
1124
1125  file it produces.
1126  This makes LaTeX files generated by LyX portable.
1127 \end_layout
1128
1129 \begin_layout Subsection
1130 Changing the Preamble
1131 \end_layout
1132
1133 \begin_layout Standard
1134 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1135  can't change them without patching LyX itself.
1136  You can, however, add your own stuff to the preamble by selecting 
1137 \begin_inset Flex MenuItem
1138 status collapsed
1139
1140 \begin_layout Plain Layout
1141 LaTeX
1142 \begin_inset space ~
1143 \end_inset
1144
1145 Preamble
1146 \end_layout
1147
1148 \end_inset
1149
1150  in the 
1151 \begin_inset Flex MenuItem
1152 status collapsed
1153
1154 \begin_layout Plain Layout
1155 Document\SpecialChar \menuseparator
1156 Settings
1157 \end_layout
1158
1159 \end_inset
1160
1161  dialog.
1162  LyX adds anything in the 
1163 \begin_inset Flex MenuItem
1164 status collapsed
1165
1166 \begin_layout Plain Layout
1167 Preamble
1168 \end_layout
1169
1170 \end_inset
1171
1172  dialog to its own built-in preamble.
1173  Before adding your own declarations in the preamble, you should make sure
1174  that LyX doesn't already support what you want to do.
1175  (Remember what we said about reinventing the wheel?) Also, 
1176 \emph on
1177 make sure your preamble code is correct
1178 \emph default
1179 .
1180  LyX doesn't check it for you.
1181  If there is an error, you're likely to get an error like 
1182 \begin_inset Quotes eld
1183 \end_inset
1184
1185
1186 \begin_inset Flex Code
1187 status collapsed
1188
1189 \begin_layout Plain Layout
1190 Missing 
1191 \backslash
1192 begin{document}
1193 \end_layout
1194
1195 \end_inset
1196
1197
1198 \begin_inset Quotes erd
1199 \end_inset
1200
1201 .
1202  If you see this error, check your preamble.
1203 \end_layout
1204
1205 \begin_layout Subsection
1206 Examples
1207 \end_layout
1208
1209 \begin_layout Standard
1210 Here are some examples of what you can add to a preamble, and what they
1211  do.
1212 \end_layout
1213
1214 \begin_layout Subsubsection
1215 Example #1: Offsets
1216 \end_layout
1217
1218 \begin_layout Standard
1219 There are two variables under LaTeX that control page position: 
1220 \begin_inset Flex Code
1221 status collapsed
1222
1223 \begin_layout Plain Layout
1224
1225 \backslash
1226 hoffset
1227 \end_layout
1228
1229 \end_inset
1230
1231  and 
1232 \begin_inset Flex Code
1233 status collapsed
1234
1235 \begin_layout Plain Layout
1236
1237 \backslash
1238 voffset
1239 \end_layout
1240
1241 \end_inset
1242
1243 .
1244  Their names should be self-explanatory.
1245  These variables are useful if you think for a moment about computer labels.
1246  Sometimes, the size of a print medium and the area of the medium that you
1247  can actually print on aren't the same.
1248  This is where 
1249 \begin_inset Flex Code
1250 status collapsed
1251
1252 \begin_layout Plain Layout
1253
1254 \backslash
1255 hoffset
1256 \end_layout
1257
1258 \end_inset
1259
1260  and 
1261 \begin_inset Flex Code
1262 status collapsed
1263
1264 \begin_layout Plain Layout
1265
1266 \backslash
1267 voffset
1268 \end_layout
1269
1270 \end_inset
1271
1272  come in.
1273 \end_layout
1274
1275 \begin_layout Standard
1276 The default values for 
1277 \begin_inset Flex Code
1278 status collapsed
1279
1280 \begin_layout Plain Layout
1281
1282 \backslash
1283 hoffset
1284 \end_layout
1285
1286 \end_inset
1287
1288  and 
1289 \begin_inset Flex Code
1290 status collapsed
1291
1292 \begin_layout Plain Layout
1293
1294 \backslash
1295 voffset
1296 \end_layout
1297
1298 \end_inset
1299
1300  are both 0
1301 \begin_inset space \thinspace{}
1302 \end_inset
1303
1304 points, i.
1305 \begin_inset space \thinspace{}
1306 \end_inset
1307
1308 e.
1309 \begin_inset space \space{}
1310 \end_inset
1311
1312 the page isn't shifted.
1313  Unfortunately, some DVI drivers always seem to shift the page.
1314  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1315  If you're using LyX on a system that you don't personally maintain, and
1316  your sysadmin is a doofus, 
1317 \begin_inset Flex Code
1318 status collapsed
1319
1320 \begin_layout Plain Layout
1321
1322 \backslash
1323 hoffset
1324 \end_layout
1325
1326 \end_inset
1327
1328  and 
1329 \begin_inset Flex Code
1330 status collapsed
1331
1332 \begin_layout Plain Layout
1333
1334 \backslash
1335 voffset
1336 \end_layout
1337
1338 \end_inset
1339
1340  can save the day.
1341  Suppose your left and top margins are always 0.5
1342 \begin_inset space \thinspace{}
1343 \end_inset
1344
1345 inches too big.
1346  You can add this to the preamble:
1347 \end_layout
1348
1349 \begin_layout LyX-Code
1350
1351 \backslash
1352 setlength{
1353 \backslash
1354 hoffset}{-0.5 in}
1355 \end_layout
1356
1357 \begin_layout LyX-Code
1358
1359 \backslash
1360 setlength{
1361 \backslash
1362 voffset}{-0.5 in}
1363 \end_layout
1364
1365 \begin_layout Standard
1366 and your margins should now be correct.
1367 \end_layout
1368
1369 \begin_layout Subsubsection
1370 Example #2: Labels
1371 \end_layout
1372
1373 \begin_layout Standard
1374 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1375  There's a rather nice package, available at your nearest CTAN archive,
1376  for printing sheets of labels: 
1377 \begin_inset Flex Code
1378 status collapsed
1379
1380 \begin_layout Plain Layout
1381 labels.sty
1382 \end_layout
1383
1384 \end_inset
1385
1386 .
1387  Now, your system may not have this package installed by default.
1388  We leave that up to you to check.
1389  You'll also want to read the documentation for it; we're not going to do
1390  that for you.
1391  Since this is an example, however, we'll give you an example of how you
1392  use this package.
1393 \end_layout
1394
1395 \begin_layout Standard
1396 First, make sure you're using the 
1397 \begin_inset Flex Code
1398 status collapsed
1399
1400 \begin_layout Plain Layout
1401 article
1402 \end_layout
1403
1404 \end_inset
1405
1406  document class.
1407  Next, you need to put the following in your preamble:
1408 \end_layout
1409
1410 \begin_layout LyX-Code
1411
1412 \backslash
1413 usepackage{labels}
1414 \end_layout
1415
1416 \begin_layout LyX-Code
1417
1418 \backslash
1419 LabelCols=3
1420 \end_layout
1421
1422 \begin_layout LyX-Code
1423
1424 \backslash
1425 LabelRows=7
1426 \end_layout
1427
1428 \begin_layout LyX-Code
1429
1430 \backslash
1431 LeftBorder=8mm
1432 \end_layout
1433
1434 \begin_layout LyX-Code
1435
1436 \backslash
1437 RightBorder=8mm
1438 \end_layout
1439
1440 \begin_layout LyX-Code
1441
1442 \backslash
1443 TopBorder=9mm
1444 \end_layout
1445
1446 \begin_layout LyX-Code
1447
1448 \backslash
1449 BottomBorder=2mm
1450 \end_layout
1451
1452 \begin_layout Standard
1453 This sets things up for Avery label sheets, stock #5360.
1454  You're now ready to print labels, but you'll need to insert LaTeX code,
1455  placing the commands 
1456 \begin_inset Flex Code
1457 status collapsed
1458
1459 \begin_layout Plain Layout
1460
1461 \backslash
1462 begin{labels}
1463 \end_layout
1464
1465 \end_inset
1466
1467  and 
1468 \begin_inset Flex Code
1469 status collapsed
1470
1471 \begin_layout Plain Layout
1472
1473 \backslash
1474 end{labels}
1475 \end_layout
1476
1477 \end_inset
1478
1479  around each label text.
1480  This and other special features of 
1481 \begin_inset Flex Code
1482 status collapsed
1483
1484 \begin_layout Plain Layout
1485 labels.sty
1486 \end_layout
1487
1488 \end_inset
1489
1490  are explained in its documentation.
1491 \end_layout
1492
1493 \begin_layout Standard
1494 Someday, someone may write a LyX layout file to support this package directly.
1495  Maybe that someone is you.
1496 \end_layout
1497
1498 \begin_layout Subsubsection
1499 Example #3: Paragraph Indentation
1500 \end_layout
1501
1502 \begin_layout Standard
1503 Americans are trained to indent the first line of 
1504 \emph on
1505 every
1506 \emph default
1507  paragraph.
1508  As with all of their other weird quirks, most Americans will whine and
1509  moan until they can have their way and indent the first line of all paragraphs.
1510  (Yes, we're joking.
1511  (We are?) 
1512 \emph on
1513 Yeah
1514 \emph default
1515 , we are.)
1516 \end_layout
1517
1518 \begin_layout Standard
1519 Of course, this behavior isn't standard typography.
1520  In books, you typically only indent the first line of a paragraph 
1521 \emph on
1522 if
1523 \emph default
1524  it follows another one.
1525  The idea behind indenting the first line of a paragraph is to distinguish
1526  neighboring paragraphs from one another.
1527  If there is no previous paragraph—for example, if it follows a figure or
1528  is the first paragraph in a section—then there is no need for indentation.
1529  
1530 \end_layout
1531
1532 \begin_layout Standard
1533 If you're a typical American (we're still joking!), though, you don't care
1534  about such esoteric things; you want your indentation! Add this to the
1535  preamble:
1536 \end_layout
1537
1538 \begin_layout LyX-Code
1539
1540 \backslash
1541 usepackage{indentfirst}
1542 \end_layout
1543
1544 \begin_layout Standard
1545 If your TeX distribution isn't braindead, you'll have this package, and
1546  all of your paragraphs will get the indentation the Founding Fathers intended
1547  they should have.
1548 \end_layout
1549
1550 \begin_layout Subsubsection
1551 Example #4: This Document
1552 \end_layout
1553
1554 \begin_layout Standard
1555 You can also check out the preamble of this document to get an idea of some
1556  of the advanced things you can do.
1557 \end_layout
1558
1559 \begin_layout Section
1560 LyX and LaTeX Errors
1561 \end_layout
1562
1563 \begin_layout Standard
1564 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1565  going.
1566  It then uses the logfile from the LaTeX run to do a post-mortem.
1567  After analyzing the logfile,LyX displays a dialog listing the errors.
1568  Clicking on any one of them will take you to the position in your LyX file
1569  where the error occurred.
1570 \begin_inset Foot
1571 status collapsed
1572
1573 \begin_layout Plain Layout
1574 Well, usually.
1575  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1576  right line.
1577  There are also cases where LaTeX reports the error on one line, but the
1578  actual error is earlier.
1579  This is not unlike forgetting a closing brace in a program: You'll get
1580  an error, but only later.
1581 \end_layout
1582
1583 \end_inset
1584
1585
1586 \end_layout
1587
1588 \begin_layout Standard
1589 Some folks also like to look at the log file directly: It is available from
1590  
1591 \begin_inset Flex MenuItem
1592 status collapsed
1593
1594 \begin_layout Plain Layout
1595 Document
1596 \bar under
1597 \SpecialChar \menuseparator
1598
1599 \bar default
1600 Latex
1601 \begin_inset space ~
1602 \end_inset
1603
1604 Log
1605 \end_layout
1606
1607 \end_inset
1608
1609 .
1610  There are some fairly common error messages and warnings.
1611  We'll cover those here.
1612  You should look at a good LaTeX book for a complete listing.
1613 \end_layout
1614
1615 \begin_layout Itemize
1616 \begin_inset Flex Code
1617 status collapsed
1618
1619 \begin_layout Plain Layout
1620 LaTeX Warning
1621 \end_layout
1622
1623 \end_inset
1624
1625
1626 \begin_inset Newline newline
1627 \end_inset
1628
1629 Anything beginning with these words is a warning message for the purpose
1630  of 
1631 \begin_inset Quotes eld
1632 \end_inset
1633
1634 debugging
1635 \begin_inset Quotes erd
1636 \end_inset
1637
1638  the LaTeX code itself.
1639  You'll get messages like this if you added or changed cross-references
1640  or bibliography entries, in which case, LaTeX is trying to tell you that
1641  you need to make another run.
1642  You can by-and-large ignore these.
1643 \end_layout
1644
1645 \begin_layout Itemize
1646 \begin_inset Flex Code
1647 status collapsed
1648
1649 \begin_layout Plain Layout
1650 LaTeX Font Warning
1651 \end_layout
1652
1653 \end_inset
1654
1655
1656 \begin_inset Newline newline
1657 \end_inset
1658
1659 Another warning message, this time about fonts which LaTeX couldn't find.
1660  The rest of the message will often say something about a replacement font
1661  that LaTeX used.
1662  You can safely ignore these, too.
1663 \end_layout
1664
1665 \begin_layout Itemize
1666 \begin_inset Flex Code
1667 status collapsed
1668
1669 \begin_layout Plain Layout
1670 Overfull 
1671 \backslash
1672 hbox
1673 \end_layout
1674
1675 \end_inset
1676
1677
1678 \begin_inset Newline newline
1679 \end_inset
1680
1681 LaTeX absolutely 
1682 \emph on
1683 loves
1684 \emph default
1685  to spew these out.
1686  They are warnings about lines that were too long and run past the right
1687  margin.
1688  Almost always, this is unnoticeable in the final output.
1689  (It can be just a point or two.) Or, only one or two characters extend past
1690  the margin.
1691  LaTeX seems to generate at least one of these messages for just about any
1692  document you write.
1693 \begin_inset Newline newline
1694 \end_inset
1695
1696 You can ignore these messages.
1697  Your eyes will tell you if there's a problem with something that's too
1698  wide; just look at the output.
1699 \begin_inset Foot
1700 status collapsed
1701
1702 \begin_layout Plain Layout
1703 You can also enable the `draft' option in 
1704 \begin_inset Flex MenuItem
1705 status collapsed
1706
1707 \begin_layout Plain Layout
1708 Document
1709 \bar under
1710 \SpecialChar \menuseparator
1711
1712 \bar default
1713 Settings
1714 \end_layout
1715
1716 \end_inset
1717
1718 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1719 \end_layout
1720
1721 \end_inset
1722
1723
1724 \end_layout
1725
1726 \begin_layout Itemize
1727 \begin_inset Flex Code
1728 status collapsed
1729
1730 \begin_layout Plain Layout
1731 Underfull 
1732 \backslash
1733 hbox
1734 \end_layout
1735
1736 \end_inset
1737
1738
1739 \begin_inset Newline newline
1740 \end_inset
1741
1742 Not quite as common as its cousin.
1743  LaTeX seems to like to print lines that are a bit too wide as opposed to
1744  ones that are a bit too narrow.
1745  We have no idea why.
1746 \end_layout
1747
1748 \begin_layout Itemize
1749 \begin_inset Flex Code
1750 status collapsed
1751
1752 \begin_layout Plain Layout
1753 Overfull 
1754 \backslash
1755 vbox
1756 \end_layout
1757
1758 \end_inset
1759
1760  and 
1761 \begin_inset Flex Code
1762 status collapsed
1763
1764 \begin_layout Plain Layout
1765 Underfull 
1766 \backslash
1767 vbox
1768 \end_layout
1769
1770 \end_inset
1771
1772
1773 \begin_inset Newline newline
1774 \end_inset
1775
1776 Warnings about troubles breaking the page.
1777  Once again, just look at the output.
1778  Your eyes will tell you where something has gone wrong.
1779 \end_layout
1780
1781 \begin_layout Itemize
1782 \begin_inset Flex Code
1783 status collapsed
1784
1785 \begin_layout Plain Layout
1786  LaTeX Error: File 
1787 \begin_inset Quotes els
1788 \end_inset
1789
1790 Xxxx
1791 \begin_inset Quotes ers
1792 \end_inset
1793
1794  not found
1795 \end_layout
1796
1797 \end_inset
1798
1799
1800 \begin_inset Newline newline
1801 \end_inset
1802
1803 The file 
1804 \begin_inset Quotes eld
1805 \end_inset
1806
1807 Xxxx
1808 \begin_inset Quotes erd
1809 \end_inset
1810
1811  isn't installed on this system.
1812  This usually appears because some package your document needs isn't installed.
1813  If you didn't touch the preamble or didn't use the 
1814 \begin_inset Flex Code
1815 status collapsed
1816
1817 \begin_layout Plain Layout
1818
1819 \backslash
1820 usepackage{}
1821 \end_layout
1822
1823 \end_inset
1824
1825  command, then one of the packages LyX tried to load is missing.
1826  Use 
1827 \begin_inset Flex MenuItem
1828 status collapsed
1829
1830 \begin_layout Plain Layout
1831 Help\SpecialChar \menuseparator
1832 LaTeX Configuration
1833 \end_layout
1834
1835 \end_inset
1836
1837  to get a list of packages that LyX knows about.
1838  This file is updated whenever you reconfigure LyX (using 
1839 \begin_inset Flex MenuItem
1840 status collapsed
1841
1842 \begin_layout Plain Layout
1843 Tools\SpecialChar \menuseparator
1844 Reconfigure
1845 \end_layout
1846
1847 \end_inset
1848
1849 ) and tells you which packages have been detected and what they do.
1850 \begin_inset Newline newline
1851 \end_inset
1852
1853 If you did use the 
1854 \begin_inset Flex Code
1855 status collapsed
1856
1857 \begin_layout Plain Layout
1858
1859 \backslash
1860 usepackage{}
1861 \end_layout
1862
1863 \end_inset
1864
1865  command and the package in question isn't installed, then you'll need to
1866  install it yourself.
1867 \end_layout
1868
1869 \begin_layout Itemize
1870 \begin_inset Flex Code
1871 status collapsed
1872
1873 \begin_layout Plain Layout
1874 LaTeX Error: Unknown option
1875 \end_layout
1876
1877 \end_inset
1878
1879
1880 \begin_inset Newline newline
1881 \end_inset
1882
1883 Error messages beginning with this are trying to tell you that you specified
1884  a bad or undefined option to a package.
1885  Check the package's documentation.
1886 \end_layout
1887
1888 \begin_layout Itemize
1889 \begin_inset Flex Code
1890 status collapsed
1891
1892 \begin_layout Plain Layout
1893 Undefined control sequence
1894 \end_layout
1895
1896 \end_inset
1897
1898
1899 \begin_inset Newline newline
1900 \end_inset
1901
1902 If you've inserted LaTeX code into your document, but made a typo, you'll
1903  get one of these.
1904  You may have forgotten to load a package.
1905  In any case, this error message usually means that you used an undefined
1906  command.
1907  
1908 \end_layout
1909
1910 \begin_layout Standard
1911 There are other error and warning messages.
1912  Some are self-explanatory.
1913  These are usually LaTeX messages.
1914  Others are downright cryptic.
1915  These are usually TeX error messages, and we really have 
1916 \emph on
1917 no clue
1918 \emph default
1919  what they mean or how to decipher them.
1920  No-one does.
1921 \end_layout
1922
1923 \begin_layout Standard
1924 There's a general sequence you should follow if you get error messages:
1925 \end_layout
1926
1927 \begin_layout Enumerate
1928 Look at the LaTeX code you inserted for typos.
1929 \end_layout
1930
1931 \begin_layout Enumerate
1932 If there are no typos, check that you used the command(s) correctly.
1933 \end_layout
1934
1935 \begin_layout Enumerate
1936 If you get a bunch of error boxes piled up at the very top of the document—and
1937  especially if you see a 
1938 \begin_inset Quotes eld
1939 \end_inset
1940
1941
1942 \begin_inset Flex Code
1943 status collapsed
1944
1945 \begin_layout Plain Layout
1946 Missing 
1947 \backslash
1948 begin{document}
1949 \end_layout
1950
1951 \end_inset
1952
1953
1954 \begin_inset Quotes erd
1955 \end_inset
1956
1957  error—it means that there are errors in the preamble.
1958  Start debugging your preamble.
1959 \end_layout
1960
1961 \begin_layout Enumerate
1962 If you didn't add anything to the preamble and didn't add any LaTeX code
1963  to the document, the first suspect is your LaTeX distribution itself.
1964  Check for missing packages and install them.
1965 \end_layout
1966
1967 \begin_layout Enumerate
1968 Okay, so there are no missing packages.
1969  Did you use any of the fine-tuning options in LyX? Specifically, did you
1970  
1971 \emph on
1972 misuse
1973 \emph default
1974  any of them, like trying to manually insert lots of 
1975 \begin_inset Flex Code
1976 status collapsed
1977
1978 \begin_layout Plain Layout
1979 Protected
1980 \begin_inset space ~
1981 \end_inset
1982
1983 Blanks
1984 \end_layout
1985
1986 \end_inset
1987
1988
1989 \begin_inset Flex Code
1990 status collapsed
1991
1992 \begin_layout Plain Layout
1993 Linebreaks
1994 \end_layout
1995
1996 \end_inset
1997
1998 , or 
1999 \begin_inset Flex Code
2000 status collapsed
2001
2002 \begin_layout Plain Layout
2003 Pagebreaks
2004 \end_layout
2005
2006 \end_inset
2007
2008 ? Did you try to kludge something together with these instead of using the
2009  appropriate paragraph environment?
2010 \end_layout
2011
2012 \begin_layout Enumerate
2013 All right, you didn't use any of the fine-tuning options, you played by
2014  the rules.
2015  Did you try to pull a fancy maneuver? Did you do something funky inside
2016  a table or an equation, like inserting a graphic into a table cell?
2017 \end_layout
2018
2019 \begin_layout Enumerate
2020 Do you have long sections of text where LaTeX cannot find a place to break
2021  a line? By default, LaTeX is rather strict about how much extra inter-word
2022  spacing it will add in order to break a line.
2023  Preferably, you should rework the paragraph to avoid the problem.
2024  If this isn't an option, you can wrap your text in 
2025 \begin_inset Flex Code
2026 status collapsed
2027
2028 \begin_layout Plain Layout
2029
2030 \backslash
2031 sloppypar
2032 \end_layout
2033
2034 \end_inset
2035
2036  to make LaTeX's line breaking more, well, sloppy.
2037 \end_layout
2038
2039 \begin_layout Enumerate
2040 Did you go overboard with the nesting? LyX (currently) doesn't check to
2041  make sure you're in the limits for nesting environments.
2042  If you nested a bunch of environments to the 
2043 \begin_inset Formula $17^{\mathrm{th}}$
2044 \end_inset
2045
2046  level, that's the problem.
2047  (The limit in LaTeX is five.)
2048 \end_layout
2049
2050 \begin_layout Enumerate
2051 Okay, you didn't get any error messages, but your output looks awful.
2052  If you have a table or figure that's too wide or long for the page, you
2053  need to:
2054 \end_layout
2055
2056 \begin_deeper
2057 \begin_layout Enumerate
2058 rescale the figure so it fits.
2059 \end_layout
2060
2061 \begin_layout Enumerate
2062 trim down the table so it fits.
2063 \end_layout
2064
2065 \end_deeper
2066 \begin_layout Enumerate
2067 If something else is wrong with the output, and you didn't try to pull anything
2068  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2069 \end_layout
2070
2071 \begin_layout Standard
2072 If all this doesn't help—well, then 
2073 \emph on
2074 perhaps
2075 \emph default
2076  you might have found a bug in LyX\SpecialChar \ldots{}
2077 .
2078 \end_layout
2079
2080 \begin_layout Chapter
2081 Supplemental Tools
2082 \end_layout
2083
2084 \begin_layout Section
2085 Customizing Bibliographies with BibTeX
2086 \end_layout
2087
2088 \begin_layout Standard
2089 The most basic information about how to use BibTeX with LyX is contained
2090  in the section 
2091 \emph on
2092 Bibliography databases (BibTeX)
2093 \emph default
2094  of the 
2095 \emph on
2096 User's Guide
2097 \emph default
2098 .
2099  The following subsections explain special bibliography features supported
2100  by LyX.
2101 \end_layout
2102
2103 \begin_layout Subsection
2104 Alternative Citation Styles
2105 \end_layout
2106
2107 \begin_layout Standard
2108 Standard BibTeX uses numbers (e.
2109 \begin_inset space \thinspace{}
2110 \end_inset
2111
2112 g.
2113 \begin_inset space \space{}
2114 \end_inset
2115
2116
2117 \begin_inset Quotes eld
2118 \end_inset
2119
2120 [12]
2121 \begin_inset Quotes erd
2122 \end_inset
2123
2124 ) to refer to a cited work.
2125  However, in many scientific disciplines, other citation styles are in use.
2126  The most common one is the author-year style (e.
2127 \begin_inset space \thinspace{}
2128 \end_inset
2129
2130 g.
2131 \begin_inset space \space{}
2132 \end_inset
2133
2134
2135 \begin_inset Quotes eld
2136 \end_inset
2137
2138 Knuth 1984a
2139 \begin_inset Quotes erd
2140 \end_inset
2141
2142 ).
2143  LyX supports two packages that provide this style, 
2144 \begin_inset Flex Code
2145 status collapsed
2146
2147 \begin_layout Plain Layout
2148 natbib
2149 \end_layout
2150
2151 \end_inset
2152
2153  and 
2154 \begin_inset Flex Code
2155 status collapsed
2156
2157 \begin_layout Plain Layout
2158 jurabib
2159 \end_layout
2160
2161 \end_inset
2162
2163 .
2164  Both packages have their pros and cons, which cannot be listed in detail.
2165  If you only want to have simple author-year (or author-numerical) style,
2166  or if you want to use one of the countless style files for 
2167 \begin_inset Flex Code
2168 status collapsed
2169
2170 \begin_layout Plain Layout
2171 natbib
2172 \end_layout
2173
2174 \end_inset
2175
2176 , than the established 
2177 \begin_inset Flex Code
2178 status collapsed
2179
2180 \begin_layout Plain Layout
2181 natbib
2182 \end_layout
2183
2184 \end_inset
2185
2186  package is probably your choice.
2187  If you need special features like short title references, ibidem etc., you
2188  might consider the 
2189 \begin_inset Flex Code
2190 status collapsed
2191
2192 \begin_layout Plain Layout
2193 jurabib
2194 \end_layout
2195
2196 \end_inset
2197
2198  package.
2199 \end_layout
2200
2201 \begin_layout Standard
2202 The handling of both packages in LyX is basically the same.
2203  Go to 
2204 \begin_inset Flex MenuItem
2205 status collapsed
2206
2207 \begin_layout Plain Layout
2208 Document\SpecialChar \menuseparator
2209 Settings
2210 \end_layout
2211
2212 \end_inset
2213
2214  and select under 
2215 \begin_inset Flex MenuItem
2216 status collapsed
2217
2218 \begin_layout Plain Layout
2219 Bibliography
2220 \end_layout
2221
2222 \end_inset
2223
2224  the option 
2225 \begin_inset Flex MenuItem
2226 status collapsed
2227
2228 \begin_layout Plain Layout
2229 Natbib
2230 \end_layout
2231
2232 \end_inset
2233
2234  or 
2235 \begin_inset Flex MenuItem
2236 status collapsed
2237
2238 \begin_layout Plain Layout
2239 Jurabib
2240 \end_layout
2241
2242 \end_inset
2243
2244 .
2245  With both packages, you will get some extra features in the citation dialog
2246  and you can select the style of the reference (
2247 \begin_inset Quotes eld
2248 \end_inset
2249
2250 Knuth 1984
2251 \begin_inset Quotes erd
2252 \end_inset
2253
2254
2255 \begin_inset Quotes eld
2256 \end_inset
2257
2258 Knuth (1984)
2259 \begin_inset Quotes erd
2260 \end_inset
2261
2262
2263 \begin_inset Quotes eld
2264 \end_inset
2265
2266 Knuth, 1984
2267 \begin_inset Quotes erd
2268 \end_inset
2269
2270
2271 \begin_inset Quotes eld
2272 \end_inset
2273
2274 1984
2275 \begin_inset Quotes erd
2276 \end_inset
2277
2278  etc.).
2279  Note that both packages need specifically designed style files.
2280  They both ship their own, but there are lots of additional style files,
2281  and there is even an interactive style file builder
2282 \begin_inset Foot
2283 status collapsed
2284
2285 \begin_layout Plain Layout
2286 See 
2287 \begin_inset Flex URL
2288 status open
2289
2290 \begin_layout Plain Layout
2291
2292 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2293 \end_layout
2294
2295 \end_inset
2296
2297
2298 \end_layout
2299
2300 \end_inset
2301
2302  for 
2303 \begin_inset Flex Code
2304 status collapsed
2305
2306 \begin_layout Plain Layout
2307 natbib
2308 \end_layout
2309
2310 \end_inset
2311
2312 .
2313 \end_layout
2314
2315 \begin_layout Subsection
2316 Sectioned Bibliographies
2317 \end_layout
2318
2319 \begin_layout Standard
2320 Sometimes you might need to divide your bibliography into several sections.
2321  If you are for instance a historian, the possibility to separate sources
2322  and scientific works is most likely a 
2323 \begin_inset Quotes eld
2324 \end_inset
2325
2326 must have
2327 \begin_inset Quotes erd
2328 \end_inset
2329
2330 .
2331  Unfortunately, BibTeX itself does not allow you to do this.
2332  But with the help of some LaTeX packages, BibTeX can be extended to fit
2333  your needs.
2334 \end_layout
2335
2336 \begin_layout Standard
2337 LyX provides native support for one of these packages, 
2338 \family typewriter
2339 bibtopic
2340 \family default
2341 .
2342 \begin_inset Foot
2343 status collapsed
2344
2345 \begin_layout Plain Layout
2346 Available from 
2347 \begin_inset Flex URL
2348 status open
2349
2350 \begin_layout Plain Layout
2351
2352 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2353 \end_layout
2354
2355 \end_inset
2356
2357
2358 \end_layout
2359
2360 \end_inset
2361
2362  The advantage of this package (compared to other packages like 
2363 \family typewriter
2364 multibib
2365 \family default
2366 ) is that you don't need to define new citation commands.
2367  Instead, you need to prepare different bibliographic databases which include
2368  the entries for the different sections of the bibliography.
2369  For example: If you want to divide your bibliography into the sections
2370  
2371 \begin_inset Quotes eld
2372 \end_inset
2373
2374 Sources
2375 \begin_inset Quotes erd
2376 \end_inset
2377
2378  and 
2379 \begin_inset Quotes eld
2380 \end_inset
2381
2382 Scientific works
2383 \begin_inset Quotes erd
2384 \end_inset
2385
2386 , you first need to create two bibliographic databases, e.
2387 \begin_inset space \thinspace{}
2388 \end_inset
2389
2390 g.
2391 \begin_inset space \space{}
2392 \end_inset
2393
2394
2395 \begin_inset Flex Code
2396 status collapsed
2397
2398 \begin_layout Plain Layout
2399 sources.bib
2400 \end_layout
2401
2402 \end_inset
2403
2404  and 
2405 \begin_inset Flex Code
2406 status collapsed
2407
2408 \begin_layout Plain Layout
2409 scientific.bib
2410 \end_layout
2411
2412 \end_inset
2413
2414 .
2415  
2416 \end_layout
2417
2418 \begin_layout Standard
2419 Go to 
2420 \begin_inset Flex MenuItem
2421 status collapsed
2422
2423 \begin_layout Plain Layout
2424 Document\SpecialChar \menuseparator
2425 Settings
2426 \end_layout
2427
2428 \end_inset
2429
2430  and check under 
2431 \begin_inset Flex MenuItem
2432 status collapsed
2433
2434 \begin_layout Plain Layout
2435 Bibliography
2436 \end_layout
2437
2438 \end_inset
2439
2440  the option 
2441 \begin_inset Flex MenuItem
2442 status collapsed
2443
2444 \begin_layout Plain Layout
2445 Sectioned bibliography
2446 \end_layout
2447
2448 \end_inset
2449
2450 .
2451  Now you can insert multiple BibTeX bibliographies, one for each section
2452  of your bibliography.
2453  Returning to our example: Insert the BibTeX bibliography 
2454 \begin_inset Flex Code
2455 status collapsed
2456
2457 \begin_layout Plain Layout
2458 sources.bib
2459 \end_layout
2460
2461 \end_inset
2462
2463  and a second one for the database 
2464 \begin_inset Flex Code
2465 status collapsed
2466
2467 \begin_layout Plain Layout
2468 scientific.bib
2469 \end_layout
2470
2471 \end_inset
2472
2473 .
2474  You are free to use the same or different styles for each section.
2475  Additionally, you can chose if the bibliography section should contain
2476  
2477 \begin_inset Quotes eld
2478 \end_inset
2479
2480 all cited references
2481 \begin_inset Quotes erd
2482 \end_inset
2483
2484  of the specified database(s) (which is the default), 
2485 \begin_inset Quotes eld
2486 \end_inset
2487
2488 all uncited references
2489 \begin_inset Quotes erd
2490 \end_inset
2491
2492  or even 
2493 \begin_inset Quotes eld
2494 \end_inset
2495
2496 all references
2497 \begin_inset Quotes erd
2498 \end_inset
2499
2500 .
2501  This might be useful if you would like to separate your bibliography into
2502  three sections: 
2503 \begin_inset Quotes eld
2504 \end_inset
2505
2506 Cited sources
2507 \begin_inset Quotes erd
2508 \end_inset
2509
2510
2511 \begin_inset Quotes eld
2512 \end_inset
2513
2514 Uncited sources
2515 \begin_inset Quotes erd
2516 \end_inset
2517
2518 , and 
2519 \begin_inset Quotes eld
2520 \end_inset
2521
2522 Scientific works
2523 \begin_inset Quotes erd
2524 \end_inset
2525
2526 .
2527  The titles for the sections can be added as ordinary sections or subsections.
2528  Since 
2529 \begin_inset Flex Code
2530 status collapsed
2531
2532 \begin_layout Plain Layout
2533 bibtopic
2534 \end_layout
2535
2536 \end_inset
2537
2538  removes the bibliography title, you have manually re-add that, too (as
2539  a chapter* or section*, for instance).
2540 \end_layout
2541
2542 \begin_layout Subsection
2543 Multiple Bibliographies
2544 \end_layout
2545
2546 \begin_layout Standard
2547 Multiple bibliographies, e.
2548 \begin_inset space \thinspace{}
2549 \end_inset
2550
2551 g.
2552 \begin_inset space \space{}
2553 \end_inset
2554
2555 a bibliography for each section or chapter of the document, are not supported
2556  by BibTeX itself.
2557  But the 
2558 \begin_inset Flex Code
2559 status collapsed
2560
2561 \begin_layout Plain Layout
2562 bibtopic
2563 \end_layout
2564
2565 \end_inset
2566
2567  package, which is used for the creation of sectioned bibliographies in
2568  LyX (see the previous section), provides an easy way to solve this task,
2569  if you are willing to use some 
2570 \begin_inset Flex MenuItem
2571 status collapsed
2572
2573 \begin_layout Plain Layout
2574 TeX Code
2575 \end_layout
2576
2577 \end_inset
2578
2579  (see section
2580 \begin_inset space ~
2581 \end_inset
2582
2583
2584 \begin_inset CommandInset ref
2585 LatexCommand ref
2586 reference "sec:Inserting-TeX-Code"
2587
2588 \end_inset
2589
2590 ).
2591 \begin_inset Foot
2592 status collapsed
2593
2594 \begin_layout Plain Layout
2595 An alternative approach is to use the 
2596 \begin_inset Flex Code
2597 status collapsed
2598
2599 \begin_layout Plain Layout
2600 chapterbib
2601 \end_layout
2602
2603 \end_inset
2604
2605  or 
2606 \begin_inset Flex Code
2607 status collapsed
2608
2609 \begin_layout Plain Layout
2610 bibunits
2611 \end_layout
2612
2613 \end_inset
2614
2615  package, respectively.
2616 \end_layout
2617
2618 \end_inset
2619
2620
2621 \end_layout
2622
2623 \begin_layout Standard
2624 First go to 
2625 \begin_inset Flex MenuItem
2626 status collapsed
2627
2628 \begin_layout Plain Layout
2629 Document\SpecialChar \menuseparator
2630 Settings
2631 \end_layout
2632
2633 \end_inset
2634
2635  and under 
2636 \begin_inset Flex MenuItem
2637 status collapsed
2638
2639 \begin_layout Plain Layout
2640 Bibliography
2641 \end_layout
2642
2643 \end_inset
2644
2645  check 
2646 \begin_inset Flex MenuItem
2647 status collapsed
2648
2649 \begin_layout Plain Layout
2650 Sectioned bibliography
2651 \end_layout
2652
2653 \end_inset
2654
2655 .
2656  In the document, you have to enclose the sections, which shall contain
2657  their own bibliography (including the BibTeX bibliography itself), between
2658  
2659 \begin_inset Flex Code
2660 status collapsed
2661
2662 \begin_layout Plain Layout
2663
2664 \backslash
2665 begin{btUnit}
2666 \end_layout
2667
2668 \end_inset
2669
2670  and 
2671 \begin_inset Flex Code
2672 status collapsed
2673
2674 \begin_layout Plain Layout
2675
2676 \backslash
2677 end{btUnit}
2678 \end_layout
2679
2680 \end_inset
2681
2682  (those commands have to be inserted as TeX code).
2683  The bibliography will contain all references which have been cited in the
2684  current 
2685 \begin_inset Flex Code
2686 status collapsed
2687
2688 \begin_layout Plain Layout
2689 btUnit
2690 \end_layout
2691
2692 \end_inset
2693
2694 .
2695  
2696 \series bold
2697 Note:
2698 \series default
2699  If you are using this approach, then every citation reference has to be
2700  inside some 
2701 \begin_inset Flex Code
2702 status collapsed
2703
2704 \begin_layout Plain Layout
2705 btUnit
2706 \end_layout
2707
2708 \end_inset
2709
2710 .
2711  Also, the 
2712 \begin_inset Flex Code
2713 status collapsed
2714
2715 \begin_layout Plain Layout
2716 btUnit
2717 \end_layout
2718
2719 \end_inset
2720
2721 s cannot be nested.
2722 \end_layout
2723
2724 \begin_layout Section
2725 Multipart Documents
2726 \end_layout
2727
2728 \begin_layout Subsection
2729 General Operation
2730 \end_layout
2731
2732 \begin_layout Standard
2733 When you are working on a large file with many sections, it is often convenient
2734  to break up the document into several files, or perhaps you have something
2735  where a table may change from time to time, but the preceding text does
2736  not.
2737  In these cases, you should seriously consider using multipart documents.
2738  For example, scientific papers often have five major sections: the introduction
2739 , observations, results, discussion, and conclusion.
2740  Each of these could be its own separate LyX file, with one 
2741 \begin_inset Quotes eld
2742 \end_inset
2743
2744 master
2745 \begin_inset Quotes erd
2746 \end_inset
2747
2748  file which contains the title, authors, abstract, references, etc., plus
2749  the five included files.
2750  It is important to note that each of these files is a full LyX file which
2751  can be formatted and printed on its own, as well as included in a master
2752  file.
2753  Each of these files must have the same document class, however—don't attempt
2754  to mix book classes with article classes.
2755  You may also include LaTeX files; however, these files must not have their
2756  own preamble (i.
2757 \begin_inset space \thinspace{}
2758 \end_inset
2759
2760 g.
2761 \begin_inset space \space{}
2762 \end_inset
2763
2764 everything up to and including the 
2765 \begin_inset Flex Code
2766 status collapsed
2767
2768 \begin_layout Plain Layout
2769
2770 \backslash
2771 begin{document}
2772 \end_layout
2773
2774 \end_inset
2775
2776  line as well as the 
2777 \begin_inset Flex Code
2778 status collapsed
2779
2780 \begin_layout Plain Layout
2781
2782 \backslash
2783 end{document}
2784 \end_layout
2785
2786 \end_inset
2787
2788  line must be deleted) or else errors will be generated when you try to
2789  make a DVI file.
2790 \end_layout
2791
2792 \begin_layout Standard
2793 LyX allows you to include files quite easily with 
2794 \begin_inset Flex MenuItem
2795 status collapsed
2796
2797 \begin_layout Plain Layout
2798 Insert\SpecialChar \menuseparator
2799 ChiId
2800 \begin_inset space ~
2801 \end_inset
2802
2803 Document
2804 \end_layout
2805
2806 \end_inset
2807
2808 .
2809  When you click on this selection a small box is inserted into the file
2810  at the current cursor location.
2811  Clicking on the box raises a dialog which allows you to select the file
2812  to be included, and the method of its inclusion.
2813  
2814 \end_layout
2815
2816 \begin_layout Standard
2817 The file selection box should by now be obvious.
2818  The three inclusion methods are 
2819 \begin_inset Quotes eld
2820 \end_inset
2821
2822 include
2823 \begin_inset Quotes erd
2824 \end_inset
2825
2826
2827 \begin_inset Quotes eld
2828 \end_inset
2829
2830 input
2831 \begin_inset Quotes erd
2832 \end_inset
2833
2834 , and 
2835 \begin_inset Quotes eld
2836 \end_inset
2837
2838 verbatim
2839 \begin_inset Quotes erd
2840 \end_inset
2841
2842 .
2843  The difference between 
2844 \begin_inset Quotes eld
2845 \end_inset
2846
2847 include
2848 \begin_inset Quotes erd
2849 \end_inset
2850
2851  and 
2852 \begin_inset Quotes eld
2853 \end_inset
2854
2855 input
2856 \begin_inset Quotes erd
2857 \end_inset
2858
2859  is really only meaningful to LaTeXperts, but the practical difference is
2860  that files which are 
2861 \begin_inset Quotes eld
2862 \end_inset
2863
2864 included
2865 \begin_inset Quotes erd
2866 \end_inset
2867
2868  are typeset beginning on a new page, while files which are 
2869 \begin_inset Quotes eld
2870 \end_inset
2871
2872 inputted
2873 \begin_inset Quotes erd
2874 \end_inset
2875
2876  are typeset starting on the current page.
2877 \end_layout
2878
2879 \begin_layout Standard
2880 Generally, the master file is converted into a full LaTeX file before typesettin
2881 g, while the included files are converted to LaTeX files which do not have
2882  all the preamble information.
2883 \end_layout
2884
2885 \begin_layout Standard
2886
2887 \begin_inset Quotes eld
2888 \end_inset
2889
2890 verbatim
2891 \begin_inset Quotes erd
2892 \end_inset
2893
2894  included file allows you to include a file typeset exactly as it appears
2895  in the file, i.
2896 \begin_inset space \thinspace{}
2897 \end_inset
2898
2899 g.
2900 \begin_inset space \space{}
2901 \end_inset
2902
2903 in 
2904 \begin_inset Flex Code
2905 status collapsed
2906
2907 \begin_layout Plain Layout
2908 verbatim
2909 \end_layout
2910
2911 \end_inset
2912
2913  mode, with the characters set in a fixed-width typewriter font.
2914  Normally, spaces in this file are invisible, though two consecutive spaces
2915  are conserved, unlike LyX's normal treatment of spaces.
2916  However, setting the 
2917 \begin_inset Flex MenuItem
2918 status collapsed
2919
2920 \begin_layout Plain Layout
2921 Mark
2922 \begin_inset space ~
2923 \end_inset
2924
2925 spaces
2926 \begin_inset space ~
2927 \end_inset
2928
2929 in
2930 \begin_inset space ~
2931 \end_inset
2932
2933 output
2934 \end_layout
2935
2936 \end_inset
2937
2938  checkbox typesets a mark to unambiguously define the presence of a space.
2939  
2940 \end_layout
2941
2942 \begin_layout Subsection
2943 Cross-References Between Files
2944 \end_layout
2945
2946 \begin_layout Standard
2947 \begin_inset Box Shadowbox
2948 position "t"
2949 hor_pos "c"
2950 has_inner_box 1
2951 inner_pos "t"
2952 use_parbox 0
2953 use_makebox 0
2954 width "100col%"
2955 special "none"
2956 height "1in"
2957 height_special "totalheight"
2958 status open
2959
2960 \begin_layout Plain Layout
2961 This section is somewhat out of date.
2962  Need to describe default master documents and how children are opened when
2963  the master is.
2964  [[FIXME]]
2965 \end_layout
2966
2967 \end_inset
2968
2969
2970 \end_layout
2971
2972 \begin_layout Standard
2973 It is possible to set up cross-references between the different files.
2974  First, open all the files in question: let's call them A and B in a two
2975  file example, where B is included in A.
2976  Let's say you insert a label in A, then want to reference it in B.
2977  Open the cross-reference dialog in whilst in document B, and you can select
2978  the 
2979 \begin_inset Quotes eld
2980 \end_inset
2981
2982 buffer
2983 \begin_inset Quotes erd
2984 \end_inset
2985
2986  to use.
2987 \end_layout
2988
2989 \begin_layout Subsection
2990 Bibliography Lists in all Subdocuments
2991 \end_layout
2992
2993 \begin_layout Standard
2994 \begin_inset Box Frameless
2995 position "t"
2996 hor_pos "c"
2997 has_inner_box 1
2998 inner_pos "t"
2999 use_parbox 0
3000 use_makebox 0
3001 width "100col%"
3002 special "none"
3003 height "1in"
3004 height_special "totalheight"
3005 status open
3006
3007 \begin_layout Plain Layout
3008 This section also needs updating.
3009  There is now material about this on the wiki, and it could be copied here.
3010 \end_layout
3011
3012 \end_inset
3013
3014
3015 \end_layout
3016
3017 \begin_layout Standard
3018 Copy the bibliography list with all entries to all subdocuments and transform
3019  them to a comment.
3020  This way LyX will find the 
3021 \begin_inset Flex Code
3022 status collapsed
3023
3024 \begin_layout Plain Layout
3025 .bib
3026 \end_layout
3027
3028 \end_inset
3029
3030 -files and you can easily insert references without making the bibliography
3031  list visible.
3032 \end_layout
3033
3034 \begin_layout Standard
3035 As the bibliography list is in a comment, LaTeX won't use use it and the
3036  references will look like this: [?], instead of like this: [1].
3037  One solution is to use the LaTeX-package 
3038 \begin_inset Flex Code
3039 status collapsed
3040
3041 \begin_layout Plain Layout
3042 comment
3043 \end_layout
3044
3045 \end_inset
3046
3047  that will only include comments by processing the files separately.
3048  To do this, add in the LaTeX preamble of every subdocument the following:
3049 \end_layout
3050
3051 \begin_layout LyX-Code
3052
3053 \backslash
3054 usepackage{comment}
3055 \end_layout
3056
3057 \begin_layout LyX-Code
3058
3059 \backslash
3060 includecomment{comment}
3061 \end_layout
3062
3063 \begin_layout Standard
3064 See also 
3065 \begin_inset Flex URL
3066 status collapsed
3067
3068 \begin_layout Plain Layout
3069
3070 http://wiki.lyx.org/FAQ/Unsorted#toc31
3071 \end_layout
3072
3073 \end_inset
3074
3075 .
3076 \end_layout
3077
3078 \begin_layout Section
3079 LyX Archives
3080 \end_layout
3081
3082 \begin_layout Standard
3083 Users sometimes need to be able to 
3084 \begin_inset Quotes eld
3085 \end_inset
3086
3087 bundle
3088 \begin_inset Quotes erd
3089 \end_inset
3090
3091  a LyX file together with all the images (and other files) on which it depends,
3092  either for sending to a publisher or for sharing with a co-author.
3093  LyX 2.0 includes a Python script (
3094 \begin_inset Flex Code
3095 status collapsed
3096
3097 \begin_layout Plain Layout
3098 lyxpak.py
3099 \end_layout
3100
3101 \end_inset
3102
3103 ) that automates this process.
3104  To use it, you must have either the 
3105 \begin_inset Flex Code
3106 status collapsed
3107
3108 \begin_layout Plain Layout
3109 zipfile
3110 \end_layout
3111
3112 \end_inset
3113
3114  or 
3115 \begin_inset Flex Code
3116 status collapsed
3117
3118 \begin_layout Plain Layout
3119 tarfile
3120 \end_layout
3121
3122 \end_inset
3123
3124  python modules installed on your system.
3125  By default, the script prefers the 
3126 \begin_inset Flex Code
3127 status collapsed
3128
3129 \begin_layout Plain Layout
3130 gzip
3131 \end_layout
3132
3133 \end_inset
3134
3135 -compressed 
3136 \begin_inset Flex Code
3137 status collapsed
3138
3139 \begin_layout Plain Layout
3140 tar
3141 \end_layout
3142
3143 \end_inset
3144
3145  format on Unix-like systems and the 
3146 \begin_inset Flex Code
3147 status collapsed
3148
3149 \begin_layout Plain Layout
3150 zip
3151 \end_layout
3152
3153 \end_inset
3154
3155  format on Windows.
3156 \end_layout
3157
3158 \begin_layout Standard
3159 LyX's configuration process will set the script up to export a `LyX Archive',
3160  and this format will then be available under 
3161 \begin_inset Flex Code
3162 status collapsed
3163
3164 \begin_layout Plain Layout
3165 File\SpecialChar \menuseparator
3166 Export
3167 \end_layout
3168
3169 \end_inset
3170
3171 .
3172 \end_layout
3173
3174 \begin_layout Standard
3175 Independently of the platform, the generation of a particular archive format
3176  can be forced by adding either the 
3177 \begin_inset Flex Code
3178 status collapsed
3179
3180 \begin_layout Plain Layout
3181 -t
3182 \end_layout
3183
3184 \end_inset
3185
3186  (for the 
3187 \begin_inset Flex Code
3188 status collapsed
3189
3190 \begin_layout Plain Layout
3191 tar
3192 \end_layout
3193
3194 \end_inset
3195
3196  format) or 
3197 \begin_inset Flex Code
3198 status collapsed
3199
3200 \begin_layout Plain Layout
3201 -z
3202 \end_layout
3203
3204 \end_inset
3205
3206  (for the 
3207 \begin_inset Flex Code
3208 status collapsed
3209
3210 \begin_layout Plain Layout
3211 zip
3212 \end_layout
3213
3214 \end_inset
3215
3216  format) switch to the 
3217 \begin_inset Flex Code
3218 status collapsed
3219
3220 \begin_layout Plain Layout
3221 LyX\SpecialChar \menuseparator
3222 LyX Archive
3223 \end_layout
3224
3225 \end_inset
3226
3227  converter in 
3228 \begin_inset Flex Code
3229 status collapsed
3230
3231 \begin_layout Plain Layout
3232 Tools\SpecialChar \menuseparator
3233 Preferences\SpecialChar \menuseparator
3234 File Handling\SpecialChar \menuseparator
3235 Converters
3236 \end_layout
3237
3238 \end_inset
3239
3240 .
3241  (Make sure you add the switch after the script name, not before it.)
3242 \end_layout
3243
3244 \begin_layout Section
3245 Fancy Headers and Footers
3246 \end_layout
3247
3248 \begin_layout Standard
3249 The default page layout is rather plain; for an 
3250 \begin_inset Flex Code
3251 status collapsed
3252
3253 \begin_layout Plain Layout
3254 article
3255 \end_layout
3256
3257 \end_inset
3258
3259  document class, all you get is a centered page number at the bottom of
3260  the page.
3261  This document uses KOMA-script's book class, so it appears to be a bit
3262  fancier.
3263  But to really put on a show, you need to set the document page style to
3264  
3265 \begin_inset Quotes eld
3266 \end_inset
3267
3268 fancy
3269 \begin_inset Quotes erd
3270 \end_inset
3271
3272 , as mentioned in the 
3273 \emph on
3274 User Guide
3275 \emph default
3276 .
3277  This section describes the LaTeX code you need to insert in your LaTeX
3278  preamble in order to get the desired effects.
3279 \end_layout
3280
3281 \begin_layout Standard
3282 For more information on fancy headers, see the 
3283 \begin_inset Flex Code
3284 status collapsed
3285
3286 \begin_layout Plain Layout
3287 fancyhdr
3288 \end_layout
3289
3290 \end_inset
3291
3292  package documentation.
3293  (
3294 \begin_inset Flex URL
3295 status collapsed
3296
3297 \begin_layout Plain Layout
3298
3299 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3300 \end_layout
3301
3302 \end_inset
3303
3304 )
3305 \end_layout
3306
3307 \begin_layout Standard
3308 The page header is divided into three fields, not surprisingly labeled 
3309 \begin_inset Quotes eld
3310 \end_inset
3311
3312 left
3313 \begin_inset Quotes erd
3314 \end_inset
3315
3316
3317 \begin_inset Quotes eld
3318 \end_inset
3319
3320 center
3321 \begin_inset Quotes erd
3322 \end_inset
3323
3324 , and 
3325 \begin_inset Quotes eld
3326 \end_inset
3327
3328 right
3329 \begin_inset Quotes erd
3330 \end_inset
3331
3332 .
3333  The footer is also divided into these three fields.
3334  The LaTeX commands to set these fields in the simplest manner are 
3335 \begin_inset Flex Code
3336 status collapsed
3337
3338 \begin_layout Plain Layout
3339
3340 \backslash
3341 lhead
3342 \end_layout
3343
3344 \end_inset
3345
3346
3347 \begin_inset Flex Code
3348 status collapsed
3349
3350 \begin_layout Plain Layout
3351
3352 \backslash
3353 chead
3354 \end_layout
3355
3356 \end_inset
3357
3358
3359 \begin_inset Flex Code
3360 status collapsed
3361
3362 \begin_layout Plain Layout
3363
3364 \backslash
3365 rhead
3366 \end_layout
3367
3368 \end_inset
3369
3370
3371 \begin_inset Flex Code
3372 status collapsed
3373
3374 \begin_layout Plain Layout
3375
3376 \backslash
3377 lfoot
3378 \end_layout
3379
3380 \end_inset
3381
3382 , etc.
3383  Suppose you wish to put your name in the upper left hand corner of each
3384  page.
3385  Simply insert the following command in the preamble: 
3386 \end_layout
3387
3388 \begin_layout Standard
3389
3390 \family typewriter
3391
3392 \backslash
3393 lhead{John Q.
3394  DocWriter}
3395 \end_layout
3396
3397 \begin_layout Standard
3398 You will now see your name in the upper left.
3399  If a field has a default entry that you would like to get rid of (often
3400  the page number appears in the central footer, simply include a command
3401  with a blank argument, e.
3402 \begin_inset space \thinspace{}
3403 \end_inset
3404
3405 g.:
3406 \end_layout
3407
3408 \begin_layout Standard
3409
3410 \family typewriter
3411
3412 \backslash
3413 cfoot{}
3414 \end_layout
3415
3416 \begin_layout Standard
3417 Let's get really fancy: lets put the section number with the word 
3418 \begin_inset Quotes eld
3419 \end_inset
3420
3421 Section
3422 \begin_inset Quotes erd
3423 \end_inset
3424
3425  (e.
3426 \begin_inset space \thinspace{}
3427 \end_inset
3428
3429 g.
3430 \begin_inset space \space{}
3431 \end_inset
3432
3433 Section 3) in the upper left, the page number (e.
3434 \begin_inset space \thinspace{}
3435 \end_inset
3436
3437 g.
3438 \begin_inset space \space{}
3439 \end_inset
3440
3441 Page 4) in the upper right, your name in the lower left, and the date in
3442  the lower right.
3443  The following commands should now appear in the preamble:
3444 \end_layout
3445
3446 \begin_layout Standard
3447
3448 \family typewriter
3449
3450 \backslash
3451 lhead{Section 
3452 \backslash
3453 thesection}
3454 \end_layout
3455
3456 \begin_layout Standard
3457
3458 \family typewriter
3459
3460 \backslash
3461 chead{}
3462 \end_layout
3463
3464 \begin_layout Standard
3465
3466 \family typewriter
3467
3468 \backslash
3469 rhead{Page 
3470 \backslash
3471 thepage}
3472 \end_layout
3473
3474 \begin_layout Standard
3475
3476 \family typewriter
3477
3478 \backslash
3479 lfoot{John Q.
3480  DocWriter}
3481 \end_layout
3482
3483 \begin_layout Standard
3484
3485 \family typewriter
3486
3487 \backslash
3488 cfoot{}
3489 \end_layout
3490
3491 \begin_layout Standard
3492
3493 \family typewriter
3494
3495 \backslash
3496 rfoot{
3497 \backslash
3498 today}
3499 \end_layout
3500
3501 \begin_layout Standard
3502 The commands 
3503 \begin_inset Flex Code
3504 status collapsed
3505
3506 \begin_layout Plain Layout
3507
3508 \backslash
3509 thesection
3510 \end_layout
3511
3512 \end_inset
3513
3514  and 
3515 \begin_inset Flex Code
3516 status collapsed
3517
3518 \begin_layout Plain Layout
3519
3520 \backslash
3521 thepage
3522 \end_layout
3523
3524 \end_inset
3525
3526  access LaTeX's section and page counters, and so print out the current
3527  section and page numbers.
3528  
3529 \begin_inset Flex Code
3530 status collapsed
3531
3532 \begin_layout Plain Layout
3533
3534 \backslash
3535 today
3536 \end_layout
3537
3538 \end_inset
3539
3540  simply prints out today's date.
3541 \end_layout
3542
3543 \begin_layout Standard
3544 The thicknesses of the horizontal rules drawn beneath the header and above
3545  the footer can also be modified.
3546  If you don't want one of the rules, set its thickness to 0.
3547  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3548  Use commands
3549 \family typewriter
3550  
3551 \family default
3552 like 
3553 \begin_inset Flex Code
3554 status collapsed
3555
3556 \begin_layout Plain Layout
3557
3558 \backslash
3559 renewcommand{
3560 \backslash
3561 headrulewidth}{0.4pt}
3562 \end_layout
3563
3564 \end_inset
3565
3566  and 
3567 \begin_inset Flex Code
3568 status collapsed
3569
3570 \begin_layout Plain Layout
3571
3572 \backslash
3573 renewcommand{
3574 \backslash
3575 footrulewidth}{0.4pt}
3576 \end_layout
3577
3578 \end_inset
3579
3580  to set the thicknesses.
3581 \end_layout
3582
3583 \begin_layout Standard
3584 You can switch the header/footer settings on and off for individual pages
3585  using commands like 
3586 \begin_inset Flex Code
3587 status collapsed
3588
3589 \begin_layout Plain Layout
3590
3591 \backslash
3592 thispagestyle{empty}
3593 \end_layout
3594
3595 \end_inset
3596
3597
3598 \begin_inset Flex Code
3599 status collapsed
3600
3601 \begin_layout Plain Layout
3602
3603 \backslash
3604 thispagestyle{plain}
3605 \end_layout
3606
3607 \end_inset
3608
3609 , and 
3610 \begin_inset Flex Code
3611 status collapsed
3612
3613 \begin_layout Plain Layout
3614
3615 \backslash
3616 thispagestyle{fancy}
3617 \end_layout
3618
3619 \end_inset
3620
3621 .
3622  Simply insert them in the text on the page you want changed and mark them
3623  as TeX code.
3624  In fact, title pages are marked as plain by default, while following pages
3625  are marked fancy when using the global fancy setting.
3626 \end_layout
3627
3628 \begin_layout Standard
3629 As a final example, it is possible to include an image in the header or
3630  footer.
3631  Suppose you want to put a company logo in the upper lefthand corner.
3632  You might try something like
3633 \end_layout
3634
3635 \begin_layout Standard
3636
3637 \family typewriter
3638
3639 \backslash
3640 lhead{
3641 \backslash
3642 resizebox{1in}{!}{
3643 \backslash
3644 includegraphics{logo.eps}}}
3645 \end_layout
3646
3647 \begin_layout Standard
3648 \noindent
3649 (you may need to preface this with 
3650 \begin_inset Flex Code
3651 status collapsed
3652
3653 \begin_layout Plain Layout
3654 \noindent
3655
3656 \backslash
3657 usepackage{graphics}
3658 \end_layout
3659
3660 \end_inset
3661
3662  if you don't include graphics elsewhere in your document).
3663 \end_layout
3664
3665 \begin_layout Section
3666 Itemize Bullet Selection
3667 \begin_inset CommandInset label
3668 LatexCommand label
3669 name "sec:bullet"
3670
3671 \end_inset
3672
3673
3674 \end_layout
3675
3676 \begin_layout Standard
3677 by
3678 \noun on
3679  Allan Rae
3680 \end_layout
3681
3682 \begin_layout Subsection
3683 Introduction
3684 \end_layout
3685
3686 \begin_layout Standard
3687 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3688  Using this dialog you can easily specify what bullet shape to use at each
3689  level of an itemized list.
3690  These settings are document-wide so you won't be able to specify different
3691  sets of bullets for different paragraphs.
3692 \begin_inset Foot
3693 status collapsed
3694
3695 \begin_layout Plain Layout
3696 Well, actually you can but you'll have to do it by hand.
3697 \end_layout
3698
3699 \end_inset
3700
3701
3702 \end_layout
3703
3704 \begin_layout Subsection
3705 How it looks
3706 \end_layout
3707
3708 \begin_layout Standard
3709 Open the dialog by selecting the 
3710 \begin_inset Flex MenuItem
3711 status collapsed
3712
3713 \begin_layout Plain Layout
3714 Document\SpecialChar \menuseparator
3715 Settings
3716 \end_layout
3717
3718 \end_inset
3719
3720  menu item and then select the 
3721 \begin_inset Flex MenuItem
3722 status collapsed
3723
3724 \begin_layout Plain Layout
3725 Bullets
3726 \end_layout
3727
3728 \end_inset
3729
3730  tab.
3731 \end_layout
3732
3733 \begin_layout Standard
3734 The dialog provides you with a table of bullet shapes.
3735  A column of buttons on the left of the table provides access to the six
3736  different panels of bullet shapes.
3737  The row of buttons across the top is used to select which bullet depth
3738  you are changing.
3739  A text entry under the table shows the currently selected bullet shape's
3740  LaTeX equivalent and this can be edited if desired.
3741  If you do modify the text you will also need to specify any needed packages
3742  in the LaTeX preamble.
3743 \end_layout
3744
3745 \begin_layout Standard
3746 The six panels are divided up by the packages they require.
3747  The following table shows the mappings from button name to LaTeX packages.
3748 \end_layout
3749
3750 \begin_layout Standard
3751 \align center
3752 \begin_inset Tabular
3753 <lyxtabular version="3" rows="7" columns="2">
3754 <features tabularvalignment="middle">
3755 <column alignment="center" valignment="top" width="0pt">
3756 <column alignment="center" valignment="top" width="0pt">
3757 <row>
3758 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3759 \begin_inset Text
3760
3761 \begin_layout Plain Layout
3762
3763 \family roman
3764 \series medium
3765 \shape up
3766 \size normal
3767 \emph off
3768 \bar no
3769 \noun off
3770 \color none
3771 Button
3772 \end_layout
3773
3774 \end_inset
3775 </cell>
3776 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3777 \begin_inset Text
3778
3779 \begin_layout Plain Layout
3780
3781 \family roman
3782 \series medium
3783 \shape up
3784 \size normal
3785 \emph off
3786 \bar no
3787 \noun off
3788 \color none
3789 Packages Required
3790 \end_layout
3791
3792 \end_inset
3793 </cell>
3794 </row>
3795 <row>
3796 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3797 \begin_inset Text
3798
3799 \begin_layout Plain Layout
3800
3801 \family sans
3802 \series medium
3803 \shape up
3804 \size normal
3805 \emph off
3806 \bar no
3807 \noun off
3808 \color none
3809 Standard
3810 \end_layout
3811
3812 \end_inset
3813 </cell>
3814 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3815 \begin_inset Text
3816
3817 \begin_layout Plain Layout
3818
3819 \series medium
3820 \shape up
3821 \size normal
3822 \emph off
3823 \bar no
3824 \noun off
3825 \color none
3826 base LaTeX
3827 \end_layout
3828
3829 \end_inset
3830 </cell>
3831 </row>
3832 <row>
3833 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3834 \begin_inset Text
3835
3836 \begin_layout Plain Layout
3837
3838 \family sans
3839 \series medium
3840 \shape up
3841 \size normal
3842 \emph off
3843 \bar no
3844 \noun off
3845 \color none
3846 Maths
3847 \end_layout
3848
3849 \end_inset
3850 </cell>
3851 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3852 \begin_inset Text
3853
3854 \begin_layout Plain Layout
3855
3856 \family typewriter
3857 \series medium
3858 \shape up
3859 \size normal
3860 \emph off
3861 \bar no
3862 \noun off
3863 \color none
3864 amssymb.sty
3865 \end_layout
3866
3867 \end_inset
3868 </cell>
3869 </row>
3870 <row>
3871 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3872 \begin_inset Text
3873
3874 \begin_layout Plain Layout
3875
3876 \family sans
3877 \series medium
3878 \shape up
3879 \size normal
3880 \emph off
3881 \bar no
3882 \noun off
3883 \color none
3884 Ding1
3885 \end_layout
3886
3887 \end_inset
3888 </cell>
3889 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3890 \begin_inset Text
3891
3892 \begin_layout Plain Layout
3893
3894 \family typewriter
3895 \series medium
3896 \shape up
3897 \size normal
3898 \emph off
3899 \bar no
3900 \noun off
3901 \color none
3902 pifont.sty
3903 \end_layout
3904
3905 \end_inset
3906 </cell>
3907 </row>
3908 <row>
3909 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3910 \begin_inset Text
3911
3912 \begin_layout Plain Layout
3913
3914 \family sans
3915 \series medium
3916 \shape up
3917 \size normal
3918 \emph off
3919 \bar no
3920 \noun off
3921 \color none
3922 Ding2
3923 \end_layout
3924
3925 \end_inset
3926 </cell>
3927 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3928 \begin_inset Text
3929
3930 \begin_layout Plain Layout
3931
3932 \family typewriter
3933 \series medium
3934 \shape up
3935 \size normal
3936 \emph off
3937 \bar no
3938 \noun off
3939 \color none
3940 pifont.sty
3941 \end_layout
3942
3943 \end_inset
3944 </cell>
3945 </row>
3946 <row>
3947 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3948 \begin_inset Text
3949
3950 \begin_layout Plain Layout
3951
3952 \family sans
3953 \series medium
3954 \shape up
3955 \size normal
3956 \emph off
3957 \bar no
3958 \noun off
3959 \color none
3960 Ding3
3961 \end_layout
3962
3963 \end_inset
3964 </cell>
3965 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3966 \begin_inset Text
3967
3968 \begin_layout Plain Layout
3969
3970 \family typewriter
3971 \series medium
3972 \shape up
3973 \size normal
3974 \emph off
3975 \bar no
3976 \noun off
3977 \color none
3978 pifont.sty
3979 \end_layout
3980
3981 \end_inset
3982 </cell>
3983 </row>
3984 <row>
3985 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3986 \begin_inset Text
3987
3988 \begin_layout Plain Layout
3989
3990 \family sans
3991 \series medium
3992 \shape up
3993 \size normal
3994 \emph off
3995 \bar no
3996 \noun off
3997 \color none
3998 Ding4
3999 \end_layout
4000
4001 \end_inset
4002 </cell>
4003 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4004 \begin_inset Text
4005
4006 \begin_layout Plain Layout
4007
4008 \family typewriter
4009 \series medium
4010 \shape up
4011 \size normal
4012 \emph off
4013 \bar no
4014 \noun off
4015 \color none
4016 pifont.sty
4017 \end_layout
4018
4019 \end_inset
4020 </cell>
4021 </row>
4022 </lyxtabular>
4023
4024 \end_inset
4025
4026
4027 \end_layout
4028
4029 \begin_layout Standard
4030 LyX doesn't stop you using bullets from packages you don't have.
4031  If you get errors from LaTeX when you try to view or print the file, then
4032  it is likely you are missing a package.
4033 \begin_inset Foot
4034 status collapsed
4035
4036 \begin_layout Plain Layout
4037 LyX doesn't restrict your use since you may be editing locally and exporting
4038  elsewhere.
4039 \end_layout
4040
4041 \end_inset
4042
4043
4044 \end_layout
4045
4046 \begin_layout Subsection
4047 How to use it
4048 \end_layout
4049
4050 \begin_layout Standard
4051 Select which bullet depth you want to change then select the bullet shape
4052  and size.
4053  Any changes will not be visible in LyX, but are visible when viewing the
4054  document.
4055 \end_layout
4056
4057 \begin_layout Standard
4058 You can reset a bullet shape to the default simply by clicking your right
4059  mouse button on the appropriate bullet depth button.
4060 \begin_inset Foot
4061 status collapsed
4062
4063 \begin_layout Plain Layout
4064 If you 
4065 \emph on
4066 really
4067 \emph default
4068  want to have multiple sets of paragraphs with different sets of bullets
4069  in each, then you're going to have to get your hands dirty with TeX code.
4070  The bullet selection dialog can help though because it provides you with
4071  the LaTeX code for a wide range of bullet shapes.
4072  To make your own custom paragraphs you have the following options:
4073 \end_layout
4074
4075 \begin_layout Plain Layout
4076 \begin_inset ERT
4077 status open
4078
4079 \begin_layout Plain Layout
4080
4081
4082 \backslash
4083 let
4084 \backslash
4085 savelabelitemi=
4086 \backslash
4087 labelitemi
4088 \end_layout
4089
4090 \end_inset
4091
4092
4093 \end_layout
4094
4095 \begin_layout Plain Layout
4096 \begin_inset ERT
4097 status open
4098
4099 \begin_layout Plain Layout
4100
4101
4102 \backslash
4103 renewcommand
4104 \backslash
4105 labelitemi[0]{
4106 \backslash
4107 small
4108 \backslash
4109 (
4110 \backslash
4111 sharp
4112 \backslash
4113 )}
4114 \end_layout
4115
4116 \end_inset
4117
4118
4119 \end_layout
4120
4121 \begin_layout Itemize
4122 Use the LaTeX command 
4123 \begin_inset Flex Code
4124 status collapsed
4125
4126 \begin_layout Plain Layout
4127
4128 \backslash
4129 renewcommand{}{}
4130 \end_layout
4131
4132 \end_inset
4133
4134  to specify a new bullet shape for a given depth.
4135  You'll also need to save the current bullet shape so you can restore it
4136  again afterwards.
4137  In this itemized list the following LaTeX code was used to change the bullet
4138  used for the first depth.
4139 \end_layout
4140
4141 \begin_deeper
4142 \begin_layout LyX-Code
4143
4144 \backslash
4145 let
4146 \backslash
4147 savelabelitemi=
4148 \backslash
4149 labelitemi 
4150 \end_layout
4151
4152 \begin_layout LyX-Code
4153
4154 \backslash
4155 renewcommand
4156 \backslash
4157 labelitemi[0]{
4158 \backslash
4159 small
4160 \backslash
4161 (
4162 \backslash
4163 sharp
4164 \backslash
4165 )}
4166 \end_layout
4167
4168 \end_deeper
4169 \begin_layout Itemize
4170 Note that the itemize depth is specified in Roman numerals as part of the
4171  
4172 \family typewriter
4173
4174 \backslash
4175 labelitem
4176 \family default
4177  command.
4178 \end_layout
4179
4180 \begin_layout Itemize
4181 \begin_inset ERT
4182 status open
4183
4184 \begin_layout Plain Layout
4185
4186 [
4187 \backslash
4188 (
4189 \backslash
4190 star
4191 \backslash
4192 )]
4193 \end_layout
4194
4195 \end_inset
4196
4197  Specify each individual entry by starting each item with the bullet shape
4198  enclosed in square brackets and set as 
4199 \begin_inset Flex MenuItem
4200 status collapsed
4201
4202 \begin_layout Plain Layout
4203 TeX Code
4204 \end_layout
4205
4206 \end_inset
4207
4208 .
4209  For example, this item was started with 
4210 \begin_inset Flex Code
4211 status collapsed
4212
4213 \begin_layout Plain Layout
4214 [
4215 \backslash
4216 (
4217 \backslash
4218 star
4219 \backslash
4220 )]
4221 \end_layout
4222
4223 \end_inset
4224
4225 .
4226 \end_layout
4227
4228 \begin_layout Plain Layout
4229 \begin_inset ERT
4230 status open
4231
4232 \begin_layout Plain Layout
4233
4234
4235 \backslash
4236 renewcommand
4237 \backslash
4238 labelitemi[0]{
4239 \backslash
4240 savelabelitemi}
4241 \end_layout
4242
4243 \end_inset
4244
4245
4246 \end_layout
4247
4248 \begin_layout Plain Layout
4249 You'll also need to revert the labelitem back to its previous setting for
4250  the global bullet shape settings to remain in effect.
4251  The way used here was:
4252 \end_layout
4253
4254 \begin_layout LyX-Code
4255
4256 \backslash
4257 renewcommand
4258 \backslash
4259 labelitemi[0]{
4260 \backslash
4261 savelabelitemi}
4262 \end_layout
4263
4264 \end_inset
4265
4266
4267 \end_layout
4268
4269 \begin_layout Chapter
4270 LyX and the World Wide Web
4271 \end_layout
4272
4273 \begin_layout Standard
4274 LyX has long supported the export of documents to various web-friendly formats,
4275  such as HTML.
4276  Before verson 2.0, however, HTML export was always accomplished by the use
4277  of external converters.
4278 \begin_inset Foot
4279 status collapsed
4280
4281 \begin_layout Plain Layout
4282 For details on the use of external converters with LyX, see the 
4283 \emph on
4284 Converters
4285 \emph default
4286  section of the Customization manual.
4287 \end_layout
4288
4289 \end_inset
4290
4291  These fall into two large groups: there are converters that use LaTeX as
4292  an intermediate format, such as 
4293 \begin_inset Flex Code
4294 status collapsed
4295
4296 \begin_layout Plain Layout
4297 htlatex
4298 \end_layout
4299
4300 \end_inset
4301
4302
4303 \begin_inset Flex Code
4304 status collapsed
4305
4306 \begin_layout Plain Layout
4307 html2latex
4308 \end_layout
4309
4310 \end_inset
4311
4312 , and 
4313 \begin_inset Flex Code
4314 status collapsed
4315
4316 \begin_layout Plain Layout
4317 plastex
4318 \end_layout
4319
4320 \end_inset
4321
4322 , relying upon LyX to produce the LaTeX; and there is a converter that works
4323  directly on LyX files, 
4324 \begin_inset Flex Code
4325 status collapsed
4326
4327 \begin_layout Plain Layout
4328 eLyXer
4329 \end_layout
4330
4331 \end_inset
4332
4333 .
4334  All of these have different advantages and disadvantages.
4335  
4336 \end_layout
4337
4338 \begin_layout Standard
4339 The LaTeX-based converters have the advantage that, in principle, they know
4340  everything about the exported document that LaTeX does.
4341  Such converters do not care, for example, if a certain block of code was
4342  produced by LyX or was Evil Red Text.
4343  These converters know about 
4344 \begin_inset Flex Code
4345 status collapsed
4346
4347 \begin_layout Plain Layout
4348 aux
4349 \end_layout
4350
4351 \end_inset
4352
4353  files, counters, and references, and can often make use of the 
4354 \begin_inset Flex Code
4355 status collapsed
4356
4357 \begin_layout Plain Layout
4358 bbl
4359 \end_layout
4360
4361 \end_inset
4362
4363  files generated by BibTeX.
4364  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4365  said that only TeX itself understands TeX---and LaTeX-based converters
4366  will often choke on what seem to be quite simple constructs; complex ones
4367  can throw them completely, and as of this writing, for example, the 
4368 \emph on
4369 Embedded Objects
4370 \emph default
4371  manual will not export with 
4372 \begin_inset Flex Code
4373 status collapsed
4374
4375 \begin_layout Plain Layout
4376 htlatex
4377 \end_layout
4378
4379 \end_inset
4380
4381 , though the others will.
4382  The other issue concerns how math is handled.
4383  These converters typically convert the formulae into little pictures that
4384  are then linked from the HTML document.
4385  Since these are actually generated by LaTeX, they are accurate.
4386  But they do not scale well, and just getting them to look as if they are
4387  actually meant to be in your document---so that the font sizes seem to
4388  be roughly the same---can be a challenge.
4389 \end_layout
4390
4391 \begin_layout Standard
4392 Alex Fernandez's 
4393 \begin_inset Flex Code
4394 status collapsed
4395
4396 \begin_layout Plain Layout
4397 eLyXer
4398 \end_layout
4399
4400 \end_inset
4401
4402  (
4403 \begin_inset CommandInset href
4404 LatexCommand href
4405 name "http://elyxer.nongnu.org/"
4406 target "http://elyxer.nongnu.org/"
4407
4408 \end_inset
4409
4410 ) solves some of these problems.
4411  In particular, the formulae it produces scale perfectly, since it renders
4412  math using a combination of HTML and CSS rather than converting the formulae
4413  to images.
4414  But even moderately complex formula are rendered less well than with 
4415 \begin_inset Flex Code
4416 status collapsed
4417
4418 \begin_layout Plain Layout
4419 htlatex
4420 \end_layout
4421
4422 \end_inset
4423
4424 ; this reflects the limitations of HTML.
4425 \begin_inset Foot
4426 status collapsed
4427
4428 \begin_layout Plain Layout
4429 That said, 
4430 \begin_inset Flex Code
4431 status collapsed
4432
4433 \begin_layout Plain Layout
4434 eLyXer
4435 \end_layout
4436
4437 \end_inset
4438
4439  can also use jsMath and MathJax for equations, but this setting is only
4440  available globally and requires one to have access to a server that runs
4441  the backend.
4442 \end_layout
4443
4444 \end_inset
4445
4446  More importantly (as of version 1.1.1, at least), 
4447 \begin_inset Flex Code
4448 status collapsed
4449
4450 \begin_layout Plain Layout
4451 eLyXer
4452 \end_layout
4453
4454 \end_inset
4455
4456  has limited support for math macros and no support for user-defined paragraph
4457  or character styles.
4458  These limitations make 
4459 \begin_inset Flex Code
4460 status collapsed
4461
4462 \begin_layout Plain Layout
4463 eLyXer
4464 \end_layout
4465
4466 \end_inset
4467
4468  unsuitable for many of the documents LyX users produce.
4469  In principle, of course, these problems could be solved, but the LyX developers
4470  have decided to follow a different path and have made LyX itself capable
4471  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4472  plaintext.
4473 \end_layout
4474
4475 \begin_layout Standard
4476 As of this writing, XHTML output remains under development and should probably
4477  be regarded as 
4478 \begin_inset Quotes eld
4479 \end_inset
4480
4481 experimental
4482 \begin_inset Quotes erd
4483 \end_inset
4484
4485 .
4486 \begin_inset Foot
4487 status collapsed
4488
4489 \begin_layout Plain Layout
4490 The file 
4491 \begin_inset Flex Code
4492 status collapsed
4493
4494 \begin_layout Plain Layout
4495 development/HTML.notes
4496 \end_layout
4497
4498 \end_inset
4499
4500 , which can be found in the LyX source tree or 
4501 \begin_inset CommandInset href
4502 LatexCommand href
4503 name "accessed online"
4504 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4505
4506 \end_inset
4507
4508 , usually contains up-to-date information about the state of XHTML output.
4509  See also the list of XHTML bugs on 
4510 \begin_inset CommandInset href
4511 LatexCommand href
4512 name "the bug tracker"
4513 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"
4514
4515 \end_inset
4516
4517 .
4518 \end_layout
4519
4520 \end_inset
4521
4522  Still, the developers have chosen this approach because it has several
4523  potential advantages over the other two.
4524 \end_layout
4525
4526 \begin_layout Standard
4527 These advantages are primarily due to the fact that the XHTML output routines,
4528  since they are part of LyX, know everything LyX knows about the document
4529  being exported.
4530 \begin_inset Foot
4531 status collapsed
4532
4533 \begin_layout Plain Layout
4534 Another advantage is that, since these routines are internal to LyX, they
4535  are immune to changes in LyX's file format, or to changes in the semantics
4536  of existing insets.
4537 \end_layout
4538
4539 \end_inset
4540
4541  So they know about the table of contents (as displayed in the outline),
4542  about the counters associated with different paragraph styles, and about
4543  user-defined styles.
4544  The XHTML output routines know what LyX knows about internationalization,
4545  too, so they will output 
4546 \begin_inset Quotes eld
4547 \end_inset
4548
4549 Chapter 1
4550 \begin_inset Quotes erd
4551 \end_inset
4552
4553  or 
4554 \begin_inset Quotes eld
4555 \end_inset
4556
4557
4558 \lang ngerman
4559 Kapitel
4560 \lang english
4561  1
4562 \begin_inset Quotes erd
4563 \end_inset
4564
4565 , depending upon the language in effect at the time.
4566  
4567 \end_layout
4568
4569 \begin_layout Standard
4570 Quite generally, the output routines know what LyX knows about document
4571  layout, that is, about how the document is to be rendered on screen.
4572  We use this information when we output the document as XHTML.
4573  In particular, LyX 
4574 \emph on
4575 automatically
4576 \emph default
4577  generates CSS style information corresponding to the layout information
4578  it uses to render the document on screen: if section headings are supposed
4579  to be sans-serif and bold as seen in LyX, then (by default) they will be
4580  sans-serif and bold when viewed in a web browser, too.
4581  And this is true not just for pre-defined styles, like Section, but for
4582  any style, including user-defined styles.
4583  Indeed, the XHTML output routines make no distinction between user-defined
4584  paragraph and character styles and LyX's own pre-defined styles: in each
4585  case, everything LyX knows about the styles is contained in the layout
4586  files.
4587  And much the same is true as regards pre-defined textual insets, such as
4588  footnotes, and various custom insets.
4589  
4590 \end_layout
4591
4592 \begin_layout Standard
4593 The result is that XHTML output can be customized and extended in exactly
4594  the same way LaTeX output can be customized and extended: through layout
4595  files and modules.
4596  See chapter five of the 
4597 \emph on
4598 Customization 
4599 \emph default
4600 manual for the details.
4601 \end_layout
4602
4603 \begin_layout Standard
4604 The remainder of this chapter contains more detailed information on XHTML
4605  output, its limitations, and ways to work around those limitations.
4606 \end_layout
4607
4608 \begin_layout Section
4609 Math Output in XHTML
4610 \end_layout
4611
4612 \begin_layout Standard
4613 LyX offers four choices for how math is rendered.
4614  These have various advantages and disadvantages:
4615 \end_layout
4616
4617 \begin_layout Itemize
4618 MathML
4619 \begin_inset Newline newline
4620 \end_inset
4621
4622 MathML is a dialect of XML designed specifically for mathematics on the
4623  web, and it typically renders very well in browsers that support it.
4624  The disadvantage is that not all browsers support MathML, and support is
4625  not complete even in the Gecko-based browsers, such as Firefox.
4626 \begin_inset Newline newline
4627 \end_inset
4628
4629 If LyX is unable to render a formula as MathML---for example, if the formula
4630  uses the 
4631 \begin_inset Flex Code
4632 status collapsed
4633
4634 \begin_layout Plain Layout
4635 xymatrix
4636 \end_layout
4637
4638 \end_inset
4639
4640  package or ERT---then it will instead output the formula as an image.
4641  
4642 \end_layout
4643
4644 \begin_layout Itemize
4645 HTML
4646 \begin_inset Newline newline
4647 \end_inset
4648
4649 As mentioned above, 
4650 \begin_inset Flex Code
4651 status collapsed
4652
4653 \begin_layout Plain Layout
4654 elyxer
4655 \end_layout
4656
4657 \end_inset
4658
4659  outputs math as HTML, styled by CSS.
4660 \begin_inset Foot
4661 status collapsed
4662
4663 \begin_layout Plain Layout
4664 LyX has borrowed some of the CSS for its HTML output from 
4665 \begin_inset Flex Code
4666 status collapsed
4667
4668 \begin_layout Plain Layout
4669 elyxer
4670 \end_layout
4671
4672 \end_inset
4673
4674 .
4675 \end_layout
4676
4677 \end_inset
4678
4679  For simple formulae, this can work quite well, though with more complicated
4680  formulae it tends to break down.
4681  Still, this method has the advantage that it is very widely supported and
4682  so it may be appropriate for documents that contain only a little, fairly
4683  simple math.
4684 \begin_inset Newline newline
4685 \end_inset
4686
4687 If Lyx is unable to render a formula as HTML---for example, if the formula
4688  uses the 
4689 \begin_inset Flex Code
4690 status collapsed
4691
4692 \begin_layout Plain Layout
4693 xymatrix
4694 \end_layout
4695
4696 \end_inset
4697
4698  package or ERT---then it will instead output the formula as an image.
4699  
4700 \end_layout
4701
4702 \begin_layout Itemize
4703 Images
4704 \begin_inset Newline newline
4705 \end_inset
4706
4707 Like 
4708 \begin_inset Flex Code
4709 status collapsed
4710
4711 \begin_layout Plain Layout
4712 htlatex
4713 \end_layout
4714
4715 \end_inset
4716
4717 , LyX will output formulae as images, the very same images, in fact, that
4718  are used for instant preview.
4719 \begin_inset Foot
4720 status collapsed
4721
4722 \begin_layout Plain Layout
4723 Instant preview does 
4724 \emph on
4725 not 
4726 \emph default
4727 have to be on for images to be output, however.
4728 \end_layout
4729
4730 \end_inset
4731
4732  The advantage to this method is that the images are simply generated by
4733  LaTeX, so they are very accurate.
4734  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4735  so they do not scale terribly well, and one cannot copy them, etc.
4736  (As of this writing, there are also problems about equation numbering.
4737  See 
4738 \begin_inset CommandInset href
4739 LatexCommand href
4740 name "bug 6894"
4741 target "http://www.lyx.org/trac/ticket/6894"
4742
4743 \end_inset
4744
4745 .)
4746 \begin_inset Newline newline
4747 \end_inset
4748
4749 The size of the images can be controlled by setting the 
4750 \begin_inset Quotes eld
4751 \end_inset
4752
4753 Math Images Scaling
4754 \begin_inset Quotes erd
4755 \end_inset
4756
4757  parameter under 
4758 \begin_inset Flex MenuItem
4759 status collapsed
4760
4761 \begin_layout Plain Layout
4762 Document\SpecialChar \menuseparator
4763 Settings\SpecialChar \menuseparator
4764 Output
4765 \end_layout
4766
4767 \end_inset
4768
4769 .
4770 \begin_inset Foot
4771 status collapsed
4772
4773 \begin_layout Plain Layout
4774 For those who want to know, this controls the resolution of the image in
4775  dots per inch and is based upon a default of 75 dpi.
4776 \end_layout
4777
4778 \end_inset
4779
4780
4781 \begin_inset Newline newline
4782 \end_inset
4783
4784 If LyX for some reason fails to create an image for a formula (e.g., if a
4785  required LaTeX package is not installed), then it will fall back to outputing
4786  the raw LaTeX.
4787 \end_layout
4788
4789 \begin_layout Itemize
4790 LaTeX
4791 \begin_inset Newline newline
4792 \end_inset
4793
4794 Finally, LyX will happily output math as LaTeX.
4795  As well as being the output of last resort, this method can be used with
4796  such tools as 
4797 \begin_inset CommandInset href
4798 LatexCommand href
4799 name "jsMath"
4800 target "http://www.math.union.edu/~dpvc/jsMath/"
4801
4802 \end_inset
4803
4804 , which uses JavaScript to render LaTeX embedded in HTML documents.
4805  LyX wraps the LaTeX in either a 
4806 \begin_inset Flex Code
4807 status collapsed
4808
4809 \begin_layout Plain Layout
4810 span
4811 \end_layout
4812
4813 \end_inset
4814
4815  (for inline formulas) or 
4816 \begin_inset Flex Code
4817 status collapsed
4818
4819 \begin_layout Plain Layout
4820 div
4821 \end_layout
4822
4823 \end_inset
4824
4825  (for displayed formulas) with 
4826 \begin_inset Flex Code
4827 status collapsed
4828
4829 \begin_layout Plain Layout
4830 class='math'
4831 \end_layout
4832
4833 \end_inset
4834
4835 , as is required for jsMath.
4836 \end_layout
4837
4838 \begin_layout Standard
4839 One of these output methods must be selected under 
4840 \begin_inset Flex MenuItem
4841 status collapsed
4842
4843 \begin_layout Plain Layout
4844 Document\SpecialChar \menuseparator
4845 Settings\SpecialChar \menuseparator
4846 Output
4847 \end_layout
4848
4849 \end_inset
4850
4851 .
4852  By default, LyX outputs MathML.
4853  This is a document-wide setting, therefore.
4854 \end_layout
4855
4856 \begin_layout Standard
4857 Eventually, LyX will offer the user the option to select an alternate output
4858  method for a particular inset, say, one that isn't being rendered very
4859  well by MathML.
4860 \begin_inset Foot
4861 status collapsed
4862
4863 \begin_layout Plain Layout
4864 That said, since LyX falls back to images if the inset contains ERT, then
4865  one can force output as an image by putting some harmless ERT into the
4866  math, for example: 
4867 \begin_inset Formula $a=b\relax$
4868 \end_inset
4869
4870 .
4871 \end_layout
4872
4873 \end_inset
4874
4875
4876 \end_layout
4877
4878 \begin_layout Section
4879 Bibliography and Citations
4880 \end_layout
4881
4882 \begin_layout Standard
4883 XHTML output fully supports bibliographies and citations.
4884  
4885 \end_layout
4886
4887 \begin_layout Standard
4888 Citation labels are generated by the same machinery that generates LyX's
4889  on-screen labels, so the labels will look in the output much as they do
4890  in LyX, though better.
4891  If you are using numerical citations, then LyX will output numerical labels,
4892  such as [1] or [17], rather than simply showing the citation key in square
4893  brackets, as it does on-screen.
4894  If you are using author-year citations, then LyX will add lowercase letters
4895  to the years, just as BibTeX does, if it finds more than one citation for
4896  a given author-year combination.
4897  The labels will be printed with the bibliography entries.
4898  Note that there is, at present, no way to customize the appearance of the
4899  labels, for example, to choose between square brackets and parentheses.
4900 \end_layout
4901
4902 \begin_layout Standard
4903 Bibliography output is handled by the same machinery that handles the presentati
4904 on of reference information in the citation dialog, so you will see in the
4905  XHTML output pretty much what you would see if you were to look at a given
4906  entry in the citation dialog.
4907  The formatting can be customized in your layout file or, preferably, in
4908  a module.
4909  See the 
4910 \emph on
4911 Customization
4912 \emph default
4913  manual for the details.
4914 \end_layout
4915
4916 \begin_layout Standard
4917 The main defect at present is that cross-referenced information is printed
4918  with every entry with which it is associated.
4919  So you can see things like this:
4920 \end_layout
4921
4922 \begin_layout Quote
4923 Jason Stanley, 
4924 \begin_inset Quotes eld
4925 \end_inset
4926
4927 Context and Logical Form
4928 \begin_inset Quotes erd
4929 \end_inset
4930
4931 , in 
4932 \emph on
4933 Language in Context: Selected Essays
4934 \emph default
4935  (Oxford: Oxford University Press, 2007), pp.
4936  30--68.
4937 \end_layout
4938
4939 \begin_layout Quote
4940 Jason Stanley, 
4941 \begin_inset Quotes eld
4942 \end_inset
4943
4944 Semantics in Context
4945 \begin_inset Quotes erd
4946 \end_inset
4947
4948 , in 
4949 \emph on
4950 Language in Context: Selected Essays
4951 \emph default
4952  (Oxford: Oxford University Press, 2007), pp.
4953  201--30.
4954 \end_layout
4955
4956 \begin_layout Standard
4957 This should be fixed before long.
4958 \end_layout
4959
4960 \begin_layout Standard
4961 There is no support at present for sectioned bibliographies.
4962  If you have multiple bibliographies, then LyX will print the same bibliography
4963  over and over.
4964 \end_layout
4965
4966 \begin_layout Section
4967 Indexes
4968 \end_layout
4969
4970 \begin_layout Standard
4971 LyX will happily export indexes as XHTML, but with certain limitations at
4972  the moment.
4973 \end_layout
4974
4975 \begin_layout Standard
4976 Index export will be most reliable when you do not attempt to use the fancy
4977  constructs that are described in the section on indexes in the 
4978 \emph on
4979 User's Guide
4980 \emph default
4981 .
4982 \begin_inset Foot
4983 status collapsed
4984
4985 \begin_layout Plain Layout
4986 The main issue here is that LyX itself does not really handle these.
4987  It just lets you enter what you would have to enter in raw LaTeX.
4988 \end_layout
4989
4990 \end_inset
4991
4992  We'll describe how they are handled using the subsection headings from
4993  that section.
4994 \end_layout
4995
4996 \begin_layout Itemize
4997 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4998  these, but the entries must be separated by 
4999 \begin_inset Quotes eld
5000 \end_inset
5001
5002  ! 
5003 \begin_inset Quotes erd
5004 \end_inset
5005
5006 , that is, there must be spaces around the exclamation point.
5007  This is because it is otherwise too difficult to check for escaped exclamation
5008  points, ones in math, and so forth.
5009 \end_layout
5010
5011 \begin_layout Itemize
5012 Page Ranges: There is no support at all for page ranges, since these make
5013  no sense with XHMTL.
5014  Instead, you will just get two index entries, one at either end.
5015 \end_layout
5016
5017 \begin_layout Itemize
5018 Cross-referencing: There is no support for cross-referencing.
5019  If LyX finds an entry containing the 
5020 \begin_inset Quotes eld
5021 \end_inset
5022
5023 |see\SpecialChar \ldots{}
5024
5025 \begin_inset Quotes erd
5026 \end_inset
5027
5028  construct, it is just dropped, and the rest is treated as an ordinary index
5029  entry.
5030 \end_layout
5031
5032 \begin_layout Itemize
5033 Index Entry Order: LyX does support attempts to fix the sorting order.
5034  It will take what is before the first `@' it finds and use that for sorting,
5035  taking what follows the first `@' to be the actual entry.
5036  At present, LyX does not check for escaped `@', so do not try to index
5037  email addresses.
5038 \end_layout
5039
5040 \begin_layout Itemize
5041 Index Entry Layout: You can format entries by using the text style dialog,
5042  or by using any other method available within LyX itself.
5043  There is no support for constructs like: 
5044 \begin_inset Quotes eld
5045 \end_inset
5046
5047 entry|textbf
5048 \begin_inset Quotes erd
5049 \end_inset
5050
5051 .
5052  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5053  and everything that follows it.
5054 \end_layout
5055
5056 \begin_layout Itemize
5057 Multiple Indexes: There is no support for multiple indexes.
5058  Rather, all index entries will be printed as one large index.
5059  To avoid our printing several versions of the index, we print only the
5060  main index, so make sure you have one.
5061 \end_layout
5062
5063 \begin_layout Section
5064 Nomenclature and Glossary
5065 \end_layout
5066
5067 \begin_layout Standard
5068 There is at present no support for glossaries.
5069  Adding it would be fairly trivial, and welcome.
5070 \end_layout
5071
5072 \begin_layout Chapter
5073 The LyX Server
5074 \end_layout
5075
5076 \begin_layout Section
5077 Introduction
5078 \end_layout
5079
5080 \begin_layout Standard
5081 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5082  and retrieve information about the LyX internal state.
5083  This is only intended for advanced users, but they should find it useful.
5084  It is by writing to the LyX server, for example, that bibliography managers,
5085  such as JabRef, are able to 
5086 \begin_inset Quotes eld
5087 \end_inset
5088
5089 push
5090 \begin_inset Quotes erd
5091 \end_inset
5092
5093  citations to LyX.
5094 \end_layout
5095
5096 \begin_layout Section
5097 Starting the LyX Server
5098 \end_layout
5099
5100 \begin_layout Standard
5101 The LyX server works through the use of a pair of named pipes.
5102  These are usually located in 
5103 \begin_inset Flex Code
5104 status collapsed
5105
5106 \begin_layout Plain Layout
5107 UserDir
5108 \end_layout
5109
5110 \end_inset
5111
5112 , (except on Windows, where 
5113 \emph on
5114 local
5115 \emph default
5116  named pipes are special objects located in 
5117 \begin_inset Flex Code
5118 status collapsed
5119
5120 \begin_layout Plain Layout
5121
5122 \backslash
5123
5124 \backslash
5125 .
5126 \backslash
5127 pipe
5128 \end_layout
5129
5130 \end_inset
5131
5132 ) and have the names 
5133 \begin_inset Quotes eld
5134 \end_inset
5135
5136
5137 \begin_inset Flex Code
5138 status collapsed
5139
5140 \begin_layout Plain Layout
5141 lyxpipe.in
5142 \end_layout
5143
5144 \end_inset
5145
5146
5147 \begin_inset Quotes erd
5148 \end_inset
5149
5150  and 
5151 \begin_inset Quotes eld
5152 \end_inset
5153
5154
5155 \begin_inset Flex Code
5156 status collapsed
5157
5158 \begin_layout Plain Layout
5159 lyxpipe.out
5160 \end_layout
5161
5162 \end_inset
5163
5164
5165 \begin_inset Quotes erd
5166 \end_inset
5167
5168 .
5169  External programs write into 
5170 \begin_inset Flex Code
5171 status collapsed
5172
5173 \begin_layout Plain Layout
5174 lyxpipe.in
5175 \end_layout
5176
5177 \end_inset
5178
5179  and read back data from 
5180 \begin_inset Flex Code
5181 status collapsed
5182
5183 \begin_layout Plain Layout
5184 lyxpipe.out
5185 \end_layout
5186
5187 \end_inset
5188
5189 .
5190  The stem of the pipe names can be defined in the 
5191 \begin_inset Flex MenuItem
5192 status collapsed
5193
5194 \begin_layout Plain Layout
5195 Tools\SpecialChar \menuseparator
5196 Preferences
5197 \end_layout
5198
5199 \end_inset
5200
5201  dialog, for example 
5202 \begin_inset Flex Code
5203 status collapsed
5204
5205 \begin_layout Plain Layout
5206 "/home/myhome/lyxpipe"
5207 \end_layout
5208
5209 \end_inset
5210
5211 , or 
5212 \begin_inset Flex Code
5213 status collapsed
5214
5215 \begin_layout Plain Layout
5216 "
5217 \backslash
5218
5219 \backslash
5220 .
5221 \backslash
5222 pipe
5223 \backslash
5224 lyxpipe"
5225 \end_layout
5226
5227 \end_inset
5228
5229  on Windows (but any working path can be used).
5230  You 
5231 \emph on
5232 must
5233 \emph default
5234  configure this manually in order for the server to start.
5235 \end_layout
5236
5237 \begin_layout Standard
5238 LyX will add the '
5239 \begin_inset Flex Code
5240 status collapsed
5241
5242 \begin_layout Plain Layout
5243 .in
5244 \end_layout
5245
5246 \end_inset
5247
5248 ' and '
5249 \begin_inset Flex Code
5250 status collapsed
5251
5252 \begin_layout Plain Layout
5253 .out
5254 \end_layout
5255
5256 \end_inset
5257
5258 ' to create the pipes.
5259  If one of the pipes already exists, LyX will assume that another LyX process
5260  is already running and will not start the server.
5261  On POSIX (Unix like) systems, if for some other reason, an unused 
5262 \begin_inset Quotes eld
5263 \end_inset
5264
5265 stale
5266 \begin_inset Quotes erd
5267 \end_inset
5268
5269  pipe is left in existence when LyX closes, then LyX will try to delete
5270  it.
5271  If this fails for some reason, you will need to delete the pipes manually
5272  and then restart LyX.
5273  On Windows, pipes are deleted by the OS on program termination or crash,
5274  so 
5275 \begin_inset Quotes eld
5276 \end_inset
5277
5278 stale
5279 \begin_inset Quotes erd
5280 \end_inset
5281
5282  pipes should not be possible.
5283 \end_layout
5284
5285 \begin_layout Standard
5286 To have several LyX processes with servers at the same time, you have to
5287  use different configurations, perhaps by using separate user directories,
5288  each with its own 
5289 \begin_inset Flex Code
5290 status collapsed
5291
5292 \begin_layout Plain Layout
5293 preferences
5294 \end_layout
5295
5296 \end_inset
5297
5298  file, for each process.
5299 \end_layout
5300
5301 \begin_layout Standard
5302 If you are developing a client program, you might find it useful to enable
5303  debugging information from the LyX server.
5304  Do this by starting LyX as 
5305 \begin_inset Flex Code
5306 status collapsed
5307
5308 \begin_layout Plain Layout
5309 lyx -dbg lyxserver
5310 \end_layout
5311
5312 \end_inset
5313
5314 .
5315 \end_layout
5316
5317 \begin_layout Standard
5318 You can find a complete example client written in C in the source distribution
5319  as 
5320 \begin_inset Flex Code
5321 status collapsed
5322
5323 \begin_layout Plain Layout
5324 development/lyxserver/server_monitor.c
5325 \end_layout
5326
5327 \end_inset
5328
5329 .
5330 \end_layout
5331
5332 \begin_layout Standard
5333 Another useful tool is command-line based client you will find in 
5334 \begin_inset Flex Code
5335 status collapsed
5336
5337 \begin_layout Plain Layout
5338 src/client/lyxclient
5339 \end_layout
5340
5341 \end_inset
5342
5343 .
5344 \end_layout
5345
5346 \begin_layout Section
5347 Normal communication
5348 \end_layout
5349
5350 \begin_layout Standard
5351 To issue a LyX call, the client writes a line of ASCII text into the input
5352  pipe.
5353  This line has the following format:
5354 \end_layout
5355
5356 \begin_layout Quote
5357 LYXCMD:
5358 \emph on
5359 clientname
5360 \emph default
5361 :
5362 \emph on
5363 function
5364 \emph default
5365 :
5366 \emph on
5367 argument
5368 \end_layout
5369
5370 \begin_layout Description
5371 clientname is a name that the client can choose arbitrarily.
5372  Its only use is that LyX will echo it if it sends an answer—so a client
5373  can dispatch results from different requesters.
5374 \end_layout
5375
5376 \begin_layout Description
5377 function is the function you want LyX to perform.
5378  It is the same as the commands you'd use in the minibuffer.
5379 \end_layout
5380
5381 \begin_layout Description
5382 argument is an optional argument which is meaningful only to some functions
5383  (for instance, the 
5384 \begin_inset Quotes eld
5385 \end_inset
5386
5387 self-insert
5388 \begin_inset Quotes erd
5389 \end_inset
5390
5391  LFUN will insert the argument as text at the cursor position).
5392 \end_layout
5393
5394 \begin_layout Standard
5395 The answer from LyX will arrive in the output pipe and be of the form
5396 \end_layout
5397
5398 \begin_layout Quote
5399 INFO:
5400 \emph on
5401 clientname
5402 \emph default
5403 :
5404 \emph on
5405 function
5406 \emph default
5407 :
5408 \emph on
5409 data
5410 \end_layout
5411
5412 \begin_layout Standard
5413 where 
5414 \emph on
5415 clientname
5416 \emph default
5417  and 
5418 \emph on
5419 function
5420 \emph default
5421  are just echoed from the command request, while 
5422 \emph on
5423 data
5424 \emph default
5425  is more or less useful information filled according to how the command
5426  execution worked out.
5427  Some commands, such as 
5428 \begin_inset Quotes eld
5429 \end_inset
5430
5431 font-state
5432 \begin_inset Quotes erd
5433 \end_inset
5434
5435 , will return information about the internal state of LyX, while other will
5436  return an empty data-response.
5437  This means that the command execution went fine.
5438 \end_layout
5439
5440 \begin_layout Standard
5441 In case of errors, the response from LyX will have this form
5442 \end_layout
5443
5444 \begin_layout Quote
5445 ERROR:
5446 \emph on
5447 clientname
5448 \emph default
5449 :
5450 \emph on
5451 function
5452 \emph default
5453 :
5454 \emph on
5455 error message
5456 \end_layout
5457
5458 \begin_layout Standard
5459 where the 
5460 \emph on
5461 error message
5462 \emph default
5463  should contain an explanation of why the command failed.
5464 \end_layout
5465
5466 \begin_layout Standard
5467 Examples:
5468 \end_layout
5469
5470 \begin_layout LyX-Code
5471 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5472 \begin_inset Newline newline
5473 \end_inset
5474
5475 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5476 \begin_inset Newline newline
5477 \end_inset
5478
5479 read a <~/.lyxpipe.out
5480 \begin_inset Newline newline
5481 \end_inset
5482
5483 echo $a
5484 \end_layout
5485
5486 \begin_layout Section
5487 Notification
5488 \end_layout
5489
5490 \begin_layout Standard
5491 LyX can notify clients of events going on asynchronously.
5492  Currently it will only do this if the user binds a key sequence with the
5493  function 
5494 \begin_inset Quotes eld
5495 \end_inset
5496
5497 notify
5498 \begin_inset Quotes erd
5499 \end_inset
5500
5501 .
5502  The format of the string LyX sends is as follows:
5503 \end_layout
5504
5505 \begin_layout Quote
5506 \begin_inset Flex Code
5507 status collapsed
5508
5509 \begin_layout Plain Layout
5510 NOTIFY:
5511 \end_layout
5512
5513 \end_inset
5514
5515
5516 \emph on
5517 key-sequence
5518 \end_layout
5519
5520 \begin_layout Standard
5521 where 
5522 \emph on
5523 key-sequence
5524 \emph default
5525  is the printed representation of the key sequence that was actually typed
5526  by the user.
5527 \end_layout
5528
5529 \begin_layout Standard
5530 This mechanism can be used to extend LyX's command set and implement macros.
5531  Bind some key sequence to 
5532 \begin_inset Quotes eld
5533 \end_inset
5534
5535 notify
5536 \begin_inset Quotes erd
5537 \end_inset
5538
5539 .
5540  Then start a client that listens on the output pipe, dispatches the command
5541  according to the sequence, and starts a function that may use LyX calls
5542  and LyX requests to issue a command or a series of commands to LyX.
5543 \end_layout
5544
5545 \begin_layout Section
5546 The simple LyX Server Protocol
5547 \end_layout
5548
5549 \begin_layout Standard
5550 LyX implements a simple protocol that can be used for session management.
5551  All messages are of the form
5552 \end_layout
5553
5554 \begin_layout Quote
5555 LYXSRV:
5556 \emph on
5557 clientname
5558 \emph default
5559 :
5560 \emph on
5561 protocol message
5562 \end_layout
5563
5564 \begin_layout Standard
5565 where 
5566 \emph on
5567 protocol message
5568 \emph default
5569  can be 
5570 \begin_inset Quotes eld
5571 \end_inset
5572
5573 hello
5574 \begin_inset Quotes erd
5575 \end_inset
5576
5577  or 
5578 \begin_inset Quotes eld
5579 \end_inset
5580
5581 bye
5582 \begin_inset Quotes erd
5583 \end_inset
5584
5585 .
5586  If 
5587 \begin_inset Quotes eld
5588 \end_inset
5589
5590 hello
5591 \begin_inset Quotes erd
5592 \end_inset
5593
5594  is received from a client, LyX will report back to inform the client that
5595  it's listening to it's messages, while 
5596 \begin_inset Quotes eld
5597 \end_inset
5598
5599 bye
5600 \begin_inset Quotes erd
5601 \end_inset
5602
5603  sent from LyX will inform clients that LyX is closing.
5604 \end_layout
5605
5606 \begin_layout Section
5607 Reverse DVI/PDF search
5608 \end_layout
5609
5610 \begin_layout Standard
5611 Some DVI/PDF viewers
5612 \begin_inset Foot
5613 status collapsed
5614
5615 \begin_layout Plain Layout
5616 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5617  Skim on Mac OSX and SumatraPDF on Windows.
5618 \end_layout
5619
5620 \end_inset
5621
5622  provide 
5623 \emph on
5624 reverse search
5625 \emph default
5626  facility (also called 
5627 \emph on
5628 inverse search
5629 \emph default
5630 ).
5631  This means that you can tell LyX to put the cursor to a specific line in
5632  the document by clicking at the respective position in the DVI/PDF output.
5633  To achieve this, the viewer must be able to communicate with LyX.
5634  This is done via the LyX server either by using the named pipe (
5635 \emph on
5636 lyxpipe
5637 \emph default
5638 ), or the UNIX domain socket (
5639 \emph on
5640 lyxsocket
5641 \emph default
5642 ) that LyX creates in its temporary directory (this is the way the 
5643 \begin_inset Flex Code
5644 status collapsed
5645
5646 \begin_layout Plain Layout
5647 lyxclient
5648 \end_layout
5649
5650 \end_inset
5651
5652  program communicates with LyX).
5653  In some cases, you need a helper script that mediates between the viewer
5654  and LyX, in others, the viewer can communicate with LyX directly.
5655  This depends on the selected viewer and on your operating system.
5656  The same applies to the way viewers need to be configured and the way the
5657  reverse search is actually performed.
5658  In what follows, we will thus describe how to setup reverse search for
5659  specific viewers.
5660  Before we turn to this, though, we will explain what needs to be done generally
5661  to enable reverse search in the DVI/PDF output.
5662 \end_layout
5663
5664 \begin_layout Subsection
5665 Automatic setup
5666 \begin_inset CommandInset label
5667 LatexCommand label
5668 name "sub:rev-search"
5669
5670 \end_inset
5671
5672
5673 \end_layout
5674
5675 \begin_layout Standard
5676 In most cases LyX will do the work for you by enabling the option 
5677 \begin_inset Flex MenuItem
5678 status collapsed
5679
5680 \begin_layout Plain Layout
5681 Synchronize with Output
5682 \end_layout
5683
5684 \end_inset
5685
5686  in the menu 
5687 \begin_inset Flex MenuItem
5688 status collapsed
5689
5690 \begin_layout Plain Layout
5691 Document\SpecialChar \menuseparator
5692 Settings\SpecialChar \menuseparator
5693 Output
5694 \end_layout
5695
5696 \end_inset
5697
5698 .
5699  In such a case LyX will automatically insert the necessary SyncTeX macro
5700  (for PDF) or load the srcltx package (for DVI) respectively.
5701  This option can be easily reached also on 
5702 \begin_inset Flex Code
5703 status collapsed
5704
5705 \begin_layout Plain Layout
5706 View/Update
5707 \end_layout
5708
5709 \end_inset
5710
5711  Toolbar.
5712 \end_layout
5713
5714 \begin_layout Standard
5715 If you need a different setting, you can select or input a custom macro
5716  from the drop down box just below 
5717 \begin_inset Flex MenuItem
5718 status collapsed
5719
5720 \begin_layout Plain Layout
5721 Document\SpecialChar \menuseparator
5722 Settings\SpecialChar \menuseparator
5723 Output\SpecialChar \menuseparator
5724 Synchronize with Output
5725 \end_layout
5726
5727 \end_inset
5728
5729 .
5730 \end_layout
5731
5732 \begin_layout Standard
5733 Note that the method 
5734 \begin_inset Flex Code
5735 status collapsed
5736
5737 \begin_layout Plain Layout
5738
5739 \backslash
5740 synctex=1
5741 \end_layout
5742
5743 \end_inset
5744
5745  enables gzip compression.
5746  If your viewer does not support it, you should instead use 
5747 \begin_inset Flex Code
5748 status collapsed
5749
5750 \begin_layout Plain Layout
5751
5752 \backslash
5753 synctex=-1
5754 \end_layout
5755
5756 \end_inset
5757
5758 .
5759 \end_layout
5760
5761 \begin_layout Standard
5762 Please aöso note that including the 
5763 \begin_inset Flex Code
5764 status collapsed
5765
5766 \begin_layout Plain Layout
5767 srcltx
5768 \end_layout
5769
5770 \end_inset
5771
5772  package or 
5773 \begin_inset Flex Code
5774 status collapsed
5775
5776 \begin_layout Plain Layout
5777 src-specials
5778 \end_layout
5779
5780 \end_inset
5781
5782  sometimes has an undesired impact on the typesetting.
5783  Thus, you should switch output synchronization off for the final typesetting
5784  if you use 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 .
5805  
5806 \end_layout
5807
5808 \begin_layout Standard
5809 In case you need some more special settings that are not covered by the
5810  automatic settings, read the next section about how to set up output synchroniz
5811 ation manually.
5812  If the automatic setup suits your needs, you can readily jump to section
5813 \begin_inset space ~
5814 \end_inset
5815
5816
5817 \begin_inset CommandInset ref
5818 LatexCommand ref
5819 reference "sub:configuring-viewers"
5820
5821 \end_inset
5822
5823 , where the necessary configuration steps in your viewer -- needed both
5824  with the automatic and the manual setup -- are described.
5825 \end_layout
5826
5827 \begin_layout Subsection
5828 Manual setup
5829 \end_layout
5830
5831 \begin_layout Standard
5832 LaTeX provides several different methods for reverse search.
5833  Some are built-in in the 
5834 \begin_inset Flex Code
5835 status collapsed
5836
5837 \begin_layout Plain Layout
5838 latex/pdflatex
5839 \end_layout
5840
5841 \end_inset
5842
5843  program, some are provided by external packages.
5844  Your choice depends on whether your LaTeX distribution already provides
5845  a given method (the built-in methods are rather new) and whether your viewer
5846  can cope with it.
5847  The available methods are described in the following.
5848 \end_layout
5849
5850 \begin_layout Subsubsection*
5851 Built-in DVI-search via src-specials (DVI only) 
5852 \end_layout
5853
5854 \begin_layout Standard
5855 This method provides the DVI file with the necessary information for reverse
5856  search.
5857  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5858  distribution should include it), and it works reliably.
5859  To enable it, change the 
5860 \begin_inset Flex MenuItem
5861 status collapsed
5862
5863 \begin_layout Plain Layout
5864 LaT
5865 \begin_inset ERT
5866 status collapsed
5867
5868 \begin_layout Plain Layout
5869
5870 {}
5871 \end_layout
5872
5873 \end_inset
5874
5875 eX (plain)->DVI
5876 \end_layout
5877
5878 \end_inset
5879
5880  or 
5881 \begin_inset Flex MenuItem
5882 status collapsed
5883
5884 \begin_layout Plain Layout
5885 LaT
5886 \begin_inset ERT
5887 status collapsed
5888
5889 \begin_layout Plain Layout
5890
5891 {}
5892 \end_layout
5893
5894 \end_inset
5895
5896 eX (plain)->DraftDVI
5897 \end_layout
5898
5899 \end_inset
5900
5901  converter in 
5902 \begin_inset Flex MenuItem
5903 status collapsed
5904
5905 \begin_layout Plain Layout
5906 Preferences\SpecialChar \menuseparator
5907 File Handling\SpecialChar \menuseparator
5908 Converters
5909 \end_layout
5910
5911 \end_inset
5912
5913  to 
5914 \begin_inset Flex Code
5915 status collapsed
5916
5917 \begin_layout Plain Layout
5918 latex -src-specials $$i
5919 \end_layout
5920
5921 \end_inset
5922
5923 .
5924  If this doesn't work, check if your TeX engine needs different options
5925  (the syntax might differ in some distributions).
5926 \end_layout
5927
5928 \begin_layout Subsubsection*
5929 External Packages (PDFSync and scrltx) 
5930 \end_layout
5931
5932 \begin_layout Standard
5933 The packages 
5934 \emph on
5935 pdfsync
5936 \emph default
5937  and 
5938 \emph on
5939 scrltx
5940 \emph default
5941  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5942  respectively.
5943  In order to enable it, load the packages in the LyX preamble: 
5944 \end_layout
5945
5946 \begin_layout Itemize
5947 \begin_inset Flex Code
5948 status collapsed
5949
5950 \begin_layout Plain Layout
5951
5952 \backslash
5953 usepackage{pdfsync}
5954 \end_layout
5955
5956 \end_inset
5957
5958  for reverse PDF search,
5959 \end_layout
5960
5961 \begin_layout Itemize
5962 \begin_inset Flex Code
5963 status collapsed
5964
5965 \begin_layout Plain Layout
5966
5967 \backslash
5968 usepackage[active]{srcltx}
5969 \end_layout
5970
5971 \end_inset
5972
5973  for reverse DVI search.
5974 \end_layout
5975
5976 \begin_layout Standard
5977 If you want to be able to perform both DVI and PDF reverse searches, you
5978  can also insert in the preamble the following lines
5979 \end_layout
5980
5981 \begin_layout LyX-Code
5982
5983 \backslash
5984 usepackage{ifpdf}
5985 \begin_inset Newline newline
5986 \end_inset
5987
5988
5989 \backslash
5990 ifpdf
5991 \begin_inset Newline newline
5992 \end_inset
5993
5994   
5995 \backslash
5996 usepackage{pdfsync}
5997 \begin_inset Newline newline
5998 \end_inset
5999
6000
6001 \backslash
6002 else
6003 \begin_inset Newline newline
6004 \end_inset
6005
6006   
6007 \backslash
6008 usepackage[active]{srcltx}
6009 \begin_inset Newline newline
6010 \end_inset
6011
6012
6013 \backslash
6014 fi
6015 \end_layout
6016
6017 \begin_layout Standard
6018 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6019  right package will be used.
6020 \end_layout
6021
6022 \begin_layout Standard
6023 Note that PDFSync might affect the output layout of your document.
6024  It is therefore advised to disable PDFsync for final documents.
6025 \end_layout
6026
6027 \begin_layout Subsubsection*
6028 Built-in reverse search via SyncTeX (DVI and PDF) 
6029 \end_layout
6030
6031 \begin_layout Standard
6032 Recent versions of 
6033 \begin_inset Flex Code
6034 status collapsed
6035
6036 \begin_layout Plain Layout
6037 (pdf)latex
6038 \end_layout
6039
6040 \end_inset
6041
6042  have built-in support for both PDF and DVI reverse search.
6043  This so-called 
6044 \emph on
6045 SyncTeX
6046 \emph default
6047  facility is basically the result of the integration of the PDFSync package
6048  to the pdftex program and its merge with the 
6049 \emph on
6050 scr-specials
6051 \emph default
6052  approach.
6053  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6054  to use it.
6055  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6056  already provide SyncTeX support.
6057 \end_layout
6058
6059 \begin_layout Standard
6060 To enable SyncTeX for DVI output, change the 
6061 \begin_inset Flex MenuItem
6062 status collapsed
6063
6064 \begin_layout Plain Layout
6065 LaT
6066 \begin_inset ERT
6067 status collapsed
6068
6069 \begin_layout Plain Layout
6070
6071 {}
6072 \end_layout
6073
6074 \end_inset
6075
6076 eX (plain) -> DVI
6077 \end_layout
6078
6079 \end_inset
6080
6081  or 
6082 \begin_inset Flex MenuItem
6083 status collapsed
6084
6085 \begin_layout Plain Layout
6086 LaT
6087 \begin_inset ERT
6088 status collapsed
6089
6090 \begin_layout Plain Layout
6091
6092 {}
6093 \end_layout
6094
6095 \end_inset
6096
6097 eX (plain) -> DraftDVI
6098 \end_layout
6099
6100 \end_inset
6101
6102  converter in 
6103 \begin_inset Flex MenuItem
6104 status collapsed
6105
6106 \begin_layout Plain Layout
6107 Preferences\SpecialChar \menuseparator
6108 File Handling\SpecialChar \menuseparator
6109 Converters
6110 \end_layout
6111
6112 \end_inset
6113
6114  to 
6115 \begin_inset Flex Code
6116 status collapsed
6117
6118 \begin_layout Plain Layout
6119 latex -synctex=1 $$i
6120 \end_layout
6121
6122 \end_inset
6123
6124 , and for PDF output, change the 
6125 \begin_inset Flex MenuItem
6126 status collapsed
6127
6128 \begin_layout Plain Layout
6129 LaT
6130 \begin_inset ERT
6131 status collapsed
6132
6133 \begin_layout Plain Layout
6134
6135 {}
6136 \end_layout
6137
6138 \end_inset
6139
6140 eX (pdflatex) -> PDF (pdflatex)
6141 \end_layout
6142
6143 \end_inset
6144
6145  or converter to 
6146 \begin_inset Flex Code
6147 status collapsed
6148
6149 \begin_layout Plain Layout
6150 pdflatex -synctex=1 $$i
6151 \end_layout
6152
6153 \end_inset
6154
6155 .
6156  Check the documentation of your viewer whether the viewer needs to be configure
6157 d for the use with SyncTeX.
6158 \begin_inset Foot
6159 status collapsed
6160
6161 \begin_layout Plain Layout
6162 Note that the option 
6163 \begin_inset Flex Code
6164 status collapsed
6165
6166 \begin_layout Plain Layout
6167 -synctex=1
6168 \end_layout
6169
6170 \end_inset
6171
6172  option enables gzip compression.
6173  If your viewer does not support it, you should instead use 
6174 \begin_inset Flex Code
6175 status collapsed
6176
6177 \begin_layout Plain Layout
6178 -synctex=-1
6179 \end_layout
6180
6181 \end_inset
6182
6183 .
6184 \end_layout
6185
6186 \end_inset
6187
6188
6189 \end_layout
6190
6191 \begin_layout Subsection
6192 Configuring and using specific viewers
6193 \begin_inset CommandInset label
6194 LatexCommand label
6195 name "sub:configuring-viewers"
6196
6197 \end_inset
6198
6199
6200 \end_layout
6201
6202 \begin_layout Subsubsection*
6203 Xdvi (all platforms)
6204 \end_layout
6205
6206 \begin_layout Standard
6207 If you use 
6208 \begin_inset Flex Code
6209 status collapsed
6210
6211 \begin_layout Plain Layout
6212 xdvi
6213 \end_layout
6214
6215 \end_inset
6216
6217 , you don't need to do anything else for performing a reverse DVI search,
6218  as LyX already provides the necessary hooks for automatically using the
6219  
6220 \begin_inset Flex Code
6221 status collapsed
6222
6223 \begin_layout Plain Layout
6224 lyxclient
6225 \end_layout
6226
6227 \end_inset
6228
6229  program.
6230  Just setup your document as described above (reverse search is triggered
6231  by Ctrl-click or Alt-click on Mac OSX, respectively).
6232 \end_layout
6233
6234 \begin_layout Standard
6235 However, if for whatever reason you want to use the named pipe instead of
6236  the socket for communicating with LyX, simply change the DVI viewer in
6237  
6238 \begin_inset Flex MenuItem
6239 status collapsed
6240
6241 \begin_layout Plain Layout
6242 Preferences\SpecialChar \menuseparator
6243 File Handling\SpecialChar \menuseparator
6244 File formats
6245 \end_layout
6246
6247 \end_inset
6248
6249  to
6250 \begin_inset Foot
6251 status collapsed
6252
6253 \begin_layout Plain Layout
6254 On Mac OSX you have to use 
6255 \begin_inset Flex Code
6256 status collapsed
6257
6258 \begin_layout Plain Layout
6259 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6260 \end_layout
6261
6262 \end_inset
6263
6264
6265 \end_layout
6266
6267 \end_inset
6268
6269  
6270 \begin_inset Flex Code
6271 status collapsed
6272
6273 \begin_layout Plain Layout
6274 xdvi -editor 'lyxeditor.sh %f %l'
6275 \end_layout
6276
6277 \end_inset
6278
6279 , where 
6280 \begin_inset Flex Code
6281 status collapsed
6282
6283 \begin_layout Plain Layout
6284 lyxeditor.sh
6285 \end_layout
6286
6287 \end_inset
6288
6289  is a suitable script.
6290  For example, a minimal shell script is the following one:
6291 \end_layout
6292
6293 \begin_layout LyX-Code
6294 #!/bin/sh
6295 \begin_inset Newline newline
6296 \end_inset
6297
6298 LYXPIPE="/path/to/lyxpipe"
6299 \begin_inset Newline newline
6300 \end_inset
6301
6302 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6303 \begin_inset Newline newline
6304 \end_inset
6305
6306 echo "$COMMAND" > "${LYXPIPE}".in || exit
6307 \begin_inset Newline newline
6308 \end_inset
6309
6310 read < "${LYXPIPE}".out || exit
6311 \end_layout
6312
6313 \begin_layout Standard
6314 where 
6315 \begin_inset Flex Code
6316 status collapsed
6317
6318 \begin_layout Plain Layout
6319 /path/to/lyxpipe
6320 \end_layout
6321
6322 \end_inset
6323
6324  is the Ly
6325 \begin_inset ERT
6326 status collapsed
6327
6328 \begin_layout Plain Layout
6329
6330 {}
6331 \end_layout
6332
6333 \end_inset
6334
6335 XServer pipe path specified in 
6336 \begin_inset Flex MenuItem
6337 status collapsed
6338
6339 \begin_layout Plain Layout
6340 Preferences\SpecialChar \menuseparator
6341 Paths
6342 \end_layout
6343
6344 \end_inset
6345
6346 .
6347 \begin_inset Foot
6348 status collapsed
6349
6350 \begin_layout Plain Layout
6351 In the 
6352 \begin_inset Flex Code
6353 status collapsed
6354
6355 \begin_layout Plain Layout
6356 development/tools
6357 \end_layout
6358
6359 \end_inset
6360
6361  folder of a source distribution you can find a 
6362 \begin_inset Flex Code
6363 status collapsed
6364
6365 \begin_layout Plain Layout
6366 lyxeditor
6367 \end_layout
6368
6369 \end_inset
6370
6371  script which is able to locate the 
6372 \emph on
6373 lyxpipe
6374 \emph default
6375  based on your preferences.
6376 \end_layout
6377
6378 \end_inset
6379
6380
6381 \end_layout
6382
6383 \begin_layout Subsubsection*
6384 MacDviX (Mac OSX)
6385 \end_layout
6386
6387 \begin_layout Standard
6388 At the end of 
6389 \begin_inset Flex Code
6390 status collapsed
6391
6392 \begin_layout Plain Layout
6393 /Applications/MacDviX_Folder/calleditor.script
6394 \end_layout
6395
6396 \end_inset
6397
6398 , add the following lines:
6399 \end_layout
6400
6401 \begin_layout LyX-Code
6402 /Applications/Ly
6403 \begin_inset ERT
6404 status collapsed
6405
6406 \begin_layout Plain Layout
6407
6408 {}
6409 \end_layout
6410
6411 \end_inset
6412
6413 X.app/Contents/MacOS/lyxeditor "$2" $1
6414 \begin_inset Newline newline
6415 \end_inset
6416
6417 exit 1
6418 \end_layout
6419
6420 \begin_layout Standard
6421 Modify the lines accordingly if you install LyX somewhere else than in the
6422  Applications folder.
6423 \end_layout
6424
6425 \begin_layout Standard
6426 Reverse search is triggered by Alt-click (OPTION-click).
6427 \end_layout
6428
6429 \begin_layout Subsubsection*
6430 Skim (Mac OSX)
6431 \end_layout
6432
6433 \begin_layout Standard
6434 Enter 
6435 \begin_inset Flex Code
6436 status collapsed
6437
6438 \begin_layout Plain Layout
6439 open -a Skim.app $$i
6440 \end_layout
6441
6442 \end_inset
6443
6444  to the viewer setting in 
6445 \begin_inset Flex MenuItem
6446 status collapsed
6447
6448 \begin_layout Plain Layout
6449 Preferences\SpecialChar \menuseparator
6450 File Handling\SpecialChar \menuseparator
6451 File formats\SpecialChar \menuseparator
6452 PDF (pdflatex)
6453 \end_layout
6454
6455 \end_inset
6456
6457 , and then in 
6458 \begin_inset Flex MenuItem
6459 status collapsed
6460
6461 \begin_layout Plain Layout
6462 Skim\SpecialChar \menuseparator
6463 Preferences\SpecialChar \menuseparator
6464 Sync
6465 \end_layout
6466
6467 \end_inset
6468
6469  select Ly
6470 \begin_inset ERT
6471 status collapsed
6472
6473 \begin_layout Plain Layout
6474
6475 {}
6476 \end_layout
6477
6478 \end_inset
6479
6480 X.
6481 \end_layout
6482
6483 \begin_layout Standard
6484 Reverse search is triggered by COMMAND-SHIFT-click
6485 \end_layout
6486
6487 \begin_layout Subsubsection*
6488 Okular (KDE)
6489 \end_layout
6490
6491 \begin_layout Standard
6492 Go to 
6493 \begin_inset Flex MenuItem
6494 status collapsed
6495
6496 \begin_layout Plain Layout
6497 Settings\SpecialChar \menuseparator
6498 Configure Okular\SpecialChar \ldots{}
6499 \SpecialChar \menuseparator
6500 Editor
6501 \end_layout
6502
6503 \end_inset
6504
6505 , select 
6506 \begin_inset Quotes eld
6507 \end_inset
6508
6509 Custom Text Editor
6510 \begin_inset Quotes erd
6511 \end_inset
6512
6513  and add the command 
6514 \begin_inset Flex Code
6515 status collapsed
6516
6517 \begin_layout Plain Layout
6518 lyxclient -g %f %l
6519 \end_layout
6520
6521 \end_inset
6522
6523 .
6524 \end_layout
6525
6526 \begin_layout Standard
6527 Reverse search is triggered by SHIFT-click.
6528 \end_layout
6529
6530 \begin_layout Subsubsection*
6531 YAP (Windows)
6532 \end_layout
6533
6534 \begin_layout Standard
6535 Launch yap, choose its 
6536 \begin_inset Flex MenuItem
6537 status collapsed
6538
6539 \begin_layout Plain Layout
6540 View\SpecialChar \menuseparator
6541 Options
6542 \end_layout
6543
6544 \end_inset
6545
6546  menu and select the 
6547 \begin_inset Quotes eld
6548 \end_inset
6549
6550 Inverse DVI Search
6551 \begin_inset Quotes erd
6552 \end_inset
6553
6554  tab.
6555  Click on the 
6556 \begin_inset Quotes eld
6557 \end_inset
6558
6559 New\SpecialChar \ldots{}
6560
6561 \begin_inset Quotes erd
6562 \end_inset
6563
6564  button and, in the window that opens, enter 
6565 \begin_inset Quotes eld
6566 \end_inset
6567
6568 LyX Editor
6569 \begin_inset Quotes erd
6570 \end_inset
6571
6572  (or any other name you like) in the 
6573 \begin_inset Quotes eld
6574 \end_inset
6575
6576 Name:
6577 \begin_inset Quotes erd
6578 \end_inset
6579
6580  field.
6581  Now click on the button labeled 
6582 \begin_inset Quotes eld
6583 \end_inset
6584
6585 \SpecialChar \ldots{}
6586
6587 \begin_inset Quotes erd
6588 \end_inset
6589
6590  to open a file dialog and navigate to the directory containing the batch
6591  file 
6592 \begin_inset Flex Code
6593 status collapsed
6594
6595 \begin_layout Plain Layout
6596 lyxeditor.bat
6597 \end_layout
6598
6599 \end_inset
6600
6601  (see below).
6602  Select 
6603 \begin_inset Flex Code
6604 status collapsed
6605
6606 \begin_layout Plain Layout
6607 lyxeditor.bat
6608 \end_layout
6609
6610 \end_inset
6611
6612  and then specify the program arguments as 
6613 \begin_inset Flex Code
6614 status collapsed
6615
6616 \begin_layout Plain Layout
6617 %f %l
6618 \end_layout
6619
6620 \end_inset
6621
6622 .
6623  The 
6624 \begin_inset Flex Code
6625 status collapsed
6626
6627 \begin_layout Plain Layout
6628 lyxeditor.bat
6629 \end_layout
6630
6631 \end_inset
6632
6633  wrapper is used for communicating with LyX through the 
6634 \emph on
6635 lyxpipe
6636 \emph default
6637  and is as follows:
6638 \end_layout
6639
6640 \begin_layout LyX-Code
6641 @echo off
6642 \begin_inset Newline newline
6643 \end_inset
6644
6645 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6646 \backslash
6647
6648 \backslash
6649 .
6650 \backslash
6651 pipe
6652 \backslash
6653 lyxpipe.in
6654 \begin_inset Newline newline
6655 \end_inset
6656
6657 type 
6658 \backslash
6659
6660 \backslash
6661 .
6662 \backslash
6663 pipe
6664 \backslash
6665 lyxpipe.out
6666 \end_layout
6667
6668 \begin_layout Standard
6669 Make sure that the LyXServer pipe path you specified in LyX is 
6670 \begin_inset Flex Code
6671 status collapsed
6672
6673 \begin_layout Plain Layout
6674
6675 \backslash
6676
6677 \backslash
6678 .
6679 \backslash
6680 pipe
6681 \backslash
6682 lyxpipe
6683 \end_layout
6684
6685 \end_inset
6686
6687 , otherwise change the 
6688 \begin_inset Flex Code
6689 status collapsed
6690
6691 \begin_layout Plain Layout
6692 lyxeditor.bat
6693 \end_layout
6694
6695 \end_inset
6696
6697  wrapper accordingly.
6698 \end_layout
6699
6700 \begin_layout Standard
6701 In yap, reverse search is triggered by double-click.
6702 \end_layout
6703
6704 \begin_layout Subsubsection*
6705 SumatraPDF (Windows)
6706 \end_layout
6707
6708 \begin_layout Standard
6709 In order to use SumatraPDF for inverse search, enter 
6710 \begin_inset Flex Code
6711 status collapsed
6712
6713 \begin_layout Plain Layout
6714 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6715 \end_layout
6716
6717 \end_inset
6718
6719  in the viewer setting in 
6720 \begin_inset Flex MenuItem
6721 status collapsed
6722
6723 \begin_layout Plain Layout
6724 Preferences\SpecialChar \menuseparator
6725 File Handling\SpecialChar \menuseparator
6726 File formats\SpecialChar \menuseparator
6727 PDF (pdflatex)
6728 \end_layout
6729
6730 \end_inset
6731
6732 , where 
6733 \begin_inset Flex Code
6734 status collapsed
6735
6736 \begin_layout Plain Layout
6737 lyxeditor.bat
6738 \end_layout
6739
6740 \end_inset
6741
6742  is the previous wrapper.
6743  If SumatraPDF.exe is not in your command PATH, use its full file name.
6744 \end_layout
6745
6746 \begin_layout Standard
6747 Reverse search is triggered by double-click.
6748 \end_layout
6749
6750 \begin_layout Subsubsection*
6751 YAP (Cygwin)
6752 \end_layout
6753
6754 \begin_layout Standard
6755 First of all, make sure that yap is your default DVI viewer in the Windows
6756  environment, then launch it, choose its 
6757 \begin_inset Flex MenuItem
6758 status collapsed
6759
6760 \begin_layout Plain Layout
6761 View\SpecialChar \menuseparator
6762 Options
6763 \end_layout
6764
6765 \end_inset
6766
6767  menu and select the 
6768 \begin_inset Quotes eld
6769 \end_inset
6770
6771 Inverse DVI Search
6772 \begin_inset Quotes erd
6773 \end_inset
6774
6775  tab.
6776  Click on the 
6777 \begin_inset Quotes eld
6778 \end_inset
6779
6780 New\SpecialChar \ldots{}
6781
6782 \begin_inset Quotes erd
6783 \end_inset
6784
6785  button and, in the window that opens, enter 
6786 \begin_inset Quotes eld
6787 \end_inset
6788
6789 LyX Editor
6790 \begin_inset Quotes erd
6791 \end_inset
6792
6793  (or any other name you like) in the 
6794 \begin_inset Quotes eld
6795 \end_inset
6796
6797 Name:
6798 \begin_inset Quotes erd
6799 \end_inset
6800
6801  field.
6802  Now click on the button labeled 
6803 \begin_inset Quotes eld
6804 \end_inset
6805
6806 \SpecialChar \ldots{}
6807
6808 \begin_inset Quotes erd
6809 \end_inset
6810
6811  to open a file dialog and navigate to the directory containing the 
6812 \begin_inset Flex Code
6813 status collapsed
6814
6815 \begin_layout Plain Layout
6816 lyxeditor.exe
6817 \end_layout
6818
6819 \end_inset
6820
6821  program (which is installed by default on Cygwin along with the LyX executable).
6822  Select 
6823 \begin_inset Flex Code
6824 status collapsed
6825
6826 \begin_layout Plain Layout
6827 lyxeditor.exe
6828 \end_layout
6829
6830 \end_inset
6831
6832  and then specify the program arguments as 
6833 \begin_inset Flex Code
6834 status collapsed
6835
6836 \begin_layout Plain Layout
6837 -g %f %l
6838 \end_layout
6839
6840 \end_inset
6841
6842 .
6843  In this way, you will be using the 
6844 \emph on
6845 lyxsocket
6846 \emph default
6847  for communicating with LyX.
6848  If, for whatever reason, you want to use the 
6849 \emph on
6850 lyxpipe
6851 \emph default
6852 , omit the 
6853 \begin_inset Flex Code
6854 status collapsed
6855
6856 \begin_layout Plain Layout
6857 -g
6858 \end_layout
6859
6860 \end_inset
6861
6862  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6863 \end_layout
6864
6865 \begin_layout Standard
6866 In yap, reverse search is triggered by double-click.
6867 \end_layout
6868
6869 \begin_layout Subsubsection*
6870 SumatraPDF (Cygwin)
6871 \end_layout
6872
6873 \begin_layout Standard
6874 In order to use SumatraPDF for inverse search, enter 
6875 \begin_inset Flex Code
6876 status collapsed
6877
6878 \begin_layout Plain Layout
6879 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6880 \end_layout
6881
6882 \end_inset
6883
6884  in the viewer setting in 
6885 \begin_inset Flex MenuItem
6886 status collapsed
6887
6888 \begin_layout Plain Layout
6889 Preferences\SpecialChar \menuseparator
6890 File Handling\SpecialChar \menuseparator
6891 File formats\SpecialChar \menuseparator
6892 PDF (pdflatex)
6893 \end_layout
6894
6895 \end_inset
6896
6897 .
6898  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6899  The 
6900 \begin_inset Flex Code
6901 status collapsed
6902
6903 \begin_layout Plain Layout
6904 -g
6905 \end_layout
6906
6907 \end_inset
6908
6909  enables communication via the 
6910 \emph on
6911 lyxsocket
6912 \emph default
6913 .
6914  Again, omit the 
6915 \begin_inset Flex Code
6916 status collapsed
6917
6918 \begin_layout Plain Layout
6919 -g
6920 \end_layout
6921
6922 \end_inset
6923
6924  option if you want to use the 
6925 \emph on
6926 lyxpipe
6927 \emph default
6928 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6929 \end_layout
6930
6931 \begin_layout Standard
6932 Reverse search is triggered by double-click.
6933 \end_layout
6934
6935 \begin_layout Section
6936 Forward search
6937 \end_layout
6938
6939 \begin_layout Standard
6940 Forward search is, as the name implies, in a sense the 
6941 \begin_inset Quotes eld
6942 \end_inset
6943
6944 opposite
6945 \begin_inset Quotes erd
6946 \end_inset
6947
6948  to reverse search.
6949  It allows you to let the viewer jump to a given position from within LyX.
6950  If forward search is set up (as described in what follows), you can put
6951  the cursor anywhere in your LyX document, and hit 
6952 \begin_inset Flex MenuItem
6953 status collapsed
6954
6955 \begin_layout Plain Layout
6956 Navigate\SpecialChar \menuseparator
6957 Forward search
6958 \end_layout
6959
6960 \end_inset
6961
6962  (or select 
6963 \begin_inset Flex MenuItem
6964 status collapsed
6965
6966 \begin_layout Plain Layout
6967 Forward search
6968 \end_layout
6969
6970 \end_inset
6971
6972  in the context menu via right mouse click), and then the viewer will jump
6973  to that position as well.
6974  This implies, of course, that your viewer supports this function.
6975 \end_layout
6976
6977 \begin_layout Standard
6978 To make forward search possible, you first need to provide the generated
6979  output PDF/DVI file with additional information about the TeX sources.
6980  This can be done via the methods described in the section 
6981 \begin_inset CommandInset ref
6982 LatexCommand ref
6983 reference "sub:rev-search"
6984
6985 \end_inset
6986
6987 .
6988 \end_layout
6989
6990 \begin_layout Standard
6991 Additionally, you need to configure LyX for using your viewers in 
6992 \begin_inset Flex MenuItem
6993 status collapsed
6994
6995 \begin_layout Plain Layout
6996 Tools\SpecialChar \menuseparator
6997 Preferences\SpecialChar \menuseparator
6998 Output\SpecialChar \menuseparator
6999 General
7000 \end_layout
7001
7002 \end_inset
7003
7004 .
7005  We provide a range of tested configurations for some viewers, which you
7006  can select from the drop down list.
7007  If none of these configurations suits you, you have to find out and enter
7008  a suitable configuration yourself.
7009  The definition syntax uses the following placeholders:
7010 \end_layout
7011
7012 \begin_layout Itemize
7013 \noindent
7014 \begin_inset Flex Code
7015 status collapsed
7016
7017 \begin_layout Plain Layout
7018 $$n
7019 \end_layout
7020
7021 \end_inset
7022
7023 : row number
7024 \end_layout
7025
7026 \begin_layout Itemize
7027 \noindent
7028 \begin_inset Flex Code
7029 status collapsed
7030
7031 \begin_layout Plain Layout
7032 $$t
7033 \end_layout
7034
7035 \end_inset
7036
7037 : name of the (temporary) exported .tex file
7038 \end_layout
7039
7040 \begin_layout Itemize
7041 \noindent
7042 \begin_inset Flex Code
7043 status collapsed
7044
7045 \begin_layout Plain Layout
7046 $$o
7047 \end_layout
7048
7049 \end_inset
7050
7051 : name of the exported output file (either dvi or pdf, depending on which
7052  one exists in the temporary directory)
7053 \end_layout
7054
7055 \begin_layout Standard
7056 Note that only some of the viewers provide full forward search functionality,
7057  among them yap, xdvi, okular and Sumatra PDF.
7058 \begin_inset Foot
7059 status collapsed
7060
7061 \begin_layout Plain Layout
7062 For Sumatra CMCDDE is needed --- downloadable from 
7063 \begin_inset CommandInset href
7064 LatexCommand href
7065 target "http://www.istri.fr/zip/CMCDDE.zip"
7066
7067 \end_inset
7068
7069
7070 \end_layout
7071
7072 \end_inset
7073
7074  While many of the widespread PDF viewers (most notably Adobe Reader) do
7075  not support forward search at all, some other viewers -- e.
7076 \begin_inset space \thinspace{}
7077 \end_inset
7078
7079 g.
7080  evince and xpdf -- allow at least to reload the document and jump to a
7081  specific page of the file, so you can at least navigate 
7082 \begin_inset Quotes eld
7083 \end_inset
7084
7085 near
7086 \begin_inset Quotes erd
7087 \end_inset
7088
7089 .
7090  These latter functionality is provided by an external call of synctex (see
7091  the predefined example configurations).
7092  
7093 \end_layout
7094
7095 \begin_layout Standard
7096 Forward search works both with DVI and PDF output.
7097  LyX simply checks which preview format you have used before (i.
7098 \begin_inset space \thinspace{}
7099 \end_inset
7100
7101 e., which format is already there in the temporary directory) and chooses
7102  the appropriate configuration for the respective format.
7103 \end_layout
7104
7105 \begin_layout Chapter
7106 Special Document Classes
7107 \end_layout
7108
7109 \begin_layout Section
7110 A&A Paper
7111 \end_layout
7112
7113 \begin_layout Standard
7114 by 
7115 \noun on
7116 Peter Sütterlin
7117 \end_layout
7118
7119 \begin_layout Subsection
7120 Introduction
7121 \end_layout
7122
7123 \begin_layout Standard
7124 This section describes how LyX can be used to write articles for submission
7125  to the scientific journal 
7126 \emph on
7127 Astronomy and Astrophysics
7128 \emph default
7129  (www.edpsciences.fr/aa/ 
7130 \begin_inset Flex URL
7131 status collapsed
7132
7133 \begin_layout Plain Layout
7134
7135 http://www.edpsciences.fr/aa/
7136 \end_layout
7137
7138 \end_inset
7139
7140 ) using Version 5.01 of the document class 
7141 \family typewriter
7142 aa.cls
7143 \family default
7144 .
7145  This package can be downloaded from the ftp site
7146 \end_layout
7147
7148 \begin_layout Standard
7149 \begin_inset VSpace medskip
7150 \end_inset
7151
7152
7153 \end_layout
7154
7155 \begin_layout Standard
7156 \align center
7157 \begin_inset Flex URL
7158 status collapsed
7159
7160 \begin_layout Plain Layout
7161
7162 ftp://ftp.edpsciences.org/pub/aa/readme.html
7163 \end_layout
7164
7165 \end_inset
7166
7167
7168 \end_layout
7169
7170 \begin_layout Standard
7171 \begin_inset VSpace medskip
7172 \end_inset
7173
7174
7175 \end_layout
7176
7177 \begin_layout Standard
7178 A manual comes together with that package, and this text is not meant to
7179  replace the original manual but is merely a short guide in how to realize
7180  the correct form of your paper.
7181  
7182 \end_layout
7183
7184 \begin_layout Standard
7185 Please note that the publisher of the journal was changed from Springer
7186  to EDP Sciences starting January 1, 2001.
7187  That change involved also some slight changes to the style files, namely
7188  the removal of the thesaurus command.
7189  The LyX class aa supports the newest version of these style files, V 5.01.
7190  If you have an older version installed, please upgrade.
7191  For compatibility, the old (version 4) layout has been kept as 
7192 \family sans
7193 article (A&A V4)
7194 \family default
7195 .
7196  Please refer to the comments in 
7197 \family typewriter
7198 LyXDir/layouts/aapaper.layout
7199 \family default
7200 .
7201 \end_layout
7202
7203 \begin_layout Subsection
7204 Getting started
7205 \end_layout
7206
7207 \begin_layout Standard
7208 It is recommended you start from the example template distributed with LyX.
7209  If you are not using a template, note the following settings:
7210 \end_layout
7211
7212 \begin_layout Itemize
7213 Select 
7214 \family sans
7215 article (A&A)
7216 \family default
7217  in the 
7218 \family sans
7219 Document\SpecialChar \menuseparator
7220 Settings
7221 \family default
7222  dialog (OK, that one was obvious).
7223 \end_layout
7224
7225 \begin_layout Itemize
7226 Don't change the option 
7227 \family sans
7228 Page
7229 \begin_inset space ~
7230 \end_inset
7231
7232 style
7233 \family default
7234 : Leave it set to 
7235 \family sans
7236 default
7237 \family default
7238 .
7239  The whole layout is done by the macros, you shouldn't change anything.
7240 \end_layout
7241
7242 \begin_layout Subsection
7243 The header block
7244 \end_layout
7245
7246 \begin_layout Standard
7247 First thing to enter is the header information.
7248  It consists of seven entries, of which some are optional.
7249  They are
7250 \end_layout
7251
7252 \begin_layout Itemize
7253
7254 \family sans
7255 Title
7256 \family default
7257 : [required] 
7258 \end_layout
7259
7260 \begin_layout Itemize
7261
7262 \family sans
7263 Subtitle
7264 \family default
7265 : [optional] 
7266 \end_layout
7267
7268 \begin_layout Itemize
7269
7270 \family sans
7271 Author
7272 \family default
7273 : [required]
7274 \end_layout
7275
7276 \begin_layout Itemize
7277
7278 \family sans
7279 Address
7280 \family default
7281 : [required]
7282 \end_layout
7283
7284 \begin_layout Itemize
7285
7286 \family sans
7287 Offprints
7288 \family default
7289 : [optional] if more than one author: whom to contact for offprint requests.
7290 \end_layout
7291
7292 \begin_layout Itemize
7293
7294 \family sans
7295 Mail
7296 \family default
7297 : [optional] mail address for contacts.
7298 \end_layout
7299
7300 \begin_layout Itemize
7301
7302 \family sans
7303 Date
7304 \family default
7305 : [required].
7306  Suggested format is 
7307 \family typewriter
7308 Received: <date>; Accepted <date> 
7309 \end_layout
7310
7311 \begin_layout Standard
7312 There is no need to issue the 
7313 \family typewriter
7314
7315 \backslash
7316 maketitle
7317 \family default
7318  command, this is done automatically by LyX when the header is finished.
7319  Although the order of the single header entries doesn't matter it is advised
7320  to keep the above sequence, just to get the best optics and meets the layout
7321  of the real document.
7322 \end_layout
7323
7324 \begin_layout Standard
7325 If you want to place footnotes in the header block, e.
7326 \begin_inset space \thinspace{}
7327 \end_inset
7328
7329 g.
7330 \begin_inset space \space{}
7331 \end_inset
7332
7333 to state your present address, just use the standard footnote via the menu
7334  
7335 \family sans
7336 Insert\SpecialChar \menuseparator
7337 Footnote.
7338
7339 \family default
7340  LyX will automagically use the term 
7341 \family typewriter
7342
7343 \backslash
7344 thanks{}
7345 \family default
7346  in that case.
7347 \end_layout
7348
7349 \begin_layout Standard
7350 In addition to these topics, the macros use three additional LaTeX commands
7351  that have no counterpart in LyX:
7352 \end_layout
7353
7354 \begin_layout Itemize
7355
7356 \family typewriter
7357
7358 \backslash
7359 and
7360 \family default
7361  to separate different names for more than one author and institute, respectivel
7362 y.
7363 \end_layout
7364
7365 \begin_layout Itemize
7366
7367 \family typewriter
7368
7369 \backslash
7370 inst{<nr>}
7371 \family default
7372 to mark corresponding author/institute pairs.
7373  The institutes are numbered sequentially as they appear in the 
7374 \family sans
7375 Address
7376 \family default
7377  field, so you have to put a marker to each author.
7378 \end_layout
7379
7380 \begin_layout Itemize
7381
7382 \family typewriter
7383
7384 \backslash
7385 email{address}
7386 \family default
7387  to supply an email address for fast contact.
7388 \end_layout
7389
7390 \begin_layout Standard
7391 In all cases, the appropriate command has to be entered in LyX and marked
7392  as LaTeX code.
7393  See the examples.
7394  
7395 \end_layout
7396
7397 \begin_layout Subsection
7398 The abstract
7399 \end_layout
7400
7401 \begin_layout Standard
7402 The abstract should immediately follow the header block.
7403  With version 5 the abstract environment was changed to a command, and there
7404  is now a resctriction to only one paragraph.
7405  In addition, it should contain an entry with the keywords.
7406  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7407  command 
7408 \family typewriter
7409
7410 \backslash
7411 keywords{}
7412 \family default
7413  by hand and mark it as LaTeX code.
7414  Refer to the example paper.
7415 \end_layout
7416
7417 \begin_layout Subsection
7418 Supported environments
7419 \end_layout
7420
7421 \begin_layout Standard
7422 The A&A paper layout supports the following environments for structuring
7423  your text:
7424 \end_layout
7425
7426 \begin_layout Itemize
7427
7428 \family sans
7429 Standard
7430 \end_layout
7431
7432 \begin_layout Itemize
7433
7434 \family sans
7435 Section
7436 \end_layout
7437
7438 \begin_layout Itemize
7439
7440 \family sans
7441 Subsection
7442 \end_layout
7443
7444 \begin_layout Itemize
7445
7446 \family sans
7447 Subsubsection
7448 \end_layout
7449
7450 \begin_layout Itemize
7451
7452 \family sans
7453 Itemize
7454 \end_layout
7455
7456 \begin_layout Itemize
7457
7458 \family sans
7459 Enumerate
7460 \end_layout
7461
7462 \begin_layout Itemize
7463
7464 \family sans
7465 Description
7466 \end_layout
7467
7468 \begin_layout Itemize
7469
7470 \family sans
7471 Caption
7472 \end_layout
7473
7474 \begin_layout Itemize
7475
7476 \family sans
7477 Abstract
7478 \end_layout
7479
7480 \begin_layout Itemize
7481
7482 \family sans
7483 Acknowledgment
7484 \end_layout
7485
7486 \begin_layout Itemize
7487
7488 \family sans
7489 Bibliography
7490 \end_layout
7491
7492 \begin_layout Itemize
7493
7494 \family sans
7495 LaTeX
7496 \end_layout
7497
7498 \begin_layout Subsection
7499 Commands not supported by LyX
7500 \end_layout
7501
7502 \begin_layout Standard
7503 Some commands are not yet supported by the 
7504 \family sans
7505 paper (A&A)
7506 \family default
7507  layout for LyX.
7508  Some have already been mentioned.
7509  For the sake of completeness, they are listed all together here:
7510 \end_layout
7511
7512 \begin_layout Itemize
7513
7514 \family typewriter
7515
7516 \backslash
7517 and
7518 \end_layout
7519
7520 \begin_layout Itemize
7521
7522 \family typewriter
7523
7524 \backslash
7525 email
7526 \end_layout
7527
7528 \begin_layout Itemize
7529
7530 \family typewriter
7531
7532 \backslash
7533 appendix
7534 \end_layout
7535
7536 \begin_layout Itemize
7537
7538 \family typewriter
7539
7540 \backslash
7541 authorrunning
7542 \end_layout
7543
7544 \begin_layout Itemize
7545
7546 \family typewriter
7547
7548 \backslash
7549 inst{}
7550 \end_layout
7551
7552 \begin_layout Itemize
7553
7554 \family typewriter
7555
7556 \backslash
7557 keywords{}
7558 \end_layout
7559
7560 \begin_layout Itemize
7561
7562 \family typewriter
7563
7564 \backslash
7565 object{}
7566 \end_layout
7567
7568 \begin_layout Itemize
7569
7570 \family typewriter
7571
7572 \backslash
7573 titlerunning{}
7574 \end_layout
7575
7576 \begin_layout Standard
7577 If you want to use any of these commands, you have to enter them yourself.
7578  
7579 \series bold
7580 Do not forget to mark them as LaTeX code!
7581 \end_layout
7582
7583 \begin_layout Subsection
7584 Figure and Table Floats
7585 \end_layout
7586
7587 \begin_layout Standard
7588 LyX provides support for the necessary float environments 
7589 \family sans
7590 figure, figure*, table
7591 \family default
7592  and 
7593 \family sans
7594 table*
7595 \family default
7596 , therefore we won't tell much about it here.
7597  Refer to the 
7598 \emph on
7599 User's
7600 \begin_inset space ~
7601 \end_inset
7602
7603 Guide
7604 \emph default
7605 .
7606  Just remember that tables should be left-aligned.
7607  For that, select the table and change the alignment in 
7608 \family sans
7609 Edit\SpecialChar \menuseparator
7610 Paragraph
7611 \begin_inset space ~
7612 \end_inset
7613
7614 Settings.
7615 \end_layout
7616
7617 \begin_layout Standard
7618 There is only one special thing: the figures with caption besides the figure.
7619  To create such a figure, you have to do the following:
7620 \end_layout
7621
7622 \begin_layout Enumerate
7623 Create a wide figure float: 
7624 \family sans
7625 Insert\SpecialChar \menuseparator
7626 Float\SpecialChar \menuseparator
7627 Figure
7628 \family default
7629 , then right click in the figure and select 
7630 \family sans
7631 \bar under
7632 S
7633 \bar default
7634 pan
7635 \begin_inset space ~
7636 \end_inset
7637
7638 columns
7639 \family default
7640 .
7641 \end_layout
7642
7643 \begin_layout Enumerate
7644 Enter your caption text.
7645 \end_layout
7646
7647 \begin_layout Enumerate
7648 Press 
7649 \family sans
7650 Return
7651 \family default
7652  to move the cursor above the caption.
7653 \end_layout
7654
7655 \begin_layout Enumerate
7656 Insert your figure
7657 \end_layout
7658
7659 \begin_layout Enumerate
7660 Position the cursor behind the figure and insert a horizontal fill: 
7661 \family sans
7662 Insert\SpecialChar \menuseparator
7663 Special
7664 \begin_inset space ~
7665 \end_inset
7666
7667 Character\SpecialChar \menuseparator
7668 Horizontal
7669 \begin_inset space ~
7670 \end_inset
7671
7672 Fill
7673 \family default
7674 .
7675 \end_layout
7676
7677 \begin_layout Enumerate
7678 Switch to LaTeX mode: 
7679 \family sans
7680 M-c
7681 \begin_inset space ~
7682 \end_inset
7683
7684 t
7685 \family default
7686 .
7687 \end_layout
7688
7689 \begin_layout Enumerate
7690 Enter 
7691 \family typewriter
7692
7693 \backslash
7694 parbox[b]{55mm}{
7695 \family default
7696 .
7697  
7698 \series bold
7699 Do not close the brace!
7700 \end_layout
7701
7702 \begin_layout Enumerate
7703 Position the cursor behind the caption text, switch to LaTeX mode and insert
7704  the closing brace: 
7705 \family sans
7706 M-c
7707 \begin_inset space ~
7708 \end_inset
7709
7710 t
7711 \family default
7712  
7713 \family typewriter
7714 }
7715 \family default
7716 .
7717 \end_layout
7718
7719 \begin_layout Standard
7720 Also, refer to the figures in the example paper.
7721 \end_layout
7722
7723 \begin_layout Subsection
7724 Referee layout
7725 \end_layout
7726
7727 \begin_layout Standard
7728 For submission, the paper has to be formated in a special double-spacing
7729  layout.
7730  For this purpose, you have to give the option 
7731 \family typewriter
7732 referee
7733 \family default
7734  to the documentclass.
7735  This must be done using the extra class options field in the 
7736 \family sans
7737 Document\SpecialChar \menuseparator
7738 Settings
7739 \family default
7740  dialog.
7741  Just enter the string 
7742 \family typewriter
7743 referee
7744 \family default
7745  there.
7746 \end_layout
7747
7748 \begin_layout Subsection
7749 The example paper
7750 \end_layout
7751
7752 \begin_layout Standard
7753 The 
7754 \family sans
7755 Examples
7756 \family default
7757  directory contains an example paper written with LyX.
7758  It is the example paper from the original macro package, translated to
7759  LyX.
7760  Use it for inspiration, and compare the original LaTeX code with LyX way
7761  of writing.
7762 \end_layout
7763
7764 \begin_layout Section
7765 AASTeX
7766 \end_layout
7767
7768 \begin_layout Standard
7769 by 
7770 \noun on
7771 Mike Ressler
7772 \end_layout
7773
7774 \begin_layout Subsection
7775 Introduction
7776 \end_layout
7777
7778 \begin_layout Standard
7779 AASTeX is a set of macros produced by the American Astronomical Society
7780  to facilitate electronic manuscript submission to the three journals they
7781  publish: the Astrophysical Journal (including the Letters and Supplement),
7782  the Astronomical Journal, and the Publications of the Astronomical Society
7783  of the Pacific.
7784  LyX has proven to be an excellent tool for generating these documents,
7785  especially given its equation, citation, and figure handling capabilities.
7786  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7787  is the version described here, or higher.
7788  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7789  incompatible with LyX.
7790  The AASTeX package may be downloaded from the AASTeX Web site
7791 \end_layout
7792
7793 \begin_layout Standard
7794 \begin_inset VSpace medskip
7795 \end_inset
7796
7797
7798 \end_layout
7799
7800 \begin_layout Standard
7801 \align center
7802 \begin_inset Flex URL
7803 status collapsed
7804
7805 \begin_layout Plain Layout
7806
7807 http://www.journals.uchicago.edu/AAS/AASTeX
7808 \end_layout
7809
7810 \end_inset
7811
7812
7813 \end_layout
7814
7815 \begin_layout Standard
7816 \begin_inset VSpace medskip
7817 \end_inset
7818
7819
7820 \end_layout
7821
7822 \begin_layout Standard
7823 A complete user guide is contained in that package and you should familiarize
7824  yourself with it thoroughly before embarking on writing a paper in LyX.
7825  LyX will not reduce the need to figure out all the AASTeX commands, it
7826  will only reduce the drudgery of typing everything in.
7827  It is your responsibility to ensure that the final exported LaTeX document
7828  conforms completely to the requirements of the journal to which you are
7829  submitting your paper.
7830 \end_layout
7831
7832 \begin_layout Subsection
7833 Starting a New Paper
7834 \end_layout
7835
7836 \begin_layout Standard
7837 I strongly suggest that you start with the AASTeX template file.
7838  Click on 
7839 \family sans
7840 File\SpecialChar \menuseparator
7841 New from
7842 \family default
7843  
7844 \family sans
7845 Template
7846 \family default
7847 , enter the new file name, then choose the 
7848 \family typewriter
7849 aastex.lyx
7850 \family default
7851  template.
7852  This will show the most common fields found in a manuscript.
7853  Simply overwrite the existing text (including the brackets, 
7854 \family typewriter
7855 <>
7856 \family default
7857 ) with the correct information.
7858  Many of the AASTeX commands and environments can be implemented directly
7859  in LyX, but some cannot: most noticeably 
7860 \family typewriter
7861
7862 \backslash
7863 altaffilmark
7864 \family default
7865  and 
7866 \family typewriter
7867
7868 \backslash
7869 altaffiltext
7870 \family default
7871 , which should stick out like a sore thumb if you actually just opened the
7872  template file.
7873  For commands such as these, the LaTeX code must be entered directly and
7874  marked as such.
7875  Such commands are referred to as TeX code, or Evil Red Text.
7876  I tried to minimize the amount of TeX code needed in an AASTeX document,
7877  but there is still a bit more required than any of us would like.
7878 \end_layout
7879
7880 \begin_layout Subsection
7881 Finishing Your Paper
7882 \end_layout
7883
7884 \begin_layout Standard
7885 When the paper is finished to your satisfaction and previews/prints correctly,
7886  there are a few 
7887 \begin_inset Quotes eld
7888 \end_inset
7889
7890 postprocessing
7891 \begin_inset Quotes erd
7892 \end_inset
7893
7894  actions which need to be done before you submit it to the journals.
7895  
7896 \end_layout
7897
7898 \begin_layout Enumerate
7899 Export your paper as a LaTeX file (
7900 \family sans
7901 File\SpecialChar \menuseparator
7902 Export\SpecialChar \menuseparator
7903 LaTeX
7904 \family default
7905 ).
7906  
7907 \end_layout
7908
7909 \begin_layout Enumerate
7910 Edit the resulting 
7911 \family typewriter
7912 .tex
7913 \family default
7914  file with your favorite text editor
7915 \end_layout
7916
7917 \begin_deeper
7918 \begin_layout Enumerate
7919 remove the comment lines before the 
7920 \family typewriter
7921
7922 \backslash
7923 documentclass
7924 \family default
7925  command
7926 \end_layout
7927
7928 \begin_layout Enumerate
7929 remove the 
7930 \family typewriter
7931
7932 \backslash
7933 usepackage...{fontenc}
7934 \family default
7935  line if it appears (usually just after 
7936 \family typewriter
7937
7938 \backslash
7939 documentclass
7940 \family default
7941 }; also remove the 
7942 \family typewriter
7943
7944 \backslash
7945 secnumdepth
7946 \family default
7947  line if it appears.
7948 \end_layout
7949
7950 \begin_layout Enumerate
7951 remove everything between (and including) the 
7952 \family typewriter
7953
7954 \backslash
7955 makeatletter
7956 \family default
7957  and 
7958 \family typewriter
7959
7960 \backslash
7961 makeatother
7962 \family default
7963  commands, except for any commands you specifically put into the LaTeX preamble
7964  (which should appear immediately after the 
7965 \begin_inset Quotes eld
7966 \end_inset
7967
7968 User specified LaTeX commands
7969 \begin_inset Quotes erd
7970 \end_inset
7971
7972  comment in the 
7973 \family typewriter
7974 .tex
7975 \family default
7976  file).
7977 \end_layout
7978
7979 \end_deeper
7980 \begin_layout Enumerate
7981 Run the resulting file through LaTeX to make sure it still processes correctly.
7982 \end_layout
7983
7984 \begin_layout Enumerate
7985 Reread the journal requirements to make sure your filenames and formats
7986  are correct.
7987 \end_layout
7988
7989 \begin_layout Enumerate
7990 Submit it.
7991 \end_layout
7992
7993 \begin_layout Subsection
7994 Comments On Specific Commands
7995 \end_layout
7996
7997 \begin_layout Standard
7998 I will not describe the detailed usage of the individual AASTeX commands:
7999  the AASTeX User Guide (
8000 \family typewriter
8001 aasguide.tex
8002 \family default
8003 ) gives a good description of each.
8004  Thus it's probably easiest for me to go down the list as found in the guide
8005  and offer comments where necessary.
8006  So let's begin \SpecialChar \ldots{}
8007
8008 \end_layout
8009
8010 \begin_layout Subsubsection
8011 Things that work as expected
8012 \end_layout
8013
8014 \begin_layout Standard
8015 Because they work as you might expect, I simply list them and the section
8016  they are found in: 
8017 \family typewriter
8018
8019 \backslash
8020 documentclass
8021 \family default
8022  (2.1.1), 
8023 \family typewriter
8024
8025 \backslash
8026 begin{document}
8027 \family default
8028  (2.2), 
8029 \family typewriter
8030
8031 \backslash
8032 title
8033 \family default
8034  (2.3), 
8035 \family typewriter
8036
8037 \backslash
8038 author
8039 \family default
8040  (2.3), 
8041 \family typewriter
8042
8043 \backslash
8044 affil
8045 \family default
8046  (2.3), 
8047 \family typewriter
8048
8049 \backslash
8050 abstract
8051 \family default
8052  (2.4), 
8053 \family typewriter
8054
8055 \backslash
8056 keywords
8057 \family default
8058  (2.5), 
8059 \family typewriter
8060
8061 \backslash
8062 section
8063 \family default
8064  (2.7), 
8065 \family typewriter
8066
8067 \backslash
8068 subsection
8069 \family default
8070  (2.7), 
8071 \family typewriter
8072
8073 \backslash
8074 subsubsection
8075 \family default
8076  (2.7), 
8077 \family typewriter
8078
8079 \backslash
8080 paragraph
8081 \family default
8082  (2.7), 
8083 \family typewriter
8084
8085 \backslash
8086 facility
8087 \family default
8088  (2.10), 
8089 \family typewriter
8090
8091 \backslash
8092 begin{displaymath}
8093 \family default
8094  (2.12), 
8095 \family typewriter
8096
8097 \backslash
8098 begin{equation}
8099 \family default
8100  (2.12), 
8101 \family typewriter
8102
8103 \backslash
8104 begin{eqnarray}
8105 \family default
8106  (2.12), 
8107 \family typewriter
8108
8109 \backslash
8110 begin{mathletters}
8111 \family default
8112  (2.12), 
8113 \family typewriter
8114
8115 \backslash
8116 begin{thebibliography}
8117 \family default
8118  (2.13.1), 
8119 \family typewriter
8120
8121 \backslash
8122 bibitem
8123 \family default
8124  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8125  graphicx figure commands (2.14.1), 
8126 \family typewriter
8127
8128 \backslash
8129 begin{table}
8130 \family default
8131  (2.15.4), 
8132 \family typewriter
8133
8134 \backslash
8135 begin{tabular}
8136 \family default
8137  (2.15.4), 
8138 \family typewriter
8139
8140 \backslash
8141 caption
8142 \family default
8143  (2.15.4), 
8144 \family typewriter
8145
8146 \backslash
8147 label
8148 \family default
8149  (2.15.4, amongst other places), 
8150 \family typewriter
8151
8152 \backslash
8153 tablerefs
8154 \family default
8155  (2.15.5), 
8156 \family typewriter
8157
8158 \backslash
8159 tablecomments
8160 \family default
8161  (2.15.5), 
8162 \family typewriter
8163
8164 \backslash
8165 url
8166 \family default
8167  (2.17.4), 
8168 \family typewriter
8169
8170 \backslash
8171 end{document}
8172 \family default
8173  (2.18).
8174 \end_layout
8175
8176 \begin_layout Standard
8177 The following style options also work correctly: 
8178 \family typewriter
8179 longabstract
8180 \family default
8181  (2.4), 
8182 \family typewriter
8183 preprint
8184 \family default
8185  (3.2.1), 
8186 \family typewriter
8187 preprint2
8188 \family default
8189  (3.2.2), 
8190 \family typewriter
8191 eqsecnum
8192 \family default
8193  (3.3), 
8194 \family typewriter
8195 flushrt
8196 \family default
8197  (3.4).
8198  Simply put them in the 
8199 \family sans
8200 Options
8201 \family default
8202  box in 
8203 \family sans
8204 Layout\SpecialChar \menuseparator
8205 Document
8206 \family default
8207 .
8208 \end_layout
8209
8210 \begin_layout Subsubsection
8211 Things that work, but require more comment
8212 \end_layout
8213
8214 \begin_layout Standard
8215 The following items work, but require a little more discussion:
8216 \end_layout
8217
8218 \begin_layout Itemize
8219 These items are reserved for use by the journal editors, but you can put
8220  them into the LaTeX preamble if you feel compelled to do so: 
8221 \family typewriter
8222
8223 \backslash
8224 received
8225 \family default
8226
8227 \family typewriter
8228
8229 \backslash
8230 revised
8231 \family default
8232
8233 \family typewriter
8234
8235 \backslash
8236 accepted
8237 \family default
8238
8239 \family typewriter
8240
8241 \backslash
8242 ccc
8243 \family default
8244
8245 \family typewriter
8246
8247 \backslash
8248 cpright
8249 \family default
8250  (all from 2.1.3)
8251 \end_layout
8252
8253 \begin_layout Itemize
8254 These items may be placed in the LaTeX preamble, and are included as blanks
8255  in the template file: 
8256 \family typewriter
8257
8258 \backslash
8259 slugcomment
8260 \family default
8261  (2.1.4), 
8262 \family typewriter
8263
8264 \backslash
8265 shorttitle
8266 \family default
8267  (2.1.5), 
8268 \family typewriter
8269
8270 \backslash
8271 shortauthors
8272 \family default
8273  (2.1.5)
8274 \end_layout
8275
8276 \begin_layout Itemize
8277
8278 \family typewriter
8279
8280 \backslash
8281 email
8282 \family default
8283  (2.3) – can only be used 
8284 \begin_inset Quotes eld
8285 \end_inset
8286
8287 standalone
8288 \begin_inset Quotes erd
8289 \end_inset
8290
8291 , not in the middle of a paragraph.
8292  Use TeX code if you need to embed it.
8293 \end_layout
8294
8295 \begin_layout Itemize
8296
8297 \family typewriter
8298
8299 \backslash
8300 and
8301 \family default
8302  (2.3) – will have extra {} after it.
8303  This should not cause an error.
8304 \end_layout
8305
8306 \begin_layout Itemize
8307
8308 \family typewriter
8309
8310 \backslash
8311 notetoeditor
8312 \family default
8313  (2.6) – can only be used 
8314 \begin_inset Quotes eld
8315 \end_inset
8316
8317 standalone
8318 \begin_inset Quotes erd
8319 \end_inset
8320
8321 , not in the middle of a paragraph.
8322  Use TeX code if you need to embed it.
8323 \end_layout
8324
8325 \begin_layout Itemize
8326
8327 \family typewriter
8328
8329 \backslash
8330 placetable
8331 \family default
8332  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8333  hand
8334 \end_layout
8335
8336 \begin_layout Itemize
8337
8338 \family typewriter
8339
8340 \backslash
8341 placefigure
8342 \family default
8343  (2.8) – same as for 
8344 \family typewriter
8345
8346 \backslash
8347 placetable
8348 \end_layout
8349
8350 \begin_layout Itemize
8351
8352 \family typewriter
8353
8354 \backslash
8355 acknowledgements
8356 \family default
8357  (2.9) – will have extra {} after it.
8358  This should not cause an error.
8359 \end_layout
8360
8361 \begin_layout Itemize
8362
8363 \family typewriter
8364
8365 \backslash
8366 appendix
8367 \family default
8368  (2.11) – will have extra {} after it.
8369  This should not cause an error.
8370 \end_layout
8371
8372 \begin_layout Itemize
8373
8374 \family typewriter
8375
8376 \backslash
8377 figcaption
8378 \family default
8379  (2.14.2) – you can insert an optional filename argument by placing the cursor
8380  at the beginning of the text and selecting 
8381 \family sans
8382 Insert\SpecialChar \menuseparator
8383 Short Title
8384 \family default
8385 .
8386  
8387 \begin_inset Quotes eld
8388 \end_inset
8389
8390 Short Title
8391 \begin_inset Quotes erd
8392 \end_inset
8393
8394  inserts an optional argument of the type needed by 
8395 \family typewriter
8396
8397 \backslash
8398 figcaption
8399 \family default
8400 .
8401  Hopefully it will be renamed someday.
8402 \end_layout
8403
8404 \begin_layout Itemize
8405
8406 \family typewriter
8407
8408 \backslash
8409 objectname
8410 \family default
8411  (2.17.1) – same as 
8412 \family typewriter
8413
8414 \backslash
8415 figcaption
8416 \family default
8417  for the catalog ID optional parameter
8418 \end_layout
8419
8420 \begin_layout Itemize
8421
8422 \family typewriter
8423
8424 \backslash
8425 dataset
8426 \family default
8427  (2.17.1) – same as 
8428 \family typewriter
8429
8430 \backslash
8431 figcaption
8432 \family default
8433  for the catalog ID optional parameter
8434 \end_layout
8435
8436 \begin_layout Subsubsection
8437 Things not implemented, use TeX code
8438 \end_layout
8439
8440 \begin_layout Standard
8441
8442 \family typewriter
8443
8444 \backslash
8445 altaffilmark
8446 \family default
8447  (2.3), 
8448 \family typewriter
8449
8450 \backslash
8451 altaffiltext
8452 \family default
8453  (2.3), 
8454 \family typewriter
8455
8456 \backslash
8457 eqnum
8458 \family default
8459  (2.12), 
8460 \family typewriter
8461
8462 \backslash
8463 setcounter{equation}
8464 \family default
8465  (2.12), Journal name abbreviations (2.13.4), 
8466 \family typewriter
8467
8468 \backslash
8469 figurenum
8470 \family default
8471  (2.14.1), 
8472 \family typewriter
8473
8474 \backslash
8475 epsscale
8476 \family default
8477  (2.14.1), 
8478 \family typewriter
8479
8480 \backslash
8481 plotone
8482 \family default
8483  (2.14.1), 
8484 \family typewriter
8485
8486 \backslash
8487 plottwo
8488 \family default
8489  (2.14.1), 
8490 \family typewriter
8491
8492 \backslash
8493 tablenum
8494 \family default
8495  (2.15.4), 
8496 \family typewriter
8497
8498 \backslash
8499 tableline
8500 \family default
8501  (2.15.4, insert it as the first element in the lefthand cell after where
8502  you want it.
8503  Don't use any of LyX's rules in the table), 
8504 \family typewriter
8505
8506 \backslash
8507 tablenotemark
8508 \family default
8509  (2.15.5), 
8510 \family typewriter
8511
8512 \backslash
8513 tablenotetext
8514 \family default
8515  (2.15.5), much of Misc (2.17, except 
8516 \family typewriter
8517
8518 \backslash
8519 objectname
8520 \family default
8521
8522 \family typewriter
8523
8524 \backslash
8525 dataset
8526 \family default
8527
8528 \family typewriter
8529
8530 \backslash
8531 url
8532 \family default
8533 , and 
8534 \family typewriter
8535
8536 \backslash
8537 email
8538 \family default
8539 ; see above), 
8540 \family typewriter
8541
8542 \backslash
8543 singlespace
8544 \family default
8545  (3.1), 
8546 \family typewriter
8547
8548 \backslash
8549 doublespace
8550 \family default
8551  (3.1), 
8552 \family typewriter
8553
8554 \backslash
8555 onecolumn
8556 \family default
8557  (3.2), 
8558 \family typewriter
8559
8560 \backslash
8561 twocolumn
8562 \family default
8563  (3.2)
8564 \end_layout
8565
8566 \begin_layout Subsubsection
8567 Things that cannot be implemented
8568 \end_layout
8569
8570 \begin_layout Standard
8571 \SpecialChar \ldots{}
8572  at least in any meaningful sort of way, so I suggest ignoring them.
8573  They are the references environment (2.13.3), and the deluxetable environment
8574  (2.15).
8575  If you really, really need to use deluxetable, I suggest editing it in
8576  a separate file with a text editor, then using 
8577 \family sans
8578 Insert\SpecialChar \menuseparator
8579 Child
8580 \begin_inset space ~
8581 \end_inset
8582
8583 Document
8584 \family default
8585  to include it in your LyX document.
8586  See the 
8587 \family typewriter
8588 aas_sample.lyx
8589 \family default
8590  file to see an example of this.
8591 \end_layout
8592
8593 \begin_layout Subsection
8594 FAQs, Tips, Tricks, and Other Ruminations
8595 \end_layout
8596
8597 \begin_layout Subsubsection
8598 Getting LyX and AASTeX to cooperate
8599 \end_layout
8600
8601 \begin_layout Standard
8602 It can be a bit tricky to get LyX to recognize a new layout and document
8603  class.
8604  When all else fails, do this:
8605 \end_layout
8606
8607 \begin_layout Enumerate
8608 Make certain that LaTeX can find AASTeX.
8609  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8610  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8611 \family typewriter
8612 sample.tex
8613 \family default
8614 .
8615 \end_layout
8616
8617 \begin_layout Enumerate
8618 Make certain that 
8619 \family typewriter
8620 aastex.layout
8621 \family default
8622  appears in LyX's 
8623 \family typewriter
8624 layouts
8625 \family default
8626  folder
8627 \end_layout
8628
8629 \begin_layout Enumerate
8630 Rerun 
8631 \family sans
8632 Tools\SpecialChar \menuseparator
8633 Reconfigure
8634 \family default
8635  in LyX, then restart LyX.
8636 \end_layout
8637
8638 \begin_layout Enumerate
8639 Open a regular new file, not from a template.
8640  Does AASTeX appear in the class list in 
8641 \family sans
8642 Document\SpecialChar \menuseparator
8643 Settings
8644 \family default
8645 ?
8646 \end_layout
8647
8648 \begin_layout Standard
8649 If you get a warning from an existing AASTeX document about not being able
8650  to find the AASTeX layout or a message about 
8651 \begin_inset Quotes eld
8652 \end_inset
8653
8654 You should not mix title layouts with normal ones
8655 \begin_inset Quotes erd
8656 \end_inset
8657
8658 , things haven't been installed correctly.
8659 \end_layout
8660
8661 \begin_layout Subsubsection
8662 LaTeX error processing a table 
8663 \end_layout
8664
8665 \begin_layout Standard
8666 LyX, by default, attempts to center the table caption/title.
8667  This seems to produce a bad interaction in AASTeX so you should click somewhere
8668  in the caption/title, then select 
8669 \family sans
8670 Edit\SpecialChar \menuseparator
8671 Paragraph
8672 \begin_inset space ~
8673 \end_inset
8674
8675 Settings
8676 \family default
8677 , then set the 
8678 \family sans
8679 Alignment
8680 \family default
8681  to 
8682 \family sans
8683 Block
8684 \family default
8685 .
8686  This took care of it for me.
8687 \end_layout
8688
8689 \begin_layout Subsubsection
8690 References
8691 \end_layout
8692
8693 \begin_layout Standard
8694 A couple of things: 1) I have noticed some funny spacing in the reference
8695  entries in the text.
8696  When you enter the bibliography item data, make sure their is 
8697 \emph on
8698 no
8699 \emph default
8700  space between the last author and the parenthesis setting off the year;
8701  
8702 \emph on
8703 e.
8704 \begin_inset space \thinspace{}
8705 \end_inset
8706
8707 g.
8708 \begin_inset space \space{}
8709 \end_inset
8710
8711
8712 \emph default
8713 type 
8714 \family typewriter
8715 Ressler(1992)
8716 \family default
8717 , not 
8718 \family typewriter
8719 Ressler (1992)
8720 \family default
8721 .
8722  2) Entering the references at all is not obvious.
8723  The easiest thing is to start typing your first reference at the end of
8724  the document, then mark it as type 
8725 \family sans
8726 References
8727 \family default
8728 .
8729  That will put a small gray box in front of what you just typed.
8730  Click on the box to fill in the rest of the information.
8731  For new references, go to the end of an existing reference and press return.
8732  That will create a new line with its own box, etc.
8733 \end_layout
8734
8735 \begin_layout Subsubsection
8736 Including EPS files
8737 \end_layout
8738
8739 \begin_layout Standard
8740 Even though AASTeX provides its own figure commands (
8741 \family typewriter
8742
8743 \backslash
8744 plotone
8745 \family default
8746 , for example), I much prefer LaTeX's standard figure commands (with the
8747  default graphicx).
8748  You can insert the 
8749 \family typewriter
8750
8751 \backslash
8752 plotone
8753 \family default
8754 , etc.
8755 \begin_inset space ~
8756 \end_inset
8757
8758 commands as TeX code into a Figure Float box if you desire, but I never
8759  have much luck getting the layout right.
8760  With the standard graphics, LyX will insert a 
8761 \family typewriter
8762
8763 \backslash
8764 usepackage{graphicx}
8765 \family default
8766  command into the LaTeX preamble and handle the figures in the standard
8767  LaTeX2e way, interspersing the figures in the text.
8768  I believe ApJ accepts figures exactly this way now; AJ might still use
8769  the 
8770 \begin_inset Quotes eld
8771 \end_inset
8772
8773 stack everything at the end
8774 \begin_inset Quotes erd
8775 \end_inset
8776
8777  technique.
8778 \end_layout
8779
8780 \begin_layout Subsubsection
8781 Things I could have done, but didn't
8782 \end_layout
8783
8784 \begin_layout Standard
8785 There are a few 
8786 \begin_inset Quotes eld
8787 \end_inset
8788
8789 pretty
8790 \begin_inset Quotes erd
8791 \end_inset
8792
8793  things I could have implemented, but chose not to.
8794  For instance, I saw no point in double-spacing the text in the LyX window,
8795  even though it is double-spaced in the paper manuscript.
8796  Also, I chose not to make separate layouts for the preprint and preprint2
8797  styles.
8798  Since I assume you will spend most of your time in the plain manuscript
8799  mode anyway, I decided not to chew up more disk space with this.
8800  
8801 \end_layout
8802
8803 \begin_layout Subsection
8804 Final Caveat
8805 \end_layout
8806
8807 \begin_layout Standard
8808 Your mileage may vary.
8809  I've now had papers published by both ApJ and AJ that have had 98% of the
8810  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8811  cleanups.
8812  I have had no trouble with the submission process, and I'm sure the journals
8813  were never aware that there might be a difference.
8814  So, go forth and publish!
8815 \end_layout
8816
8817 \begin_layout Section
8818 AMS LaTeX
8819 \end_layout
8820
8821 \begin_layout Standard
8822 by 
8823 \noun on
8824 David Johnson
8825 \noun default
8826 ; updated by 
8827 \noun on
8828 Richard Heck
8829 \end_layout
8830
8831 \begin_layout Standard
8832 \begin_inset VSpace bigskip
8833 \end_inset
8834
8835
8836 \end_layout
8837
8838 \begin_layout Standard
8839 \noindent
8840 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8841  papers to be submitted to American Mathematical Society publications.
8842  The layouts are not tailored to a specific journal, but easily can be.
8843  You should refer to the AMS documentation for specific instructions for
8844  each journal (usually it will entail only changing a single line in the
8845  TeX output).
8846  That documentation is available on the Web at 
8847 \begin_inset Flex URL
8848 status open
8849
8850 \begin_layout Plain Layout
8851
8852 http://www.ams.org
8853 \end_layout
8854
8855 \end_inset
8856
8857  or by ftp at 
8858 \begin_inset Flex URL
8859 status open
8860
8861 \begin_layout Plain Layout
8862
8863 ftp://ftp.ams.org/pub/tex/amslatex/
8864 \end_layout
8865
8866 \end_inset
8867
8868 .
8869  These layouts are appropriate, and useful, for any mathematical writing.
8870  
8871 \end_layout
8872
8873 \begin_layout Standard
8874 There are two basic AMS LaTeX layouts: 
8875 \end_layout
8876
8877 \begin_layout Itemize
8878 amsart: The standard AMS article format.
8879 \end_layout
8880
8881 \begin_layout Itemize
8882 amsbook: the standard AMS book (really, monograph) format.
8883  
8884 \end_layout
8885
8886 \begin_layout Standard
8887 The layouts themselves contain only the minimum necessary to use the AMS
8888  classes.
8889  They do not, in particular, contain any of the `theorem' environments used
8890  for setting theorems, lemmas, and the like.
8891  These are contained, instead, in the 
8892 \begin_inset Flex Code
8893 status collapsed
8894
8895 \begin_layout Plain Layout
8896 Theorems (AMS)
8897 \end_layout
8898
8899 \end_inset
8900
8901  module, which is loaded by default when when you select one of the AMS
8902  classes.
8903  (It can also be used with other classes and can be removed, if you would
8904  rather use something else.) Less commonly used environments are in the 
8905 \begin_inset Flex Code
8906 status collapsed
8907
8908 \begin_layout Plain Layout
8909 Theorems (AMS-Extended)
8910 \end_layout
8911
8912 \end_inset
8913
8914  module, which must be loaded manually.
8915 \end_layout
8916
8917 \begin_layout Standard
8918 By default, theorems and the like are numbered consecutively throughout
8919  the document, but this may be modified by loading the module 
8920 \begin_inset Flex Code
8921 status collapsed
8922
8923 \begin_layout Plain Layout
8924 Theorems (Order by Section)
8925 \end_layout
8926
8927 \end_inset
8928
8929  or, if you are using 
8930 \begin_inset Flex Code
8931 status collapsed
8932
8933 \begin_layout Plain Layout
8934 book (AMS)
8935 \end_layout
8936
8937 \end_inset
8938
8939 , the module 
8940 \begin_inset Flex Code
8941 status collapsed
8942
8943 \begin_layout Plain Layout
8944 Theorems (Order by Chapter)
8945 \end_layout
8946
8947 \end_inset
8948
8949 .
8950  These will number the results as 
8951 \begin_inset Formula $n.m$
8952 \end_inset
8953
8954 , where the first number refers to the section (or chapter) and the second
8955  refers to the total number of results so far in that section (or chapter).
8956  Many environments are also available unnumbered.
8957  These are indicated by an asterisk at the end.
8958  If you happen to want 
8959 \emph on
8960 only
8961 \emph default
8962  unnumbered results, the module 
8963 \begin_inset Flex Code
8964 status collapsed
8965
8966 \begin_layout Plain Layout
8967 Theorems (Starred)
8968 \end_layout
8969
8970 \end_inset
8971
8972  provides that option.
8973 \end_layout
8974
8975 \begin_layout Standard
8976 Note that these modules do not 
8977 \emph on
8978 have
8979 \emph default
8980  to be used with the AMS classes.
8981  It is perfectly possible to use the 
8982 \begin_inset Flex Code
8983 status collapsed
8984
8985 \begin_layout Plain Layout
8986 Theorems (AMS)
8987 \end_layout
8988
8989 \end_inset
8990
8991  module, and the others mentioned, with other classes, such as 
8992 \begin_inset Flex Code
8993 status collapsed
8994
8995 \begin_layout Plain Layout
8996 article
8997 \end_layout
8998
8999 \end_inset
9000
9001
9002 \begin_inset Flex Code
9003 status collapsed
9004
9005 \begin_layout Plain Layout
9006 report
9007 \end_layout
9008
9009 \end_inset
9010
9011
9012 \begin_inset Flex Code
9013 status collapsed
9014
9015 \begin_layout Plain Layout
9016 book (KOMA-script)
9017 \end_layout
9018
9019 \end_inset
9020
9021 , and so forth.
9022 \end_layout
9023
9024 \begin_layout Subsection
9025 What these layouts provide
9026 \end_layout
9027
9028 \begin_layout Standard
9029 There is a long list of included environments provided by these layouts.
9030  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9031  variety of `theorem' environments.
9032  However, the AMS recommends the environments that are available in LyX.
9033  
9034 \end_layout
9035
9036 \begin_layout Standard
9037 The following environments—as well as the standard environments, such as
9038  
9039 \begin_inset Flex Noun
9040 status collapsed
9041
9042 \begin_layout Plain Layout
9043 section
9044 \end_layout
9045
9046 \end_inset
9047
9048
9049 \begin_inset Flex Noun
9050 status collapsed
9051
9052 \begin_layout Plain Layout
9053 bibliography
9054 \end_layout
9055
9056 \end_inset
9057
9058
9059 \begin_inset Flex Noun
9060 status collapsed
9061
9062 \begin_layout Plain Layout
9063 title
9064 \end_layout
9065
9066 \end_inset
9067
9068
9069 \begin_inset Flex Noun
9070 status collapsed
9071
9072 \begin_layout Plain Layout
9073 author
9074 \end_layout
9075
9076 \end_inset
9077
9078 , and 
9079 \begin_inset Flex Noun
9080 status collapsed
9081
9082 \begin_layout Plain Layout
9083 date
9084 \end_layout
9085
9086 \end_inset
9087
9088 —are provided by 
9089 \begin_inset Flex Code
9090 status collapsed
9091
9092 \begin_layout Plain Layout
9093 article (AMS)
9094 \end_layout
9095
9096 \end_inset
9097
9098  and 
9099 \begin_inset Flex Code
9100 status collapsed
9101
9102 \begin_layout Plain Layout
9103 book (AMS)
9104 \end_layout
9105
9106 \end_inset
9107
9108 :
9109 \end_layout
9110
9111 \begin_layout Description
9112 Address This should be the author's permanent address.
9113 \end_layout
9114
9115 \begin_layout Description
9116 Current
9117 \begin_inset space ~
9118 \end_inset
9119
9120 Address This should be the author's temporary address at the time of submission,
9121  if different from the Address.
9122 \end_layout
9123
9124 \begin_layout Description
9125 Email Author's e-mail address
9126 \end_layout
9127
9128 \begin_layout Description
9129 URL Author's Web address, if desired.
9130 \end_layout
9131
9132 \begin_layout Description
9133 Keywords Key words or phrases used to identify specific topics discussed
9134  in the paper.
9135 \end_layout
9136
9137 \begin_layout Description
9138 Subjectclass These refer to the AMS Subject Classifications, published and
9139  described in 
9140 \emph on
9141 Mathematical Reviews
9142 \emph default
9143 .
9144  These are also available online at the AMS cites listed above.
9145 \end_layout
9146
9147 \begin_layout Description
9148 Thanks
9149 \end_layout
9150
9151 \begin_layout Description
9152 Dedicatory
9153 \end_layout
9154
9155 \begin_layout Description
9156 Translator
9157 \end_layout
9158
9159 \begin_layout Standard
9160 The following environments are provided by both the 
9161 \begin_inset Flex Code
9162 status collapsed
9163
9164 \begin_layout Plain Layout
9165 Theorems
9166 \end_layout
9167
9168 \end_inset
9169
9170  and 
9171 \begin_inset Flex Code
9172 status collapsed
9173
9174 \begin_layout Plain Layout
9175 Theorems (AMS)
9176 \end_layout
9177
9178 \end_inset
9179
9180  modules, in the latter case in both starred (unnumbered) and unstarred
9181  (numbered) versions.
9182  These same environments are provided only in the starred versions by the
9183  
9184 \begin_inset Flex Code
9185 status collapsed
9186
9187 \begin_layout Plain Layout
9188 Theorems (Starred)
9189 \end_layout
9190
9191 \end_inset
9192
9193  module:
9194 \end_layout
9195
9196 \begin_layout Theorem
9197 This is typically used for the statements of major results.
9198  
9199 \end_layout
9200
9201 \begin_layout Corollary*
9202 This is used for statements which follow fairly directly from previous statement
9203 s.
9204  Again, these can be major results.
9205  
9206 \end_layout
9207
9208 \begin_layout Lemma
9209 These are smaller results needed to prove other statements.
9210 \end_layout
9211
9212 \begin_layout Proposition
9213 These are less major results which (hopefully) add to the general theory
9214  being discussed.
9215 \end_layout
9216
9217 \begin_layout Conjecture
9218 These are statements provided without justification, which the author does
9219  not know how to prove, but which seem to be true (to the author, at least).
9220 \end_layout
9221
9222 \begin_layout Definition*
9223 Guess what this is for.
9224  The font is different for this environment than for the previous ones.
9225  
9226 \end_layout
9227
9228 \begin_layout Example*
9229 Used for examples illustrating proven results.
9230 \end_layout
9231
9232 \begin_layout Problem
9233 It's not really known what this is for.
9234  You should figure it out.
9235 \end_layout
9236
9237 \begin_layout Exercise*
9238 Write a description for this one.
9239 \end_layout
9240
9241 \begin_layout Remark
9242 This environment is also a type of theorem, usually a lesser sort of observation.
9243 \end_layout
9244
9245 \begin_layout Claim*
9246 Often used in the course of giving a proof of a larger result.
9247 \end_layout
9248
9249 \begin_layout Case
9250 Generally, these are used to break up long arguments, using specific instances
9251  of some condition.
9252  
9253 \end_layout
9254
9255 \begin_layout Case
9256 The numbering scheme for cases is on its own, not together with other numbered
9257  statements.
9258  
9259 \end_layout
9260
9261 \begin_layout Proof
9262 At the end of this environment, a QED symbol (usually a square, but it can
9263  vary with different styles) is placed.
9264  If you want to have other environments within this one—for example, Case
9265  environments—and have the QED symbol appear only after them, then the other
9266  environments need to be nested within the proof environment.
9267  See the section 
9268 \emph on
9269 Nesting Environments
9270 \emph default
9271  of the 
9272 \emph on
9273 User's Guide
9274 \emph default
9275  for information on nesting.
9276 \end_layout
9277
9278 \begin_layout Standard
9279 And these environments are provided by 
9280 \begin_inset Flex Code
9281 status collapsed
9282
9283 \begin_layout Plain Layout
9284 Theorems (AMS-Extended)
9285 \end_layout
9286
9287 \end_inset
9288
9289 :
9290 \end_layout
9291
9292 \begin_layout Criterion*
9293 A required condition.
9294 \end_layout
9295
9296 \begin_layout Algorithm*
9297 A general procedure to be used.
9298 \end_layout
9299
9300 \begin_layout Axiom*
9301 This is a property or statement taken as true within the system being discussed.
9302 \end_layout
9303
9304 \begin_layout Condition*
9305 Sometimes used to state a condition assumed within the present context of
9306  discussion.
9307 \end_layout
9308
9309 \begin_layout Note*
9310 Similar to a Remark.
9311 \end_layout
9312
9313 \begin_layout Notation*
9314 Used for the explanation of, yes, notation.
9315 \end_layout
9316
9317 \begin_layout Summary
9318 Do we really need to tell you? 
9319 \end_layout
9320
9321 \begin_layout Acknowledgement*
9322 Acknowledgement.
9323 \end_layout
9324
9325 \begin_layout Conclusion*
9326 Sometimes used at the end of a long train of argument.
9327 \end_layout
9328
9329 \begin_layout Fact
9330 Used in a way similar to Proposition, though perhaps lower on the scale.
9331 \end_layout
9332
9333 \begin_layout Standard
9334 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9335  fonts packages.
9336  They need to be available on your system in order to use these environments.
9337 \end_layout
9338
9339 \begin_layout Section
9340 AGU journals (
9341 \family sans
9342 aguplus
9343 \family default
9344 )
9345 \end_layout
9346
9347 \begin_layout Standard
9348 by 
9349 \shape smallcaps
9350 Martin Vermeer
9351 \end_layout
9352
9353 \begin_layout Subsection
9354 Description
9355 \end_layout
9356
9357 \begin_layout Standard
9358 These are the layout files for some of the journals of the American Geophysical
9359  Society.
9360  It is assumed that you have both the AGU's own class files and AGUplus
9361  installed (everything to be found at
9362 \begin_inset Flex URL
9363 status collapsed
9364
9365 \begin_layout Plain Layout
9366
9367 ftp://ftp.agu.org/journals/latex/journals
9368 \end_layout
9369
9370 \end_inset
9371
9372 ).
9373 \end_layout
9374
9375 \begin_layout Subsection
9376 New styles
9377 \end_layout
9378
9379 \begin_layout Standard
9380 Redefined are 
9381 \family sans
9382 Paragraph
9383 \family default
9384
9385 \family sans
9386 Paragraph*
9387 \family default
9388 .
9389  They are still called this in the LyX GUI, though their LaTeX equivalents
9390  in the AGU classes are 
9391 \family sans
9392 Subsubsubsection
9393 \family default
9394  and 
9395 \family sans
9396 Subsubsubsection*
9397 \family default
9398 .
9399 \end_layout
9400
9401 \begin_layout Standard
9402 Newly defined styles are 
9403 \family sans
9404 Left_Header
9405 \family default
9406
9407 \family sans
9408 Right_Header
9409 \family default
9410
9411 \family sans
9412 Received
9413 \family default
9414
9415 \family sans
9416 Revised
9417 \family default
9418
9419 \family sans
9420 Accepted
9421 \family default
9422
9423 \family sans
9424 CCC
9425 \family default
9426
9427 \family sans
9428 PaperId
9429 \family default
9430
9431 \family sans
9432 AuthorAddr
9433 \family default
9434
9435 \family sans
9436 SlugComment
9437 \family default
9438 .
9439  These are mostly manuscript attributes and defined in the AGU class documentati
9440 on.
9441 \end_layout
9442
9443 \begin_layout Standard
9444 I suspect this is still badly incomplete.
9445 \end_layout
9446
9447 \begin_layout Subsection
9448 New floats
9449 \end_layout
9450
9451 \begin_layout Standard
9452
9453 \family sans
9454 Planotable
9455 \family default
9456  and 
9457 \family sans
9458 Plate
9459 \family default
9460 .
9461  We also have a new 
9462 \family sans
9463 Table_Caption
9464 \family default
9465 .
9466 \end_layout
9467
9468 \begin_layout Subsection
9469 Supported journals
9470 \end_layout
9471
9472 \begin_layout Itemize
9473
9474 \emph on
9475 Journal of Geophysical Research
9476 \emph default
9477
9478 \family typewriter
9479 jgrga.layout
9480 \family default
9481  — Martin Vermeer
9482 \end_layout
9483
9484 \begin_layout Standard
9485 Add your own, it isn't so hard! Look at the 
9486 \family typewriter
9487 jgrga.layout
9488 \family default
9489  example and 
9490 \family typewriter
9491 aguplus.inc
9492 \family default
9493 .
9494 \end_layout
9495
9496 \begin_layout Subsection
9497 Bugs and things to remember
9498 \end_layout
9499
9500 \begin_layout Standard
9501 In order to use the new layouts, you must remember to do the following for
9502  a new document:
9503 \end_layout
9504
9505 \begin_layout Enumerate
9506
9507 \emph on
9508 Turn off babel
9509 \emph default
9510 .
9511  This can be done in the 
9512 \family sans
9513 Layout\SpecialChar \menuseparator
9514 Document
9515 \family default
9516  or 
9517 \family sans
9518 Document\SpecialChar \menuseparator
9519 Settings
9520 \family default
9521  menu item.
9522  (AGU articles are always in English, right? So 
9523 \emph on
9524 don't
9525 \emph default
9526  choose a language.)
9527 \end_layout
9528
9529 \begin_layout Enumerate
9530 Enter 
9531 \family typewriter
9532 jgrga
9533 \family default
9534  into the document's 
9535 \family sans
9536 Extra Options
9537 \family default
9538  field.
9539  (Yes, this is a bug.)
9540 \end_layout
9541
9542 \begin_layout Enumerate
9543 Make sure you use the 
9544 \family typewriter
9545 agu.bst
9546 \family default
9547  bibliography style, by entering 
9548 \family sans
9549 agu
9550 \family default
9551  into the second field of the BibTeX inset.
9552  None of the standard styles will do.
9553 \end_layout
9554
9555 \begin_layout Section
9556 Broadway
9557 \end_layout
9558
9559 \begin_layout Standard
9560 by 
9561 \shape smallcaps
9562 Garst Reese
9563 \end_layout
9564
9565 \begin_layout Subsection
9566 Introduction
9567 \end_layout
9568
9569 \begin_layout Standard
9570 Broadway is for writing plays.
9571  The format is more decorative than Hollywood, and much less standardized.
9572  This format should be suitable for workshops.
9573 \end_layout
9574
9575 \begin_layout Subsection
9576 Special problems
9577 \end_layout
9578
9579 \begin_layout Standard
9580 The same as in Hollywood.
9581 \end_layout
9582
9583 \begin_layout Subsection
9584 Special features
9585 \end_layout
9586
9587 \begin_layout Standard
9588 Insert the 
9589 \family sans
9590 Speaker
9591 \family default
9592  names as labels then cross-reference the label to insert the name.
9593  The cross-reference dialog will show the current cast of characters.
9594 \end_layout
9595
9596 \begin_layout Subsection
9597 Paper size and Margins
9598 \end_layout
9599
9600 \begin_layout Standard
9601 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9602 \end_layout
9603
9604 \begin_layout Subsection
9605 Environments
9606 \end_layout
9607
9608 \begin_layout Standard
9609 The following environments are available.
9610  You can use broadway.bind to get the bind keys shown at the right.
9611 \end_layout
9612
9613 \begin_layout Itemize
9614
9615 \family sans
9616 Standard
9617 \begin_inset Newline newline
9618 \end_inset
9619
9620
9621 \family default
9622 You should not have to use this, but it is here for anything that does not
9623  fit otherwise.
9624 \end_layout
9625
9626 \begin_layout Itemize
9627
9628 \family sans
9629 Narrative
9630 \begin_inset space \hfill{}
9631 \end_inset
9632
9633 M-z n
9634 \begin_inset Newline newline
9635 \end_inset
9636
9637
9638 \family default
9639 Used to describe stage setting and the action.
9640  First use of speaker names in all CAPs.
9641 \end_layout
9642
9643 \begin_layout Itemize
9644
9645 \family sans
9646 ACT
9647 \begin_inset space \hfill{}
9648 \end_inset
9649
9650 M-z a
9651 \begin_inset Newline newline
9652 \end_inset
9653
9654
9655 \family default
9656 Automatically numbered.
9657  On screen it will be arabic, but will print as Roman.
9658 \end_layout
9659
9660 \begin_layout Itemize
9661
9662 \family sans
9663 ACT*
9664 \begin_inset space \hfill{}
9665 \end_inset
9666
9667 M-z S at
9668 \begin_inset Newline newline
9669 \end_inset
9670
9671
9672 \family default
9673 Subtitle for 
9674 \family sans
9675 ACT.
9676
9677 \family default
9678  It is just centered text.
9679 \end_layout
9680
9681 \begin_layout Itemize
9682
9683 \family sans
9684 SCENE
9685 \begin_inset space \hfill{}
9686 \end_inset
9687
9688 M-z S-S
9689 \begin_inset Newline newline
9690 \end_inset
9691
9692
9693 \family default
9694 Not automatically numbered.
9695  You supply the number.
9696  This is because I couldn't figure out how.
9697 \end_layout
9698
9699 \begin_layout Itemize
9700
9701 \family sans
9702 AT_RISE:
9703 \begin_inset space \hfill{}
9704 \end_inset
9705
9706 M-z S-R
9707 \begin_inset Newline newline
9708 \end_inset
9709
9710
9711 \family default
9712 A special case of Narrative to describe the setting and action as the curtain
9713  rises.
9714 \end_layout
9715
9716 \begin_layout Itemize
9717
9718 \family sans
9719 Speaker
9720 \begin_inset space \hfill{}
9721 \end_inset
9722
9723 M-z s
9724 \begin_inset Newline newline
9725 \end_inset
9726
9727
9728 \family default
9729 The speaker's (actor's) title, centered in all CAPS.
9730 \end_layout
9731
9732 \begin_layout Itemize
9733
9734 \family sans
9735 Parenthetical
9736 \begin_inset space \hfill{}
9737 \end_inset
9738
9739 M-z p
9740 \begin_inset Newline newline
9741 \end_inset
9742
9743
9744 \family default
9745 Instructions to the speaker.
9746  The parentheses are automatically inserted.
9747  The ( will appear on screen, but both will be in the printed play.
9748  This environment is only used within 
9749 \family sans
9750 Dialogue
9751 \family default
9752 .
9753 \end_layout
9754
9755 \begin_layout Itemize
9756
9757 \family sans
9758 Dialogue
9759 \begin_inset space \hfill{}
9760 \end_inset
9761
9762 M-z d
9763 \begin_inset Newline newline
9764 \end_inset
9765
9766
9767 \family default
9768 What the Speaker says.
9769 \end_layout
9770
9771 \begin_layout Itemize
9772
9773 \family sans
9774 CURTAIN
9775 \begin_inset space \hfill{}
9776 \end_inset
9777
9778 M-z S-C
9779 \begin_inset Newline newline
9780 \end_inset
9781
9782
9783 \family default
9784 The curtain comes down.
9785 \end_layout
9786
9787 \begin_layout Itemize
9788
9789 \family sans
9790 Title
9791 \begin_inset space \hfill{}
9792 \end_inset
9793
9794 M-z S-T
9795 \end_layout
9796
9797 \begin_layout Itemize
9798
9799 \family sans
9800 Author
9801 \begin_inset space \hfill{}
9802 \end_inset
9803
9804 M-z S-A
9805 \end_layout
9806
9807 \begin_layout Itemize
9808
9809 \family sans
9810 Right_Address
9811 \begin_inset space \hfill{}
9812 \end_inset
9813
9814 M-z r
9815 \end_layout
9816
9817 \begin_layout Standard
9818 Hello there.
9819 \end_layout
9820
9821 \begin_layout Section
9822 Dinbrief
9823 \end_layout
9824
9825 \begin_layout Standard
9826 The document class 
9827 \family sans
9828 dinbrief
9829 \family default
9830  can be used to type letters according to German conventions.
9831  A template file is included in 
9832 \family typewriter
9833 .../lyx/share/templates
9834 \family default
9835  for you to use as a starting point.
9836 \end_layout
9837
9838 \begin_layout Section
9839 EGS journals (
9840 \family sans
9841 egs
9842 \family default
9843 )
9844 \end_layout
9845
9846 \begin_layout Standard
9847 by 
9848 \shape smallcaps
9849 Martin Vermeer
9850 \end_layout
9851
9852 \begin_layout Subsection
9853 Description
9854 \end_layout
9855
9856 \begin_layout Standard
9857 This is the layout file for the European Geophysical Society journals.
9858  The needed 
9859 \family typewriter
9860 egs.cls
9861 \family default
9862  can be downloaded from the web site of the EGS under 
9863 \begin_inset Flex URL
9864 status collapsed
9865
9866 \begin_layout Plain Layout
9867
9868 www.copernicus.org
9869 \end_layout
9870
9871 \end_inset
9872
9873 .
9874 \end_layout
9875
9876 \begin_layout Subsection
9877 New styles
9878 \end_layout
9879
9880 \begin_layout Standard
9881
9882 \family sans
9883 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9884  Accepted
9885 \family default
9886
9887 \family sans
9888 Offsets
9889 \family default
9890 .
9891  The current layout file is unfortunately very unmodular and would benefit
9892  from using the various 
9893 \family typewriter
9894 std*.inc
9895 \family default
9896  file inclusions.
9897 \end_layout
9898
9899 \begin_layout Section
9900 Elsevier Journals
9901 \end_layout
9902
9903 \begin_layout Standard
9904 See the LyX template file 
9905 \family typewriter
9906 elsarticle.lyx
9907 \family default
9908 .
9909  It contains all infos you need.
9910 \end_layout
9911
9912 \begin_layout Section
9913 Foils [aka 
9914 \family sans
9915 FoilTeX
9916 \family default
9917 ]
9918 \begin_inset CommandInset label
9919 LatexCommand label
9920 name "sec:foiltex"
9921
9922 \end_inset
9923
9924
9925 \end_layout
9926
9927 \begin_layout Standard
9928 by 
9929 \noun on
9930 Allan Rae
9931 \end_layout
9932
9933 \begin_layout Subsection
9934 Introduction
9935 \end_layout
9936
9937 \begin_layout Standard
9938 This section describes how to use LyX to make slides for overhead projectors.
9939  There are two document classes that can do this: the default slides class
9940  and the 
9941 \family sans
9942 FoilTeX
9943 \family default
9944  slides class.
9945  This section documents the latter.
9946 \end_layout
9947
9948 \begin_layout Standard
9949 I'm going to say this again, nice and clear, so that there's no misunderstanding
9950 :
9951 \end_layout
9952
9953 \begin_layout Standard
9954 \begin_inset VSpace bigskip
9955 \end_inset
9956
9957
9958 \end_layout
9959
9960 \begin_layout Standard
9961 \align center
9962
9963 \size large
9964 This section documents the class 
9965 \begin_inset Quotes eld
9966 \end_inset
9967
9968
9969 \family sans
9970 slides (FoilTeX)
9971 \family default
9972
9973 \begin_inset Quotes erd
9974 \end_inset
9975
9976  
9977 \emph on
9978 only.
9979 \end_layout
9980
9981 \begin_layout Standard
9982 \begin_inset VSpace bigskip
9983 \end_inset
9984
9985
9986 \end_layout
9987
9988 \begin_layout Standard
9989 If you're looking for the documentation for 
9990 \begin_inset Quotes eld
9991 \end_inset
9992
9993
9994 \family sans
9995 slides (default)
9996 \family default
9997
9998 \begin_inset Quotes erd
9999 \end_inset
10000
10001 , check out section
10002 \begin_inset space ~
10003 \end_inset
10004
10005
10006 \begin_inset CommandInset ref
10007 LatexCommand ref
10008 reference "sec:slitex"
10009
10010 \end_inset
10011
10012 .
10013  If your machine doesn't have the 
10014 \family sans
10015 foils
10016 \family default
10017  class [
10018 \begin_inset Quotes eld
10019 \end_inset
10020
10021
10022 \family sans
10023 slides (FoilTeX)
10024 \family default
10025
10026 \begin_inset Quotes erd
10027 \end_inset
10028
10029 ] installed, you'll probably have to use the default 
10030 \family sans
10031 slides
10032 \family default
10033  class, which isn't quite as good as 
10034 \family sans
10035 foils.
10036 \end_layout
10037
10038 \begin_layout Standard
10039 The 
10040 \family sans
10041 foils
10042 \family default
10043  class is designed for use with version 2.1 of the 
10044 \family sans
10045 foils.cls
10046 \family default
10047  LaTeX class file which is now an integral part of LaTeX2e.
10048 \end_layout
10049
10050 \begin_layout Subsection
10051 Getting Started
10052 \end_layout
10053
10054 \begin_layout Standard
10055 Obviously, to use this document class, you need to select 
10056 \begin_inset Quotes eld
10057 \end_inset
10058
10059
10060 \family sans
10061 slides (FoilTeX)
10062 \family default
10063
10064 \begin_inset Quotes erd
10065 \end_inset
10066
10067  from the 
10068 \family sans
10069 Class
10070 \family default
10071  entry in the 
10072 \family sans
10073 Document
10074 \begin_inset space ~
10075 \end_inset
10076
10077 Layout
10078 \family default
10079  dialog.
10080  There are some settings in the 
10081 \family sans
10082 Document
10083 \begin_inset space ~
10084 \end_inset
10085
10086 Layout
10087 \family default
10088  dialog that you should know about that are specific to this class:
10089 \end_layout
10090
10091 \begin_layout Itemize
10092 Don't change the options 
10093 \family sans
10094 Sides
10095 \family default
10096  and 
10097 \family sans
10098 Columns
10099 \family default
10100  on the 
10101 \family sans
10102 Document
10103 \begin_inset space ~
10104 \end_inset
10105
10106 Layout
10107 \family default
10108  dialog.
10109  They're ignored by the 
10110 \family sans
10111 foils
10112 \family default
10113  class.
10114 \end_layout
10115
10116 \begin_layout Itemize
10117 The default font size is 20
10118 \begin_inset space \thinspace{}
10119 \end_inset
10120
10121 pt with the other options being 17
10122 \begin_inset space \thinspace{}
10123 \end_inset
10124
10125 pt, 25
10126 \begin_inset space \thinspace{}
10127 \end_inset
10128
10129 pt and 30
10130 \begin_inset space \thinspace{}
10131 \end_inset
10132
10133 pt.
10134 \end_layout
10135
10136 \begin_layout Itemize
10137 The default font is 
10138 \family sans
10139 sans
10140 \family default
10141  
10142 \family sans
10143 serif
10144 \family default
10145  but all math equations are still typeset in the usual roman font.
10146 \end_layout
10147
10148 \begin_layout Itemize
10149
10150 \family sans
10151 FoilTeX
10152 \family default
10153  supports A4 and Letter paper sizes as well as a special size for working
10154  with 35
10155 \begin_inset space \thinspace{}
10156 \end_inset
10157
10158 mm slides.
10159  It doesn't support A5, B5, legal or executive paper sizes.
10160 \end_layout
10161
10162 \begin_layout Itemize
10163 Don't bother changing the 
10164 \family sans
10165 Float Placement
10166 \family default
10167  settings because they are ignored anyway.
10168  All floats appear where they are defined in the text.
10169 \end_layout
10170
10171 \begin_layout Itemize
10172 The 
10173 \family sans
10174 Pagestyle
10175 \family default
10176  setting behaves a bit differently for this class.
10177  
10178 \family sans
10179 FoilTeX
10180 \family default
10181  provides extensive footer and header capabilities including a user-defined
10182  logo.
10183  See section
10184 \begin_inset space ~
10185 \end_inset
10186
10187
10188 \begin_inset CommandInset ref
10189 LatexCommand ref
10190 reference "sec:foilfoot"
10191
10192 \end_inset
10193
10194  for more details.
10195  The title page is treated differently to all other pages in the document
10196  and is 
10197 \emph on
10198 always
10199 \emph default
10200  unnumbered and 
10201 \emph on
10202 always
10203 \emph default
10204  has the logo centered at the bottom of the page (if one is defined).
10205  The possible page style choices and what they do are as follows:
10206 \end_layout
10207
10208 \begin_deeper
10209 \begin_layout Labeling
10210 \labelwidthstring MMMMMMM
10211
10212 \family sans
10213 \series bold
10214 empty
10215 \family default
10216 \series default
10217  The final output contains no page numbers, or other headers or footers
10218  (except footnotes of course).
10219  
10220 \end_layout
10221
10222 \begin_layout Labeling
10223 \labelwidthstring MMMMMMM
10224
10225 \family sans
10226 \series bold
10227 plain
10228 \family default
10229 \series default
10230  The final output contains page numbers centered at the bottom of the page.
10231  No other headings or footers (other than footnotes).
10232 \end_layout
10233
10234 \begin_layout Labeling
10235 \labelwidthstring MMMMMMM
10236
10237 \series bold
10238 foilheadings
10239 \series default
10240  Page numbers in lower right corner.
10241  Additional headers and footers are also shown.
10242  This is also the default.
10243 \end_layout
10244
10245 \begin_layout Labeling
10246 \labelwidthstring MMMMMMM
10247
10248 \series bold
10249 fancy
10250 \series default
10251  Gives you access to the 
10252 \family sans
10253 fancyheadings
10254 \family default
10255  package although its use with 
10256 \family sans
10257 FoilTeX
10258 \family default
10259  is discouraged by the writer of the 
10260 \family sans
10261 FoilTeX
10262 \family default
10263  package because of some potential page layout clashes.
10264 \end_layout
10265
10266 \end_deeper
10267 \begin_layout Subsubsection
10268 Extra Options
10269 \end_layout
10270
10271 \begin_layout Standard
10272 The following options may be used in the extra class options in the 
10273 \family sans
10274 Document\SpecialChar \menuseparator
10275 Settings
10276 \family default
10277  dialog.
10278 \end_layout
10279
10280 \begin_layout Labeling
10281 \labelwidthstring MMMMMMx
10282
10283 \series bold
10284 35mmSlide
10285 \series default
10286  This sets up the page layout for 7.33
10287 \begin_inset space \thinspace{}
10288 \end_inset
10289
10290 in by 11
10291 \begin_inset space \thinspace{}
10292 \end_inset
10293
10294 in paper, which is about the same aspect ratio as a 35
10295 \begin_inset space \thinspace{}
10296 \end_inset
10297
10298 mm slide, making it a bit easier to work with this medium.
10299 \end_layout
10300
10301 \begin_layout Labeling
10302 \labelwidthstring MMMMMMx
10303
10304 \series bold
10305 headrule
10306 \series default
10307  Places a rule across the page below the header on every page except the
10308  title page.
10309 \end_layout
10310
10311 \begin_layout Labeling
10312 \labelwidthstring MMMMMMx
10313
10314 \series bold
10315 footrule
10316 \series default
10317  Places a rule across the page above the footer on every page except the
10318  title page.
10319 \end_layout
10320
10321 \begin_layout Labeling
10322 \labelwidthstring MMMMMMx
10323
10324 \series bold
10325 dvips
10326 \series default
10327  This is automatically set each time you create a new 
10328 \family sans
10329 foils
10330 \family default
10331  document.
10332  This option tells 
10333 \family sans
10334 FoilTeX
10335 \family default
10336  to use the dvips driver to rotate those pages that are set as landscape
10337  foils.
10338 \end_layout
10339
10340 \begin_layout Labeling
10341 \labelwidthstring MMMMMMx
10342
10343 \series bold
10344 landscape
10345 \series default
10346  Simply changes the page dimensions to those of a landscape page but doesn't
10347  do any rotation.
10348  Thus if you use this option you need to use an external program to rotate
10349  each page or feed your paper through your printer as landscape.
10350  Note that this option effectively reverses the roles of the 
10351 \family sans
10352 Foilhead
10353 \family default
10354  and 
10355 \family sans
10356 Rotatefoilhead
10357 \family default
10358  environments (don't worry these are described in the next section).
10359 \end_layout
10360
10361 \begin_layout Labeling
10362 \labelwidthstring MMMMMMx
10363
10364 \series bold
10365 leqno
10366 \series default
10367  Equation numbers on the left.
10368 \end_layout
10369
10370 \begin_layout Labeling
10371 \labelwidthstring MMMMMMx
10372
10373 \series bold
10374 fleqn
10375 \series default
10376  Flush-left equations.
10377 \end_layout
10378
10379 \begin_layout Subsection
10380 Supported Environments
10381 \end_layout
10382
10383 \begin_layout Standard
10384 Most of the environments commonly supported in other classes are also supported
10385  by the 
10386 \family sans
10387 foils
10388 \family default
10389  class.
10390  There are several additional environments provided by 
10391 \family sans
10392 FoilTeX
10393 \family default
10394  as well as a couple added by LyX.
10395  The following environments are shared with other classes:
10396 \end_layout
10397
10398 \begin_layout Standard
10399 \begin_inset ERT
10400 status open
10401
10402 \begin_layout Plain Layout
10403
10404
10405 \backslash
10406 begin{multicols}{2}
10407 \end_layout
10408
10409 \end_inset
10410
10411
10412 \end_layout
10413
10414 \begin_layout Itemize
10415
10416 \family sans
10417 Standard
10418 \end_layout
10419
10420 \begin_layout Itemize
10421
10422 \family sans
10423 Itemize
10424 \end_layout
10425
10426 \begin_layout Itemize
10427
10428 \family sans
10429 Enumerate
10430 \end_layout
10431
10432 \begin_layout Itemize
10433
10434 \family sans
10435 Description
10436 \end_layout
10437
10438 \begin_layout Itemize
10439
10440 \family sans
10441 List
10442 \end_layout
10443
10444 \begin_layout Itemize
10445
10446 \family sans
10447 LyX-Code
10448 \end_layout
10449
10450 \begin_layout Itemize
10451
10452 \family sans
10453 Verse
10454 \end_layout
10455
10456 \begin_layout Itemize
10457
10458 \family sans
10459 Quote
10460 \end_layout
10461
10462 \begin_layout Itemize
10463
10464 \family sans
10465 Quotation
10466 \end_layout
10467
10468 \begin_layout Itemize
10469
10470 \family sans
10471 Title
10472 \end_layout
10473
10474 \begin_layout Itemize
10475
10476 \family sans
10477 Author
10478 \end_layout
10479
10480 \begin_layout Itemize
10481
10482 \family sans
10483 Date
10484 \end_layout
10485
10486 \begin_layout Itemize
10487
10488 \family sans
10489 Abstract
10490 \end_layout
10491
10492 \begin_layout Itemize
10493
10494 \family sans
10495 Bibliography
10496 \end_layout
10497
10498 \begin_layout Itemize
10499
10500 \family sans
10501 Address
10502 \end_layout
10503
10504 \begin_layout Itemize
10505
10506 \family sans
10507 RightAddress
10508 \end_layout
10509
10510 \begin_layout Itemize
10511
10512 \family sans
10513 Caption
10514 \end_layout
10515
10516 \begin_layout Itemize
10517
10518 \family sans
10519 Comment
10520 \end_layout
10521
10522 \begin_layout Standard
10523 \begin_inset ERT
10524 status open
10525
10526 \begin_layout Plain Layout
10527
10528
10529 \backslash
10530 end{multicols}
10531 \end_layout
10532
10533 \end_inset
10534
10535
10536 \end_layout
10537
10538 \begin_layout Standard
10539 That is, all the major environments apart from the sectioning environments.
10540  Since foils are essentially self-contained sections, with a title and body,
10541  
10542 \family sans
10543 FoilTeX
10544 \family default
10545  provides specific commands for starting new foils and these are:
10546 \end_layout
10547
10548 \begin_layout Itemize
10549
10550 \family sans
10551 Foilhead
10552 \end_layout
10553
10554 \begin_layout Itemize
10555
10556 \family sans
10557 Rotatefoilhead
10558 \end_layout
10559
10560 \begin_layout Standard
10561 LyX also provides slightly modified versions of these two environments called:
10562 \end_layout
10563
10564 \begin_layout Itemize
10565
10566 \family sans
10567 ShortFoilhead
10568 \end_layout
10569
10570 \begin_layout Itemize
10571
10572 \family sans
10573 ShortRotatefoilhead
10574 \end_layout
10575
10576 \begin_layout Standard
10577 and the differences will be explained in the next section.
10578 \end_layout
10579
10580 \begin_layout Standard
10581 Since foils are often used in presenting ideas or new theorems and such
10582  
10583 \family sans
10584 FoilTeX
10585 \family default
10586  also provides a comprehensive box of goodies for presenting them:
10587 \end_layout
10588
10589 \begin_layout Standard
10590 \begin_inset ERT
10591 status open
10592
10593 \begin_layout Plain Layout
10594
10595
10596 \backslash
10597 begin{multicols}{2}
10598 \end_layout
10599
10600 \end_inset
10601
10602
10603 \end_layout
10604
10605 \begin_layout Itemize
10606
10607 \family sans
10608 Theorem
10609 \end_layout
10610
10611 \begin_layout Itemize
10612
10613 \family sans
10614 Lemma
10615 \end_layout
10616
10617 \begin_layout Itemize
10618
10619 \family sans
10620 Corollary
10621 \end_layout
10622
10623 \begin_layout Itemize
10624
10625 \family sans
10626 Proposition
10627 \end_layout
10628
10629 \begin_layout Itemize
10630
10631 \family sans
10632 Definition
10633 \end_layout
10634
10635 \begin_layout Itemize
10636
10637 \family sans
10638 Proof
10639 \end_layout
10640
10641 \begin_layout Itemize
10642
10643 \family sans
10644 Theorem*
10645 \end_layout
10646
10647 \begin_layout Itemize
10648
10649 \family sans
10650 Lemma*
10651 \end_layout
10652
10653 \begin_layout Itemize
10654
10655 \family sans
10656 Corollary*
10657 \end_layout
10658
10659 \begin_layout Itemize
10660
10661 \family sans
10662 Proposition*
10663 \end_layout
10664
10665 \begin_layout Itemize
10666
10667 \family sans
10668 Definition*
10669 \end_layout
10670
10671 \begin_layout Standard
10672 \begin_inset ERT
10673 status open
10674
10675 \begin_layout Plain Layout
10676
10677
10678 \backslash
10679 end{multicols}
10680 \end_layout
10681
10682 \end_inset
10683
10684
10685 \end_layout
10686
10687 \begin_layout Standard
10688 The starred versions are unnumbered while the unstarred versions are numbered.
10689  There are also two list environments added by LyX and these are:
10690 \end_layout
10691
10692 \begin_layout Itemize
10693
10694 \family sans
10695 TickList
10696 \end_layout
10697
10698 \begin_layout Itemize
10699
10700 \family sans
10701 CrossList
10702 \end_layout
10703
10704 \begin_layout Standard
10705
10706 \family sans
10707 FoilTeX
10708 \family default
10709  provides some powerful header and footer capabilities that are best set
10710  in the preamble although they may be set at any point in a document.
10711  If you want to change these settings in your document the best place to
10712  do so is at the very top of a foil, i.
10713 \begin_inset space \thinspace{}
10714 \end_inset
10715
10716 g.
10717 \emph on
10718
10719 \begin_inset space \space{}
10720 \end_inset
10721
10722
10723 \emph default
10724 straight after the foilhead.
10725 \end_layout
10726
10727 \begin_layout Standard
10728 For this purpose, the following command styles are provided [
10729 \shape smallcaps
10730 Martin Vermeer
10731 \shape default
10732 ]:
10733 \end_layout
10734
10735 \begin_layout Standard
10736 \begin_inset ERT
10737 status open
10738
10739 \begin_layout Plain Layout
10740
10741
10742 \backslash
10743 begin{multicols}{2}
10744 \end_layout
10745
10746 \end_inset
10747
10748
10749 \end_layout
10750
10751 \begin_layout Itemize
10752
10753 \family sans
10754 My
10755 \begin_inset space ~
10756 \end_inset
10757
10758 Logo
10759 \end_layout
10760
10761 \begin_layout Itemize
10762
10763 \family sans
10764 Restriction
10765 \end_layout
10766
10767 \begin_layout Itemize
10768
10769 \family sans
10770 Right
10771 \begin_inset space ~
10772 \end_inset
10773
10774 Footer
10775 \end_layout
10776
10777 \begin_layout Itemize
10778
10779 \family sans
10780 Right
10781 \begin_inset space ~
10782 \end_inset
10783
10784 Header
10785 \end_layout
10786
10787 \begin_layout Itemize
10788
10789 \family sans
10790 Left
10791 \begin_inset space ~
10792 \end_inset
10793
10794 Header
10795 \end_layout
10796
10797 \begin_deeper
10798 \begin_layout Standard
10799 \begin_inset space ~
10800 \end_inset
10801
10802
10803 \end_layout
10804
10805 \end_deeper
10806 \begin_layout Standard
10807 \begin_inset ERT
10808 status open
10809
10810 \begin_layout Plain Layout
10811
10812
10813 \backslash
10814 end{multicols}
10815 \end_layout
10816
10817 \end_inset
10818
10819
10820 \end_layout
10821
10822 \begin_layout Standard
10823 There are also a few commands provided by 
10824 \family sans
10825 FoilTeX
10826 \family default
10827  that aren't directly supported by LyX but I'll tell you what they do and
10828  how to use them in section
10829 \begin_inset space ~
10830 \end_inset
10831
10832
10833 \begin_inset CommandInset ref
10834 LatexCommand ref
10835 reference "sec:unsuppfoils"
10836
10837 \end_inset
10838
10839 .
10840 \end_layout
10841
10842 \begin_layout Subsection
10843 Building a Set of Foils
10844 \end_layout
10845
10846 \begin_layout Standard
10847 This section will give a simple introduction to using the different environments
10848  to build a set of foils.
10849  If you want to see an example set of foils, take a look at the 
10850 \family typewriter
10851 Foils.lyx
10852 \family default
10853  file you find in LyX's 
10854 \family typewriter
10855 examples
10856 \family default
10857  folder.
10858 \end_layout
10859
10860 \begin_layout Subsubsection
10861 Give It a Title Page
10862 \end_layout
10863
10864 \begin_layout Standard
10865 Unlike other classes that provide 
10866 \family sans
10867 Title
10868 \family default
10869
10870 \family sans
10871 Author
10872 \family default
10873
10874 \family sans
10875 Date
10876 \family default
10877  and 
10878 \family sans
10879 Abstract
10880 \family default
10881  environments, 
10882 \family sans
10883 foils
10884 \family default
10885  creates the title on a page of its own.
10886  If you leave out the 
10887 \family sans
10888 Date
10889 \family default
10890  environment LaTeX will substitute the current date (every time you regenerate
10891  the output).
10892 \end_layout
10893
10894 \begin_layout Subsubsection
10895 Start a New Foil
10896 \end_layout
10897
10898 \begin_layout Standard
10899 As I mentioned earlier, there are four ways of starting a new foil.
10900  For portrait foils you should use 
10901 \family sans
10902 Foilhead
10903 \family default
10904  or 
10905 \family sans
10906 ShortFoilhead.
10907
10908 \family default
10909  The difference between these two environments is the amount of space between
10910  the title of the foil (the foilhead) and the body of the foil.
10911 \end_layout
10912
10913 \begin_layout Standard
10914 Landscape foils are generated using the 
10915 \family sans
10916 Rotatefoilhead
10917 \family default
10918  and 
10919 \family sans
10920 ShortRotatefoilhead
10921 \family default
10922  environments.
10923  Again the only difference is the spacing between foilhead and body.
10924  Both of the short versions have 0.5 inches less separation between the foilhead
10925  and the body.
10926  
10927 \end_layout
10928
10929 \begin_layout Standard
10930 One problem with the support for landscape foils is the requirement that
10931  you have to use the 
10932 \family typewriter
10933 dvips
10934 \family default
10935  driver to generate the PostScript output otherwise the foils won't be rotated.
10936  It is possible to get landscape foils even if you haven't got the 
10937 \family typewriter
10938 dvips
10939 \family default
10940  driver provided you can feed your foils sideways through your printer ;-)
10941 \end_layout
10942
10943 \begin_layout Subsubsection
10944 Theorems, Lemmas, Proofs and more
10945 \end_layout
10946
10947 \begin_layout Standard
10948 Due to a small bug in LyX you can't have two of the same type of these environme
10949 nts directly following each other.
10950  They must be separated by something.
10951  If you try, you will just be extending the previous environment as if you
10952  had merged the two environments together.
10953  So, how do you get around this problem? The simplest option is to insert
10954  some text between the two environments or add a 
10955 \family sans
10956 LaTeX
10957 \family default
10958  environment between the two with just a 
10959 \begin_inset Quotes eld
10960 \end_inset
10961
10962
10963 \family typewriter
10964 %
10965 \family default
10966
10967 \begin_inset Quotes erd
10968 \end_inset
10969
10970  in it.
10971  This will force LyX to produce two separate environments and hence the
10972  correct LaTeX output.
10973  An example is provided in the example file included with the LyX distribution.
10974  Remember, this problem only occurs if you are trying to place two of the
10975  same type of theorem-like environments one directly after the other.
10976 \end_layout
10977
10978 \begin_layout Subsubsection
10979 Lists
10980 \end_layout
10981
10982 \begin_layout Standard
10983 You get all the commonly supported list styles found in other classes as
10984  well as two new ones.
10985  I'll only describe the new ones here.
10986  If you want to find out more about the other list environments check out
10987  the 
10988 \emph on
10989 User's Guide.
10990
10991 \emph default
10992  If you intend to use itemized lists you might also want to read about the
10993  
10994 \family sans
10995 Itemize
10996 \begin_inset space ~
10997 \end_inset
10998
10999 Bullet
11000 \begin_inset space ~
11001 \end_inset
11002
11003 Selection
11004 \family default
11005  dialog described above in section
11006 \begin_inset space ~
11007 \end_inset
11008
11009
11010 \begin_inset CommandInset ref
11011 LatexCommand ref
11012 reference "sec:bullet"
11013
11014 \end_inset
11015
11016 .
11017 \end_layout
11018
11019 \begin_layout Standard
11020 The two new list styles, 
11021 \family sans
11022 TickList
11023 \family default
11024  and 
11025 \family sans
11026 CrossList
11027 \family default
11028 , are designed to make it easier for you to create lists of do's and don'ts
11029  or right and wrong by providing dedicated environments that use a tick
11030  or a cross as the label of the list.
11031  These lists are in fact dedicated variants of the 
11032 \family sans
11033 Itemize
11034 \family default
11035  environment.
11036  They do however require that you have the 
11037 \family typewriter
11038 psnfss
11039 \family default
11040  packages installed.
11041 \end_layout
11042
11043 \begin_layout Subsubsection
11044 Figures and Tables
11045 \end_layout
11046
11047 \begin_layout Standard
11048
11049 \family sans
11050 FoilTeX
11051 \family default
11052  redefines the floating tables and figures so that they appear exactly where
11053  they are in the text rather than pushing them to the top of the page or
11054  to some user specified location.
11055  In fact if you change the float placement settings they are simply ignored.
11056 \end_layout
11057
11058 \begin_layout Subsubsection
11059 Page Headers and Footers
11060 \begin_inset CommandInset label
11061 LatexCommand label
11062 name "sec:foilfoot"
11063
11064 \end_inset
11065
11066
11067 \end_layout
11068
11069 \begin_layout Standard
11070
11071 \family sans
11072 My
11073 \begin_inset space ~
11074 \end_inset
11075
11076 Logo
11077 \family default
11078  and 
11079 \family sans
11080 Restriction
11081 \family default
11082  are two commands used to control the left-footer text string.
11083  The first is meant to allow you to include a graphic logo on your foils
11084  and defaults to 
11085 \begin_inset Quotes eld
11086 \end_inset
11087
11088 -Typeset by 
11089 \family sans
11090 FoilTeX
11091 \family default
11092 -
11093 \begin_inset Quotes erd
11094 \end_inset
11095
11096 .
11097  While the second is meant to provide a classification for the audience,
11098  
11099 \emph on
11100 e.
11101 \begin_inset space \thinspace{}
11102 \end_inset
11103
11104 g.
11105 \emph default
11106
11107 \begin_inset space \space{}
11108 \end_inset
11109
11110 Confidential.
11111  It is empty by default.
11112 \end_layout
11113
11114 \begin_layout Standard
11115 The remaining page corners can be filled by 
11116 \family sans
11117 Right
11118 \begin_inset space ~
11119 \end_inset
11120
11121 Footer
11122 \family default
11123  (which defaults to page numbers), 
11124 \family sans
11125 Right
11126 \begin_inset space ~
11127 \end_inset
11128
11129 Header
11130 \family default
11131  (top right) and 
11132 \family sans
11133 Left
11134 \begin_inset space ~
11135 \end_inset
11136
11137 Header
11138 \family default
11139  (top left).
11140 \end_layout
11141
11142 \begin_layout Subsection
11143 Unsupported 
11144 \family sans
11145 FoilTeX
11146 \family default
11147  Goodies
11148 \begin_inset CommandInset label
11149 LatexCommand label
11150 name "sec:unsuppfoils"
11151
11152 \end_inset
11153
11154
11155 \end_layout
11156
11157 \begin_layout Standard
11158 All the commands mentioned below need to be set in a 
11159 \family sans
11160 LaTeX
11161 \family default
11162  environment or as 
11163 \family sans
11164 TeX
11165 \family default
11166  within another environment.
11167 \end_layout
11168
11169 \begin_layout Subsubsection
11170 Lengths
11171 \end_layout
11172
11173 \begin_layout Standard
11174 All lengths are adjusted using the 
11175 \family typewriter
11176
11177 \backslash
11178 setlength{
11179 \family default
11180 \emph on
11181 lengthname
11182 \family typewriter
11183 \emph default
11184 }{
11185 \family default
11186 \emph on
11187 newlength
11188 \family typewriter
11189 \emph default
11190 }
11191 \family default
11192  command.
11193  Where 
11194 \emph on
11195 lengthname
11196 \emph default
11197  should be replaced by the name given to the length you want to change and
11198  
11199 \emph on
11200 newlength
11201 \emph default
11202  is the length value.
11203  All lengths should be specified in units of length such as inches (
11204 \family typewriter
11205 in
11206 \family default
11207 ), millimeters (
11208 \family typewriter
11209 mm
11210 \family default
11211 ) or points (
11212 \family typewriter
11213 pt
11214 \family default
11215 ) or relative to some document or font-based length such as 
11216 \family typewriter
11217
11218 \backslash
11219 textwidth
11220 \family default
11221 .
11222  
11223 \end_layout
11224
11225 \begin_layout Standard
11226 It's possible to change the spacing between a foilhead and the body of the
11227  foil by adjusting the length specified by 
11228 \family typewriter
11229
11230 \backslash
11231 foilheadskip
11232 \family default
11233 .
11234  For example, to make 
11235 \emph on
11236 all
11237 \emph default
11238  foilheads 0.5
11239 \begin_inset space \space{}
11240 \end_inset
11241
11242 in closer to their bodies put the following in the preamble: 
11243 \family typewriter
11244
11245 \backslash
11246 setlength{
11247 \backslash
11248 foilheadskip}{-0.5in}
11249 \end_layout
11250
11251 \begin_layout Standard
11252 The spacings around floats can be adjusted by setting these lengths:
11253 \end_layout
11254
11255 \begin_layout Labeling
11256 \labelwidthstring MMMMMMMMMMM
11257
11258 \family typewriter
11259
11260 \backslash
11261 abovefloatskip
11262 \family default
11263  Separation between the text and the top of the float
11264 \end_layout
11265
11266 \begin_layout Labeling
11267 \labelwidthstring MMMMMMMMMMM
11268
11269 \family typewriter
11270
11271 \backslash
11272 abovecaptionskip
11273 \family default
11274  Separation between the float and the caption
11275 \end_layout
11276
11277 \begin_layout Labeling
11278 \labelwidthstring MMMMMMMMMMM
11279
11280 \family typewriter
11281
11282 \backslash
11283 belowcaptionskip
11284 \family default
11285  Separation between the caption and the following text
11286 \end_layout
11287
11288 \begin_layout Labeling
11289 \labelwidthstring MMMMMMMMMMM
11290
11291 \family typewriter
11292
11293 \backslash
11294 captionwidth
11295 \family default
11296  You can make the captions narrower than the surrounding text by adjusting
11297  this length.
11298  Best done relative to 
11299 \family typewriter
11300
11301 \backslash
11302 textwidth
11303 \family default
11304 .
11305 \end_layout
11306
11307 \begin_layout Standard
11308 There are also several title page related lengths that you may find useful
11309  if you have a long title or several authors:
11310 \end_layout
11311
11312 \begin_layout Labeling
11313 \labelwidthstring MMMMMMMMMMM
11314
11315 \family typewriter
11316
11317 \backslash
11318 abovetitleskip
11319 \family default
11320  Separation from headers to 
11321 \family sans
11322 Title
11323 \end_layout
11324
11325 \begin_layout Labeling
11326 \labelwidthstring MMMMMMMMMMM
11327
11328 \family typewriter
11329
11330 \backslash
11331 titleauthorskip
11332 \family default
11333  between 
11334 \family sans
11335 Title
11336 \family default
11337  and 
11338 \family sans
11339 Author
11340 \family default
11341  environments
11342 \end_layout
11343
11344 \begin_layout Labeling
11345 \labelwidthstring MMMMMMMMMMM
11346
11347 \family typewriter
11348
11349 \backslash
11350 authorauthorskip
11351 \family default
11352  between multiple 
11353 \family sans
11354 Author
11355 \family default
11356  lines
11357 \end_layout
11358
11359 \begin_layout Labeling
11360 \labelwidthstring MMMMMMMMMMM
11361
11362 \family typewriter
11363
11364 \backslash
11365 authordateskip
11366 \family default
11367  between the 
11368 \family sans
11369 Author
11370 \family default
11371  and the 
11372 \family sans
11373 Date
11374 \end_layout
11375
11376 \begin_layout Labeling
11377 \labelwidthstring MMMMMMMMMMM
11378
11379 \family typewriter
11380
11381 \backslash
11382 dateabstractskip
11383 \family default
11384  between the 
11385 \family sans
11386 Date
11387 \family default
11388  and the 
11389 \family sans
11390 Abstract
11391 \end_layout
11392
11393 \begin_layout Standard
11394 The last length related command affects all the list environments.
11395  If you place 
11396 \family typewriter
11397
11398 \backslash
11399 zerolistvertdimens
11400 \family default
11401  
11402 \emph on
11403 inside
11404 \emph default
11405  a list environment then all the vertical spacing between the list items
11406  is removed.
11407  Note that this is a command not a length so it doesn't require 
11408 \family typewriter
11409
11410 \backslash
11411 setlength
11412 \family default
11413  like the stuff mentioned above.
11414 \end_layout
11415
11416 \begin_layout Subsubsection
11417 Headers and Footers
11418 \end_layout
11419
11420 \begin_layout Standard
11421 The 
11422 \family typewriter
11423
11424 \backslash
11425 LogoOn
11426 \family default
11427  and 
11428 \family typewriter
11429
11430 \backslash
11431 LogoOff
11432 \family default
11433  commands control whether the logo in the 
11434 \family sans
11435 MyLogo
11436 \family default
11437  definition appear on a given page.
11438  If you put 
11439 \family typewriter
11440
11441 \backslash
11442 LogoOff
11443 \family default
11444  in the preamble then none of the foils will have the logo on them.
11445  If you don't want the logo on a particular page place the 
11446 \family typewriter
11447
11448 \backslash
11449 LogoOff
11450 \family default
11451  directly after the foilhead of that page and the 
11452 \family typewriter
11453
11454 \backslash
11455 LogoOn
11456 \family default
11457  directly after the next foilhead.
11458 \end_layout
11459
11460 \begin_layout Standard
11461 If you decide to use the 
11462 \family sans
11463 fancy
11464 \family default
11465  page style setting in the 
11466 \family sans
11467 Document
11468 \begin_inset space ~
11469 \end_inset
11470
11471 Layout
11472 \family default
11473  dialog you should probably add 
11474 \family typewriter
11475
11476 \backslash
11477 let
11478 \backslash
11479 headwidth
11480 \backslash
11481 textwidth
11482 \family default
11483  to your preamble so headers and footers on landscape pages are correctly
11484  placed when rotated.
11485  This is due to some clashes between the page layouts provided by the 
11486 \family sans
11487 fancyheadings
11488 \family default
11489  package and the 
11490 \family sans
11491 foils
11492 \family default
11493  class.
11494 \end_layout
11495
11496 \begin_layout Section
11497 Hollywood (Hollywood spec scripts)
11498 \end_layout
11499
11500 \begin_layout Standard
11501 by 
11502 \shape smallcaps
11503 Garst Reese
11504 \end_layout
11505
11506 \begin_layout Subsection
11507 Introduction
11508 \end_layout
11509
11510 \begin_layout Standard
11511 Getting the format of a Hollywood script right is a 
11512 \begin_inset Quotes eld
11513 \end_inset
11514
11515 rite of passage.
11516 \begin_inset Quotes erd
11517 \end_inset
11518
11519  It is designed to make the readers focus on content and to be easy and
11520  familiar for the actors to read.
11521  Each page of a script should be one minute of film.
11522  Nothing goes in a script that you cannot see or hear on screen.
11523  The courier 12 pt font should be used throughout.
11524  No italics.
11525 \end_layout
11526
11527 \begin_layout Subsection
11528 Special problems
11529 \end_layout
11530
11531 \begin_layout Standard
11532 Speakers' lines should NEVER break in mid-sentence.
11533  If a speaker's lines continue over a page break, repeat the 
11534 \family sans
11535 Speaker
11536 \family default
11537  title followed by (Cont'd).
11538 \end_layout
11539
11540 \begin_layout Subsection
11541 Special features
11542 \end_layout
11543
11544 \begin_layout Standard
11545 Insert the 
11546 \family sans
11547 Speaker
11548 \family default
11549  names as labels then cross-reference the label to insert the name.
11550  The cross-reference dialog will show the current cast of characters.
11551  You can use this to insert the speaker name in narratives also.
11552 \end_layout
11553
11554 \begin_layout Subsection
11555 Paper size and Margins
11556 \end_layout
11557
11558 \begin_layout Standard
11559 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11560 \end_layout
11561
11562 \begin_layout Subsection
11563 Environments
11564 \end_layout
11565
11566 \begin_layout Standard
11567 The following environments are available.
11568  You can use hollywood.bind to get the bind keys shown at the right.
11569 \end_layout
11570
11571 \begin_layout Itemize
11572
11573 \family sans
11574 Standard
11575 \begin_inset Newline newline
11576 \end_inset
11577
11578
11579 \family default
11580 Used where nothing else works.
11581  Try to avoid it.
11582 \end_layout
11583
11584 \begin_layout Itemize
11585
11586 \family sans
11587 FADE_IN
11588 \family default
11589 :
11590 \begin_inset space \hfill{}
11591 \end_inset
11592
11593
11594 \family sans
11595 M-z S-I
11596 \family default
11597
11598 \begin_inset Newline newline
11599 \end_inset
11600
11601 Usually followed by something like 
11602 \begin_inset Quotes eld
11603 \end_inset
11604
11605 on Sally waking up.
11606 \begin_inset Quotes erd
11607 \end_inset
11608
11609
11610 \end_layout
11611
11612 \begin_layout Itemize
11613
11614 \family sans
11615 INT:
11616 \begin_inset space \hfill{}
11617 \end_inset
11618
11619 M-z i
11620 \begin_inset Newline newline
11621 \end_inset
11622
11623
11624 \family default
11625 Introduces a new INTERIOR camera set-up.
11626  Always followed by DAY or NIGHT, or something similar to define the lighting
11627  required.
11628  Everthing on this line in CAPS.
11629 \end_layout
11630
11631 \begin_layout Itemize
11632
11633 \family sans
11634 EXT:
11635 \begin_inset space \hfill{}
11636 \end_inset
11637
11638 M-z e
11639 \begin_inset Newline newline
11640 \end_inset
11641
11642
11643 \family default
11644 Introduces a new EXTERIOR camera set-up.
11645  Everthing on this line in CAPS.
11646 \end_layout
11647
11648 \begin_layout Itemize
11649
11650 \family sans
11651 Speaker
11652 \begin_inset space \hfill{}
11653 \end_inset
11654
11655 M-z s
11656 \begin_inset Newline newline
11657 \end_inset
11658
11659
11660 \family default
11661 The character speaking.
11662 \end_layout
11663
11664 \begin_layout Itemize
11665
11666 \family sans
11667 Parenthetical
11668 \begin_inset space \hfill{}
11669 \end_inset
11670
11671 M-z p
11672 \begin_inset Newline newline
11673 \end_inset
11674
11675
11676 \family default
11677 Instructions to the speaker.
11678  The () are automatically inserted, but only the ( will show in LyX.
11679  Both will be printed.
11680 \end_layout
11681
11682 \begin_layout Itemize
11683
11684 \family sans
11685 Dialogue
11686 \begin_inset space \hfill{}
11687 \end_inset
11688
11689 M-z d
11690 \begin_inset Newline newline
11691 \end_inset
11692
11693
11694 \family default
11695 What the 
11696 \family sans
11697 Speaker
11698 \family default
11699  says.
11700 \end_layout
11701
11702 \begin_layout Itemize
11703
11704 \family sans
11705 Transition
11706 \begin_inset space \hfill{}
11707 \end_inset
11708
11709 M-z t
11710 \begin_inset Newline newline
11711 \end_inset
11712
11713
11714 \family default
11715 Camera movement instruction.
11716  e.
11717 \begin_inset space \thinspace{}
11718 \end_inset
11719
11720 g.
11721 \begin_inset space \space{}
11722 \end_inset
11723
11724 CUT TO:
11725 \end_layout
11726
11727 \begin_layout Itemize
11728
11729 \family sans
11730 FADE OUT:
11731 \begin_inset space \hfill{}
11732 \end_inset
11733
11734 M-z S-I
11735 \end_layout
11736
11737 \begin_layout Itemize
11738
11739 \family sans
11740 Author
11741 \begin_inset space \hfill{}
11742 \end_inset
11743
11744 M-z S-A
11745 \end_layout
11746
11747 \begin_layout Itemize
11748
11749 \family sans
11750 Title
11751 \begin_inset space \hfill{}
11752 \end_inset
11753
11754 M-z S-T
11755 \end_layout
11756
11757 \begin_layout Itemize
11758
11759 \family sans
11760 Right_Address
11761 \begin_inset space \hfill{}
11762 \end_inset
11763
11764 M-z r
11765 \end_layout
11766
11767 \begin_layout Subsection
11768 Script jargon
11769 \end_layout
11770
11771 \begin_layout Itemize
11772 (O.S) — off screen
11773 \end_layout
11774
11775 \begin_layout Itemize
11776 (V.0) — voice over
11777 \end_layout
11778
11779 \begin_layout Itemize
11780 b.
11781 \begin_inset space \thinspace{}
11782 \end_inset
11783
11784 g.
11785  — background
11786 \end_layout
11787
11788 \begin_layout Itemize
11789 C.U.
11790  — close-up
11791 \end_layout
11792
11793 \begin_layout Itemize
11794 PAN — camera movement
11795 \end_layout
11796
11797 \begin_layout Itemize
11798 INSERT — cut to close-up of
11799 \end_layout
11800
11801 \begin_layout Section
11802 ijmpc and ijmpd
11803 \end_layout
11804
11805 \begin_layout Standard
11806 by 
11807 \noun on
11808 Panayotis Papasotiriou
11809 \end_layout
11810
11811 \begin_layout Subsection
11812 Overview
11813 \end_layout
11814
11815 \begin_layout Standard
11816 The ijmpc package is a set of macros that facilitates electronic manuscript
11817  submission to the 
11818 \emph on
11819 International Journal of Modern Physics C
11820 \emph default
11821 .
11822  Similarly, the ijmpd package is for creating manuscripts to be submitted
11823  to the 
11824 \emph on
11825 International Journal of Modern Physics D
11826 \emph default
11827 .
11828  Both journals are published by World Scientific.
11829  The corresponding document classes are named 
11830 \family typewriter
11831 ws-ijmpc.cls
11832 \family default
11833  and 
11834 \family typewriter
11835 ws-ijmpd.cls
11836 \family default
11837 , respectively.
11838  These files, together with instructions for the authors, can be downloaded
11839  from the sites 
11840 \begin_inset Flex URL
11841 status collapsed
11842
11843 \begin_layout Plain Layout
11844
11845 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11846 \end_layout
11847
11848 \end_inset
11849
11850  and 
11851 \begin_inset Flex URL
11852 status collapsed
11853
11854 \begin_layout Plain Layout
11855
11856 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11857 \end_layout
11858
11859 \end_inset
11860
11861 .
11862  Both packages are modified versions of the standard 
11863 \begin_inset Quotes eld
11864 \end_inset
11865
11866 article
11867 \begin_inset Quotes erd
11868 \end_inset
11869
11870  package, and they are almost (but not exactly) identical.
11871  Most of their features are supported by LyX.
11872  I have used LyX successfully to write articles submitted to both journals
11873  without any problem.
11874 \end_layout
11875
11876 \begin_layout Subsection
11877 Writing a paper
11878 \end_layout
11879
11880 \begin_layout Standard
11881 As usual, the easiest way to write a paper is to start with a template.
11882  Click on 
11883 \family sans
11884 File\SpecialChar \menuseparator
11885 New from
11886 \family default
11887  
11888 \family sans
11889 \bar under
11890 T
11891 \bar default
11892 emplate
11893 \family default
11894 , then choose the 
11895 \family typewriter
11896 ijmpc.lyx
11897 \family default
11898  or 
11899 \family typewriter
11900 ijmpd.lyx
11901 \family default
11902  template.
11903  This will give an (almost) empty document that includes the most common
11904  fields found in a manuscript.
11905  Simply overwrite the existing text (including the brackets, 
11906 \family typewriter
11907 <>
11908 \family default
11909 ) with your text.
11910  You should keep in mind the following remarks.
11911 \end_layout
11912
11913 \begin_layout Enumerate
11914 LyX won't let you change the font size and the page style of the document,
11915  because such modifications are not allowed by both packages.
11916 \end_layout
11917
11918 \begin_layout Enumerate
11919 The language of the document should not be changed.
11920  Before previewing your paper, be sure that the babel package is not used.
11921  To do this, click on 
11922 \family sans
11923 Tools\SpecialChar \menuseparator
11924 Preferences
11925 \family default
11926 , select the 
11927 \family sans
11928 Lang Opts
11929 \family default
11930  tab, deselect the 
11931 \family sans
11932 Use babel
11933 \family default
11934  checkbox in the language settings, and click on 
11935 \family sans
11936 Apply
11937 \family default
11938  (or 
11939 \family sans
11940 Save
11941 \family default
11942 , if you wish to make this change permanent).
11943 \end_layout
11944
11945 \begin_layout Enumerate
11946 The 
11947 \begin_inset Quotes eld
11948 \end_inset
11949
11950 Keywords
11951 \begin_inset Quotes erd
11952 \end_inset
11953
11954  style must be used to define keywords.
11955 \end_layout
11956
11957 \begin_layout Enumerate
11958 The ijmpc package provides a style named 
11959 \begin_inset Quotes eld
11960 \end_inset
11961
11962 Classification Codes
11963 \begin_inset Quotes erd
11964 \end_inset
11965
11966 , which can be used to define classification codes, such as PACS numbers.
11967  Note that this facility is not supported by the ijmpd package.
11968 \end_layout
11969
11970 \begin_layout Enumerate
11971 Several new environments are available: 
11972 \begin_inset Quotes eld
11973 \end_inset
11974
11975 Definition
11976 \begin_inset Quotes erd
11977 \end_inset
11978
11979
11980 \begin_inset Quotes eld
11981 \end_inset
11982
11983 Step
11984 \begin_inset Quotes erd
11985 \end_inset
11986
11987
11988 \begin_inset Quotes eld
11989 \end_inset
11990
11991 Example
11992 \begin_inset Quotes erd
11993 \end_inset
11994
11995
11996 \begin_inset Quotes eld
11997 \end_inset
11998
11999 Remark
12000 \begin_inset Quotes erd
12001 \end_inset
12002
12003
12004 \begin_inset Quotes eld
12005 \end_inset
12006
12007 Notation
12008 \begin_inset Quotes erd
12009 \end_inset
12010
12011
12012 \begin_inset Quotes eld
12013 \end_inset
12014
12015 Theorem
12016 \begin_inset Quotes erd
12017 \end_inset
12018
12019
12020 \begin_inset Quotes eld
12021 \end_inset
12022
12023 Proof
12024 \begin_inset Quotes erd
12025 \end_inset
12026
12027
12028 \begin_inset Quotes eld
12029 \end_inset
12030
12031 Corollary
12032 \begin_inset Quotes erd
12033 \end_inset
12034
12035
12036 \begin_inset Quotes eld
12037 \end_inset
12038
12039 Lemma
12040 \begin_inset Quotes erd
12041 \end_inset
12042
12043
12044 \begin_inset Quotes eld
12045 \end_inset
12046
12047 Proposition
12048 \begin_inset Quotes erd
12049 \end_inset
12050
12051
12052 \begin_inset Quotes eld
12053 \end_inset
12054
12055 Prop
12056 \begin_inset Quotes erd
12057 \end_inset
12058
12059
12060 \begin_inset Quotes eld
12061 \end_inset
12062
12063 Question
12064 \begin_inset Quotes erd
12065 \end_inset
12066
12067
12068 \begin_inset Quotes eld
12069 \end_inset
12070
12071 Claim
12072 \begin_inset Quotes erd
12073 \end_inset
12074
12075 , and 
12076 \begin_inset Quotes eld
12077 \end_inset
12078
12079 Conjecture
12080 \begin_inset Quotes erd
12081 \end_inset
12082
12083 .
12084  Their use is more or less obvious.
12085  LyX supports all these environments; it will use the proper label, text
12086  style, and numbering scheme for each of them.
12087 \end_layout
12088
12089 \begin_layout Enumerate
12090 Both packages use basic citations; the natbib package should not be used.
12091  In LyX, citation references are shown as usual; in the output, citations
12092  are shown as superscripts.
12093  If you want to use a citation as normal text, you should use the 
12094 \family typewriter
12095 refcite
12096 \family default
12097  command, e.
12098 \begin_inset space \thinspace{}
12099 \end_inset
12100
12101 g.
12102 \begin_inset space \space{}
12103 \end_inset
12104
12105
12106 \begin_inset Quotes eld
12107 \end_inset
12108
12109 See Ref.
12110 \begin_inset space \space{}
12111 \end_inset
12112
12113
12114 \family typewriter
12115
12116 \backslash
12117 refcite{key}
12118 \family default
12119
12120 \begin_inset Quotes erd
12121 \end_inset
12122
12123 .
12124 \end_layout
12125
12126 \begin_layout Enumerate
12127 There is no 
12128 \begin_inset Quotes eld
12129 \end_inset
12130
12131 Acknowledgments
12132 \begin_inset Quotes erd
12133 \end_inset
12134
12135  section in both packages.
12136  To put acknowledgments, just use the 
12137 \begin_inset Quotes eld
12138 \end_inset
12139
12140 Section*
12141 \begin_inset Quotes erd
12142 \end_inset
12143
12144  environment.
12145 \end_layout
12146
12147 \begin_layout Enumerate
12148 Appendices may be added to the paper, 
12149 \emph on
12150 after
12151 \emph default
12152  the Acknowledgments and 
12153 \shape italic
12154 before
12155 \shape default
12156  the References.
12157  LyX provides a special environment, called 
12158 \begin_inset Quotes eld
12159 \end_inset
12160
12161 Appendices Section
12162 \begin_inset Quotes erd
12163 \end_inset
12164
12165  which marks the beginning of the appendices.
12166  This environment should be left blank; it just sends a LaTeX command, but
12167  nothing is really printed.
12168  In LyX, the word 
12169 \begin_inset Quotes eld
12170 \end_inset
12171
12172 Appendix
12173 \begin_inset Quotes erd
12174 \end_inset
12175
12176  is printed with blue letters, as a signal that all sections after that
12177  point are appendices.
12178  To write an appendix, use the 
12179 \begin_inset Quotes eld
12180 \end_inset
12181
12182 Appendix
12183 \begin_inset Quotes erd
12184 \end_inset
12185
12186  environment.
12187  LyX will number each appendix with capital letters, as required by both
12188  journals.
12189  Note that 
12190 \begin_inset Quotes eld
12191 \end_inset
12192
12193 Appendices Section
12194 \begin_inset Quotes erd
12195 \end_inset
12196
12197  
12198 \emph on
12199 must
12200 \emph default
12201  be present before the first appendix; if not, all appendices will be numbered
12202  as normal sections in the output.
12203 \end_layout
12204
12205 \begin_layout Enumerate
12206 The ijmpc and the ijmpd packages use the 
12207 \family typewriter
12208 tbl
12209 \family default
12210  command to implement table captions.
12211  As a result, a table created by LyX is printed correctly, but its caption
12212  is ignored.
12213  However, you can use some TeX code to overcome this problem, so that captions
12214  are printed as expected.
12215  To do so, create a float table as usual, remove the caption, and replace
12216  it with the TeX code 
12217 \family typewriter
12218
12219 \backslash
12220 tbl{
12221 \emph on
12222 your table caption
12223 \emph default
12224 }{
12225 \family default
12226  (sic); you must also the TeX code 
12227 \family typewriter
12228 }
12229 \family default
12230  immediately after the tabular material.
12231  Study the example table included in the template files to see how this
12232  trick is implemented.
12233  Alternatively, If you need table captions, you should implement the whole
12234  table float in a 
12235 \family typewriter
12236 .tex
12237 \family default
12238  file, then include this file to the LyX document (
12239 \family sans
12240 Insert\SpecialChar \menuseparator
12241 File\SpecialChar \menuseparator
12242 Child
12243 \begin_inset space ~
12244 \end_inset
12245
12246 Document
12247 \family default
12248 ).
12249  Details on how to create a table float can be found in the files 
12250 \family typewriter
12251 ws-ijmpc.tex
12252 \family default
12253  and 
12254 \family typewriter
12255 ws-ijmpd.tex
12256 \family default
12257 , included in the corresponding packages.
12258 \end_layout
12259
12260 \begin_layout Subsection
12261 Preparing a paper for submission
12262 \end_layout
12263
12264 \begin_layout Standard
12265 Before you submit your paper you must export the LyX document as a LaTeX
12266  file (
12267 \family sans
12268 File\SpecialChar \menuseparator
12269 Export\SpecialChar \menuseparator
12270 LaTeX
12271 \family default
12272 )
12273 \begin_inset Foot
12274 status open
12275
12276 \begin_layout Plain Layout
12277 Actually you have the choice between LaTeX (plain) and pdflatex.
12278  If you intend to use pdflatex to prepare the paper, you should use the
12279  pdflatex option so that included graphics are converted to PDF format,
12280  ready for use by pdflatex.
12281 \end_layout
12282
12283 \end_inset
12284
12285 , then make the following changes to the resulting 
12286 \family typewriter
12287 .tex
12288 \family default
12289  file.
12290 \end_layout
12291
12292 \begin_layout Enumerate
12293 Remove the comment lines before the 
12294 \family typewriter
12295
12296 \backslash
12297 documentclass
12298 \family default
12299  command.
12300 \end_layout
12301
12302 \begin_layout Enumerate
12303 Remove everything between (and including) the 
12304 \family typewriter
12305
12306 \backslash
12307 makeatletter
12308 \family default
12309  and 
12310 \family typewriter
12311
12312 \backslash
12313 makeatother
12314 \family default
12315  commands, except for any commands you specifically put into the LaTeX preamble.
12316 \end_layout
12317
12318 \begin_layout Standard
12319 The modified 
12320 \family typewriter
12321 .tex
12322 \family default
12323  file should be saved and processed through LaTeX as many times as necessary.
12324  You may also want to check the resulting 
12325 \family typewriter
12326 .dvi
12327 \family default
12328  document.
12329 \end_layout
12330
12331 \begin_layout Subsection
12332 Use of TeX code
12333 \end_layout
12334
12335 \begin_layout Standard
12336 The use of TeX code is reduced to two commands, which must be placed at
12337  the top of the document.
12338  If you started writing your paper by using the 
12339 \family typewriter
12340 ijmpc.lyx
12341 \family default
12342  or the 
12343 \family typewriter
12344 ijmpd.lyx
12345 \family default
12346  template, the TeX code needed is already in its place; you usually don't
12347  need to delete it.
12348  You may only modify the first TeX code to specify the information printed
12349  to the top of odd and even pages (authors' names and short paper's title,
12350  respectively).
12351  This TeX code must have the form 
12352 \family typewriter
12353
12354 \backslash
12355 markboth{Authors' Names}{Short Paper's Title}
12356 \family default
12357 .
12358 \end_layout
12359
12360 \begin_layout Section
12361 iopart
12362 \end_layout
12363
12364 \begin_layout Standard
12365 by 
12366 \noun on
12367 Uwe Stöhr
12368 \end_layout
12369
12370 \begin_layout Subsection
12371 Overview
12372 \end_layout
12373
12374 \begin_layout Standard
12375 The iopart package provides a document class to create electronic manuscript
12376  submission to the journals published by the Institute of Physics.
12377  Instructions for the authors how to create a paper using the iopart class
12378  can be downloaded together with the iopart package from the site 
12379 \begin_inset Flex URL
12380 status collapsed
12381
12382 \begin_layout Plain Layout
12383
12384 ftp://ftp.iop.org/pub/journals/latex2e
12385 \end_layout
12386
12387 \end_inset
12388
12389 .
12390 \end_layout
12391
12392 \begin_layout Subsection
12393 Writing a paper
12394 \end_layout
12395
12396 \begin_layout Standard
12397 The easiest way to write a paper is to start with the file 
12398 \emph on
12399 IOP-article.lyx
12400 \emph default
12401  that is available in LyX's examples files folder.
12402  Open this file, save it under a new name, and start writing.
12403  The example file explains how to use the special text environments.
12404  Here are the most important advices:
12405 \end_layout
12406
12407 \begin_layout Itemize
12408 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12409  two options 
12410 \family sans
12411 Use AMS math package
12412 \family default
12413  in the document settings under 
12414 \family sans
12415 Math Options
12416 \family default
12417  are not used!
12418 \end_layout
12419
12420 \begin_layout Itemize
12421
12422 \size normal
12423 The title environment defines the kind of your paper.
12424  So use one of the following environments for the title:
12425 \end_layout
12426
12427 \begin_deeper
12428 \begin_layout Itemize
12429
12430 \family sans
12431 \size normal
12432 Title
12433 \family default
12434  for a Paper
12435 \end_layout
12436
12437 \begin_layout Itemize
12438
12439 \family sans
12440 \size normal
12441 Review
12442 \family default
12443  for a Review
12444 \end_layout
12445
12446 \begin_layout Itemize
12447
12448 \family sans
12449 \size normal
12450 Topical
12451 \family default
12452  for a Topical review
12453 \end_layout
12454
12455 \begin_layout Itemize
12456
12457 \family sans
12458 \size normal
12459 Comment
12460 \family default
12461  for a Comment
12462 \end_layout
12463
12464 \begin_layout Itemize
12465
12466 \family sans
12467 \size normal
12468 Note
12469 \family default
12470  for a Note
12471 \end_layout
12472
12473 \begin_layout Itemize
12474
12475 \family sans
12476 \size normal
12477 Paper
12478 \family default
12479  for a Paper (same as Title)
12480 \end_layout
12481
12482 \begin_layout Itemize
12483
12484 \family sans
12485 \size normal
12486 Prelim
12487 \family default
12488  for a Preliminary communication
12489 \end_layout
12490
12491 \begin_layout Itemize
12492
12493 \family sans
12494 \size normal
12495 Rapid
12496 \family default
12497  for a Rapid communication
12498 \end_layout
12499
12500 \begin_layout Itemize
12501
12502 \family sans
12503 \size normal
12504 Letter
12505 \family default
12506  for a Letter to the editor
12507 \end_layout
12508
12509 \end_deeper
12510 \begin_layout Itemize
12511
12512 \size normal
12513 All title environments except of 
12514 \family sans
12515 Letter
12516 \family default
12517  can have an optional short title.
12518 \end_layout
12519
12520 \begin_layout Itemize
12521 There is a general title environment 
12522 \family sans
12523 Article
12524 \family default
12525  which is not directly supported by the LyX.
12526  This can be used as TeX code when your document doesn't fit into one of
12527  the other title types.
12528 \end_layout
12529
12530 \begin_layout Standard
12531 For more informations like hints for special table and formula formatting,
12532  look at the IOP author guidelines.
12533 \end_layout
12534
12535 \begin_layout Section
12536 Kluwer
12537 \end_layout
12538
12539 \begin_layout Standard
12540 by 
12541 \noun on
12542 Panayotis Papasotiriou
12543 \end_layout
12544
12545 \begin_layout Subsection
12546 Overview
12547 \end_layout
12548
12549 \begin_layout Standard
12550 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12551  that facilitates electronic manuscript submission to the journals they
12552  publish.
12553  Most known of them (at least in my domain of interest) are 
12554 \emph on
12555 Astrophysics and Space Science
12556 \emph default
12557  and 
12558 \emph on
12559 Solar Physics
12560 \emph default
12561 , but there are many others (see a complete list at 
12562 \begin_inset Flex URL
12563 status open
12564
12565 \begin_layout Plain Layout
12566
12567 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12568 \end_layout
12569
12570 \end_inset
12571
12572 ).
12573  The Kluwer package may be downloaded from the site 
12574 \begin_inset Flex URL
12575 status collapsed
12576
12577 \begin_layout Plain Layout
12578
12579 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12580 \end_layout
12581
12582 \end_inset
12583
12584 .
12585  A complete user guide is contained in that package (but it can also be
12586  downloaded separately).
12587 \end_layout
12588
12589 \begin_layout Standard
12590 LyX supports many features of the package but not everything.
12591  However, the TeX code needed is reduced to some 
12592 \begin_inset Quotes eld
12593 \end_inset
12594
12595 peculiar
12596 \begin_inset Quotes erd
12597 \end_inset
12598
12599  commands of the package (see
12600 \begin_inset space ~
12601 \end_inset
12602
12603
12604 \begin_inset CommandInset ref
12605 LatexCommand ref
12606 reference "subsec:kluwer_peculiarities"
12607
12608 \end_inset
12609
12610 ).
12611  I have recently used LyX to write an article submitted to the 
12612 \emph on
12613 Astrophysics and Space Science
12614 \emph default
12615  without any problem.
12616 \end_layout
12617
12618 \begin_layout Subsection
12619 Writing a paper
12620 \end_layout
12621
12622 \begin_layout Standard
12623 The easiest way to write a paper is to start with the Kluwer template file.
12624  Click on 
12625 \family sans
12626 File\SpecialChar \menuseparator
12627 New from
12628 \family default
12629  
12630 \family sans
12631 Template
12632 \family default
12633 , then choose the 
12634 \family typewriter
12635 kluwer.lyx
12636 \family default
12637  template.
12638  This will give an (almost) empty document that includes the most common
12639  fields found in a manuscript and a short description of their use.
12640  As in most templates, simply overwrite the existing text (including the
12641  brackets, 
12642 \family typewriter
12643 <>
12644 \family default
12645 ) with the correct information.
12646 \end_layout
12647
12648 \begin_layout Subsection
12649 Preparing a paper for submission
12650 \end_layout
12651
12652 \begin_layout Standard
12653 As in the AASTeX package, before you submit your paper to a journal you
12654  must 
12655 \begin_inset Quotes eld
12656 \end_inset
12657
12658 postprocess
12659 \begin_inset Quotes erd
12660 \end_inset
12661
12662  it as follows.
12663 \end_layout
12664
12665 \begin_layout Enumerate
12666 Export your paper as a LaTeX file.
12667  To do this, click on 
12668 \family sans
12669 File\SpecialChar \menuseparator
12670 Export\SpecialChar \menuseparator
12671 LaTeX
12672 \family default
12673 .
12674  
12675 \end_layout
12676
12677 \begin_layout Enumerate
12678 Edit the resulting 
12679 \family typewriter
12680 .tex
12681 \family default
12682  file with a text editor and make the following changes
12683 \end_layout
12684
12685 \begin_deeper
12686 \begin_layout Enumerate
12687 remove the comment lines before the 
12688 \family typewriter
12689
12690 \backslash
12691 documentclass
12692 \family default
12693  command,
12694 \end_layout
12695
12696 \begin_layout Enumerate
12697 remove everything between (and including) the 
12698 \family typewriter
12699
12700 \backslash
12701 makeatletter
12702 \family default
12703  and 
12704 \family typewriter
12705
12706 \backslash
12707 makeatother
12708 \family default
12709  commands, except for any commands you specifically put into the LaTeX preamble.
12710 \end_layout
12711
12712 \begin_layout Standard
12713 Save the resulting 
12714 \family typewriter
12715 .tex
12716 \family default
12717  file.
12718 \end_layout
12719
12720 \end_deeper
12721 \begin_layout Enumerate
12722 Run the 
12723 \family typewriter
12724 .tex
12725 \family default
12726  file through LaTeX as many times as necessary (usually up to three).
12727 \end_layout
12728
12729 \begin_layout Enumerate
12730 View the resulting 
12731 \family typewriter
12732 .dvi
12733 \family default
12734  document using, e.
12735 \begin_inset space \thinspace{}
12736 \end_inset
12737
12738 g.
12739 \begin_inset space \space{}
12740 \end_inset
12741
12742
12743 \family sans
12744 xdvi
12745 \family default
12746 , and check if everything is OK (it should, if you didn't make any mistake).
12747 \end_layout
12748
12749 \begin_layout Subsection
12750 \begin_inset Quotes eld
12751 \end_inset
12752
12753 Peculiarities
12754 \begin_inset Quotes erd
12755 \end_inset
12756
12757  of the Kluwer package
12758 \begin_inset CommandInset label
12759 LatexCommand label
12760 name "subsec:kluwer_peculiarities"
12761
12762 \end_inset
12763
12764
12765 \end_layout
12766
12767 \begin_layout Standard
12768 The Kluwer package has the following 
12769 \begin_inset Quotes eld
12770 \end_inset
12771
12772 peculiarities
12773 \begin_inset Quotes erd
12774 \end_inset
12775
12776 .
12777 \end_layout
12778
12779 \begin_layout Enumerate
12780 It is possible to write multiple articles in the same LaTeX file
12781 \begin_inset Foot
12782 status collapsed
12783
12784 \begin_layout Plain Layout
12785 I can't imagine any good reason to do this.
12786 \end_layout
12787
12788 \end_inset
12789
12790 .
12791  Each article must be included in the environment 
12792 \begin_inset Quotes eld
12793 \end_inset
12794
12795 article
12796 \begin_inset Quotes erd
12797 \end_inset
12798
12799 .
12800  Unfortunately, this environment cannot be omitted, even if you write just
12801  one article.
12802  Therefore, each article starts with the command 
12803 \family typewriter
12804
12805 \backslash
12806 begin{article}
12807 \family default
12808  and, obviously, ends with the command 
12809 \family typewriter
12810
12811 \backslash
12812 end{article}
12813 \family default
12814 .
12815  Although this can be implemented in LyX, I didn't included it, since it
12816  looks ugly and can confuse the novice user.
12817  Therefore, you need to enter them directly and mark them as LaTeX code
12818  (the well-known 
12819 \begin_inset Quotes eld
12820 \end_inset
12821
12822 TeX code
12823 \begin_inset Quotes erd
12824 \end_inset
12825
12826 ).
12827 \end_layout
12828
12829 \begin_layout Enumerate
12830 Information given at the beginning of the article (i.
12831 \begin_inset space \thinspace{}
12832 \end_inset
12833
12834 g.
12835 \begin_inset space \space{}
12836 \end_inset
12837
12838 title, subtitle, author, institution, running title, running author, abstract
12839  and keywords) must be included in an environment called 
12840 \begin_inset Quotes eld
12841 \end_inset
12842
12843 opening
12844 \begin_inset Quotes erd
12845 \end_inset
12846
12847 .
12848  This is not implemented in LyX, so you must enter title, subtitle etc.
12849 \begin_inset space ~
12850 \end_inset
12851
12852 between two TeX code lines (
12853 \family typewriter
12854
12855 \backslash
12856 begin{opening}
12857 \family default
12858  and 
12859 \family typewriter
12860
12861 \backslash
12862 end{opening}
12863 \family default
12864 ).
12865 \end_layout
12866
12867 \begin_layout Enumerate
12868 According to the user manual, the label of each bibliography item must be
12869  written as 
12870 \family typewriter
12871
12872 \backslash
12873 protect
12874 \backslash
12875 citeauthoryear{
12876 \family default
12877 \emph on
12878 author(s)
12879 \family typewriter
12880 \emph default
12881 }{
12882 \family default
12883 \emph on
12884 year
12885 \family typewriter
12886 \emph default
12887 }
12888 \family default
12889 .
12890 \end_layout
12891
12892 \begin_layout Standard
12893 The 
12894 \family typewriter
12895 kluwer.lyx
12896 \family default
12897  template takes care of all these 
12898 \begin_inset Quotes eld
12899 \end_inset
12900
12901 peculiarities
12902 \begin_inset Quotes erd
12903 \end_inset
12904
12905 .
12906  If you start a new paper using this template you don't need to do anything
12907  special.
12908  Just 
12909 \end_layout
12910
12911 \begin_layout Enumerate
12912 don't delete the TeX code included in the template, and
12913 \end_layout
12914
12915 \begin_layout Enumerate
12916 copy the example bibliography item included in the template and modify it
12917  as necessary to enter new bibliography items.
12918 \end_layout
12919
12920 \begin_layout Section
12921 Koma-Script
12922 \end_layout
12923
12924 \begin_layout Standard
12925 by 
12926 \noun on
12927 Bernd Rellermeyer
12928 \end_layout
12929
12930 \begin_layout Subsection
12931 Overview
12932 \end_layout
12933
12934 \begin_layout Standard
12935 The LyX document classes 
12936 \emph on
12937 article (koma-script)
12938 \emph default
12939
12940 \emph on
12941 report (koma-script)
12942 \emph default
12943
12944 \emph on
12945 book
12946 \emph default
12947  
12948 \emph on
12949 (koma-script)
12950 \emph default
12951 , and 
12952 \emph on
12953 letter
12954 \emph default
12955  
12956 \emph on
12957 (koma-script)
12958 \emph default
12959  correspond to the LaTeX document classes 
12960 \family typewriter
12961 scrartcl.cls
12962 \family default
12963
12964 \family typewriter
12965 scrreprt.cls
12966 \family default
12967
12968 \family typewriter
12969 scrbook.cls
12970 \family default
12971 , and 
12972 \family typewriter
12973 scrlettr.cls
12974 \family default
12975 , resp.
12976 \begin_inset space ~
12977 \end_inset
12978
12979 of the Koma-Script family.
12980  They are replacements for the standard document classes 
12981 \family typewriter
12982 article.cls
12983 \family default
12984
12985 \family typewriter
12986 report.cls
12987 \family default
12988
12989 \family typewriter
12990 book.cls
12991 \family default
12992  and 
12993 \family typewriter
12994 letter.cls
12995 \family default
12996 , resp., and fit better to European typography conventions in a number of
12997  points.
12998 \end_layout
12999
13000 \begin_layout Itemize
13001 Standard character size is 11pt in 
13002 \emph on
13003 article (koma-script)
13004 \emph default
13005
13006 \emph on
13007 report (koma-script)
13008 \emph default
13009 , and 
13010 \emph on
13011 book (koma-script)
13012 \emph default
13013 , and 12pt in 
13014 \emph on
13015 letter (koma-script)
13016 \emph default
13017 .
13018 \end_layout
13019
13020 \begin_layout Itemize
13021 Headings, labels of the description environment, and a number of elements
13022  of the 
13023 \emph on
13024 letter (koma-script)
13025 \emph default
13026  document class are set in a bold sans serif font.
13027 \begin_inset Foot
13028 status collapsed
13029
13030 \begin_layout Plain Layout
13031 There is a big difference between the bold sans serif old cm fonts and new
13032  ec fonts, especially in the appearance of headings.
13033  In comparison, the ec bold sans serif fonts look a bit thin.
13034  Here the LaTeX package 
13035 \family typewriter
13036 cmsd.sty by
13037 \family default
13038  
13039 \shape smallcaps
13040 Walter Schmidt
13041 \shape default
13042  helps to produce the 
13043 \begin_inset Quotes eld
13044 \end_inset
13045
13046 usual
13047 \begin_inset Quotes erd
13048 \end_inset
13049
13050  appearance when using the ec fonts.
13051 \end_layout
13052
13053 \end_inset
13054
13055  The numbering of chapter headings is made in the same way as the numbering
13056  of section headings, that is without the extra line 
13057 \begin_inset Quotes eld
13058 \end_inset
13059
13060 Chapter\SpecialChar \ldots{}
13061
13062 \begin_inset Quotes erd
13063 \end_inset
13064
13065 .
13066  In addition, the appearance of the headings can be modified by using a
13067  number of options (in LyX to be entered in the field 
13068 \family sans
13069 Extra
13070 \begin_inset space ~
13071 \end_inset
13072
13073 Options
13074 \family default
13075  of the dialog 
13076 \family sans
13077 Layout\SpecialChar \menuseparator
13078 Document
13079 \family default
13080 ).
13081  
13082 \end_layout
13083
13084 \begin_layout Itemize
13085 The main means in the Koma-Script document classes to design the type area
13086  are the options 
13087 \family sans
13088 BCOR
13089 \family default
13090  and 
13091 \family sans
13092 DIV
13093 \family default
13094  (in LyX to be entered in the extra class options field in the dialog 
13095 \family sans
13096 Document\SpecialChar \menuseparator
13097 Settings
13098 \family default
13099 ).
13100  They make a clearer modification of page margins possible as do the options
13101  of the dialog 
13102 \family sans
13103 Document\SpecialChar \menuseparator
13104 Settings
13105 \family default
13106 .
13107  
13108 \end_layout
13109
13110 \begin_layout Itemize
13111 The LaTeX document classes of the Koma-Script family define a number of
13112  additional commands.
13113  Those part of it which makes sense in LyX is implemented in corresponding
13114  paragraph types.
13115 \end_layout
13116
13117 \begin_layout Standard
13118 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13119  can be found in the Koma-Script documentation 
13120 \emph on
13121 scrguide
13122 \emph default
13123  (German) and 
13124 \emph on
13125 scrguien
13126 \emph default
13127  (English).
13128 \end_layout
13129
13130 \begin_layout Subsection
13131 article (koma-script), report (koma-script), and book (koma-script)
13132 \end_layout
13133
13134 \begin_layout Standard
13135 The document classes 
13136 \emph on
13137 article (koma-script)
13138 \emph default
13139
13140 \emph on
13141 report (koma-script)
13142 \emph default
13143 , and 
13144 \emph on
13145 book
13146 \emph default
13147  
13148 \emph on
13149 (koma-script)
13150 \emph default
13151  are implemented in the layout files 
13152 \family typewriter
13153 scrartcl.layout
13154 \family default
13155
13156 \family typewriter
13157 scrreprt.layout
13158 \family default
13159 , and 
13160 \family typewriter
13161 scrbook.layout
13162 \family default
13163 , resp.
13164  They contain all the paragraph types of the corresponding standard document
13165  classes 
13166 \emph on
13167 article
13168 \emph default
13169
13170 \emph on
13171 report
13172 \emph default
13173 , and 
13174 \emph on
13175 book
13176 \emph default
13177 , resp., partly modified, with the exception of the LyX specific 
13178 \family sans
13179 List
13180 \family default
13181 -type, which is replaced by the new 
13182 \family sans
13183 Labeling
13184 \family default
13185 -type having the same functionality.
13186  Beside the 
13187 \family sans
13188 Labeling
13189 \family default
13190 -Type there is a number of new paragraph types added.
13191  They are 
13192 \emph on
13193 not
13194 \emph default
13195  part of 
13196 \emph on
13197 letter (koma-script)
13198 \emph default
13199 .
13200 \end_layout
13201
13202 \begin_layout Itemize
13203
13204 \family sans
13205 Addpart, Addchap
13206 \family default
13207
13208 \family sans
13209 Addsec
13210 \family default
13211 : are equivalents to 
13212 \family sans
13213 Part*, Chapter*
13214 \family default
13215  and 
13216 \family sans
13217 Section*
13218 \family default
13219 , resp., additionally inserting an entry in the table of contents.
13220  
13221 \family sans
13222 Addpart
13223 \family default
13224  and 
13225 \family sans
13226 Addchap
13227 \family default
13228  are not contained in 
13229 \emph on
13230 article (koma-script)
13231 \emph default
13232 .
13233 \end_layout
13234
13235 \begin_layout Itemize
13236
13237 \family sans
13238 Addchap*
13239 \family default
13240
13241 \family sans
13242 Addsec*
13243 \family default
13244 : behave exactly as 
13245 \family sans
13246 Addchap
13247 \family default
13248  and 
13249 \family sans
13250 Addsec
13251 \family default
13252 , resp., additionally clearing running heads.
13253  
13254 \family sans
13255 Addchap*
13256 \family default
13257  is not contained in 
13258 \emph on
13259 article (koma-script)
13260 \emph default
13261 .
13262 \begin_inset Foot
13263 status collapsed
13264
13265 \begin_layout Plain Layout
13266 There is also an 
13267 \family typewriter
13268
13269 \backslash
13270 addpart*
13271 \family default
13272  command in 
13273 \emph on
13274 book (koma-script)
13275 \emph default
13276  and in 
13277 \emph on
13278 report (koma-script)
13279 \emph default
13280 , but since this is identical to 
13281 \family sans
13282 Part*
13283 \family default
13284 , is has not been implemented in LyX.
13285 \end_layout
13286
13287 \end_inset
13288
13289
13290 \end_layout
13291
13292 \begin_layout Itemize
13293
13294 \family sans
13295 Minisec
13296 \family default
13297 : generates a heading directly above the following paragraph in the standard
13298  character size without affecting the structure of the document.
13299 \end_layout
13300
13301 \begin_layout Itemize
13302
13303 \family sans
13304 Captionabove
13305 \family default
13306  and 
13307 \family sans
13308 Captionbelow
13309 \family default
13310  are special captions which respect the different space settings needed
13311  for captions placed above or below an element (if you follow strict typographic
13312  rules, you might want to place table captions always above the table).
13313  You can also use the class option 
13314 \family typewriter
13315 tablecaptionsabove
13316 \family default
13317 , which will switch 
13318 \family sans
13319 caption
13320 \family default
13321  to 
13322 \family sans
13323 captionabove
13324 \family default
13325  for tables and 
13326 \family sans
13327 captionbelow
13328 \family default
13329  for figures.
13330  You need at least Koma-Script version 2.8q to use this.
13331 \end_layout
13332
13333 \begin_layout Itemize
13334
13335 \family sans
13336 Dictum
13337 \family default
13338 : can be used to set a bonmot, e.
13339 \begin_inset space \thinspace{}
13340 \end_inset
13341
13342 g.
13343 \begin_inset space \space{}
13344 \end_inset
13345
13346 at the beginning of a chapter.
13347  If you use the optional argument (
13348 \family sans
13349 Insert\SpecialChar \menuseparator
13350 Short
13351 \begin_inset space ~
13352 \end_inset
13353
13354 Title
13355 \family default
13356 ), you can insert the dictum's author there.
13357  Dictum and author are separated by a line.
13358  You need at least Koma-Script version 2.8q to use this.
13359  
13360 \family sans
13361 Dictum
13362 \family default
13363  is not contained in 
13364 \emph on
13365 article (koma-script)
13366 \emph default
13367 .
13368 \end_layout
13369
13370 \begin_layout Standard
13371 The following types, together with the standard types 
13372 \family sans
13373 Title
13374 \family default
13375
13376 \family sans
13377 Author
13378 \family default
13379 , and 
13380 \family sans
13381 Date
13382 \family default
13383 , form the title area of the document.
13384  They must be entered ahead of the first 
13385 \begin_inset Quotes eld
13386 \end_inset
13387
13388 ordinary
13389 \begin_inset Quotes erd
13390 \end_inset
13391
13392  paragraph.
13393 \begin_inset Foot
13394 status collapsed
13395
13396 \begin_layout Plain Layout
13397 The corresponding LaTeX commands must appear before the 
13398 \family typewriter
13399
13400 \backslash
13401 maketitle
13402 \family default
13403  command.
13404 \end_layout
13405
13406 \end_inset
13407
13408  When such a type is used more than once, the latter usage overwrites the
13409  former one, that means, for every type only the latest usage is valid.
13410  The order of the different types however has, like 
13411 \family sans
13412 Title
13413 \family default
13414
13415 \family sans
13416 Author
13417 \family default
13418 , and 
13419 \family sans
13420 Date
13421 \family default
13422 , no effect on the appearance of the produced document.
13423 \end_layout
13424
13425 \begin_layout Itemize
13426
13427 \family sans
13428 Subject
13429 \family default
13430 : produces a centered paragraph above the ordinary title (
13431 \family sans
13432 Title
13433 \family default
13434
13435 \family sans
13436 Author
13437 \family default
13438
13439 \family sans
13440 Date
13441 \family default
13442 ) for the subject of the document.
13443 \end_layout
13444
13445 \begin_layout Itemize
13446
13447 \family sans
13448 Publishers
13449 \family default
13450 : produces a centered paragraph below the ordinary title (
13451 \family sans
13452 Title
13453 \family default
13454
13455 \family sans
13456 Author
13457 \family default
13458
13459 \family sans
13460 Date
13461 \family default
13462 ) for the publishers' name.
13463 \end_layout
13464
13465 \begin_layout Itemize
13466
13467 \family sans
13468 Dedication
13469 \family default
13470 : in 
13471 \emph on
13472 report (koma-script)
13473 \emph default
13474  and 
13475 \emph on
13476 book (koma-script)
13477 \emph default
13478  produces a centered paragraph on its own page behind the title page, or
13479  in 
13480 \emph on
13481 article (koma-script)
13482 \emph default
13483  produces a centered paragraph below the ordinary title (
13484 \family sans
13485 Title
13486 \family default
13487
13488 \family sans
13489 Author
13490 \family default
13491
13492 \family sans
13493 Date
13494 \family default
13495
13496 \family sans
13497 Publishers
13498 \family default
13499 ) for a dedication.
13500 \end_layout
13501
13502 \begin_layout Itemize
13503
13504 \family sans
13505 Titlehead
13506 \family default
13507 : produces a left aligned paragraph above the ordinary title (
13508 \family sans
13509 Title
13510 \family default
13511
13512 \family sans
13513 Author
13514 \family default
13515
13516 \family sans
13517 Date
13518 \family default
13519
13520 \family sans
13521 Subject
13522 \family default
13523 ) for a document`s head.
13524 \end_layout
13525
13526 \begin_layout Itemize
13527
13528 \family sans
13529 Uppertitleback
13530 \family default
13531 : produces in a double-sided print in 
13532 \emph on
13533 report (koma-script)
13534 \emph default
13535  and 
13536 \emph on
13537 book (koma-script)
13538 \emph default
13539  a left-aligned paragraph at the top of the title page`s back or has no
13540  effect in a single-sided print or in 
13541 \emph on
13542 article (koma-script)
13543 \emph default
13544 .
13545 \end_layout
13546
13547 \begin_layout Itemize
13548
13549 \family sans
13550 Lowertitleback
13551 \family default
13552 : produces in a double-sided print in 
13553 \emph on
13554 report (koma-script)
13555 \emph default
13556  and 
13557 \emph on
13558 book (koma-script)
13559 \emph default
13560  a left-aligned paragraph at the bottom of the title page`s back or has
13561  no effect in a single-sided print or in 
13562 \emph on
13563 article (koma-script)
13564 \emph default
13565 .
13566 \end_layout
13567
13568 \begin_layout Itemize
13569
13570 \family sans
13571 Extratitle
13572 \family default
13573 : produces a special 
13574 \begin_inset Quotes eld
13575 \end_inset
13576
13577 dirty
13578 \begin_inset Quotes erd
13579 \end_inset
13580
13581  page ahead of the actual document containing a paragraph without special
13582  formatting.
13583 \end_layout
13584
13585 \begin_layout Standard
13586 The layout files for the document classes 
13587 \emph on
13588 article (koma-script)
13589 \emph default
13590
13591 \emph on
13592 report (koma-script)
13593 \emph default
13594 , and 
13595 \emph on
13596 book (koma-script)
13597 \emph default
13598  do include the file 
13599 \family typewriter
13600 scrmacros.inc
13601 \family default
13602 .
13603  This is thought of as a place to define your own types.
13604  Copy scrmacros
13605 \family typewriter
13606 .inc
13607 \family default
13608  in your personal layout directory and edit the file!
13609 \end_layout
13610
13611 \begin_layout Subsection
13612 letter (koma-script)
13613 \end_layout
13614
13615 \begin_layout Standard
13616 \noindent
13617 The document class 
13618 \emph on
13619 letter (koma-script)
13620 \emph default
13621  is implemented in the layout file 
13622 \family typewriter
13623 scrlettr.layout
13624 \family default
13625 .
13626  It contains all the paragraph types of the corresponding standard document
13627  class 
13628 \emph on
13629 letter
13630 \emph default
13631 , partly modified, with the exception of the LyX specific types 
13632 \family sans
13633 LyX-Code
13634 \family default
13635  and 
13636 \family sans
13637 Comment
13638 \family default
13639  and the 
13640 \family sans
13641 List
13642 \family default
13643  type, which is replaced by the new 
13644 \family sans
13645 Labeling
13646 \family default
13647  type.
13648  In addition, it contains, in contrast to the standard document class, the
13649  standard types 
13650 \family sans
13651 LaTeX
13652 \family default
13653
13654 \family sans
13655 Quotation
13656 \family default
13657
13658 \family sans
13659 Quote
13660 \family default
13661 , and 
13662 \family sans
13663 Verse
13664 \family default
13665 .
13666  Furthermore, there are a number of new letter specific types.
13667 \end_layout
13668
13669 \begin_layout Standard
13670 The appearance of the letter produced by this document class can be controlled
13671  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13672 \begin_inset Foot
13673 status collapsed
13674
13675 \begin_layout Plain Layout
13676 For example, the standard appearance of the letter`s heading, consisting
13677  of name and address, is quite self-willed.
13678  An 
13679 \begin_inset Quotes eld
13680 \end_inset
13681
13682 ordinary
13683 \begin_inset Quotes erd
13684 \end_inset
13685
13686  heading is produced by the following LaTeX commands in the preamble:
13687 \end_layout
13688
13689 \begin_layout LyX-Code
13690
13691 \backslash
13692 firsthead{
13693 \backslash
13694 parbox[b]{
13695 \backslash
13696 textwidth}
13697 \end_layout
13698
13699 \begin_layout LyX-Code
13700   {
13701 \backslash
13702 ignorespaces 
13703 \backslash
13704 fromname
13705 \backslash
13706
13707 \backslash
13708  
13709 \backslash
13710 ignorespaces 
13711 \backslash
13712 fromaddress}} 
13713 \end_layout
13714
13715 \begin_layout LyX-Code
13716
13717 \backslash
13718 nexthead{
13719 \backslash
13720 parbox[b]{
13721 \backslash
13722 textwidth}
13723 \end_layout
13724
13725 \begin_layout LyX-Code
13726   {
13727 \backslash
13728 ignorespaces 
13729 \backslash
13730 fromname 
13731 \backslash
13732 hfill 
13733 \backslash
13734 ignorespaces 
13735 \backslash
13736 pagename
13737 \backslash
13738  
13739 \backslash
13740 thepage}}
13741 \end_layout
13742
13743 \end_inset
13744
13745  A detailed German description of such LaTeX commands can be found in the
13746  Koma-Script documentation 
13747 \emph on
13748 scrguide
13749 \emph default
13750 .
13751  With it, the letter's author can produce his personal letter layout.
13752 \end_layout
13753
13754 \begin_layout Standard
13755 The types 
13756 \family sans
13757 Letter
13758 \family default
13759  and 
13760 \family sans
13761 Opening
13762 \family default
13763  define the beginning of the letter and must be used in every letter.
13764  To emphasize them in the LyX document class, they are marked with the letter
13765  
13766 \shape italic
13767 L
13768 \shape default
13769  or 
13770 \shape italic
13771 O
13772 \shape default
13773 , resp.
13774 \begin_inset space ~
13775 \end_inset
13776
13777 in the left margin.
13778  It is possible to write any number of letters in one file.
13779  An 
13780 \family sans
13781 Opening
13782 \family default
13783  type produces a new letter using the same addressee and a 
13784 \family sans
13785 Letter
13786 \family default
13787  type produces a new addressee.
13788  The types 
13789 \family sans
13790 Closing
13791 \family default
13792
13793 \family sans
13794 PS
13795 \family default
13796
13797 \family sans
13798 CC
13799 \family default
13800 , and 
13801 \family sans
13802 Encl
13803 \family default
13804  are ordinary paragraph types and can also be used several times in one
13805  and the same letter.
13806 \end_layout
13807
13808 \begin_layout Itemize
13809
13810 \family sans
13811 Letter
13812 \family default
13813 : produces a paragraph for the addressee and implicitly defines the beginning
13814  of the letter.
13815 \end_layout
13816
13817 \begin_layout Itemize
13818
13819 \family sans
13820 Opening
13821 \family default
13822 : produces a paragraph for the form of address and implicitly produces a
13823  new letter.
13824 \end_layout
13825
13826 \begin_layout Itemize
13827
13828 \family sans
13829 Closing
13830 \family default
13831 : produces a paragraph for a close.
13832 \end_layout
13833
13834 \begin_layout Itemize
13835
13836 \family sans
13837 PS
13838 \family default
13839 : produces a paragraph for a postscript.
13840 \end_layout
13841
13842 \begin_layout Itemize
13843
13844 \family sans
13845 CC
13846 \family default
13847 : produces a paragraph for a distribution list.
13848 \end_layout
13849
13850 \begin_layout Itemize
13851
13852 \family sans
13853 Encl
13854 \family default
13855 : produces a paragraph for enclosures.
13856 \end_layout
13857
13858 \begin_layout Standard
13859 The types 
13860 \family sans
13861 Name
13862 \family default
13863
13864 \family sans
13865 Signature
13866 \family default
13867
13868 \family sans
13869 Address
13870 \family default
13871
13872 \family sans
13873 Telephone
13874 \family default
13875
13876 \family sans
13877 Place
13878 \family default
13879
13880 \family sans
13881 Backaddress
13882 \family default
13883
13884 \family sans
13885 Specialmail
13886 \family default
13887
13888 \family sans
13889 Location
13890 \family default
13891
13892 \family sans
13893 Title
13894 \family default
13895 , and 
13896 \family sans
13897 Subject
13898 \family default
13899  are input types provided with a label to enter information, which will
13900  be processed by the document class.
13901 \begin_inset Foot
13902 status open
13903
13904 \begin_layout Plain Layout
13905 It could be seen as a matter of inconsequence, that the types 
13906 \family sans
13907 Letter
13908 \family default
13909  and 
13910 \family sans
13911 Opening
13912 \family default
13913  described above are not such input types as well.
13914  Because of the special meaning of those types, however, I have implemented
13915  them as ordinary paragraph types with a one letter mark in the left margin.
13916  Moreover, it would affect my feeling of symmetry, if the 
13917 \family sans
13918 Opening
13919 \family default
13920  type and the 
13921 \family sans
13922 Closing
13923 \family default
13924  type had such a serious different appearance.
13925 \end_layout
13926
13927 \end_inset
13928
13929  The types must be used ahead of the corresponding 
13930 \family sans
13931 Opening
13932 \family default
13933  type.
13934 \end_layout
13935
13936 \begin_layout Standard
13937 An implementation of these types in a WYSIWYG fashion does not seem to make
13938  sense, because the real appearance of the produced letter does not only
13939  depend on the usage of the particular type, but also on other factors.
13940  For example, a signature entered in the 
13941 \family sans
13942 Signature
13943 \family default
13944  type will in the standard behavior appear in the produced letter only,
13945  when in the same letter also a 
13946 \family sans
13947 Closing
13948 \family default
13949  type is used.
13950  The entered value of the 
13951 \family sans
13952 Telephone
13953 \family default
13954  type will in the standard behavior not appear in the produced letter at
13955  all.
13956  The possibility to design the letter`s heading freely is already indicated
13957  in a footnote above.
13958 \end_layout
13959
13960 \begin_layout Standard
13961 The input types can also be used as empty paragraphs.
13962  This makes sense e.
13963 \begin_inset space \thinspace{}
13964 \end_inset
13965
13966 g.
13967 \begin_inset space \space{}
13968 \end_inset
13969
13970 for the 
13971 \family sans
13972 Signature
13973 \family default
13974  type.
13975  If the 
13976 \family sans
13977 Signature
13978 \family default
13979  type is not used at all, in the standard behavior the value of the 
13980 \family sans
13981 Name
13982 \family default
13983  type is used as signature, whereas if an empty 
13984 \family sans
13985 Signature
13986 \family default
13987  type is used, no signature value is defined.
13988 \end_layout
13989
13990 \begin_layout Standard
13991 By using the input types it is possible to write a letter template, containing
13992  filled input types with your personal dates (name, address, etc.) and empty
13993  input types for other dates you want to enter.
13994 \end_layout
13995
13996 \begin_layout Itemize
13997
13998 \family sans
13999 Name
14000 \family default
14001 : sender's name, in the standard behavior appears as a centered paragraph
14002  in small caps in the letter`s heading.
14003 \end_layout
14004
14005 \begin_layout Itemize
14006
14007 \family sans
14008 Signature
14009 \family default
14010 : sender's signature, in the standard behavior appears below the 
14011 \family sans
14012 Closing
14013 \family default
14014  type.
14015  If no 
14016 \family sans
14017 Signature
14018 \family default
14019  type is used, the value of the 
14020 \family sans
14021 Name
14022 \family default
14023  type appears instead.
14024 \end_layout
14025
14026 \begin_layout Itemize
14027
14028 \family sans
14029 Address
14030 \family default
14031 : sender's address, in the standard behavior appears in a centered paragraph
14032  in the letter`s heading below the sender's name.
14033 \end_layout
14034
14035 \begin_layout Itemize
14036
14037 \family sans
14038 Telephone
14039 \family default
14040 : sender's telephone number, in the standard behavior only sets the LaTeX
14041  variable 
14042 \family typewriter
14043
14044 \backslash
14045 telephonenum
14046 \family default
14047 .
14048 \end_layout
14049
14050 \begin_layout Itemize
14051
14052 \family sans
14053 Place
14054 \family default
14055 : place of the letter`s making.
14056 \end_layout
14057
14058 \begin_layout Itemize
14059
14060 \family sans
14061 Date
14062 \family default
14063 : date of the letter`s making.
14064  
14065 \family sans
14066 Place
14067 \family default
14068  and 
14069 \family sans
14070 Date
14071 \family default
14072 , in the standard behavior, produce the place and the date in a right-aligned
14073  line below the addressee's field.
14074  If an empty 
14075 \family sans
14076 Date
14077 \family default
14078  type is used, neither place nor date appear, independent of the value of
14079  the 
14080 \family sans
14081 Place
14082 \family default
14083  type.
14084  If no 
14085 \family sans
14086 Date
14087 \family default
14088  type is used, the date of the letter `s production is used.
14089 \end_layout
14090
14091 \begin_layout Itemize
14092
14093 \family sans
14094 Backaddress
14095 \family default
14096 : sender`s back address, in the standard behavior appears above the addressee's
14097  field in a small sans serif font.
14098 \end_layout
14099
14100 \begin_layout Itemize
14101
14102 \family sans
14103 Specialmail
14104 \family default
14105 : special mail information, in the standard behavior appears underlined
14106  above the addressee's field below the back address.
14107 \end_layout
14108
14109 \begin_layout Itemize
14110
14111 \family sans
14112 Location
14113 \family default
14114 : additional information, in the standard behavior appears on right side
14115  below the addressee`s field.
14116 \end_layout
14117
14118 \begin_layout Itemize
14119
14120 \family sans
14121 Title
14122 \family default
14123 : the letter's title, in the standard behavior appears in a big, bold, sans
14124  serif font above the subject.
14125 \end_layout
14126
14127 \begin_layout Itemize
14128
14129 \family sans
14130 Subject
14131 \family default
14132 : the letter's subject, in the standard behavior appears in a bold font
14133  above the 
14134 \family sans
14135 Opening
14136 \family default
14137  paragraph.
14138 \end_layout
14139
14140 \begin_layout Standard
14141 The types 
14142 \family sans
14143 Yourref
14144 \family default
14145
14146 \family sans
14147 Yourmail
14148 \family default
14149
14150 \family sans
14151 Myref
14152 \family default
14153
14154 \family sans
14155 Customer
14156 \family default
14157 , and 
14158 \family sans
14159 Invoice
14160 \family default
14161  produce a business letter like line above the 
14162 \family sans
14163 Title
14164 \family default
14165  line containing the fields 
14166 \begin_inset Quotes eld
14167 \end_inset
14168
14169 Your ref.
14170 \begin_inset Quotes erd
14171 \end_inset
14172
14173
14174 \begin_inset Quotes eld
14175 \end_inset
14176
14177 Your letter of
14178 \begin_inset Quotes erd
14179 \end_inset
14180
14181
14182 \begin_inset Quotes eld
14183 \end_inset
14184
14185 Our ref.
14186 \begin_inset Quotes erd
14187 \end_inset
14188
14189
14190 \begin_inset Quotes eld
14191 \end_inset
14192
14193 Customer no.
14194 \begin_inset Quotes erd
14195 \end_inset
14196
14197
14198 \begin_inset Quotes eld
14199 \end_inset
14200
14201 Invoice no.
14202 \begin_inset Quotes erd
14203 \end_inset
14204
14205 , and 
14206 \begin_inset Quotes eld
14207 \end_inset
14208
14209 Date
14210 \begin_inset Quotes erd
14211 \end_inset
14212
14213 .
14214  For the date field, the value of the 
14215 \family sans
14216 Date
14217 \family default
14218  type is used.
14219  If one of these 
14220 \begin_inset Quotes eld
14221 \end_inset
14222
14223 business letter types
14224 \begin_inset Quotes erd
14225 \end_inset
14226
14227  is used, the value of the 
14228 \family sans
14229 Place
14230 \family default
14231  type however does not appear, but only the LaTeX variable 
14232 \family typewriter
14233
14234 \backslash
14235 fromplace
14236 \family default
14237  is set.
14238  The ordinary output of place and date in a right-aligned line below the
14239  addressee`s field is suppressed.
14240  The types are implemented as input types provided with a label and must
14241  be used ahead of the corresponding 
14242 \family sans
14243 Opening
14244 \family default
14245  type.
14246 \end_layout
14247
14248 \begin_layout Itemize
14249
14250 \family sans
14251 Yourref
14252 \family default
14253 : Your ref.
14254 \end_layout
14255
14256 \begin_layout Itemize
14257
14258 \family sans
14259 Yourmail
14260 \family default
14261 : Your letter of.
14262 \end_layout
14263
14264 \begin_layout Itemize
14265
14266 \family sans
14267 Myref
14268 \family default
14269 : Our ref.
14270 \end_layout
14271
14272 \begin_layout Itemize
14273
14274 \family sans
14275 Customer
14276 \family default
14277 : Customer no.
14278 \end_layout
14279
14280 \begin_layout Itemize
14281
14282 \family sans
14283 Invoice
14284 \family default
14285 : Invoice no.
14286 \end_layout
14287
14288 \begin_layout Subsection
14289 The new letter class: letter (koma-script v.2)
14290 \end_layout
14291
14292 \begin_layout Standard
14293 by 
14294 \noun on
14295 Jürgen Spitzmüller
14296 \end_layout
14297
14298 \begin_layout Standard
14299 \begin_inset VSpace medskip
14300 \end_inset
14301
14302
14303 \end_layout
14304
14305 \begin_layout Standard
14306 \noindent
14307 Koma-Script version 2.8 has introduced a new letter class 
14308 \family typewriter
14309 scrlttr2
14310 \family default
14311  which supersedes the now unsupported 
14312 \family typewriter
14313 scrlettr
14314 \family default
14315 .
14316  It has — on the LaTeX side — a completely new interface and is not compatible
14317  with the old class.
14318  Therefore, LyX supports both, though it is recommended you use the new
14319  class.
14320 \end_layout
14321
14322 \begin_layout Standard
14323 This class covers the same functionality as 
14324 \emph on
14325 letter (koma-script),
14326 \emph default
14327  and a few more.
14328  The basic items are 
14329 \family sans
14330 Address
14331 \family default
14332  (receiver's address, same as 
14333 \family sans
14334 Letter
14335 \family default
14336  in the old layout), 
14337 \family sans
14338 Opening
14339 \family default
14340 , and 
14341 \family sans
14342 Closing
14343 \family default
14344 .
14345  
14346 \family sans
14347 NextAddress
14348 \family default
14349  will start a new letter (i.
14350 \begin_inset space \thinspace{}
14351 \end_inset
14352
14353 g.
14354 \begin_inset space \space{}
14355 \end_inset
14356
14357 you can write several letters per document).
14358  New elements are sender's 
14359 \family sans
14360 E-Mail
14361 \family default
14362
14363 \family sans
14364 URL
14365 \family default
14366
14367 \family sans
14368 Fax
14369 \family default
14370
14371 \family sans
14372 Bank
14373 \family default
14374  and the possibility to use a 
14375 \family sans
14376 Logo
14377 \family default
14378  (via 
14379 \family sans
14380 Insert\SpecialChar \menuseparator
14381 Graphics
14382 \family default
14383 ) in the header.
14384 \end_layout
14385
14386 \begin_layout Standard
14387 The biggest improvement is, though, that the letter's layout is configurable
14388  to meet almost any needs.
14389  This can be done via the preamble or with a special style file (Letter
14390  Class Option, extension 
14391 \family typewriter
14392 *.lco
14393 \family default
14394 ), that will be read in as a class option.
14395 \begin_inset Foot
14396 status collapsed
14397
14398 \begin_layout Plain Layout
14399 The KOMA package comes with some default 
14400 \family typewriter
14401 *.lco
14402 \family default
14403  files.
14404  There is, for instance, a 
14405 \family typewriter
14406 DIN.lco
14407 \family default
14408  file that follows german typesetting rules, or a 
14409 \family typewriter
14410 KOMAold.lco
14411 \family default
14412  that provides the default layout of the old 
14413 \family typewriter
14414 scrlettr
14415 \family default
14416  class.
14417  The latter can be loaded with the class option 
14418 \family typewriter
14419 KOMAold
14420 \family default
14421 , inserted via the 
14422 \family sans
14423 \bar under
14424 L
14425 \bar default
14426 ayout\SpecialChar \menuseparator
14427
14428 \bar under
14429 D
14430 \bar default
14431 ocument\SpecialChar \menuseparator
14432 Extra Options
14433 \family default
14434  field.
14435 \end_layout
14436
14437 \end_inset
14438
14439  Have a look at the 
14440 \emph on
14441 koma-letter2
14442 \emph default
14443  template that is included in LyX for examples.
14444  A detailed description is to be found in the Koma-Script documentation
14445  (
14446 \emph on
14447 scrguide
14448 \emph default
14449 ).
14450 \end_layout
14451
14452 \begin_layout Subsection
14453 Problems
14454 \end_layout
14455
14456 \begin_layout Standard
14457 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14458  some problems.
14459 \end_layout
14460
14461 \begin_layout Itemize
14462 The chapter number of a 
14463 \family sans
14464 Chapter
14465 \family default
14466  type appears on a line of its own above the chapter heading instead of
14467  appearing in the same line ahead of it.
14468  The cause for that is the LyX internal behavior for the labeltype 
14469 \family sans
14470 Counter_Chapter
14471 \family default
14472  in the layout file.
14473 \end_layout
14474
14475 \begin_layout Itemize
14476 The headings of the types 
14477 \family sans
14478 Addchap
14479 \family default
14480  and 
14481 \family sans
14482 Addsec
14483 \family default
14484  are only put in the 
14485 \begin_inset Quotes eld
14486 \end_inset
14487
14488 true
14489 \begin_inset Quotes erd
14490 \end_inset
14491
14492  LaTeX table of contents, but not in the LyX table of contents (
14493 \family sans
14494 Document\SpecialChar \menuseparator
14495 Table
14496 \begin_inset space ~
14497 \end_inset
14498
14499 of
14500 \begin_inset space ~
14501 \end_inset
14502
14503 Contents
14504 \family default
14505 ).
14506 \end_layout
14507
14508 \begin_layout Itemize
14509 The paragraphs in a 
14510 \emph on
14511 letter
14512 \emph default
14513  document class appear in a skip separation mode, not indented.
14514  This is the standard behavior, no special LaTeX commands are needed for
14515  that.
14516  But in the 
14517 \family sans
14518 Document\SpecialChar \menuseparator
14519 Settings
14520 \family default
14521  dialog the corresponding radio button indicates 
14522 \family sans
14523 Indent
14524 \family default
14525 .
14526  A 
14527 \family sans
14528 Skip
14529 \family default
14530  value always has the effect that extra LaTeX commands are inserted in the
14531  document to produce the gap, which is not what is wanted in this case.
14532 \end_layout
14533
14534 \begin_layout Section
14535 Memoir
14536 \end_layout
14537
14538 \begin_layout Standard
14539 By 
14540 \noun on
14541 Jürgen Spitzmüller
14542 \end_layout
14543
14544 \begin_layout Subsection
14545 Overview
14546 \end_layout
14547
14548 \begin_layout Standard
14549 Memoir is a very powerful and constantly evolving class.
14550  It has been designed with regard to fictional and non-fictional literature.
14551  Its aim is to let the user have maximum control over the typesetting of
14552  his document.
14553  Memoir is based on the standard book class, but it can also emulate the
14554  article class (see below).
14555 \end_layout
14556
14557 \begin_layout Standard
14558 Peter Wilson, the developer of Memoir, is known as the author of lots of
14559  useful packages in the LaTeX world.
14560  Most of them have been merged with Memoir.
14561  Therefore, it is much easier to layout the table of contents, appendices,
14562  chapter designs and such.
14563  LyX, though, does not support all of these goodies natively.
14564  Some of them might be added to forthcoming releases
14565 \begin_inset Foot
14566 status collapsed
14567
14568 \begin_layout Plain Layout
14569 You are invited to send suggestions to 
14570 \begin_inset Flex URL
14571 status collapsed
14572
14573 \begin_layout Plain Layout
14574
14575 lyx-devel@lists.lyx.org
14576 \end_layout
14577
14578 \end_inset
14579
14580 .
14581 \end_layout
14582
14583 \end_inset
14584
14585 , lots will probably never, due to the limitations of LyX's framework.
14586  Of course you can still use all features with the help of some native LaTeX
14587  commands (TeX code
14588 \begin_inset Foot
14589 status collapsed
14590
14591 \begin_layout Plain Layout
14592 Cf.
14593 \begin_inset ERT
14594 status collapsed
14595
14596 \begin_layout Plain Layout
14597
14598
14599 \backslash
14600  
14601 \end_layout
14602
14603 \end_inset
14604
14605 section
14606 \begin_inset space ~
14607 \end_inset
14608
14609
14610 \begin_inset CommandInset ref
14611 LatexCommand ref
14612 reference "sec:Inserting-TeX-Code"
14613
14614 \end_inset
14615
14616  for details.
14617 \end_layout
14618
14619 \end_inset
14620
14621 ).
14622  In this section, we can only list those features which are natively supported
14623  by LyX.
14624  For detailed descriptions (and for the rest of features) we recommend you
14625  have a look at the detailed manual of the Memoir class
14626 \begin_inset Foot
14627 status collapsed
14628
14629 \begin_layout Plain Layout
14630 Cf.
14631 \begin_inset ERT
14632 status collapsed
14633
14634 \begin_layout Plain Layout
14635
14636
14637 \backslash
14638  
14639 \end_layout
14640
14641 \end_inset
14642
14643
14644 \begin_inset Flex URL
14645 status collapsed
14646
14647 \begin_layout Plain Layout
14648
14649 CTAN:/macros/latex/memoir/memman.pdf
14650 \end_layout
14651
14652 \end_inset
14653
14654 .
14655 \end_layout
14656
14657 \end_inset
14658
14659 , which is not only a user guide for the class, but also both a comprehensive
14660  description on good typesetting and a superb example for good typesetting
14661  itself.
14662 \end_layout
14663
14664 \begin_layout Subsection
14665 Basic features and restrictions
14666 \end_layout
14667
14668 \begin_layout Standard
14669 Memoir supports basically all features of the standard book classes.
14670  There are, however, some differences, as follows:
14671 \end_layout
14672
14673 \begin_layout Description
14674 Font
14675 \begin_inset space ~
14676 \end_inset
14677
14678 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14679 \end_layout
14680
14681 \begin_layout Description
14682 Page
14683 \begin_inset space ~
14684 \end_inset
14685
14686 style: The fancy page style is not supported, due to a command clash between
14687  Memoir and the fancyhdr package (they both define a command with the same
14688  name, which confuses LaTeX).
14689  Instead, Memoir comes with a number of its own page styles (see 
14690 \family sans
14691 Layout\SpecialChar \menuseparator
14692 Document\SpecialChar \menuseparator
14693 Page
14694 \begin_inset space ~
14695 \end_inset
14696
14697 Style
14698 \family default
14699 ).
14700  If you want to use these for the chapter pages, you have to use the command
14701  
14702 \family typewriter
14703
14704 \backslash
14705 chapterstyle
14706 \family default
14707  in the main text or in preamble (e.
14708 \begin_inset space \thinspace{}
14709 \end_inset
14710
14711 g.
14712 \begin_inset space \space{}
14713 \end_inset
14714
14715
14716 \family typewriter
14717
14718 \backslash
14719 chapterstyle{companion}
14720 \family default
14721 ).
14722 \end_layout
14723
14724 \begin_layout Description
14725 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14726  optional argument in the standard classes.
14727  With this, you can specify an alternative version of the title for the
14728  table of contents and the headers (for instance, if the title is too long).
14729  In LyX, you can do this via 
14730 \family sans
14731 Insert\SpecialChar \menuseparator
14732 Short
14733 \begin_inset space ~
14734 \end_inset
14735
14736 Title
14737 \family default
14738  at the beginning of a chapter/section.
14739  Memoir features a second optional argument and thus separates the table
14740  of contents from the header.
14741  You can define three variants of a title with this: one for the main text,
14742  one for the table of contents, and one for the headers.
14743  Simply insert two optional arguments if you need this feature, the first
14744  one containing the short title for the Table of Contents, the second one
14745  containing an alternative short title for the headers.
14746 \end_layout
14747
14748 \begin_layout Description
14749 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14750  of contents, the list of figures and the list of table start a new page
14751  automatically.
14752  Memoir does not follow this route.
14753  You have to insert a page break yourself, if you want to have one.
14754 \end_layout
14755
14756 \begin_layout Description
14757 Titlepage: For some unknown reason, Memoir uses pagination on the title
14758  page (in the standard classes, title pages are 
14759 \begin_inset Quotes eld
14760 \end_inset
14761
14762 empty
14763 \begin_inset Quotes erd
14764 \end_inset
14765
14766 , i.
14767 \begin_inset space \thinspace{}
14768 \end_inset
14769
14770 g.
14771 \begin_inset space \space{}
14772 \end_inset
14773
14774 without pagina).
14775  If you want an empty title page, type 
14776 \family typewriter
14777
14778 \backslash
14779 aliaspagestyle{title}{empty}
14780 \family default
14781  in the preamble.
14782 \end_layout
14783
14784 \begin_layout Description
14785 Article: With the class option 
14786 \emph on
14787 article
14788 \emph default
14789  (to be inserted in 
14790 \family sans
14791 Layout\SpecialChar \menuseparator
14792 Document\SpecialChar \menuseparator
14793 Extra
14794 \begin_inset space ~
14795 \end_inset
14796
14797 Options
14798 \family default
14799 ), you can emulate article style.
14800  That is, counters (footnotes, figures, tables etc.) will not be reset on
14801  new chapters, chapters don't start a new page (but are—in contrary to 
14802 \begin_inset Quotes eld
14803 \end_inset
14804
14805 real
14806 \begin_inset Quotes erd
14807 \end_inset
14808
14809  article classes—still allowed), parts, though, use their own page, as in
14810  book.
14811 \end_layout
14812
14813 \begin_layout Description
14814 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14815  font commands, which have been used in the old LaTeX version 2.09 (e.
14816 \begin_inset space \thinspace{}
14817 \end_inset
14818
14819 g.
14820 \begin_inset space \space{}
14821 \end_inset
14822
14823
14824 \family typewriter
14825
14826 \backslash
14827 rm
14828 \family default
14829
14830 \family typewriter
14831
14832 \backslash
14833 it
14834 \family default
14835 ).
14836  It produces an error and stops LaTeX whenever such a command appears.
14837  The class option 
14838 \emph on
14839 oldfontcommands
14840 \emph default
14841  reallows the commands and spits out warnings instead (which does at least
14842  not stop LaTeX).
14843  Since a lot of packages and particularly BibTeX style files are still using
14844  those commands, we have decided to use this option by default.
14845 \end_layout
14846
14847 \begin_layout Subsection
14848 Extra features
14849 \end_layout
14850
14851 \begin_layout Standard
14852 We will only describe the features supported by LyX (which is not much currently
14853 ).
14854  Please consult the Memoir manual
14855 \begin_inset Foot
14856 status collapsed
14857
14858 \begin_layout Plain Layout
14859 Cf.
14860 \begin_inset ERT
14861 status collapsed
14862
14863 \begin_layout Plain Layout
14864
14865
14866 \backslash
14867  
14868 \end_layout
14869
14870 \end_inset
14871
14872
14873 \begin_inset Flex URL
14874 status collapsed
14875
14876 \begin_layout Plain Layout
14877
14878 CTAN:/macros/latex/memoir/memman.pdf
14879 \end_layout
14880
14881 \end_inset
14882
14883 .
14884 \end_layout
14885
14886 \end_inset
14887
14888  for details.
14889 \end_layout
14890
14891 \begin_layout Description
14892 Abstract: You may wonder why an abstract is an extra feature.
14893  Well, it is in book class.
14894  Usually books don't have abstracts.
14895  Memoir, however, has.
14896  You can use it wherever and how often you like.
14897 \end_layout
14898
14899 \begin_layout Description
14900 Chapterprecis: You may know this older typesetting style: The contents of
14901  a chapter are summarized below the title and also in the table of contents
14902  (e.
14903 \begin_inset space \thinspace{}
14904 \end_inset
14905
14906 g.
14907 \begin_inset space \space{}
14908 \end_inset
14909
14910
14911 \emph on
14912 Our hero arrives in Troia; he loses some friends; he finds others
14913 \emph default
14914 ).
14915  Chapterprecis does exactly this.
14916  It is therefore only sensible below a chapter.
14917 \end_layout
14918
14919 \begin_layout Description
14920 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14921  The epigraph environment provides an elegant way of typesetting such a
14922  motto.
14923  The motto itself (text) and its author (source) are divided by a short
14924  line.
14925  Unfortunately, we have to fool LyX a bit here again, since the environment
14926  needs two arguments (text and source).
14927  In this case, we have to use curly brackets (in TeX mode) between the two
14928  arguments: 
14929 \emph on
14930 <smart slogan>
14931 \emph default
14932  
14933 \family typewriter
14934 }{
14935 \family default
14936  
14937 \emph on
14938 <author of the slogan>.
14939 \end_layout
14940
14941 \begin_layout Description
14942 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14943  complex figurative poems).
14944  LyX can only support a few of them.
14945  One is poemtitle, which is a centered title for poems, which will also
14946  be added to the table of contents (verse is the standard environment for
14947  poems.
14948  Memoir has some enhanced versions of verse, but you need to use TeX code,
14949  because they have to be nested inside regular verse environments, which
14950  is not possible with LyX).
14951 \end_layout
14952
14953 \begin_layout Description
14954 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14955 \end_layout
14956
14957 \begin_layout Section
14958 Article (mwart), book (mwbk) and report (mwrep)
14959 \begin_inset Argument
14960 status collapsed
14961
14962 \begin_layout Plain Layout
14963 The 
14964 \family typewriter
14965 mw
14966 \family default
14967  Classes
14968 \end_layout
14969
14970 \end_inset
14971
14972
14973 \end_layout
14974
14975 \begin_layout Standard
14976 by 
14977 \noun on
14978 Tomasz Luczak
14979 \end_layout
14980
14981 \begin_layout Standard
14982 The LyX document classes 
14983 \emph on
14984 article (mwart)
14985 \emph default
14986
14987 \emph on
14988 report (mwrep)
14989 \emph default
14990  and 
14991 \emph on
14992 book
14993 \emph default
14994  
14995 \emph on
14996 (mwbk)
14997 \emph default
14998  correspond to the LaTeX document classes 
14999 \family typewriter
15000 mwart.cls
15001 \family default
15002
15003 \family typewriter
15004 mwrep.cls
15005 \family default
15006  and 
15007 \family typewriter
15008 mwbk.cls
15009 \family default
15010 , resp.
15011  They are replacements for the standard document classes 
15012 \family typewriter
15013 article.cls
15014 \family default
15015
15016 \family typewriter
15017 report.cls
15018 \family default
15019  and 
15020 \family typewriter
15021 book.cls
15022 \family default
15023 , resp., and fit better to Polish typography conventions in a number of points.
15024  
15025 \end_layout
15026
15027 \begin_layout Standard
15028 Basic differences:
15029 \end_layout
15030
15031 \begin_layout Itemize
15032 Unnumbered titles (with star, e.
15033 \begin_inset space \thinspace{}
15034 \end_inset
15035
15036 g.
15037 \begin_inset space \space{}
15038 \end_inset
15039
15040
15041 \family sans
15042 Section*
15043 \family default
15044 ) are added into table of contents,
15045 \end_layout
15046
15047 \begin_layout Itemize
15048 Additional page styles:
15049 \end_layout
15050
15051 \begin_deeper
15052 \begin_layout Description
15053 uheadings header with separated lines,
15054 \end_layout
15055
15056 \begin_layout Description
15057 myheadings custom header, contents headers via commands: 
15058 \family typewriter
15059
15060 \backslash
15061 markright
15062 \family default
15063  and 
15064 \family typewriter
15065
15066 \backslash
15067 markboth
15068 \family default
15069 ,
15070 \end_layout
15071
15072 \begin_layout Description
15073 myuheadings custom header with separated lines,
15074 \end_layout
15075
15076 \begin_layout Description
15077 outer page number is placed on outer side of page
15078 \end_layout
15079
15080 \end_deeper
15081 \begin_layout Itemize
15082 Options 
15083 \end_layout
15084
15085 \begin_deeper
15086 \begin_layout Description
15087 rmheadings serif titles — default,
15088 \end_layout
15089
15090 \begin_layout Description
15091 sfheadings sansserif titles,
15092 \end_layout
15093
15094 \begin_layout Description
15095 authortitle on title page first placed is author next title — default,
15096 \end_layout
15097
15098 \begin_layout Description
15099 titleauthor on title page first placed is title next author,
15100 \end_layout
15101
15102 \begin_layout Description
15103 withmarginpar reserve place on page for margins.
15104 \end_layout
15105
15106 \end_deeper
15107 \begin_layout Section
15108 Paper
15109 \end_layout
15110
15111 \begin_layout Standard
15112 The document class 
15113 \family sans
15114 paper
15115 \family default
15116  provides an alternative to the standard 
15117 \family sans
15118 article
15119 \family default
15120  class.
15121  It provides similar functionality, but you might prefer this layout with
15122  sans serif sections, headings, and more.
15123 \end_layout
15124
15125 \begin_layout Section
15126 RevTeX4
15127 \end_layout
15128
15129 \begin_layout Standard
15130 by 
15131 \noun on
15132 Amir Karger
15133 \end_layout
15134
15135 \begin_layout Standard
15136 \begin_inset VSpace bigskip
15137 \end_inset
15138
15139
15140 \end_layout
15141
15142 \begin_layout Standard
15143 \noindent
15144 The 
15145 \family sans
15146 Revtex
15147 \begin_inset space ~
15148 \end_inset
15149
15150 4
15151 \family default
15152  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15153 \begin_inset Formula $\beta$
15154 \end_inset
15155
15156  release of May, 1999) class.
15157 \end_layout
15158
15159 \begin_layout Standard
15160 LyX has a 
15161 \family sans
15162 Revtex
15163 \family default
15164  textclass, which works with RevTeX 3.1.
15165  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15166  That means that it doesn't interact very well with LyX, which requires
15167  LaTeX2e, although it has been kludged to work.
15168  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15169  LyX with the 
15170 \family sans
15171 RevTeX
15172 \begin_inset space ~
15173 \end_inset
15174
15175 4
15176 \family default
15177  textclass should also be pretty easy to use.
15178 \end_layout
15179
15180 \begin_layout Standard
15181 These documents are supposed to be used in 
15182 \emph on
15183 addition
15184 \emph default
15185  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15186  macros, and assume you'll know what to put in the preamble if necessary.
15187 \end_layout
15188
15189 \begin_layout Subsection
15190 Installation
15191 \end_layout
15192
15193 \begin_layout Standard
15194 All you need to do is install RevTeX 4, as described in the package's README
15195  file.
15196  The package can be found at The RevTeX 4 Web Site 
15197 \begin_inset Flex URL
15198 status collapsed
15199
15200 \begin_layout Plain Layout
15201
15202 http://publish.aps.org/revtex4/
15203 \end_layout
15204
15205 \end_inset
15206
15207 .
15208  Install it somewhere that LaTeX can see it.
15209  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15210  (i.
15211 \begin_inset space \thinspace{}
15212 \end_inset
15213
15214 g.
15215 \begin_inset space \space{}
15216 \end_inset
15217
15218 not the directory where you installed the class file.) Then, if you reconfigure
15219  LyX, it will find the class file and let you use the RevTeX4 textclass.
15220 \end_layout
15221
15222 \begin_layout Standard
15223 Probably the easiest way to get started is either to import a RevTeX 4 document
15224  using 
15225 \family typewriter
15226 tex2lyx
15227 \family default
15228 , or to use the 
15229 \family sans
15230 Revtex
15231 \begin_inset space ~
15232 \end_inset
15233
15234 4
15235 \family default
15236  template, found in the templates directory.
15237 \end_layout
15238
15239 \begin_layout Subsection
15240 Preamble Matter
15241 \end_layout
15242
15243 \begin_layout Standard
15244 Optional arguments to 
15245 \family typewriter
15246
15247 \backslash
15248 documentclass
15249 \family default
15250 , like 
15251 \begin_inset Quotes eld
15252 \end_inset
15253
15254 preprint
15255 \begin_inset Quotes erd
15256 \end_inset
15257
15258  and 
15259 \begin_inset Quotes eld
15260 \end_inset
15261
15262 aps
15263 \begin_inset Quotes erd
15264 \end_inset
15265
15266 , go in the 
15267 \family sans
15268 E
15269 \bar under
15270 x
15271 \bar default
15272 tra
15273 \begin_inset space ~
15274 \end_inset
15275
15276 Options
15277 \family default
15278  field in the 
15279 \family sans
15280 Document
15281 \begin_inset space ~
15282 \end_inset
15283
15284 Layout
15285 \family default
15286  dialog, as usual.
15287  Remember that in RevTeX, at least one optional argument is required! 
15288 \end_layout
15289
15290 \begin_layout Standard
15291 Other preamble matter, like 
15292 \family typewriter
15293
15294 \backslash
15295 draft
15296 \family default
15297  etc.
15298 \begin_inset space ~
15299 \end_inset
15300
15301 goes in the 
15302 \family sans
15303 LaTeX
15304 \begin_inset space ~
15305 \end_inset
15306
15307 Preamble
15308 \family default
15309  dialog, also as usual.
15310 \end_layout
15311
15312 \begin_layout Subsection
15313 Layouts
15314 \end_layout
15315
15316 \begin_layout Standard
15317 The layouts basically correspond to the commands in RevTeX4.0.
15318  For example, the Email layout corresponds to 
15319 \family typewriter
15320
15321 \backslash
15322 email{}
15323 \family default
15324 .
15325  Note that (at least as of RevTeX 4.0 Beta), the 
15326 \family sans
15327 Address
15328 \family default
15329  and 
15330 \family sans
15331 Affiliation
15332 \family default
15333  layouts are exactly equivalent, so you shouldn't need to use both.
15334 \begin_inset Foot
15335 status collapsed
15336
15337 \begin_layout Plain Layout
15338 In case you're curious, both were included so that 
15339 \family typewriter
15340 tex2lyx
15341 \family default
15342  would be able to translate both 
15343 \family typewriter
15344
15345 \backslash
15346 address
15347 \family default
15348  and 
15349 \family typewriter
15350
15351 \backslash
15352 affiliation
15353 \family default
15354 .
15355 \end_layout
15356
15357 \end_inset
15358
15359
15360 \end_layout
15361
15362 \begin_layout Subsection
15363 Important Notes
15364 \end_layout
15365
15366 \begin_layout Standard
15367 There are a couple of important unique aspects of RevTeX 4 which might cause
15368  bugs that will be even more confusing in LyX.
15369 \end_layout
15370
15371 \begin_layout Standard
15372 In RevTeX, the 
15373 \family typewriter
15374
15375 \backslash
15376 thanks
15377 \family default
15378  command goes 
15379 \emph on
15380 outside
15381 \emph default
15382  the 
15383 \family typewriter
15384
15385 \backslash
15386 author
15387 \family default
15388  command.
15389  The LyX equivalent is that there is a separate Thanks layout.
15390  Do 
15391 \emph on
15392 not
15393 \emph default
15394  write footnotes in the 
15395 \family sans
15396 Author
15397 \family default
15398  layout, or weird things may happen.
15399  See the RevTeX 4 documentation for more details.
15400 \end_layout
15401
15402 \begin_layout Standard
15403 Also, the 
15404 \family sans
15405 Author
15406 \begin_inset space ~
15407 \end_inset
15408
15409 Email
15410 \family default
15411
15412 \family sans
15413 Author
15414 \begin_inset space ~
15415 \end_inset
15416
15417 URL
15418 \family default
15419 , and 
15420 \family sans
15421 Thanks
15422 \family default
15423  layouts must be placed 
15424 \emph on
15425 in between
15426 \emph default
15427  the 
15428 \family sans
15429 Author
15430 \family default
15431  layout and the corresponding 
15432 \family sans
15433 Address
15434 \family default
15435  (or equivalent 
15436 \family sans
15437 Affiliation
15438 \family default
15439 ) layout.
15440  If you put the 
15441 \family sans
15442 Thanks
15443 \family default
15444  after the 
15445 \family sans
15446 Address
15447 \family default
15448 , the LaTeX won't compile.
15449 \end_layout
15450
15451 \begin_layout Subsection
15452 Drawbacks
15453 \end_layout
15454
15455 \begin_layout Standard
15456 The main problem with this layout is that you can't use the optional arguments
15457  to layouts like Email and Title.
15458  (The problem is not unique to this layout; you can't use optional arguments
15459  to the Section layouts either.) This means that after you export that file
15460  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15461  need to edit the LaTeX file with a text editor to add the optional arguments
15462  to set, e.
15463 \begin_inset space \thinspace{}
15464 \end_inset
15465
15466 g.
15467 \begin_inset space \space{}
15468 \end_inset
15469
15470 the running title for the page headers.
15471  Lacking these layouts makes the 
15472 \family typewriter
15473
15474 \backslash
15475 altaffiliation
15476 \family default
15477  (and the equivalent 
15478 \family typewriter
15479
15480 \backslash
15481 altaddress
15482 \family default
15483 ) useless, so the corresponding layouts don't exist, and will have to be
15484  added by hand.
15485 \begin_inset Foot
15486 status collapsed
15487
15488 \begin_layout Plain Layout
15489
15490 \emph on
15491 Note from JMarc:
15492 \emph default
15493  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15494  has not been updated yet to take advantage of it.
15495 \end_layout
15496
15497 \end_inset
15498
15499  
15500 \end_layout
15501
15502 \begin_layout Section
15503 Springer Journals (
15504 \family sans
15505 svjour
15506 \family default
15507 )
15508 \end_layout
15509
15510 \begin_layout Standard
15511 by 
15512 \noun on
15513 Martin Vermeer
15514 \end_layout
15515
15516 \begin_layout Subsection
15517 Description
15518 \end_layout
15519
15520 \begin_layout Standard
15521 These are the layout files for some of the journal formats used by Springer
15522  Verlag and listed on 
15523 \begin_inset Flex URL
15524 status collapsed
15525
15526 \begin_layout Plain Layout
15527
15528 http://www.springer.de/author/tex/help-journals.html
15529 \end_layout
15530
15531 \end_inset
15532
15533 , where you should also go to fetch the class files (yes, these are LaTeX2e
15534  now!).
15535  It is a modular system: the things common to all journals are implemented
15536  in 
15537 \family typewriter
15538 svjour.inc
15539 \family default
15540 , which journal-specific layout files (such as, e.
15541 \begin_inset space \thinspace{}
15542 \end_inset
15543
15544 g.
15545 \begin_inset space \space{}
15546 \end_inset
15547
15548
15549 \family typewriter
15550 svjog.layout
15551 \family default
15552  for Journal of Geodesy) can include.
15553 \end_layout
15554
15555 \begin_layout Standard
15556 This means that implementing support for any other Springer journal on this
15557  list is as simple as writing your own 
15558 \family typewriter
15559 sv
15560 \family default
15561 <myjournal>
15562 \family typewriter
15563 .layout
15564 \family default
15565  file following the outline given in 
15566 \family typewriter
15567 svjog.layout
15568 \family default
15569 .
15570  
15571 \end_layout
15572
15573 \begin_layout Standard
15574 It is reasonably well tested only for the Journal of Geodesy.
15575  
15576 \family typewriter
15577 svjour
15578 \family default
15579  and 
15580 \family typewriter
15581 svjog
15582 \family default
15583  come with the standard LyX distribution.
15584  Install the relevant class file (downloaded from Springer) in a proper
15585  directory, reconfigure LaTeX (in the teTeX case by running 
15586 \family typewriter
15587 texhash
15588 \family default
15589 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15590  and it should work.
15591 \end_layout
15592
15593 \begin_layout Subsection
15594 New styles
15595 \end_layout
15596
15597 \begin_layout Standard
15598 A large number of theorem-like styles — 
15599 \family sans
15600 Claim, Conjecture,
15601 \family default
15602  
15603 \family sans
15604 \SpecialChar \ldots{}
15605 Theorem
15606 \family default
15607 .
15608 \end_layout
15609
15610 \begin_layout Standard
15611
15612 \family sans
15613 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15614  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15615 \family default
15616 .
15617  See the Springer class file documentation for details.
15618 \end_layout
15619
15620 \begin_layout Subsection
15621 Supported journals
15622 \end_layout
15623
15624 \begin_layout Itemize
15625
15626 \emph on
15627 Journal of Geodesy
15628 \emph default
15629
15630 \family typewriter
15631 svjog.layout
15632 \family default
15633  — Martin Vermeer
15634 \end_layout
15635
15636 \begin_layout Itemize
15637
15638 \emph on
15639 Probability Theory and Related Fields
15640 \emph default
15641
15642 \family typewriter
15643 svprobth.layout
15644 \family default
15645  — Jean-Marc Lasgouttes
15646 \end_layout
15647
15648 \begin_layout Standard
15649 Add your own, it isn't so hard!
15650 \end_layout
15651
15652 \begin_layout Subsection
15653 Credits
15654 \end_layout
15655
15656 \begin_layout Standard
15657 These files are partly based on the older 
15658 \family typewriter
15659 ejour2.layout
15660 \family default
15661 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15662  file from Springer.
15663  All this, and the 
15664 \family typewriter
15665 ejour2
15666 \family default
15667  layout, are now defunct.
15668  Jean-Marc Lasgouttes helped out big in making me find my way around the
15669  LyX layout file mechanism.
15670 \end_layout
15671
15672 \begin_layout Subsection
15673 Bugs
15674 \end_layout
15675
15676 \begin_layout Standard
15677 Probably.
15678  But probably less than in the old hacked-LaTeX 
15679 \family typewriter
15680 ejour2
15681 \family default
15682 .
15683 \end_layout
15684
15685 \begin_layout Standard
15686 Limitations e.
15687 \begin_inset space \thinspace{}
15688 \end_inset
15689
15690 g.: does not display the number for theorem-like layouts, just #.
15691 \end_layout
15692
15693 \begin_layout Section
15694 Slides [aka 
15695 \noun on
15696 SliTeX
15697 \noun default
15698 ]
15699 \begin_inset CommandInset label
15700 LatexCommand label
15701 name "sec:slitex"
15702
15703 \end_inset
15704
15705
15706 \end_layout
15707
15708 \begin_layout Standard
15709 by 
15710 \noun on
15711 John Weiss
15712 \noun default
15713  
15714 \end_layout
15715
15716 \begin_layout Subsection
15717 Introduction
15718 \end_layout
15719
15720 \begin_layout Standard
15721 This section describes how to use LyX to make slides for overhead projectors.
15722  There are two document classes that can do this: the default slides class
15723  and the 
15724 \family sans
15725 FoilTeX
15726 \family default
15727  slides class.
15728  This section documents the former.
15729 \end_layout
15730
15731 \begin_layout Standard
15732 I'm going to say this again, nice and clear, so that there's no misunderstanding
15733 :
15734 \end_layout
15735
15736 \begin_layout Standard
15737 \begin_inset VSpace bigskip
15738 \end_inset
15739
15740
15741 \end_layout
15742
15743 \begin_layout Standard
15744 \align center
15745
15746 \size large
15747 This section documents the class 
15748 \begin_inset Quotes eld
15749 \end_inset
15750
15751
15752 \family sans
15753 slides (default)
15754 \family default
15755
15756 \begin_inset Quotes erd
15757 \end_inset
15758
15759  
15760 \emph on
15761 only.
15762 \end_layout
15763
15764 \begin_layout Standard
15765 \begin_inset VSpace bigskip
15766 \end_inset
15767
15768
15769 \end_layout
15770
15771 \begin_layout Standard
15772 If you're looking for the documentation for 
15773 \begin_inset Quotes eld
15774 \end_inset
15775
15776
15777 \family sans
15778 slides (FoilTeX)
15779 \family default
15780
15781 \begin_inset Quotes erd
15782 \end_inset
15783
15784 , check out section
15785 \begin_inset space ~
15786 \end_inset
15787
15788
15789 \begin_inset CommandInset ref
15790 LatexCommand ref
15791 reference "sec:foiltex"
15792
15793 \end_inset
15794
15795 .
15796  The 
15797 \family sans
15798 foils
15799 \family default
15800  class [
15801 \begin_inset Quotes eld
15802 \end_inset
15803
15804
15805 \family sans
15806 slides (FoilTeX)
15807 \family default
15808
15809 \begin_inset Quotes erd
15810 \end_inset
15811
15812 ] is actually somewhat better than the default 
15813 \family sans
15814 slides
15815 \family default
15816  class,
15817 \begin_inset Foot
15818 status collapsed
15819
15820 \begin_layout Plain Layout
15821 \SpecialChar \ldots{}
15822 or so I've been told repeatedly by its advocates.
15823  Having never used it, I have no idea if this claim is true or not.
15824 \end_layout
15825
15826 \end_inset
15827
15828  which this section documents.
15829 \end_layout
15830
15831 \begin_layout Standard
15832 This class is the LaTeX2e improvement of the old 
15833 \noun on
15834 SliTeX
15835 \noun default
15836  package.
15837  Every LaTeX2e distribution includes this class [which I'll just refer to
15838  as 
15839 \begin_inset Quotes eld
15840 \end_inset
15841
15842
15843 \family sans
15844 slides
15845 \family default
15846
15847 \begin_inset Quotes erd
15848 \end_inset
15849
15850  from now on], so you're bound to have it.
15851  As I noted earlier, there are other classes, such as 
15852 \family sans
15853 foils
15854 \family default
15855 , which also produce slides for overhead projectors and do a better job
15856  at it.
15857  However, there are some things which 
15858 \family sans
15859 slides
15860 \family default
15861  can do which the others can't, such as generate overlays.
15862  Read on to learn more!
15863 \end_layout
15864
15865 \begin_layout Subsection
15866 Getting Started
15867 \begin_inset CommandInset label
15868 LatexCommand label
15869 name "sec:slidesetup"
15870
15871 \end_inset
15872
15873
15874 \end_layout
15875
15876 \begin_layout Standard
15877 Obviously, to use this document class, you need to select 
15878 \begin_inset Quotes eld
15879 \end_inset
15880
15881
15882 \family sans
15883 slides (default)
15884 \family default
15885
15886 \begin_inset Quotes erd
15887 \end_inset
15888
15889  from the class list in the 
15890 \family sans
15891 Document\SpecialChar \menuseparator
15892 Settings
15893 \family default
15894  dialog.
15895  There are some other special things you should know about this class:
15896 \end_layout
15897
15898 \begin_layout Itemize
15899 Don't bother changing the options 
15900 \family sans
15901 Sides and Columns
15902 \family default
15903 .
15904  They're not supported by the 
15905 \family sans
15906 slides
15907 \family default
15908  class, anyways.
15909 \end_layout
15910
15911 \begin_layout Itemize
15912 The option 
15913 \family sans
15914 Page
15915 \begin_inset space ~
15916 \end_inset
15917
15918 style
15919 \family default
15920  behaves a bit differently for this class.
15921  The possible choices and what they do are as follows:
15922 \end_layout
15923
15924 \begin_deeper
15925 \begin_layout Description
15926
15927 \family sans
15928 plain
15929 \family default
15930  The final output contains page numbers in the lower right corner.
15931 \end_layout
15932
15933 \begin_layout Description
15934
15935 \family sans
15936 headings
15937 \family default
15938  Like 
15939 \family sans
15940 plain
15941 \family default
15942 , but also prints out any time markers you've put in.
15943  This is the default.
15944 \end_layout
15945
15946 \begin_layout Description
15947
15948 \family sans
15949 empty
15950 \family default
15951  The final output contains no page numbers, time markers, or alignment markers.
15952 \end_layout
15953
15954 \end_deeper
15955 \begin_layout Itemize
15956 The 
15957 \family sans
15958 slides
15959 \family default
15960  class has an extra option: 
15961 \family typewriter
15962 clock
15963 \family default
15964 .
15965  To use it, put 
15966 \begin_inset Quotes eld
15967 \end_inset
15968
15969
15970 \family typewriter
15971 clock
15972 \family default
15973
15974 \begin_inset Quotes erd
15975 \end_inset
15976
15977  in the extra class options.
15978 \end_layout
15979
15980 \begin_deeper
15981 \begin_layout Standard
15982 Using this options allows you to add time markers to 
15983 \family sans
15984 Note
15985 \family default
15986 s.
15987  See section
15988 \begin_inset space ~
15989 \end_inset
15990
15991
15992 \begin_inset CommandInset ref
15993 LatexCommand ref
15994 reference "sec:slideNote"
15995
15996 \end_inset
15997
15998  for more details.
15999 \end_layout
16000
16001 \end_deeper
16002 \begin_layout Standard
16003 You can also use the template file 
16004 \begin_inset Quotes eld
16005 \end_inset
16006
16007
16008 \family typewriter
16009 slides.lyx
16010 \family default
16011
16012 \begin_inset Quotes erd
16013 \end_inset
16014
16015  to automatically set up a document to use the 
16016 \family sans
16017 slides
16018 \family default
16019  class [using 
16020 \family sans
16021 File\SpecialChar \menuseparator
16022 New
16023 \begin_inset space ~
16024 \end_inset
16025
16026 from
16027 \begin_inset space ~
16028 \end_inset
16029
16030 Template
16031 \family default
16032  to open your new document].
16033  The template file also contains some examples of the special paragraph
16034  environments used by this class.
16035  I'll describe those next.
16036 \end_layout
16037
16038 \begin_layout Subsection
16039 Paragraph Environments
16040 \end_layout
16041
16042 \begin_layout Subsubsection
16043 Supported Environments
16044 \end_layout
16045
16046 \begin_layout Standard
16047 The first thing you'll notice when you start up a new 
16048 \family sans
16049 slides
16050 \family default
16051  document is the font size and type: it's the equivalent of the size 
16052 \begin_inset Quotes eld
16053 \end_inset
16054
16055
16056 \family sans
16057 Largest
16058 \family default
16059
16060 \begin_inset Quotes erd
16061 \end_inset
16062
16063  in the 
16064 \family sans
16065 Sans
16066 \begin_inset space ~
16067 \end_inset
16068
16069 Serif
16070 \family default
16071  font.
16072  This is also what's used in the output.
16073  Think of this as a 
16074 \begin_inset Quotes eld
16075 \end_inset
16076
16077 visual cue
16078 \begin_inset Quotes erd
16079 \end_inset
16080
16081  to remind you that this is a slide.
16082  Your final slides will use a larger font; ergo, you'll have less space.
16083  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16084 \end_layout
16085
16086 \begin_layout Standard
16087 The next thing that becomes obvious is the changes to the paragraph environment
16088  pull-down box [at the far-left end of the toolbar].
16089  Most of the paragraph environments you're used to seeing are missing.
16090  There are also five new ones.
16091  That's because the 
16092 \family sans
16093 slides
16094 \family default
16095  class itself only supports certain paragraph environments:
16096 \end_layout
16097
16098 \begin_layout Itemize
16099
16100 \family sans
16101 Standard
16102 \end_layout
16103
16104 \begin_layout Itemize
16105
16106 \family sans
16107 Itemize
16108 \end_layout
16109
16110 \begin_layout Itemize
16111
16112 \family sans
16113 Enumerate
16114 \end_layout
16115
16116 \begin_layout Itemize
16117
16118 \family sans
16119 Description
16120 \end_layout
16121
16122 \begin_layout Itemize
16123
16124 \family sans
16125 List
16126 \end_layout
16127
16128 \begin_layout Itemize
16129
16130 \family sans
16131 Quotation
16132 \end_layout
16133
16134 \begin_layout Itemize
16135
16136 \family sans
16137 Quote
16138 \end_layout
16139
16140 \begin_layout Itemize
16141
16142 \family sans
16143 Verse
16144 \end_layout
16145
16146 \begin_layout Itemize
16147
16148 \family sans
16149 Caption
16150 \end_layout
16151
16152 \begin_layout Itemize
16153
16154 \family sans
16155 LyX-Code
16156 \end_layout
16157
16158 \begin_layout Itemize
16159
16160 \family sans
16161 Comment
16162 \end_layout
16163
16164 \begin_layout Standard
16165 All of the other standard environments, including the section-heading environmen
16166 ts, aren't used in the 
16167 \family sans
16168 slides
16169 \family default
16170  class.
16171 \end_layout
16172
16173 \begin_layout Standard
16174 On the other hand, you'll notice the following new environments:
16175 \end_layout
16176
16177 \begin_layout Itemize
16178
16179 \family sans
16180 Slide
16181 \end_layout
16182
16183 \begin_layout Itemize
16184
16185 \family sans
16186 Overlay
16187 \end_layout
16188
16189 \begin_layout Itemize
16190
16191 \family sans
16192 Note
16193 \end_layout
16194
16195 \begin_layout Itemize
16196
16197 \family sans
16198 InvisibleText
16199 \end_layout
16200
16201 \begin_layout Itemize
16202
16203 \family sans
16204 VisibleText
16205 \end_layout
16206
16207 \begin_layout Standard
16208 These five are kind of quirky, due to a 
16209 \begin_inset Quotes eld
16210 \end_inset
16211
16212 feature
16213 \begin_inset Quotes erd
16214 \end_inset
16215
16216  in LyX.
16217  You see, LyX doesn't permit you to nest any other paragraph environment
16218  into an empty environment.
16219  Now, that's fine and dandy, but it means that you wouldn't be able to start
16220  a slide with anything except plain text.
16221  To deal with this, I've performed a little 
16222 \begin_inset Quotes eld
16223 \end_inset
16224
16225 LaTeX magic.
16226 \begin_inset Quotes erd
16227 \end_inset
16228
16229  
16230 \end_layout
16231
16232 \begin_layout Subsubsection
16233 Quirks of the New Environments
16234 \begin_inset CommandInset label
16235 LatexCommand label
16236 name "sec:slideQuirk"
16237
16238 \end_inset
16239
16240
16241 \end_layout
16242
16243 \begin_layout Standard
16244 All five of the new paragraph environments are somewhat quirky due to inherent
16245  limitiations in the current version of LyX.
16246  As I just mentioned, LyX forbids environments that begin with another environme
16247 nt.
16248  To get around this, the 
16249 \family sans
16250 Slide
16251 \family default
16252  environment isn't a paragraph environment as described in the 
16253 \emph on
16254 User's Guide
16255 \emph default
16256 .
16257  
16258 \end_layout
16259
16260 \begin_layout Standard
16261 You should consider 
16262 \family sans
16263 Slide
16264 \family default
16265
16266 \family sans
16267 Overlay
16268 \family default
16269 , and 
16270 \family sans
16271 Note
16272 \family default
16273  to be 
16274 \begin_inset Quotes eld
16275 \end_inset
16276
16277 pseudo-environments.
16278 \begin_inset Quotes erd
16279 \end_inset
16280
16281  They look like a section heading or a 
16282 \begin_inset Quotes eld
16283 \end_inset
16284
16285
16286 \family sans
16287 Caption
16288 \family default
16289 ,
16290 \begin_inset Quotes erd
16291 \end_inset
16292
16293  but really begin a [and, if necessary, end the previous] paragraph environment.
16294  Likewise, treat 
16295 \family sans
16296 InvisibleText
16297 \family default
16298  and 
16299 \family sans
16300 VisibleText
16301 \family default
16302  as 
16303 \begin_inset Quotes eld
16304 \end_inset
16305
16306 pseudo-commands.
16307 \begin_inset Quotes erd
16308 \end_inset
16309
16310  These two perform some action.
16311 \end_layout
16312
16313 \begin_layout Standard
16314 A common feature of all five environments, 
16315 \family sans
16316 Slide
16317 \family default
16318
16319 \family sans
16320 Overlay
16321 \family default
16322
16323 \family sans
16324 Note
16325 \family default
16326
16327 \family sans
16328 InvisibleText
16329 \family default
16330  and 
16331 \family sans
16332 VisibleText
16333 \family default
16334 , is a rather long-ish label.
16335  The text following this label — ordinarily the contents of the paragraph
16336  environment — is utterly irrelevant for 
16337 \family sans
16338 Slide
16339 \family default
16340
16341 \family sans
16342 Overlay
16343 \family default
16344
16345 \family sans
16346 Note
16347 \family default
16348
16349 \family sans
16350 InvisibleText
16351 \family default
16352  and 
16353 \family sans
16354 VisibleText
16355 \family default
16356 .
16357  LyX completely ignores it.
16358  In fact, you can leave these five environments completely empty.
16359  
16360 \end_layout
16361
16362 \begin_layout Standard
16363 While you don't 
16364 \emph on
16365 have
16366 \emph default
16367  to put any text after the rather long-ish label, you might want to.
16368  This could be a short description of the contents of the 
16369 \family sans
16370 Slide
16371 \family default
16372 , for example.
16373  In that case, enter your descriptive comment and hit 
16374 \family sans
16375 Return
16376 \family default
16377  as you normally would.
16378 \end_layout
16379
16380 \begin_layout Standard
16381 If, on the other hand, you don't want to enter any descriptive text, you'll
16382  hit another LyX quirk.
16383  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16384  environment until you put something in the old one.
16385  So, do this:
16386 \end_layout
16387
16388 \begin_layout Itemize
16389 Start entering the text that will 
16390 \emph on
16391 follow
16392 \emph default
16393  the new 
16394 \family sans
16395 Slide
16396 \family default
16397
16398 \family sans
16399 Overlay
16400 \family default
16401
16402 \family sans
16403 Note
16404 \family default
16405
16406 \family sans
16407 InvisibleText
16408 \family default
16409  or 
16410 \family sans
16411 VisibleText
16412 \family default
16413 .
16414  
16415 \end_layout
16416
16417 \begin_layout Itemize
16418 Now move to the beginning of that paragraph.
16419  
16420 \end_layout
16421
16422 \begin_layout Itemize
16423 Next, hit 
16424 \family sans
16425 Return
16426 \family default
16427 .
16428  
16429 \end_layout
16430
16431 \begin_layout Itemize
16432 Finally, change this new, empty paragraph to a 
16433 \family sans
16434 Slide
16435 \family default
16436
16437 \family sans
16438 Overlay
16439 \family default
16440
16441 \family sans
16442 Note
16443 \family default
16444
16445 \family sans
16446 InvisibleText
16447 \family default
16448  or 
16449 \family sans
16450 VisibleText
16451 \family default
16452 .
16453  
16454 \end_layout
16455
16456 \begin_layout Standard
16457 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16458
16459 \end_layout
16460
16461 \begin_layout Subsection
16462 Making a Presentation with 
16463 \family sans
16464 Slide
16465 \family default
16466
16467 \family sans
16468 Overlay
16469 \family default
16470  and 
16471 \family sans
16472 Note
16473 \end_layout
16474
16475 \begin_layout Subsubsection
16476 Using the 
16477 \family sans
16478 Slide
16479 \family default
16480  Environment
16481 \end_layout
16482
16483 \begin_layout Standard
16484 If you're expecting this section to teach you how to actually make a presentatio
16485 n, you'll be sorely disappointed.
16486  Naturally, I'll describe all of the ways the 
16487 \family sans
16488 slides
16489 \family default
16490  class can assist you in preparing the materials for a presentation.
16491  Filling in the contents, however, is up to you.
16492  [Then again, that 
16493 \emph on
16494 is
16495 \emph default
16496  the LyX philosophy.]
16497 \end_layout
16498
16499 \begin_layout Standard
16500 Choosing the 
16501 \family sans
16502 Slide
16503 \family default
16504  environment [in the manner described in section
16505 \begin_inset space ~
16506 \end_inset
16507
16508
16509 \begin_inset CommandInset ref
16510 LatexCommand ref
16511 reference "sec:slideQuirk"
16512
16513 \end_inset
16514
16515 ] tells LyX to begin a new slide [duh].
16516  The label for this environment/
16517 \begin_inset Quotes erd
16518 \end_inset
16519
16520 pseudo-command
16521 \begin_inset Quotes erd
16522 \end_inset
16523
16524  is an 
16525 \begin_inset Quotes eld
16526 \end_inset
16527
16528 ASCII line,
16529 \begin_inset Quotes erd
16530 \end_inset
16531
16532  in cool blue, followed by the label, 
16533 \begin_inset Quotes eld
16534 \end_inset
16535
16536 NewSlide:
16537 \begin_inset Quotes erd
16538 \end_inset
16539
16540 .
16541  Any text or paragraph environments that follow this one go on the new slide.
16542  It's that simple.
16543 \end_layout
16544
16545 \begin_layout Standard
16546 Slides are probably the only time you'll need to forcibly end pages in LyX
16547  (this can be specified in the 
16548 \family sans
16549 Paragraph Layout
16550 \family default
16551  dialog).
16552  In fact, you'll want to, once you finish entering the contents of one slide.
16553  If you've entered more text than can physically fit on a slide, the extra
16554  overflows onto a new slide.
16555  I don't recommend doing this, however, since the overflow slide won't have
16556  any page number on it.
16557  Furthermore, it may interfere with any 
16558 \family sans
16559 Overlay
16560 \family default
16561  you've made to accompany the oversized 
16562 \family sans
16563 Slide
16564 \family default
16565 .
16566 \end_layout
16567
16568 \begin_layout Standard
16569 The 
16570 \family sans
16571 Overlay
16572 \family default
16573  and 
16574 \family sans
16575 Note
16576 \family default
16577  environments work the same way as the 
16578 \family sans
16579 Slide
16580 \family default
16581  environment.
16582  They both create an 
16583 \begin_inset Quotes eld
16584 \end_inset
16585
16586 ASCII line
16587 \begin_inset Quotes erd
16588 \end_inset
16589
16590  followed by a label [
16591 \begin_inset Quotes eld
16592 \end_inset
16593
16594 NewOverlay:
16595 \begin_inset Quotes erd
16596 \end_inset
16597
16598  and 
16599 \begin_inset Quotes eld
16600 \end_inset
16601
16602 NewNote:
16603 \begin_inset Quotes erd
16604 \end_inset
16605
16606 , respectively].
16607  The color is a stunning magenta instead of blue, and the 
16608 \begin_inset Quotes eld
16609 \end_inset
16610
16611 ASCII line
16612 \begin_inset Quotes erd
16613 \end_inset
16614
16615  will look different, in style and in length.
16616  The label fonts of all three also differ from one another.
16617 \end_layout
16618
16619 \begin_layout Standard
16620 As with a 
16621 \family sans
16622 Slide
16623 \family default
16624 , if the contents of a 
16625 \family sans
16626 Note
16627 \family default
16628  or 
16629 \family sans
16630 Overlay
16631 \family default
16632  exceed the physical size of a slide or sheet of paper, the extra will overflow
16633  onto a new sheet.
16634  Again, you should avoid this.
16635  It defeats the whole purpose of 
16636 \family sans
16637 Note
16638 \family default
16639 s and 
16640 \family sans
16641 Overlay
16642 \family default
16643 s.
16644 \end_layout
16645
16646 \begin_layout Subsubsection
16647 Using 
16648 \family sans
16649 Overlay
16650 \family default
16651  with 
16652 \family sans
16653 Slide
16654 \end_layout
16655
16656 \begin_layout Standard
16657 The idea behind an 
16658 \family sans
16659 Overlay
16660 \family default
16661  is a slide that sits atop another slide.
16662  Perhaps you wish to discuss a figure on the main 
16663 \family sans
16664 Slide
16665 \family default
16666  before displaying the text associated with it.
16667  One way to accomplish this is tape a flap of dark paper over the part of
16668  the 
16669 \family sans
16670 Slide
16671 \family default
16672  you want to display later.
16673  This method fails, however, if you wish to overlap one graph with another,
16674  for example.
16675  You would then have to fumble while speaking to align the two separate,
16676  overlapping 
16677 \family sans
16678 Slide
16679 \family default
16680 s to align the two graphs.
16681  The use of an 
16682 \family sans
16683 Overlay
16684 \family default
16685  environment in both cases makes life much easier.
16686 \end_layout
16687
16688 \begin_layout Standard
16689 Each 
16690 \family sans
16691 Overlay
16692 \family default
16693  receives the page number of its 
16694 \begin_inset Quotes eld
16695 \end_inset
16696
16697 parent
16698 \begin_inset Quotes erd
16699 \end_inset
16700
16701  
16702 \family sans
16703 Slide
16704 \family default
16705 , appended by 
16706 \begin_inset Quotes eld
16707 \end_inset
16708
16709
16710 \family typewriter
16711 -a
16712 \family default
16713
16714 \begin_inset Quotes erd
16715 \end_inset
16716
16717 .
16718 \begin_inset Foot
16719 status collapsed
16720
16721 \begin_layout Plain Layout
16722 Presumably, mutliple 
16723 \family sans
16724 Overlay
16725 \family default
16726 s would have 
16727 \begin_inset Quotes eld
16728 \end_inset
16729
16730
16731 \family typewriter
16732 -a
16733 \family default
16734
16735 \begin_inset Quotes erd
16736 \end_inset
16737
16738
16739 \begin_inset Quotes eld
16740 \end_inset
16741
16742
16743 \family typewriter
16744 -b
16745 \family default
16746
16747 \begin_inset Quotes erd
16748 \end_inset
16749
16750
16751 \begin_inset Quotes eld
16752 \end_inset
16753
16754
16755 \family typewriter
16756 -c
16757 \family default
16758
16759 \begin_inset Quotes erd
16760 \end_inset
16761
16762 , etc.
16763 \begin_inset space ~
16764 \end_inset
16765
16766 appended to the page number of the parent 
16767 \family sans
16768 Slide
16769 \family default
16770 .
16771  
16772 \end_layout
16773
16774 \end_inset
16775
16776  Clearly, you want the contents of both the 
16777 \family sans
16778 Slide
16779 \family default
16780  and the 
16781 \family sans
16782 Overlay
16783 \family default
16784  to each fit on a single physical slide! You should probably consider an
16785  
16786 \family sans
16787 Overlay
16788 \family default
16789  as 
16790 \begin_inset Quotes eld
16791 \end_inset
16792
16793 part of
16794 \begin_inset Quotes erd
16795 \end_inset
16796
16797  a 
16798 \family sans
16799 Slide
16800 \family default
16801 .
16802  Indeed, the LyX 
16803 \family sans
16804 slides
16805 \family default
16806  class provides a visual cue for this: the label at the start of an 
16807 \family sans
16808 Overlay
16809 \family default
16810  is shorter than that at the start of a 
16811 \family sans
16812 Slide
16813 \family default
16814 .
16815  Lastly, when you generate printable output, you'll find alignment markers
16816  in all four corners of both the 
16817 \family sans
16818 Overlay
16819 \family default
16820  page and its parent 
16821 \family sans
16822 Slide
16823 \family default
16824 .
16825  These will assist you in lining up the two physical slides.
16826 \end_layout
16827
16828 \begin_layout Standard
16829 The major problem in overlaying two slides is aligning the contents of the
16830  two transparencies.
16831  How much space should you leave for that graph on the second slide? Worse
16832  still, what if you want a graph and a sentence on second slide, but there
16833  is text on the main transparency that goes in between them? You could try
16834  and insert vertical space of the right size.
16835  The better way is to use 
16836 \family sans
16837 InvisibleText
16838 \family default
16839  and 
16840 \family sans
16841 VisibleText
16842 \family default
16843 .
16844 \end_layout
16845
16846 \begin_layout Standard
16847 As their names imply, 
16848 \family sans
16849 InvisibleText
16850 \family default
16851  and 
16852 \family sans
16853 VisibleText
16854 \family default
16855  are two command-like paragraph environments that make all subsequent text
16856  invisible and visible, respectively.
16857  Note from section
16858 \begin_inset space ~
16859 \end_inset
16860
16861
16862 \begin_inset CommandInset ref
16863 LatexCommand ref
16864 reference "sec:slideQuirk"
16865
16866 \end_inset
16867
16868  that you don't place anything 
16869 \emph on
16870 into
16871 \emph default
16872  these two environments, however.
16873  When you create an 
16874 \family sans
16875 InvisibleText
16876 \family default
16877 , it inserts a centered, sky-blue label into the page reading 
16878 \begin_inset Quotes eld
16879 \end_inset
16880
16881 <Invisible Text Follows>
16882 \begin_inset Quotes erd
16883 \end_inset
16884
16885 .
16886  For paragraphs following this label, the parts of the 
16887 \family sans
16888 Slide
16889 \family default
16890  [or 
16891 \family sans
16892 Overlay
16893 \family default
16894 ; it doesn't matter which] where they would be contain instead blank space.
16895  
16896 \end_layout
16897
16898 \begin_layout Standard
16899 For 
16900 \family sans
16901 VisibleText
16902 \family default
16903 , the corresponding centered label is 
16904 \begin_inset Quotes eld
16905 \end_inset
16906
16907 <Visible Text Follows>
16908 \begin_inset Quotes erd
16909 \end_inset
16910
16911  in blazing green.
16912  Paragraphs following this label behave normally.
16913  Note that the beginning of a new 
16914 \family sans
16915 Slide
16916 \family default
16917
16918 \family sans
16919 Overlay
16920 \family default
16921 , or 
16922 \family sans
16923 Note
16924 \family default
16925  automatically shuts off an 
16926 \family sans
16927 InvisibleText
16928 \family default
16929 .
16930  It's therefore not necessary to use 
16931 \family sans
16932 VisibleText
16933 \family default
16934  at the end of a 
16935 \family sans
16936 Slide
16937 \family default
16938 .
16939 \end_layout
16940
16941 \begin_layout Standard
16942 By now, it should be obvious how to create overlay transparencies using
16943  the proper combination of 
16944 \family sans
16945 InvisibleText
16946 \family default
16947  and 
16948 \family sans
16949 VisibleText
16950 \family default
16951  on a 
16952 \family sans
16953 Slide
16954 \family default
16955  and 
16956 \family sans
16957 Overlay
16958 \family default
16959 :
16960 \end_layout
16961
16962 \begin_layout Enumerate
16963 Create a 
16964 \family sans
16965 Slide
16966 \family default
16967 , including everything that will appear on it, whether on the main slide
16968  or on the 
16969 \family sans
16970 Overlay
16971 \family default
16972 .
16973 \end_layout
16974
16975 \begin_layout Enumerate
16976 Before each figure or paragraph that will appear only on the 
16977 \family sans
16978 Overlay
16979 \family default
16980 , insert an 
16981 \family sans
16982 InvisibleText
16983 \family default
16984  environment.
16985  If necessary, insert a 
16986 \family sans
16987 VisibleText
16988 \family default
16989  environment after the 
16990 \family sans
16991 Overlay
16992 \family default
16993 -only text.
16994 \end_layout
16995
16996 \begin_layout Enumerate
16997 Start an 
16998 \family sans
16999 Overlay
17000 \family default
17001  immediately following the 
17002 \family sans
17003 Slide
17004 \family default
17005 .
17006 \end_layout
17007
17008 \begin_layout Enumerate
17009 Copy the contents of this 
17010 \family sans
17011 Slide
17012 \family default
17013  into the 
17014 \family sans
17015 Overlay
17016 \family default
17017 .
17018 \end_layout
17019
17020 \begin_layout Enumerate
17021 Within the 
17022 \family sans
17023 Overlay
17024 \family default
17025 , change all of the 
17026 \family sans
17027 InvisibleText
17028 \family default
17029  lines to 
17030 \family sans
17031 VisibleText
17032 \family default
17033  and vice-versa.
17034 \end_layout
17035
17036 \begin_layout Standard
17037 That's it.
17038  You've just made an 
17039 \family sans
17040 Overlay
17041 \family default
17042 .
17043 \end_layout
17044
17045 \begin_layout Standard
17046 There's one problem with the way I've designed the LyX 
17047 \family sans
17048 slides
17049 \family default
17050  class: you can't make text in the middle of a paragraph invisible, nor
17051  make text in the middle of an invisible paragraph visible again.
17052  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17053 \begin_inset Foot
17054 status collapsed
17055
17056 \begin_layout Plain Layout
17057 The commands of interest are: 
17058 \end_layout
17059
17060 \begin_layout Itemize
17061
17062 \family typewriter
17063 {
17064 \backslash
17065 invisible \SpecialChar \ldots{}
17066  }
17067 \end_layout
17068
17069 \begin_layout Itemize
17070
17071 \family typewriter
17072 {
17073 \backslash
17074 visible \SpecialChar \ldots{}
17075  }
17076 \end_layout
17077
17078 \begin_layout Plain Layout
17079 \SpecialChar \ldots{}
17080 and need to be marked as TeX.
17081  The text whose 
17082 \begin_inset Quotes eld
17083 \end_inset
17084
17085 visibility
17086 \begin_inset Quotes erd
17087 \end_inset
17088
17089  you wish to change goes in between the brackets [and after the 
17090 \family typewriter
17091
17092 \backslash
17093 invisible
17094 \family default
17095  or 
17096 \family typewriter
17097
17098 \backslash
17099 visible
17100 \family default
17101  command].
17102  If you don't know how to mark text as TeX, see the appropriate section
17103  of the 
17104 \emph on
17105 User's Guide
17106 \emph default
17107 .
17108 \end_layout
17109
17110 \end_inset
17111
17112
17113 \end_layout
17114
17115 \begin_layout Subsubsection
17116 Using 
17117 \family sans
17118 Note
17119 \family default
17120  with 
17121 \family sans
17122 Slide
17123 \family default
17124
17125 \begin_inset CommandInset label
17126 LatexCommand label
17127 name "sec:slideNote"
17128
17129 \end_inset
17130
17131
17132 \end_layout
17133
17134 \begin_layout Standard
17135 Like an 
17136 \family sans
17137 Overlay
17138 \family default
17139 , a 
17140 \family sans
17141 Note
17142 \family default
17143  is associated with a 
17144 \begin_inset Quotes eld
17145 \end_inset
17146
17147 parent
17148 \begin_inset Quotes erd
17149 \end_inset
17150
17151  
17152 \family sans
17153 Slide
17154 \family default
17155 .
17156  Here, too, the LyX 
17157 \family sans
17158 slides
17159 \family default
17160  class provides visual cues.
17161  The label for a 
17162 \family sans
17163 Note
17164 \family default
17165  is shorter than that of a 
17166 \family sans
17167 Slide
17168 \family default
17169  [yet longer than that of an 
17170 \family sans
17171 Overlay
17172 \family default
17173 ] and, like the label of an 
17174 \family sans
17175 Overlay
17176 \family default
17177  is shockingly magenta.
17178  Additionally, the printed 
17179 \family sans
17180 Note
17181 \family default
17182  has the page number of its 
17183 \begin_inset Quotes eld
17184 \end_inset
17185
17186 parent
17187 \begin_inset Quotes erd
17188 \end_inset
17189
17190  
17191 \family sans
17192 Slide
17193 \family default
17194 , appended by 
17195 \begin_inset Quotes eld
17196 \end_inset
17197
17198
17199 \family typewriter
17200 -
17201 \family default
17202 1
17203 \begin_inset Quotes erd
17204 \end_inset
17205
17206
17207 \begin_inset Quotes eld
17208 \end_inset
17209
17210
17211 \family typewriter
17212 -
17213 \family default
17214 2
17215 \begin_inset Quotes erd
17216 \end_inset
17217
17218
17219 \begin_inset Quotes eld
17220 \end_inset
17221
17222
17223 \family typewriter
17224 -
17225 \family default
17226 3
17227 \begin_inset Quotes erd
17228 \end_inset
17229
17230 , etc.
17231  You can have multiple 
17232 \family sans
17233 Note
17234 \family default
17235 s associated with a single 
17236 \family sans
17237 Slide
17238 \family default
17239 , and, as with 
17240 \family sans
17241 Slide
17242 \family default
17243  and 
17244 \family sans
17245 Overlay
17246 \family default
17247 , you'll probably want to break up long 
17248 \family sans
17249 Note
17250 \family default
17251 s so that they fit on a single sheet of paper.
17252 \end_layout
17253
17254 \begin_layout Standard
17255 The purpose of a 
17256 \family sans
17257 Note
17258 \family default
17259  is obvious: it contains anything additional you might want to say about
17260  a 
17261 \family sans
17262 Slide
17263 \family default
17264 .
17265  It could also be used as a sheet of reminders for a particular 
17266 \family sans
17267 Slide
17268 \family default
17269 .
17270  In the case of the latter, you might want to make use of time markers.
17271  Currently, the LyX 
17272 \family sans
17273 slides
17274 \family default
17275  class has no 
17276 \begin_inset Quotes eld
17277 \end_inset
17278
17279 native
17280 \begin_inset Quotes erd
17281 \end_inset
17282
17283  support for time markers, a 
17284 \noun on
17285 SliTeX
17286 \noun default
17287  feature.
17288  So, you'll have to resort to using the LaTeX codes.
17289 \end_layout
17290
17291 \begin_layout Standard
17292 To use time markers, you'll need to specify the extra class option 
17293 \begin_inset Quotes eld
17294 \end_inset
17295
17296
17297 \family typewriter
17298 clock
17299 \family default
17300
17301 \begin_inset Quotes erd
17302 \end_inset
17303
17304  [see section
17305 \begin_inset space ~
17306 \end_inset
17307
17308
17309 \begin_inset CommandInset ref
17310 LatexCommand ref
17311 reference "sec:slidesetup"
17312
17313 \end_inset
17314
17315 ].
17316  This option turns on timing marks, which will appear in the lower-left-hand
17317  corner of every 
17318 \family sans
17319 Note
17320 \family default
17321  you generate.
17322  To set what appears in the time marker, you use the LaTeX commands 
17323 \begin_inset Quotes eld
17324 \end_inset
17325
17326
17327 \family typewriter
17328
17329 \backslash
17330 settime{}
17331 \family default
17332
17333 \begin_inset Quotes erd
17334 \end_inset
17335
17336  and 
17337 \begin_inset Quotes eld
17338 \end_inset
17339
17340
17341 \family typewriter
17342
17343 \backslash
17344 addtime{}
17345 \family default
17346
17347 \begin_inset Quotes erd
17348 \end_inset
17349
17350 .
17351  The arguments of both commands are time measured in seconds.
17352  
17353 \begin_inset Quotes eld
17354 \end_inset
17355
17356
17357 \family typewriter
17358
17359 \backslash
17360 settime{}
17361 \family default
17362
17363 \begin_inset Quotes erd
17364 \end_inset
17365
17366  sets the time marker to a given time.
17367  
17368 \begin_inset Quotes eld
17369 \end_inset
17370
17371
17372 \family typewriter
17373
17374 \backslash
17375 addtime{}
17376 \family default
17377
17378 \begin_inset Quotes erd
17379 \end_inset
17380
17381  increments the time marker by the specified amount.
17382  Using time markers and 
17383 \family sans
17384 Note
17385 \family default
17386 s in this fashion, you can remind yourself how much time to spend on a particula
17387
17388 \family sans
17389 Slide
17390 \family default
17391 .
17392 \end_layout
17393
17394 \begin_layout Standard
17395 There's one last feature to describe.
17396  Clearly, you'd like to print out all of your 
17397 \family sans
17398 Slide
17399 \family default
17400 s and 
17401 \family sans
17402 Overlay
17403 \family default
17404 s on transparencies while printing all of your 
17405 \family sans
17406 Note
17407 \family default
17408 s on plain paper.
17409  However, a 
17410 \family sans
17411 Note
17412 \family default
17413  
17414 \emph on
17415 must
17416 \emph default
17417  follow the 
17418 \family sans
17419 Slide
17420 \family default
17421  with which it is associated.
17422  What's a person to do?
17423 \end_layout
17424
17425 \begin_layout Standard
17426 Luckily, there are two LaTeX commands that allow you to select what to print
17427  out.
17428  Both must be placed into the preamble of your document.
17429  The command 
17430 \begin_inset Quotes eld
17431 \end_inset
17432
17433
17434 \family typewriter
17435
17436 \backslash
17437 onlyslides{
17438 \backslash
17439 slides}
17440 \family default
17441
17442 \begin_inset Quotes erd
17443 \end_inset
17444
17445  will cause the output to contain only the 
17446 \family sans
17447 Slide
17448 \family default
17449 s and 
17450 \family sans
17451 Overlay
17452 \family default
17453 s.
17454  Correspondingly, the command 
17455 \begin_inset Quotes eld
17456 \end_inset
17457
17458
17459 \family typewriter
17460
17461 \backslash
17462 onlynotes{
17463 \backslash
17464 notes}
17465 \family default
17466
17467 \begin_inset Quotes erd
17468 \end_inset
17469
17470  prevents the output of anything but 
17471 \family sans
17472 Note
17473 \family default
17474 s.
17475  I'd advise placing both commands in the preamble and initially comment
17476  both out.
17477  You can then preview your entire presentation as you write.
17478  When you're done writing, you can then uncomment one of the two to select
17479  what you want to print.
17480  I like to uncomment 
17481 \begin_inset Quotes eld
17482 \end_inset
17483
17484
17485 \family typewriter
17486
17487 \backslash
17488 onlyslides{
17489 \backslash
17490 slides}
17491 \family default
17492
17493 \begin_inset Quotes erd
17494 \end_inset
17495
17496  , print to a file with 
17497 \begin_inset Quotes eld
17498 \end_inset
17499
17500
17501 \family typewriter
17502 -slides
17503 \family default
17504
17505 \begin_inset Quotes erd
17506 \end_inset
17507
17508  in its name, comment it back out, then uncomment 
17509 \begin_inset Quotes eld
17510 \end_inset
17511
17512
17513 \family typewriter
17514
17515 \backslash
17516 onlynotes{
17517 \backslash
17518 notes}
17519 \family default
17520
17521 \begin_inset Quotes erd
17522 \end_inset
17523
17524  and print to a 
17525 \begin_inset Quotes eld
17526 \end_inset
17527
17528
17529 \family typewriter
17530 *-notes.ps
17531 \family default
17532
17533 \begin_inset Quotes erd
17534 \end_inset
17535
17536  file.
17537  I can then send either file to a printer, loading transparencies or plain
17538  paper as appropriate.
17539 \end_layout
17540
17541 \begin_layout Standard
17542 You can also provide other arguments to the 
17543 \begin_inset Quotes eld
17544 \end_inset
17545
17546
17547 \family typewriter
17548
17549 \backslash
17550 onlyslides{}
17551 \family default
17552
17553 \begin_inset Quotes erd
17554 \end_inset
17555
17556  and 
17557 \begin_inset Quotes eld
17558 \end_inset
17559
17560
17561 \family typewriter
17562
17563 \backslash
17564 onlynotes{}
17565 \family default
17566
17567 \begin_inset Quotes erd
17568 \end_inset
17569
17570  commands.
17571  See a good LaTeX book for details.
17572 \end_layout
17573
17574 \begin_layout Subsection
17575 The 
17576 \family sans
17577 slides
17578 \family default
17579  Class Template File
17580 \end_layout
17581
17582 \begin_layout Standard
17583 I have also provided a template file, 
17584 \begin_inset Quotes eld
17585 \end_inset
17586
17587
17588 \family typewriter
17589 slides.lyx
17590 \family default
17591
17592 \begin_inset Quotes erd
17593 \end_inset
17594
17595 , with the 
17596 \family sans
17597 slides
17598 \family default
17599  class.
17600  To use it, begin your new presentation with 
17601 \family sans
17602 \bar under
17603 F
17604 \bar default
17605 ile\SpecialChar \menuseparator
17606 New
17607 \begin_inset space ~
17608 \end_inset
17609
17610 from
17611 \begin_inset space ~
17612 \end_inset
17613
17614
17615 \bar under
17616 T
17617 \bar default
17618 emplate
17619 \family default
17620 .
17621  Your new LyX presentation file will contain an example 
17622 \family sans
17623 Slide
17624 \family default
17625  – 
17626 \family sans
17627 Overlay
17628 \family default
17629  – 
17630 \family sans
17631 Note
17632 \family default
17633  triplet.
17634  The 
17635 \family sans
17636 Slide
17637 \family default
17638  and 
17639 \family sans
17640 Overlay
17641 \family default
17642  additionally contain an example of the use of 
17643 \family sans
17644 InvisibleText
17645 \family default
17646  and 
17647 \family sans
17648 VisibleText
17649 \family default
17650 .
17651  Lastly, the preamble will contain:
17652 \end_layout
17653
17654 \begin_layout LyX-Code
17655 % Uncomment to print out only slides and overlays
17656 \end_layout
17657
17658 \begin_layout LyX-Code
17659 %
17660 \end_layout
17661
17662 \begin_layout LyX-Code
17663 %
17664 \backslash
17665 onlyslides{
17666 \backslash
17667 slides}
17668 \begin_inset Newline newline
17669 \end_inset
17670
17671  
17672 \end_layout
17673
17674 \begin_layout LyX-Code
17675 % Uncomment to print out only notes
17676 \end_layout
17677
17678 \begin_layout LyX-Code
17679 %
17680 \end_layout
17681
17682 \begin_layout LyX-Code
17683 %
17684 \backslash
17685 onlynotes{
17686 \backslash
17687 notes}
17688 \end_layout
17689
17690 \begin_layout Standard
17691 One final thing: I created this class to support the LaTeX2e 
17692 \begin_inset Quotes eld
17693 \end_inset
17694
17695
17696 \noun on
17697 SliTeX
17698 \noun default
17699  emulation
17700 \begin_inset Quotes erd
17701 \end_inset
17702
17703  class, one of the built-in LaTeX2e classes.
17704  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17705  built-in slide class.
17706  It's here if you want it or need it.
17707  There exist other LaTeX2e classes for creating presentations, such as the
17708  
17709 \family sans
17710 Foils
17711 \family default
17712  class [see section
17713 \begin_inset space ~
17714 \end_inset
17715
17716
17717 \begin_inset CommandInset ref
17718 LatexCommand ref
17719 reference "sec:foiltex"
17720
17721 \end_inset
17722
17723 ] or the 
17724 \begin_inset Quotes eld
17725 \end_inset
17726
17727
17728 \family typewriter
17729 seminar
17730 \family default
17731
17732 \begin_inset Quotes erd
17733 \end_inset
17734
17735  package [present on some TeX distributions].
17736  The latter is not yet supported under LyX.
17737 \begin_inset Foot
17738 status collapsed
17739
17740 \begin_layout Plain Layout
17741 Perhaps you can take on the task\SpecialChar \ldots{}
17742
17743 \end_layout
17744
17745 \end_inset
17746
17747  I know nothing about these other classes.
17748  Try them out to see what sort of alternative they provide.
17749 \end_layout
17750
17751 \begin_layout Chapter
17752 LyX Features needing Extra Software
17753 \end_layout
17754
17755 \begin_layout Section
17756 Checking TeX
17757 \end_layout
17758
17759 \begin_layout Standard
17760 by 
17761 \noun on
17762 Asger Alstrup
17763 \end_layout
17764
17765 \begin_layout Subsection
17766 Introduction
17767 \end_layout
17768
17769 \begin_layout Standard
17770 If you have the 
17771 \family typewriter
17772 chktex
17773 \family default
17774  program installed
17775 \begin_inset Foot
17776 status collapsed
17777
17778 \begin_layout Plain Layout
17779
17780 \family typewriter
17781 chktex
17782 \family default
17783  is not yet available when you are using the LaTeX distribution MiKTeX.
17784 \end_layout
17785
17786 \end_inset
17787
17788 , you'll find in the 
17789 \family sans
17790 Tools
17791 \family default
17792  menu the entry: 
17793 \family sans
17794 Check
17795 \begin_inset space ~
17796 \end_inset
17797
17798 TeX
17799 \family default
17800 .
17801  You can get 
17802 \family typewriter
17803 chktex
17804 \family default
17805  it from CTAN, 
17806 \begin_inset CommandInset href
17807 LatexCommand href
17808 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17809
17810 \end_inset
17811
17812 .
17813 \end_layout
17814
17815 \begin_layout Standard
17816 The 
17817 \family sans
17818 ChkTeX
17819 \family default
17820  package is a program that was written by 
17821 \begin_inset Flex Noun
17822 status collapsed
17823
17824 \begin_layout Plain Layout
17825 Jens T.
17826 \begin_inset space ~
17827 \end_inset
17828
17829 Berger Thielemann
17830 \end_layout
17831
17832 \end_inset
17833
17834  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17835  and easy to forget.
17836  The program runs over your LaTeX file, checks the integrity of the file,
17837  and flags some common errors.
17838  In other technical words, it is 
17839 \family typewriter
17840 lint
17841 \family default
17842  for LaTeX.
17843 \end_layout
17844
17845 \begin_layout Standard
17846 Well, what is a syntax checker doing in LyX which is supposed to produce
17847  correct LaTeX anyways? The answer is simple: Just as 
17848 \family typewriter
17849 Lint
17850 \family default
17851  not only checks the 
17852 \emph on
17853 syntax
17854 \emph default
17855  of C programs, but also does 
17856 \emph on
17857 semantic
17858 \emph default
17859  checks for type-errors, 
17860 \family sans
17861 ChkTeX
17862 \family default
17863  catches some common 
17864 \emph on
17865 typographic
17866 \emph default
17867  errors, in addition to the syntactical ones.
17868  Specifically, 
17869 \family sans
17870 ChkTeX
17871 \family default
17872  is capable of detecting several common errors, such as
17873 \end_layout
17874
17875 \begin_layout Itemize
17876 Ellipsis detection:
17877 \begin_inset Newline newline
17878 \end_inset
17879
17880 Use \SpecialChar \ldots{}
17881  instead of ...
17882 \end_layout
17883
17884 \begin_layout Itemize
17885 No space in front of/after parenthesis:
17886 \begin_inset Newline newline
17887 \end_inset
17888
17889 ( wrong spacing )
17890 \end_layout
17891
17892 \begin_layout Itemize
17893 Enforcement of normal space after common abbreviations:
17894 \begin_inset Newline newline
17895 \end_inset
17896
17897 e.
17898 \begin_inset space \thinspace{}
17899 \end_inset
17900
17901 g.
17902 \begin_inset space \space{}
17903 \end_inset
17904
17905 is too wide spacing.
17906 \end_layout
17907
17908 \begin_layout Itemize
17909 Enforcement of end-of-sentence space when the last sentence ends with a
17910  capital letter:
17911 \begin_inset Newline newline
17912 \end_inset
17913
17914 This is a TEST.
17915  And this is wrong spacing.
17916 \end_layout
17917
17918 \begin_layout Itemize
17919 Space in front of labels and similar commands:
17920 \begin_inset Newline newline
17921 \end_inset
17922
17923 The label should stick right up to the text to avoid falling to a wrong
17924  page.
17925  
17926 \begin_inset CommandInset label
17927 LatexCommand label
17928 name "sec:chktex"
17929
17930 \end_inset
17931
17932  
17933 \begin_inset Foot
17934 status collapsed
17935
17936 \begin_layout Plain Layout
17937 This footnote is in danger of falling off to a wrong page
17938 \end_layout
17939
17940 \end_inset
17941
17942  The label is separated too much.
17943 \end_layout
17944
17945 \begin_layout Itemize
17946 Space in front of references, instead of hard spaces:
17947 \begin_inset Newline newline
17948 \end_inset
17949
17950 In you are in bad luck, the text will break right between the referenced
17951  text and reference number, and that's a pity.
17952  See section 
17953 \begin_inset CommandInset ref
17954 LatexCommand ref
17955 reference "sec:chktex"
17956
17957 \end_inset
17958
17959 .
17960 \end_layout
17961
17962 \begin_layout Itemize
17963 Use of 
17964 \begin_inset Quotes eld
17965 \end_inset
17966
17967 x
17968 \begin_inset Quotes erd
17969 \end_inset
17970
17971  instead of 
17972 \begin_inset Formula $\times$
17973 \end_inset
17974
17975  between numbers:
17976 \begin_inset Newline newline
17977 \end_inset
17978
17979 2x2 looks cheap compared to 
17980 \begin_inset Formula $2\times2$
17981 \end_inset
17982
17983 .
17984 \end_layout
17985
17986 \begin_layout Standard
17987 and more \SpecialChar \ldots{}
17988  It is an invaluable tool when you are 
17989 \begin_inset Quotes eld
17990 \end_inset
17991
17992 finishing up
17993 \begin_inset Quotes erd
17994 \end_inset
17995
17996  your document before printing, and you should run it right after the obligatory
17997  spelling check, and before you go fine tuning the typesetting.
17998 \end_layout
17999
18000 \begin_layout Subsection
18001 How to use it
18002 \end_layout
18003
18004 \begin_layout Standard
18005 If you have the program installed, usage is as simple as choosing 
18006 \family sans
18007 Tools\SpecialChar \menuseparator
18008 Check
18009 \begin_inset space ~
18010 \end_inset
18011
18012 TeX
18013 \family default
18014 .
18015  This will make LyX generate a LaTeX file of your document, start 
18016 \family sans
18017 ChkTeX
18018 \family default
18019  to check it, and then make LyX insert 
18020 \begin_inset Quotes eld
18021 \end_inset
18022
18023 error boxes
18024 \begin_inset Quotes erd
18025 \end_inset
18026
18027  with the warnings from 
18028 \family sans
18029 ChkTeX
18030 \family default
18031 , if there were any.
18032  The warnings will be placed close to the point of the mistake, and you
18033  can quickly find them by using the 
18034 \family sans
18035 Navigate\SpecialChar \menuseparator
18036 Error
18037 \family default
18038  menu item, or the shortcut key 
18039 \family sans
18040 C-g
18041 \family default
18042  from the default 
18043 \family typewriter
18044 cua
18045 \family default
18046  bind file.
18047  Open the error boxes by clicking on them with the mouse, or use the shortcut
18048  key 
18049 \family sans
18050 C-i
18051 \family default
18052  from 
18053 \family typewriter
18054 cua
18055 \family default
18056  bindings, or the corresponding 
18057 \family sans
18058 C-o
18059 \family default
18060  for the alternate 
18061 \family typewriter
18062 emacs
18063 \family default
18064  bind file.
18065  Read the warning and correct the mistake, if it is a mistake.
18066  If you have trouble understanding what the warning is about, you can safely
18067  ignore it.
18068  Remember that there is a hidden layer between the document on screen and
18069  the technical details in invoking 
18070 \family sans
18071 ChkTeX
18072 \family default
18073 , and this gap can make some warnings seem arcane or just right down plain
18074  silly.
18075 \end_layout
18076
18077 \begin_layout Standard
18078 This document is an excellent testing bed for the feature, and it should
18079  provide quite a few warnings for you to fiddle with.
18080  Since computers are only so smart, expect most of the warnings to be false
18081  alarms, though.
18082 \end_layout
18083
18084 \begin_layout Subsection
18085 How to fine tune it
18086 \end_layout
18087
18088 \begin_layout Standard
18089 Sometimes, you'll find that 
18090 \family sans
18091 ChkTeX
18092 \family default
18093  makes more noise than suits your mood.
18094  Then you can choose not to use it, wait until your mood changes, or try
18095  to customize 
18096 \family sans
18097 ChkTeX
18098 \family default
18099  to get better along with you.
18100 \end_layout
18101
18102 \begin_layout Standard
18103 Although 
18104 \family sans
18105 ChkTeX
18106 \family default
18107  
18108 \emph on
18109 is
18110 \emph default
18111  very configurable and extensible, you shouldn't expect to solve all problems
18112  with 
18113 \family sans
18114 ChkTeX
18115 \family default
18116  in LyX this way.
18117  Since LyX has to generate a somewhat special LaTeX file to be able to match
18118  the line numbers from the 
18119 \family sans
18120 ChkTeX
18121 \family default
18122  output
18123 \begin_inset Foot
18124 status collapsed
18125
18126 \begin_layout Plain Layout
18127 You can inspect the specific output from 
18128 \family sans
18129 chktex
18130 \family default
18131  by using 
18132 \family sans
18133 Edit\SpecialChar \menuseparator
18134 View
18135 \begin_inset space ~
18136 \end_inset
18137
18138 LaTeX
18139 \begin_inset space ~
18140 \end_inset
18141
18142 Log
18143 \family default
18144  right after a 
18145 \family sans
18146 chktex
18147 \family default
18148  run.
18149 \end_layout
18150
18151 \end_inset
18152
18153  to the internal document structure, some of the warnings will not seen
18154  to appear correctly.
18155  There are two things you can do about this:
18156 \end_layout
18157
18158 \begin_layout Itemize
18159 Fine tune the 
18160 \family sans
18161 ChkTeX
18162 \family default
18163  invocation command line in 
18164 \family sans
18165 Preferences
18166 \family default
18167  (tabs 
18168 \family sans
18169 Outputs
18170 \family default
18171
18172 \family sans
18173 Misc
18174 \family default
18175 ), or the global 
18176 \family sans
18177 ChkTeX
18178 \family default
18179  installation configuration file (usually with the file 
18180 \family typewriter
18181 chktexrc
18182 \family default
18183 ).
18184  See below to learn what warnings can be enabled and disabled on the command
18185  line.
18186  
18187 \end_layout
18188
18189 \begin_layout Itemize
18190 Export your document as a raw LaTeX file using 
18191 \family sans
18192 File\SpecialChar \menuseparator
18193 Export\SpecialChar \menuseparator
18194 LaTeX
18195 \family default
18196  and run 
18197 \family typewriter
18198 chktex
18199 \family default
18200  manually on that.
18201  Invoked in this way, it can be a hassle to find the corresponding place
18202  in the document inside LyX, but with a little patience, you should be able
18203  to do it.
18204 \end_layout
18205
18206 \begin_layout Standard
18207 Here follows the warning messages that can be enabled and disabled in 
18208 \family sans
18209 Preferences
18210 \family default
18211 .
18212  Use 
18213 \family typewriter
18214 -n#
18215 \family default
18216  to disable a warning, and 
18217 \family typewriter
18218 -w#
18219 \family default
18220  to enable a warning.
18221  The emphasized entries are disabled by default, because the default is
18222  "
18223 \family typewriter
18224 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18225 \family default
18226 ".
18227 \end_layout
18228
18229 \begin_layout Standard
18230 Notice that you should only use the options that enable and disable warnings,
18231  because LyX relies on some of the other command line parameters to be set
18232  in a specific way to have a chance to communicate with 
18233 \family typewriter
18234 chktex
18235 \family default
18236 .
18237 \end_layout
18238
18239 \begin_layout Enumerate
18240
18241 \size small
18242 \emph on
18243 Command terminated with space.
18244 \end_layout
18245
18246 \begin_layout Enumerate
18247
18248 \size small
18249 Non-breaking space (
18250 \begin_inset Quotes eld
18251 \end_inset
18252
18253
18254 \family typewriter
18255 ~
18256 \family default
18257
18258 \begin_inset Quotes erd
18259 \end_inset
18260
18261 ) should have been used.
18262 \end_layout
18263
18264 \begin_layout Enumerate
18265
18266 \size small
18267 \emph on
18268 You should enclose the previous parenthesis with 
18269 \begin_inset Quotes eld
18270 \end_inset
18271
18272
18273 \family typewriter
18274 {}
18275 \family default
18276
18277 \begin_inset Quotes erd
18278 \end_inset
18279
18280 .
18281 \end_layout
18282
18283 \begin_layout Enumerate
18284
18285 \size small
18286 Italic correction (
18287 \begin_inset Quotes eld
18288 \end_inset
18289
18290
18291 \family typewriter
18292
18293 \backslash
18294 /
18295 \family default
18296
18297 \begin_inset Quotes erd
18298 \end_inset
18299
18300 ) found in non-italic buffer.
18301 \end_layout
18302
18303 \begin_layout Enumerate
18304
18305 \size small
18306 Italic correction (
18307 \begin_inset Quotes eld
18308 \end_inset
18309
18310
18311 \family typewriter
18312
18313 \backslash
18314 /
18315 \family default
18316
18317 \begin_inset Quotes erd
18318 \end_inset
18319
18320 ) found more than once.
18321 \end_layout
18322
18323 \begin_layout Enumerate
18324
18325 \size small
18326 \emph on
18327 No italic correction (
18328 \begin_inset Quotes eld
18329 \end_inset
18330
18331
18332 \family typewriter
18333
18334 \backslash
18335 /
18336 \family default
18337
18338 \begin_inset Quotes erd
18339 \end_inset
18340
18341 ) found.
18342 \end_layout
18343
18344 \begin_layout Enumerate
18345
18346 \size small
18347 Accent command 
18348 \begin_inset Quotes eld
18349 \end_inset
18350
18351
18352 \family typewriter
18353 cmd
18354 \family default
18355
18356 \begin_inset Quotes erd
18357 \end_inset
18358
18359  needs use of 
18360 \begin_inset Quotes eld
18361 \end_inset
18362
18363
18364 \family typewriter
18365 cmd
18366 \family default
18367
18368 \begin_inset Quotes erd
18369 \end_inset
18370
18371 .
18372 \end_layout
18373
18374 \begin_layout Enumerate
18375
18376 \size small
18377 Wrong length of dash may have been used.
18378 \end_layout
18379
18380 \begin_layout Enumerate
18381
18382 \size small
18383 \emph on
18384 \begin_inset Quotes eld
18385 \end_inset
18386
18387
18388 \family typewriter
18389 %s
18390 \family default
18391
18392 \begin_inset Quotes erd
18393 \end_inset
18394
18395  expected, found 
18396 \begin_inset Quotes eld
18397 \end_inset
18398
18399
18400 \family typewriter
18401 %s
18402 \family default
18403
18404 \begin_inset Quotes erd
18405 \end_inset
18406
18407 .
18408 \end_layout
18409
18410 \begin_layout Enumerate
18411
18412 \size small
18413 Solo 
18414 \begin_inset Quotes eld
18415 \end_inset
18416
18417
18418 \family typewriter
18419 %s
18420 \family default
18421
18422 \begin_inset Quotes erd
18423 \end_inset
18424
18425  found.
18426 \end_layout
18427
18428 \begin_layout Enumerate
18429
18430 \size small
18431 You should use 
18432 \begin_inset Quotes eld
18433 \end_inset
18434
18435
18436 \family typewriter
18437 %s
18438 \family default
18439
18440 \begin_inset Quotes erd
18441 \end_inset
18442
18443  to achieve an ellipsis.
18444 \end_layout
18445
18446 \begin_layout Enumerate
18447
18448 \size small
18449 Inter-word spacing (
18450 \begin_inset Quotes eld
18451 \end_inset
18452
18453
18454 \family typewriter
18455
18456 \backslash
18457
18458 \family default
18459  
18460 \begin_inset Quotes eld
18461 \end_inset
18462
18463 ) should perhaps be used.
18464 \end_layout
18465
18466 \begin_layout Enumerate
18467
18468 \size small
18469 Inter-sentence spacing (
18470 \begin_inset Quotes eld
18471 \end_inset
18472
18473
18474 \family typewriter
18475
18476 \backslash
18477 @
18478 \family default
18479
18480 \begin_inset Quotes erd
18481 \end_inset
18482
18483 ) should perhaps be used.
18484 \end_layout
18485
18486 \begin_layout Enumerate
18487
18488 \size small
18489 Could not find argument for command.
18490 \end_layout
18491
18492 \begin_layout Enumerate
18493
18494 \size small
18495 No match found for 
18496 \begin_inset Quotes eld
18497 \end_inset
18498
18499
18500 \family typewriter
18501 %s
18502 \family default
18503
18504 \begin_inset Quotes erd
18505 \end_inset
18506
18507 .
18508 \end_layout
18509
18510 \begin_layout Enumerate
18511
18512 \size small
18513 Math mode still on at end of LaTeX file.
18514 \end_layout
18515
18516 \begin_layout Enumerate
18517
18518 \size small
18519 Number of 
18520 \begin_inset Quotes eld
18521 \end_inset
18522
18523
18524 \family typewriter
18525 char
18526 \family default
18527
18528 \begin_inset Quotes erd
18529 \end_inset
18530
18531  doesn't match the number of 
18532 \begin_inset Quotes eld
18533 \end_inset
18534
18535
18536 \family typewriter
18537 char
18538 \family default
18539
18540 \begin_inset Quotes erd
18541 \end_inset
18542
18543 .
18544 \end_layout
18545
18546 \begin_layout Enumerate
18547
18548 \size small
18549 You should use either 
18550 \family typewriter
18551
18552 \begin_inset Quotes eld
18553 \end_inset
18554
18555
18556 \family default
18557  or 
18558 \family typewriter
18559
18560 \begin_inset Quotes erd
18561 \end_inset
18562
18563
18564 \family default
18565  as an alternative to 
18566 \begin_inset Quotes eld
18567 \end_inset
18568
18569
18570 \family typewriter
18571 "
18572 \family default
18573
18574 \begin_inset Quotes erd
18575 \end_inset
18576
18577 .
18578 \end_layout
18579
18580 \begin_layout Enumerate
18581
18582 \size small
18583 You should use "
18584 \family typewriter
18585 '
18586 \family default
18587 " (ASCII 39) instead of "
18588 \family typewriter
18589 ´
18590 \family default
18591 " (ASCII 180).
18592 \end_layout
18593
18594 \begin_layout Enumerate
18595
18596 \size small
18597 User-specified pattern found.
18598 \end_layout
18599
18600 \begin_layout Enumerate
18601
18602 \size small
18603 This command might not be intended.
18604 \end_layout
18605
18606 \begin_layout Enumerate
18607
18608 \size small
18609 \emph on
18610 Comment displayed.
18611 \end_layout
18612
18613 \begin_layout Enumerate
18614
18615 \size small
18616 Either 
18617 \family typewriter
18618 ''
18619 \backslash
18620 ,'
18621 \family default
18622  or 
18623 \family typewriter
18624 '
18625 \backslash
18626 ,''
18627 \family default
18628  will look better.
18629 \end_layout
18630
18631 \begin_layout Enumerate
18632
18633 \size small
18634 Delete this space to maintain correct page references.
18635 \end_layout
18636
18637 \begin_layout Enumerate
18638
18639 \size small
18640 \emph on
18641 You might wish to put this between a pair of 
18642 \begin_inset Quotes eld
18643 \end_inset
18644
18645
18646 \family typewriter
18647 {}
18648 \family default
18649
18650 \begin_inset Quotes erd
18651 \end_inset
18652
18653 .
18654 \end_layout
18655
18656 \begin_layout Enumerate
18657
18658 \size small
18659 You ought to remove spaces in front of punctuation.
18660 \end_layout
18661
18662 \begin_layout Enumerate
18663
18664 \size small
18665 Could not execute LaTeX command.
18666 \end_layout
18667
18668 \begin_layout Enumerate
18669
18670 \size small
18671 Don't use 
18672 \family typewriter
18673
18674 \backslash
18675 /
18676 \family default
18677  in front of small punctuation.
18678 \end_layout
18679
18680 \begin_layout Enumerate
18681
18682 \family typewriter
18683 \size small
18684 $
18685 \backslash
18686 times$
18687 \family default
18688  may look prettier here.
18689 \end_layout
18690
18691 \begin_layout Enumerate
18692
18693 \size small
18694 \emph on
18695 Multiple spaces detected in output.
18696 \end_layout
18697
18698 \begin_layout Enumerate
18699
18700 \size small
18701 This text may be ignored.
18702 \end_layout
18703
18704 \begin_layout Enumerate
18705
18706 \size small
18707 Use 
18708 \family typewriter
18709
18710 \begin_inset Quotes eld
18711 \end_inset
18712
18713
18714 \family default
18715  to begin quotation, not 
18716 \family typewriter
18717 '
18718 \family default
18719 .
18720 \end_layout
18721
18722 \begin_layout Enumerate
18723
18724 \size small
18725 Use 
18726 \family typewriter
18727 '
18728 \family default
18729  to end quotation, not 
18730 \family typewriter
18731
18732 \begin_inset Quotes eld
18733 \end_inset
18734
18735
18736 \family default
18737 .
18738 \end_layout
18739
18740 \begin_layout Enumerate
18741
18742 \size small
18743 Don't mix quotes.
18744 \end_layout
18745
18746 \begin_layout Enumerate
18747
18748 \size small
18749 You should perhaps use 
18750 \begin_inset Quotes eld
18751 \end_inset
18752
18753
18754 \family typewriter
18755 cmd
18756 \family default
18757
18758 \begin_inset Quotes erd
18759 \end_inset
18760
18761  instead.
18762 \end_layout
18763
18764 \begin_layout Enumerate
18765
18766 \size small
18767 You should put a space in front of/after parenthesis.
18768 \end_layout
18769
18770 \begin_layout Enumerate
18771
18772 \size small
18773 You should avoid spaces in front of/after parenthesis.
18774 \end_layout
18775
18776 \begin_layout Enumerate
18777
18778 \size small
18779 \emph on
18780 You should not use punctuation in front of/after quotes.
18781 \end_layout
18782
18783 \begin_layout Enumerate
18784
18785 \size small
18786 Double space found.
18787 \end_layout
18788
18789 \begin_layout Enumerate
18790
18791 \size small
18792 You should put punctuation outside inner/inside display math mode.
18793 \end_layout
18794
18795 \begin_layout Enumerate
18796
18797 \size small
18798 You ought to not use primitive TeX in LaTeX code.
18799 \end_layout
18800
18801 \begin_layout Enumerate
18802
18803 \size small
18804 You should remove spaces in front of 
18805 \begin_inset Quotes eld
18806 \end_inset
18807
18808
18809 \family typewriter
18810 %s
18811 \family default
18812
18813 \begin_inset Quotes erd
18814 \end_inset
18815
18816
18817 \end_layout
18818
18819 \begin_layout Enumerate
18820
18821 \size small
18822 \begin_inset Quotes eld
18823 \end_inset
18824
18825
18826 \family typewriter
18827 %s
18828 \family default
18829
18830 \begin_inset Quotes erd
18831 \end_inset
18832
18833  is normally not followed by 
18834 \begin_inset Quotes eld
18835 \end_inset
18836
18837
18838 \family typewriter
18839 %c
18840 \family default
18841
18842 \begin_inset Quotes erd
18843 \end_inset
18844
18845 .
18846 \end_layout
18847
18848 \begin_layout Standard
18849 In later versions of LyX, we hope to provide a more complete interface to
18850  this tool (and it's smaller cousin 
18851 \family typewriter
18852 lacheck
18853 \family default
18854 ) to exploit the full power of it.
18855  But it's not exactly useless as it is now: go try it on one of your existing
18856  documents of a certain length and be surprised.
18857 \end_layout
18858
18859 \begin_layout Section
18860 Version Control in LyX
18861 \end_layout
18862
18863 \begin_layout Standard
18864 by
18865 \noun on
18866  Lars Gullik Bjønnes 
18867 \noun default
18868 and 
18869 \noun on
18870 Pavel Sanda
18871 \end_layout
18872
18873 \begin_layout Subsection
18874 Introduction
18875 \end_layout
18876
18877 \begin_layout Standard
18878 A friend of mine wanted to try LyX for a group project.
18879  When he didn't find support for version control or file locking, he dropped
18880  it.
18881  This angered me a bit, so I thought that I should at least make support
18882  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18883  This has been done.
18884  LyX now supports some of the most basic RCS/CVS/SVN commands.
18885  If you need something a bit more sophisticated you will have to do that
18886  manually in a terminal.
18887 \end_layout
18888
18889 \begin_layout Standard
18890 Also note that CVS support is not as good as subversion support so we advice
18891  using SVN instead.
18892  Good place to start with Subversion is SVN Book
18893 \begin_inset Foot
18894 status open
18895
18896 \begin_layout Plain Layout
18897 \begin_inset CommandInset href
18898 LatexCommand href
18899 target "http://svnbook.red-bean.com/"
18900
18901 \end_inset
18902
18903
18904 \end_layout
18905
18906 \end_inset
18907
18908 .
18909  In case of RCS you should read 
18910 \begin_inset Quotes eld
18911 \end_inset
18912
18913 rcsintro
18914 \begin_inset Quotes erd
18915 \end_inset
18916
18917  (a man file, read it with 
18918 \family typewriter
18919 man rcsintro
18920 \family default
18921 ).
18922  This file describes all the basic features of RCS.
18923  You should especially notice the comment about a RCS directory, and the
18924  notion of a master RCS file (the file ending in 
18925 \family typewriter
18926 ,v
18927 \family default
18928 ).
18929 \end_layout
18930
18931 \begin_layout Standard
18932 Before you begin to use the version control features in LyX, you should
18933  be familiar with RCS/CVS/SVN usage.
18934  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18935  package—no guarantees are made for older versions.
18936  Most of the log messages are not currently displayed after operations —
18937  you can check them in Messages pane if unsure.
18938 \end_layout
18939
18940 \begin_layout Standard
18941 For introducing your own external commands consult vc-command in the manual
18942  of LyX functions.
18943 \end_layout
18944
18945 \begin_layout Subsection
18946 RCS commands in LyX
18947 \end_layout
18948
18949 \begin_layout Standard
18950 The following sections describe the RCS commands supported by LyX.
18951  You can find them in the 
18952 \family sans
18953 File\SpecialChar \menuseparator
18954 Version
18955 \begin_inset space ~
18956 \end_inset
18957
18958 Control
18959 \family default
18960  submenu.
18961  LyX was tested against RCS 5.7.
18962 \end_layout
18963
18964 \begin_layout Subsubsection
18965
18966 \family sans
18967 Register
18968 \end_layout
18969
18970 \begin_layout Standard
18971 If your document is not under revision control, this is the only item shown
18972  in the menu.
18973  And if it is under revision control, the 
18974 \family sans
18975 Register
18976 \family default
18977  item is not visible.
18978  
18979 \end_layout
18980
18981 \begin_layout Standard
18982 This command registers your document with RCS (unless you are under the
18983  directory managed by CVS)\SpecialChar \@.
18984  You are asked interactively to supply an initial
18985  description of the document.
18986  The document is now set in Read-Only mode and you have to 
18987 \family sans
18988 Check
18989 \begin_inset space ~
18990 \end_inset
18991
18992 Out
18993 \begin_inset space ~
18994 \end_inset
18995
18996 For
18997 \begin_inset space ~
18998 \end_inset
18999
19000 Edit
19001 \family default
19002 , before making any changes to it.
19003  A document under revision control has a 
19004 \begin_inset Quotes eld
19005 \end_inset
19006
19007 [RCS:<version> <locker>]
19008 \begin_inset Quotes erd
19009 \end_inset
19010
19011  item tagged to the filename in the minibuffer.
19012 \end_layout
19013
19014 \begin_layout Standard
19015 RCS command that is run: 
19016 \family typewriter
19017 ci -q -u -i -t-"<initial description>" <file-name>
19018 \end_layout
19019
19020 \begin_layout Standard
19021 Read 
19022 \family typewriter
19023 man ci
19024 \family default
19025  to understand the switches.
19026  
19027 \end_layout
19028
19029 \begin_layout Subsubsection
19030
19031 \family sans
19032 Check In Changes
19033 \end_layout
19034
19035 \begin_layout Standard
19036 When you are finished editing a file, you check in your changes.
19037  When you do this, you are asked for a description of the changes.
19038  This is stored in the history log.
19039  The version number is bumped, your changes are applied to the master RCS
19040  file, the document is unlocked and set to Read-Only mode.
19041  
19042 \end_layout
19043
19044 \begin_layout Standard
19045 RCS command: 
19046 \family typewriter
19047 ci -q -u -m"<description>" <file-name>
19048 \end_layout
19049
19050 \begin_layout Subsubsection
19051
19052 \family sans
19053 Check Out For Edit
19054 \end_layout
19055
19056 \begin_layout Standard
19057 By doing this you lock the document so that only you can edit it.
19058  This will also make the document Read-Write only for you.
19059  You will usually continue editing for a while and when you are finished
19060  you check in your changes.
19061  The status line is changed to reflect that you have locked the file.
19062  
19063 \end_layout
19064
19065 \begin_layout Standard
19066 RCS command: 
19067 \family typewriter
19068 co -q -l <file-name>
19069 \end_layout
19070
19071 \begin_layout Subsubsection
19072
19073 \family sans
19074 Revert To Repository Version
19075 \end_layout
19076
19077 \begin_layout Standard
19078 This will discard all changes made to the document since the last check
19079  in.
19080  You get a warning before changes are discarded.
19081 \end_layout
19082
19083 \begin_layout Standard
19084 RCS command: 
19085 \family typewriter
19086 co -f -u<version> <file-name>
19087 \end_layout
19088
19089 \begin_layout Subsubsection
19090
19091 \family sans
19092 Undo Last Checkin
19093 \end_layout
19094
19095 \begin_layout Standard
19096 This makes as if the last check in never happened.
19097  No changes are made to the document loaded into LyX, but the last version
19098  is removed from the master RCS file.
19099  
19100 \end_layout
19101
19102 \begin_layout Standard
19103 RCS command: 
19104 \family typewriter
19105 rcs -o<version> <file-name>
19106 \end_layout
19107
19108 \begin_layout Subsubsection
19109
19110 \family sans
19111 Show History
19112 \end_layout
19113
19114 \begin_layout Standard
19115 This shows the complete history of the RCS document.
19116  The output of 
19117 \family typewriter
19118 rlog <file-name>
19119 \family default
19120  is shown in a browser.
19121  See 
19122 \family typewriter
19123 man rlog
19124 \family default
19125  for more info.
19126 \end_layout
19127
19128 \begin_layout Subsubsection
19129 Revision info
19130 \end_layout
19131
19132 \begin_layout Standard
19133 LyX supports RCS version number, author name, date and time of last commit.
19134  All those are extracted from 
19135 \family typewriter
19136 rlog -r <file-name>
19137 \family default
19138 .
19139  For other details see 
19140 \begin_inset CommandInset ref
19141 LatexCommand ref
19142 reference "sub:VCS-Revision-Information"
19143
19144 \end_inset
19145
19146  for details.
19147 \end_layout
19148
19149 \begin_layout Subsection
19150 CVS commands in LyX
19151 \end_layout
19152
19153 \begin_layout Standard
19154 A subset of CVS operations is supported by LyX.
19155  You can find the commands in the 
19156 \family sans
19157 File\SpecialChar \menuseparator
19158 Version
19159 \begin_inset space ~
19160 \end_inset
19161
19162 Control
19163 \family default
19164  submenu.
19165  The version control system SVN is more powerful, so please use it instead
19166  of CVS if possible.
19167 \end_layout
19168
19169 \begin_layout Subsubsection
19170
19171 \family sans
19172 General CVS usage
19173 \end_layout
19174
19175 \begin_layout Standard
19176 If you start from scratch with CVS you have to create your repository and
19177  checkout the working copy with external tools.
19178  If you're using a client-server setup you may need to login before doing
19179  the first repository checkout.
19180 \end_layout
19181
19182 \begin_layout Standard
19183 If your documents are under revision control and others are using the same
19184  repository problems arise when different changes to the same document at
19185  the same location happen.
19186  Standard CVS repositories doesn't operate with a file locking mechanism.
19187  This may be surprising, but conflicts only occur if people disagree on
19188  the proper content of the same part of a document.
19189  So, if co-workers are used to communicate regularly, these conflicts occur
19190  rarely.
19191  If they don't communicate they have a fundamental problem anyway.
19192  Nevertheless some people like to work with so called 
19193 \begin_inset Quotes eld
19194 \end_inset
19195
19196 reserved checkouts
19197 \begin_inset Quotes erd
19198 \end_inset
19199
19200 .
19201  If they do so the working copy of all files is readonly when checked out
19202  first and the user starts editing after using a special command to make
19203  the working copy writable.
19204  When the changes are checked in the working copy returns to readonly state.
19205  With LyX one has to edit the 
19206 \begin_inset Flex Code
19207 status collapsed
19208
19209 \begin_layout Plain Layout
19210 .cvsrc
19211 \end_layout
19212
19213 \end_inset
19214
19215  file and add the line 
19216 \begin_inset Flex Code
19217 status collapsed
19218
19219 \begin_layout Plain Layout
19220 cvs -r
19221 \end_layout
19222
19223 \end_inset
19224
19225  to work with reserved checkouts.
19226  The benefit is the possibility to see who is using a writable copy of some
19227  document.
19228  It's not guaranteed only one user makes a copy writable.
19229 \end_layout
19230
19231 \begin_layout Standard
19232 LyX tries to guess if you're using reserved or non-reserved checkouts.
19233  If your working copy is readonly or it is writable and an additional copy
19234  of your document exists in the CVS/Base sub-directory a reserved otherwise
19235  a non-reserved checkout is assumed.
19236  When a reserved checkout is detected you have to use 
19237 \begin_inset Flex MenuItem
19238 status collapsed
19239
19240 \begin_layout Plain Layout
19241 Check Out
19242 \end_layout
19243
19244 \end_inset
19245
19246  to make your working copy writable if it's readonly.
19247  After doing so the 
19248 \begin_inset Flex MenuItem
19249 status collapsed
19250
19251 \begin_layout Plain Layout
19252 Check In
19253 \end_layout
19254
19255 \end_inset
19256
19257  operation is possible and that makes your working copy readonly again after
19258  transferring your changes to the repository.
19259 \end_layout
19260
19261 \begin_layout Standard
19262 More information about CVS can be found here 
19263 \begin_inset Flex URL
19264 status collapsed
19265
19266 \begin_layout Plain Layout
19267
19268 http://www.nongnu.org/cvs
19269 \end_layout
19270
19271 \end_inset
19272
19273  and here 
19274 \begin_inset Flex URL
19275 status collapsed
19276
19277 \begin_layout Plain Layout
19278
19279 http://ximbiot.com/cvs
19280 \end_layout
19281
19282 \end_inset
19283
19284 .
19285 \end_layout
19286
19287 \begin_layout Standard
19288 Read 
19289 \family typewriter
19290 man cvs
19291 \family default
19292  to understand the sub-commands and the switches mentioned below.
19293 \end_layout
19294
19295 \begin_layout Subsubsection
19296
19297 \family sans
19298 Register
19299 \end_layout
19300
19301 \begin_layout Standard
19302 If your document is not under revision control, this is the only item shown
19303  in the menu.
19304  And if it is under revision control, the 
19305 \family sans
19306 \bar under
19307 R
19308 \bar default
19309 egister
19310 \family default
19311  item is not visible.
19312  
19313 \end_layout
19314
19315 \begin_layout Standard
19316 This command registers in CVS your document 
19317 \begin_inset Flex Strong
19318 status collapsed
19319
19320 \begin_layout Plain Layout
19321
19322 \emph on
19323 only
19324 \end_layout
19325
19326 \end_inset
19327
19328  in case you have already the documents directory under CVS control (in
19329  particular 
19330 \family typewriter
19331 CVS/Entries
19332 \family default
19333  file exists).
19334  This means you have to create or checkout the archive by yourself using
19335  external tools.
19336  (In case you forget that step LyX registers the document with RCS.)
19337 \end_layout
19338
19339 \begin_layout Standard
19340 Then you are asked interactively to supply an initial description of the
19341  document.
19342  Don't forget that registered file is not yet checked in.
19343 \end_layout
19344
19345 \begin_layout Standard
19346 CVS command that is run: 
19347 \family typewriter
19348 cvs -q add -m"<entered message>" "<file-name>"
19349 \end_layout
19350
19351 \begin_layout Standard
19352 The term 
19353 \family typewriter
19354 "<file-name>"
19355 \family default
19356  above and for all other CVS commands is an abbreviation for 
19357 \begin_inset Quotes eld
19358 \end_inset
19359
19360 change the current working directory to file location and use the file name
19361  without path component as argument
19362 \begin_inset Quotes erd
19363 \end_inset
19364
19365 .
19366 \end_layout
19367
19368 \begin_layout Subsubsection
19369
19370 \family sans
19371 Check In Changes
19372 \end_layout
19373
19374 \begin_layout Standard
19375 When you are finished editing a file, you commit your changes.
19376  When you do this and you had changed the document, you are asked for a
19377  description of the changes.
19378  After that changes are written to the repository.
19379  In case you didn't change the document and a reserved checkout is detected
19380  the reservation made on 
19381 \begin_inset Flex MenuItem
19382 status collapsed
19383
19384 \begin_layout Plain Layout
19385 Check Out
19386 \end_layout
19387
19388 \end_inset
19389
19390  is undone.
19391 \end_layout
19392
19393 \begin_layout Labeling
19394 \labelwidthstring 00.00.0000
19395 CVS
19396 \begin_inset space ~
19397 \end_inset
19398
19399 command: 
19400 \begin_inset space ~
19401 \end_inset
19402
19403
19404 \begin_inset Newline newline
19405 \end_inset
19406
19407
19408 \begin_inset Flex Code
19409 status collapsed
19410
19411 \begin_layout Plain Layout
19412 cvs 
19413 \family typewriter
19414 -q commit -m"<description>" "<file-name>"
19415 \end_layout
19416
19417 \end_inset
19418
19419  or
19420 \begin_inset Newline newline
19421 \end_inset
19422
19423
19424 \begin_inset Flex Code
19425 status collapsed
19426
19427 \begin_layout Plain Layout
19428 cvs -q unedit 
19429 \family typewriter
19430 "<file-name>"
19431 \end_layout
19432
19433 \end_inset
19434
19435
19436 \end_layout
19437
19438 \begin_layout Subsubsection
19439
19440 \family sans
19441 Check Out Changes
19442 \end_layout
19443
19444 \begin_layout Standard
19445 When you are sharing a repository with others, you may have to incorporate
19446  their changes into your working copy.
19447 \end_layout
19448
19449 \begin_layout Standard
19450 CVS command: 
19451 \family typewriter
19452 cvs -q update "<file-name>"
19453 \end_layout
19454
19455 \begin_layout Standard
19456 If a readonly checkout is detected the working copy is made writable and
19457  reserved.
19458 \end_layout
19459
19460 \begin_layout Standard
19461 CVS command: 
19462 \family typewriter
19463 cvs -q edit "<file-name>"
19464 \end_layout
19465
19466 \begin_layout Subsubsection
19467
19468 \family sans
19469 Revert To Repository Version
19470 \end_layout
19471
19472 \begin_layout Standard
19473 This will discard all changes made to the document since the last check
19474  in.
19475  You get a warning before changes are discarded.
19476  Firstly the file is deleted, secondly CVS update command is run.
19477 \end_layout
19478
19479 \begin_layout Standard
19480 CVS command: 
19481 \family typewriter
19482 cvs -q update "<file-name>"
19483 \end_layout
19484
19485 \begin_layout Standard
19486 If a reserved checkout is detected and the working copy has no changes only
19487  the reservation is undone.
19488 \end_layout
19489
19490 \begin_layout Standard
19491 CVS command: 
19492 \family typewriter
19493 cvs -q unedit "<file-name>"
19494 \end_layout
19495
19496 \begin_layout Subsubsection
19497 Update of the local directory checkout from repository
19498 \end_layout
19499
19500 \begin_layout Standard
19501 Once your documents gets more complex, containing sub-documents and pictures,
19502  including external 
19503 \begin_inset Flex Code
19504 status collapsed
19505
19506 \begin_layout Plain Layout
19507 .tex
19508 \end_layout
19509
19510 \end_inset
19511
19512  files and so on using version control becomes more complicated.
19513  LyX supports updating the whole tree in which resides the document.
19514  This become especially useful once you cooperate with people which neither
19515  have detailed knowledge about CVS usage nor they have ambition to commit
19516  additional material to the repository.
19517  You have to organize the files structure so that all external files are
19518  in the same directory or subdirectories of the document.
19519  It's good practice anyway to store multipart documents in an extra directory.
19520 \end_layout
19521
19522 \begin_layout Standard
19523 The 
19524 \begin_inset Flex Code
19525 status collapsed
19526
19527 \begin_layout Plain Layout
19528 Update local directory from repository
19529 \end_layout
19530
19531 \end_inset
19532
19533  command updates the whole directory.
19534  If local changes are detected user is warned before update starts.
19535  In case of merge conflicts both versions of the conflicting document parts
19536  are placed in the final document.
19537  You have to review and correct the result of the merge.
19538  You'll find the conflicts enclosed in pairs of 
19539 \begin_inset Flex Code
19540 status collapsed
19541
19542 \begin_layout Plain Layout
19543 <<<<<<<
19544 \end_layout
19545
19546 \end_inset
19547
19548  and 
19549 \begin_inset Flex Code
19550 status collapsed
19551
19552 \begin_layout Plain Layout
19553 >>>>>>>
19554 \end_layout
19555
19556 \end_inset
19557
19558  separated by 
19559 \begin_inset Flex Code
19560 status collapsed
19561
19562 \begin_layout Plain Layout
19563 =======
19564 \end_layout
19565
19566 \end_inset
19567
19568 .
19569  The first part is your version as before the update operation with the
19570  document name prepended.
19571  The second one is the repository version with the version number after
19572  the sequence of 
19573 \begin_inset Flex Code
19574 status collapsed
19575
19576 \begin_layout Plain Layout
19577 >
19578 \end_layout
19579
19580 \end_inset
19581
19582  signs.
19583 \end_layout
19584
19585 \begin_layout Labeling
19586 \labelwidthstring 00.00.0000
19587 CVS
19588 \begin_inset space ~
19589 \end_inset
19590
19591 commands: 
19592 \begin_inset space ~
19593 \end_inset
19594
19595
19596 \begin_inset Newline newline
19597 \end_inset
19598
19599
19600 \begin_inset Flex Code
19601 status collapsed
19602
19603 \begin_layout Plain Layout
19604 cd $path; cvs diff 
19605 \family typewriter
19606 "."
19607 \end_layout
19608
19609 \end_inset
19610
19611  (Ask if changes are detected.)
19612 \begin_inset Newline newline
19613 \end_inset
19614
19615
19616 \begin_inset Flex Code
19617 status collapsed
19618
19619 \begin_layout Plain Layout
19620 cd $path; cvs -q update 
19621 \family typewriter
19622 "."
19623 \end_layout
19624
19625 \end_inset
19626
19627
19628 \end_layout
19629
19630 \begin_layout Standard
19631 where 
19632 \begin_inset Flex Code
19633 status collapsed
19634
19635 \begin_layout Plain Layout
19636 $path
19637 \end_layout
19638
19639 \end_inset
19640
19641  stands for the path to the document.
19642 \end_layout
19643
19644 \begin_layout Subsubsection
19645
19646 \family sans
19647 Show History
19648 \end_layout
19649
19650 \begin_layout Standard
19651 This shows the complete history of the CVS document.
19652  The output of 
19653 \family typewriter
19654 cvs log "<file-name>"
19655 \family default
19656  is shown in a browser.
19657 \end_layout
19658
19659 \begin_layout Subsection
19660 SVN commands in LyX
19661 \end_layout
19662
19663 \begin_layout Standard
19664 SVN is now partially supported by LyX.
19665  You can find the commands in the 
19666 \family sans
19667 File\SpecialChar \menuseparator
19668 Version
19669 \begin_inset space ~
19670 \end_inset
19671
19672 Control
19673 \family default
19674  submenu.
19675  Please note that if you use password protected access to repository via
19676  ssh, you will be asked in terminal window.
19677  LyX was tested against SVN 1.5 and 1.6
19678 \begin_inset Foot
19679 status open
19680
19681 \begin_layout Plain Layout
19682 Most of the commands will work with 1.4 too, see 
19683 \begin_inset CommandInset ref
19684 LatexCommand ref
19685 reference "sub:SVN-Repo-Update"
19686
19687 \end_inset
19688
19689 .
19690 \end_layout
19691
19692 \end_inset
19693
19694
19695 \end_layout
19696
19697 \begin_layout Subsubsection
19698
19699 \family sans
19700 Register
19701 \end_layout
19702
19703 \begin_layout Standard
19704 If your document is not under revision control, this is the only item shown
19705  in the menu.
19706  And if it is under revision control, the 
19707 \family sans
19708 \bar under
19709 R
19710 \bar default
19711 egister
19712 \family default
19713  item is not visible.
19714  
19715 \end_layout
19716
19717 \begin_layout Standard
19718 This command registers in SVN your document ONLY in case you have already
19719  the documents directory under SVN control (in particular 
19720 \family typewriter
19721 .svn/entries
19722 \family default
19723  file exists).
19724  This means you have to checkout the archive by yourself.
19725  
19726 \end_layout
19727
19728 \begin_layout Standard
19729 Then you are asked interactively to supply an initial description of the
19730  document.
19731  Don't forget that registered file is not yet commited.
19732 \end_layout
19733
19734 \begin_layout Standard
19735 SVN command that is run: 
19736 \family typewriter
19737 svn add -q 
19738 \begin_inset Quotes eld
19739 \end_inset
19740
19741 <file-name>
19742 \begin_inset Quotes erd
19743 \end_inset
19744
19745
19746 \end_layout
19747
19748 \begin_layout Standard
19749 Read 
19750 \family typewriter
19751 man svn
19752 \family default
19753  to understand the switches.
19754  
19755 \end_layout
19756
19757 \begin_layout Subsubsection
19758
19759 \family sans
19760 Check In Changes
19761 \end_layout
19762
19763 \begin_layout Standard
19764 When you are finished editing a file, you commit your changes.
19765  When you do this, you are asked for a description of the changes.
19766  After that changes are commited.
19767 \end_layout
19768
19769 \begin_layout Standard
19770 SVN command:
19771 \begin_inset Foot
19772 status collapsed
19773
19774 \begin_layout Plain Layout
19775 In case locking is not enabled.
19776  See Section 
19777 \begin_inset CommandInset ref
19778 LatexCommand ref
19779 reference "subsec:SVN-File-Locking"
19780
19781 \end_inset
19782
19783 .
19784 \end_layout
19785
19786 \end_inset
19787
19788  
19789 \family typewriter
19790 svn commit -q -m"<description>" <file-name>
19791 \end_layout
19792
19793 \begin_layout Subsubsection
19794
19795 \family sans
19796 Check Out For Edit
19797 \end_layout
19798
19799 \begin_layout Standard
19800 Updates the changes of this file from the repository.
19801  Be sure you understand SVN merging and conflicts resolving before using
19802  this function, because all conflicts has to be resolved manually by you!
19803 \end_layout
19804
19805 \begin_layout Standard
19806 SVN command:
19807 \begin_inset Foot
19808 status collapsed
19809
19810 \begin_layout Plain Layout
19811 Ditto.
19812 \end_layout
19813
19814 \end_inset
19815
19816  
19817 \family typewriter
19818 svn update --non-interactive 
19819 \begin_inset Quotes eld
19820 \end_inset
19821
19822 <file-name>
19823 \begin_inset Quotes erd
19824 \end_inset
19825
19826
19827 \end_layout
19828
19829 \begin_layout Subsubsection
19830
19831 \family sans
19832 Revert To Repository Version
19833 \end_layout
19834
19835 \begin_layout Standard
19836 This will discard all changes made to the document since the last check
19837  in.
19838  You get a warning before changes are discarded.
19839  
19840 \end_layout
19841
19842 \begin_layout Standard
19843 SVN command: 
19844 \family typewriter
19845 svn revert -q 
19846 \begin_inset Quotes eld
19847 \end_inset
19848
19849 <file-name>
19850 \begin_inset Quotes erd
19851 \end_inset
19852
19853
19854 \end_layout
19855
19856 \begin_layout Subsubsection
19857 \begin_inset CommandInset label
19858 LatexCommand label
19859 name "sub:SVN-Repo-Update"
19860
19861 \end_inset
19862
19863 Update of the local directory checkout from repository
19864 \begin_inset Foot
19865 status collapsed
19866
19867 \begin_layout Plain Layout
19868 Note that this command will work only with subversion 
19869 \begin_inset Formula $\geqq1.5$
19870 \end_inset
19871
19872
19873 \end_layout
19874
19875 \end_inset
19876
19877
19878 \end_layout
19879
19880 \begin_layout Standard
19881 All the commands above have one shortcomming - they deal with the current
19882  document only.
19883  Once your document contains pictures, includes external 
19884 \begin_inset Flex Code
19885 status collapsed
19886
19887 \begin_layout Plain Layout
19888 .tex
19889 \end_layout
19890
19891 \end_inset
19892
19893  files and so on administration becomes more complicated.
19894  LyX now supports updating the whole tree in which resides the document
19895 \begin_inset Foot
19896 status collapsed
19897
19898 \begin_layout Plain Layout
19899 One need to organize the files structure so that all external files are
19900  in the same directory or subdirectories of the document.
19901  
19902 \end_layout
19903
19904 \end_inset
19905
19906 .
19907  This become especially useful once you cooperate with people which neither
19908  know about subversion management nor they have ambition to commit additional
19909  material to the repository.
19910  
19911 \end_layout
19912
19913 \begin_layout Standard
19914 \begin_inset Flex Code
19915 status collapsed
19916
19917 \begin_layout Plain Layout
19918 Update local directory from repository
19919 \end_layout
19920
19921 \end_inset
19922
19923  command updates the whole directory and in case of merge conflicts local
19924  version of the files are left, so no unintended data loss occurs.
19925  If local changes are detected user is warned before update starts.
19926 \end_layout
19927
19928 \begin_layout Labeling
19929 \labelwidthstring 00.00.0000
19930 SVN
19931 \begin_inset space ~
19932 \end_inset
19933
19934 commands: 
19935 \begin_inset space ~
19936 \end_inset
19937
19938
19939 \begin_inset Newline newline
19940 \end_inset
19941
19942
19943 \begin_inset Flex Code
19944 status collapsed
19945
19946 \begin_layout Plain Layout
19947 svn diff $path
19948 \end_layout
19949
19950 \end_inset
19951
19952  (Ask if changes are detected.)
19953 \begin_inset Newline newline
19954 \end_inset
19955
19956
19957 \begin_inset Flex Code
19958 status collapsed
19959
19960 \begin_layout Plain Layout
19961 svn update --accept mine-full $path
19962 \end_layout
19963
19964 \end_inset
19965
19966
19967 \end_layout
19968
19969 \begin_layout Standard
19970 where 
19971 \begin_inset Flex Code
19972 status collapsed
19973
19974 \begin_layout Plain Layout
19975 $path
19976 \end_layout
19977
19978 \end_inset
19979
19980  stands for the path to the document.
19981 \end_layout
19982
19983 \begin_layout Subsubsection
19984
19985 \family sans
19986 Show History
19987 \end_layout
19988
19989 \begin_layout Standard
19990 This shows the complete history of the SVN document.
19991  The output of 
19992 \family typewriter
19993 svn log 
19994 \begin_inset Quotes eld
19995 \end_inset
19996
19997 <file-name>
19998 \begin_inset Quotes erd
19999 \end_inset
20000
20001
20002 \family default
20003  is shown in a browser.
20004 \end_layout
20005
20006 \begin_layout Subsubsection
20007 File Locking
20008 \begin_inset CommandInset label
20009 LatexCommand label
20010 name "subsec:SVN-File-Locking"
20011
20012 \end_inset
20013
20014
20015 \end_layout
20016
20017 \begin_layout Standard
20018 The file exchange through various revision control systems brings the problem
20019  of merge conflicts in case two different users try to edit the same (parts
20020  of) document.
20021  When such a conflict happens it needs manual resolving and one reasonable
20022  alternative is to provide some kind of locking mechanism, which guarantees
20023  that only one user is allowed to edit file at the given time.
20024 \end_layout
20025
20026 \begin_layout Standard
20027 SVN has two such mechanisms to provide mutual exclusivity for file access
20028  - locks and automatic setting of write permissions (see sec.
20029  
20030 \begin_inset CommandInset ref
20031 LatexCommand ref
20032 reference "subsec:Automatical-Locking-Property"
20033
20034 \end_inset
20035
20036 ) based on 
20037 \begin_inset Flex Code
20038 status collapsed
20039
20040 \begin_layout Plain Layout
20041 svn:needs-lock
20042 \end_layout
20043
20044 \end_inset
20045
20046  file svn property
20047 \begin_inset Foot
20048 status open
20049
20050 \begin_layout Plain Layout
20051 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20052 \end_layout
20053
20054 \end_inset
20055
20056 .
20057  If this property is detected for a given document LyX starts to use SVN
20058  locks for document editing automatically and the whole check-in/out mechanism
20059  switches to the same regimen as for RCS.
20060  This in particular means there are two different modes of file use in LyX:
20061 \end_layout
20062
20063 \begin_layout Itemize
20064 Unlocked state.
20065  The loaded file is in the read-only mode.
20066  For editing on needs to check-out.
20067  
20068 \emph on
20069 Check-out
20070 \emph default
20071  consists of updating from the repository and gaining write lock.
20072  If the lock is not possible to obtain, we remain in unlocked state.
20073 \end_layout
20074
20075 \begin_layout Itemize
20076 Locked state.
20077  The loaded file is in the 'normal' edit mode.
20078  No other user is allowed to edit the file.
20079  
20080 \emph on
20081 Check-in
20082 \emph default
20083  consists of commiting changes and releasing write-lock.
20084  If no changes have been made to the document, no commit will be produced
20085 \begin_inset Foot
20086 status collapsed
20087
20088 \begin_layout Plain Layout
20089 Don't be puzzled by the fact that you will be asked for commit message anyway.
20090 \end_layout
20091
20092 \end_inset
20093
20094  and only the write-lock will be released.
20095 \end_layout
20096
20097 \begin_layout Standard
20098 SVN commands:
20099 \end_layout
20100
20101 \begin_layout Labeling
20102 \labelwidthstring 00.00.0000
20103 Check-in:
20104 \family typewriter
20105  svn commit -q -m"<description>" "<file-name>"
20106 \begin_inset Newline newline
20107 \end_inset
20108
20109 svn unlock "<file-name>"
20110 \end_layout
20111
20112 \begin_layout Labeling
20113 \labelwidthstring 00.00.0000
20114 Check-out: 
20115 \family typewriter
20116 svn update "<file-name>"
20117 \begin_inset Newline newline
20118 \end_inset
20119
20120 svn lock "<file-name>"
20121 \end_layout
20122
20123 \begin_layout Subsubsection
20124
20125 \family typewriter
20126 \begin_inset CommandInset label
20127 LatexCommand label
20128 name "subsec:Automatical-Locking-Property"
20129
20130 \end_inset
20131
20132
20133 \family default
20134 Automatic Locking Property
20135 \end_layout
20136
20137 \begin_layout Standard
20138 The above mentioned automatic setting of write permissions of the .lyx file
20139  can be set through
20140 \family sans
20141 \bar under
20142  F
20143 \bar default
20144 ile\SpecialChar \menuseparator
20145
20146 \bar under
20147 V
20148 \bar default
20149 ersion
20150 \begin_inset space ~
20151 \end_inset
20152
20153 Control\SpecialChar \menuseparator
20154
20155 \bar under
20156 T
20157 \bar default
20158 oggle locking property
20159 \family default
20160 .
20161  This command is active only when the file is not locked on the svn server
20162  (i.e.
20163  you need to check-out before proceeding).
20164 \end_layout
20165
20166 \begin_layout Labeling
20167 \labelwidthstring 00.00.0000
20168 SVN
20169 \begin_inset space ~
20170 \end_inset
20171
20172 commands:
20173 \end_layout
20174
20175 \begin_layout Labeling
20176 \labelwidthstring 00.00.0000
20177 Set:
20178 \family typewriter
20179  svn propset svn:needs-lock ON "<file-name>"
20180 \end_layout
20181
20182 \begin_layout Labeling
20183 \labelwidthstring 00.00.0000
20184 Unset: 
20185 \family typewriter
20186 svn propdel svn:needs-lock "<file-name>"
20187 \end_layout
20188
20189 \begin_layout Subsubsection
20190 \begin_inset CommandInset label
20191 LatexCommand label
20192 name "sub:VCS-Revision-Information"
20193
20194 \end_inset
20195
20196 Revision Information in Documents
20197 \end_layout
20198
20199 \begin_layout Standard
20200 There are more possibilities how to activate revision information in our
20201  document.
20202 \end_layout
20203
20204 \begin_layout Itemize
20205 LyX supports directly:
20206 \end_layout
20207
20208 \begin_deeper
20209 \begin_layout Itemize
20210 tree revision information (
20211 \begin_inset Flex Code
20212 status collapsed
20213
20214 \begin_layout Plain Layout
20215 vcs-tree-revision
20216 \end_layout
20217
20218 \end_inset
20219
20220 ).
20221  The result is the output of the 
20222 \begin_inset Flex Code
20223 status collapsed
20224
20225 \begin_layout Plain Layout
20226 svnversion
20227 \end_layout
20228
20229 \end_inset
20230
20231  command, the following table gives you an idea, how to read the results.
20232 \end_layout
20233
20234 \begin_layout Standard
20235 \align center
20236 \begin_inset Tabular
20237 <lyxtabular version="3" rows="6" columns="2">
20238 <features tabularvalignment="middle">
20239 <column alignment="center" valignment="top" width="0">
20240 <column alignment="center" valignment="top" width="0">
20241 <row>
20242 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20243 \begin_inset Text
20244
20245 \begin_layout Plain Layout
20246 Output
20247 \end_layout
20248
20249 \end_inset
20250 </cell>
20251 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20252 \begin_inset Text
20253
20254 \begin_layout Plain Layout
20255 Meaning
20256 \end_layout
20257
20258 \end_inset
20259 </cell>
20260 </row>
20261 <row>
20262 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20263 \begin_inset Text
20264
20265 \begin_layout Plain Layout
20266 4123:4168
20267 \end_layout
20268
20269 \end_inset
20270 </cell>
20271 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20272 \begin_inset Text
20273
20274 \begin_layout Plain Layout
20275 mixed revision working copy
20276 \end_layout
20277
20278 \end_inset
20279 </cell>
20280 </row>
20281 <row>
20282 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20283 \begin_inset Text
20284
20285 \begin_layout Plain Layout
20286 4168M
20287 \end_layout
20288
20289 \end_inset
20290 </cell>
20291 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20292 \begin_inset Text
20293
20294 \begin_layout Plain Layout
20295 modified working copy
20296 \end_layout
20297
20298 \end_inset
20299 </cell>
20300 </row>
20301 <row>
20302 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20303 \begin_inset Text
20304
20305 \begin_layout Plain Layout
20306 4123S
20307 \end_layout
20308
20309 \end_inset
20310 </cell>
20311 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20312 \begin_inset Text
20313
20314 \begin_layout Plain Layout
20315 switched working copy
20316 \end_layout
20317
20318 \end_inset
20319 </cell>
20320 </row>
20321 <row>
20322 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20323 \begin_inset Text
20324
20325 \begin_layout Plain Layout
20326 4123P
20327 \end_layout
20328
20329 \end_inset
20330 </cell>
20331 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20332 \begin_inset Text
20333
20334 \begin_layout Plain Layout
20335 partial working copy, from a sparse checkout
20336 \end_layout
20337
20338 \end_inset
20339 </cell>
20340 </row>
20341 <row>
20342 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20343 \begin_inset Text
20344
20345 \begin_layout Plain Layout
20346 4123:4168MS
20347 \end_layout
20348
20349 \end_inset
20350 </cell>
20351 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20352 \begin_inset Text
20353
20354 \begin_layout Plain Layout
20355 mixed revision, modified, switched working copy
20356 \end_layout
20357
20358 \end_inset
20359 </cell>
20360 </row>
20361 </lyxtabular>
20362
20363 \end_inset
20364
20365
20366 \end_layout
20367
20368 \begin_layout Itemize
20369 file revision information.
20370  The result comes from parsing the output of 
20371 \begin_inset Flex Code
20372 status collapsed
20373
20374 \begin_layout Plain Layout
20375 svn
20376 \begin_inset space ~
20377 \end_inset
20378
20379 info
20380 \begin_inset space ~
20381 \end_inset
20382
20383 --xml
20384 \begin_inset space ~
20385 \end_inset
20386
20387 file.lyx
20388 \end_layout
20389
20390 \end_inset
20391
20392 .
20393  Supported flags are:
20394 \end_layout
20395
20396 \begin_deeper
20397 \begin_layout Itemize
20398 version number of the last commit (
20399 \begin_inset Flex Code
20400 status collapsed
20401
20402 \begin_layout Plain Layout
20403 vcs-revision
20404 \end_layout
20405
20406 \end_inset
20407
20408 )
20409 \end_layout
20410
20411 \begin_layout Itemize
20412 author of the last commit (
20413 \begin_inset Flex Code
20414 status collapsed
20415
20416 \begin_layout Plain Layout
20417 vcs-author
20418 \end_layout
20419
20420 \end_inset
20421
20422 )
20423 \end_layout
20424
20425 \begin_layout Itemize
20426 date of the last commit (
20427 \begin_inset Flex Code
20428 status collapsed
20429
20430 \begin_layout Plain Layout
20431 vcs-date
20432 \end_layout
20433
20434 \end_inset
20435
20436 )
20437 \end_layout
20438
20439 \begin_layout Itemize
20440 time of the last commit (
20441 \begin_inset Flex Code
20442 status collapsed
20443
20444 \begin_layout Plain Layout
20445 vcs-time
20446 \end_layout
20447
20448 \end_inset
20449
20450 )
20451 \end_layout
20452
20453 \end_deeper
20454 \begin_layout Standard
20455 You can obtain this info via InsetInfo (e.g.
20456  
20457 \begin_inset Flex Code
20458 status collapsed
20459
20460 \begin_layout Plain Layout
20461 info-insert buffer vcs-date
20462 \end_layout
20463
20464 \end_inset
20465
20466 ).
20467  The information will be available only when you have the file stored under
20468  svn managment (i.e.
20469  the 
20470 \begin_inset Flex Code
20471 status collapsed
20472
20473 \begin_layout Plain Layout
20474 .svn
20475 \end_layout
20476
20477 \end_inset
20478
20479  directory is available with your document).
20480 \end_layout
20481
20482 \end_deeper
20483 \begin_layout Itemize
20484 Another---a hacking one---possibility is to use svn keywords
20485 \begin_inset Foot
20486 status collapsed
20487
20488 \begin_layout Plain Layout
20489 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20490 \end_layout
20491
20492 \end_inset
20493
20494 .
20495  In short -- you set file keywords property (e.g.
20496  
20497 \family sans
20498 svn propset svn:keywords 'Rev' file.lyx
20499 \family default
20500 ) and then paste keyword TeX code
20501 \begin_inset Foot
20502 status collapsed
20503
20504 \begin_layout Plain Layout
20505 This is an easy way how to ensure that LyX won't break the line in the middle
20506  of keyword tag.
20507 \end_layout
20508
20509 \end_inset
20510
20511  tag in your document (e.g.
20512  
20513 \begin_inset ERT
20514 status open
20515
20516 \begin_layout Plain Layout
20517
20518 $Rev$
20519 \end_layout
20520
20521 \end_inset
20522
20523 ).
20524  This way svn client will automatically substitute revision number (e.g.
20525  
20526 \begin_inset ERT
20527 status open
20528
20529 \begin_layout Plain Layout
20530
20531 $Rev: 59 $
20532 \end_layout
20533
20534 \end_inset
20535
20536 ) after each update and commit.
20537  There are more problems with this approach.
20538  Firstly, the '$' character is used in TeX world for math equations, so
20539  any occurence of math formula 
20540 \begin_inset Formula $Rev$
20541 \end_inset
20542
20543  become 
20544 \begin_inset Formula $Rev:59$
20545 \end_inset
20546
20547  in your LyX document.
20548  Similarly for other keywords like Id, Date, Author, etc.
20549  Secondly svn output is dependent on your locales, so its very easy that
20550  svn would produce some problematic strings once Date is used.
20551  Thirdly you get the whole 'Rev: 59' string in your document instead of
20552  the plain number.
20553  Until subversion implements user's custom keywords it will be hard to use
20554  this approach reliably or let LyX to support it directly.
20555 \end_layout
20556
20557 \begin_layout Subsection
20558 SVN and Windows Environment
20559 \end_layout
20560
20561 \begin_layout Quote
20562 My inclination is to say that if the user cannot figure out the command
20563  line operations on their own fairly quickly, they would be well advised
20564  to use TortoiseSVN.
20565  ---P.
20566  A.
20567  Rubin
20568 \end_layout
20569
20570 \begin_layout Subsubsection
20571 Preparation
20572 \end_layout
20573
20574 \begin_layout Standard
20575 In addition to installing LyX, and having access to a Subversion repository,
20576  the user will need to install the Subversion client program.
20577  A Windows installer for the client program is available from 
20578 \begin_inset CommandInset href
20579 LatexCommand href
20580 name "CollabNet"
20581 target "http://www.collab.net/nonav/downloads/subversion/"
20582
20583 \end_inset
20584
20585 .
20586  The user may also want to install 
20587 \begin_inset CommandInset href
20588 LatexCommand href
20589 name "TortoiseSVN"
20590 target "http://tortoisesvn.tigris.org/"
20591
20592 \end_inset
20593
20594 , which integrates Subversion operations into the context (rightclick) menu
20595  of Windows Explorer.
20596  Operations done outside LyX will typically be more convenient using the
20597  Explorer context menu.
20598  Note that TortoiseSVN is not a replacement for the client program, which
20599  is what LyX itself will use.
20600 \end_layout
20601
20602 \begin_layout Subsubsection
20603 Bringing a document under Subversion control
20604 \end_layout
20605
20606 \begin_layout Standard
20607 Before a LyX document can be brought under version control in Subversion,
20608  its parent directory needs to be under version control.
20609  If the document is being added to a project already in the repository,
20610  this is accomplished by checking the project out to the directory where
20611  the new document will be placed.
20612  If the project itself is not yet under version control (for instance, if
20613  this document starts a new project), the directory must be imported into
20614  the repository.
20615  This is done outside LyX.
20616  Both import and checkout are easily accomplished from the Explorer context
20617  menu using TortoiseSVN, or alternatively can be done using the command
20618  line client at a DOS prompt.
20619  The procedure for importing the project using TortoiseSVN is described
20620  below, assuming an existing repository and a new project being started
20621  in 
20622 \family typewriter
20623 C:
20624 \backslash
20625 new project
20626 \family default
20627 .
20628  For information on using the Subversion client program, run 
20629 \family typewriter
20630 svn --help 
20631 \family default
20632 in a DOS shell.
20633 \end_layout
20634
20635 \begin_layout Enumerate
20636 Locate 
20637 \family typewriter
20638 C:
20639 \backslash
20640 new project 
20641 \family default
20642 in Windows Explorer, right click it, and select 
20643 \family typewriter
20644 TortoiseSVN > Repo-browser
20645 \family default
20646 .
20647  If necessary, adjust the URL for the repository, then click OK.
20648 \end_layout
20649
20650 \begin_layout Enumerate
20651 Right click the level of the repository under which you want to place the
20652  new project folder (typically the top level) and click 
20653 \family typewriter
20654 Create folder\SpecialChar \ldots{}
20655
20656 \family default
20657  Supply a name for the project folder and click OK.
20658  Add a message for the log file if desired, then click OK again.
20659  The new project folder should appear in the repository.
20660  Finally, click OK again to exit the repository browser.
20661 \end_layout
20662
20663 \begin_layout Enumerate
20664 Once again right click 
20665 \family typewriter
20666 C:
20667 \backslash
20668 new project
20669 \family default
20670 , this time selecting SVN Checkout\SpecialChar \ldots{}
20671  Select the URL of the project folder
20672  you just created in the repository, and set the checkout directory to 
20673 \family typewriter
20674 C:
20675 \backslash
20676 new project.
20677
20678 \family default
20679  Click OK.
20680  You will be warned about a non-empty folder; click OK to proceed.
20681  You should now have a 
20682 \family typewriter
20683 .svn
20684 \family default
20685  directory under 
20686 \family typewriter
20687 C:
20688 \backslash
20689 new project.
20690 \end_layout
20691
20692 \begin_layout Enumerate
20693 Create or open your document in LyX and click 
20694 \family sans
20695 \bar under
20696 F
20697 \bar default
20698 ile\SpecialChar \menuseparator
20699
20700 \bar under
20701 V
20702 \bar default
20703 ersion
20704 \begin_inset space ~
20705 \end_inset
20706
20707 Control\SpecialChar \menuseparator
20708
20709 \bar under
20710 R
20711 \bar default
20712 egister.
20713  
20714 \family default
20715 Add a log message and click OK to commit the document to version control.
20716 \end_layout
20717
20718 \begin_layout Standard
20719 From this point onward, you should have full functionality in the 
20720 \family sans
20721 \bar under
20722 F
20723 \bar default
20724 ile\SpecialChar \menuseparator
20725
20726 \bar under
20727 V
20728 \bar default
20729 ersion
20730 \begin_inset space ~
20731 \end_inset
20732
20733 Control
20734 \family default
20735  menu.
20736  You also have the option of checking the document in and out, viewing its
20737  history, etc.
20738  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20739  client program from a command prompt.
20740 \end_layout
20741
20742 \begin_layout Subsubsection
20743 SSH tunnel used with SVN under Windows
20744 \end_layout
20745
20746 \begin_layout Standard
20747 Compared with Linux setting up svn client to communicate over ssh under
20748  Windows is a rather troublesome task.
20749  We will at least offer some hints how to setup the client side but prior
20750  knowledge about ssh and the Windows command line is needed, also be prepared
20751  for a great deal of frustration\SpecialChar \ldots{}
20752
20753 \end_layout
20754
20755 \begin_layout Enumerate
20756 Get a svn client for windows, as described in the previous sections.
20757  When it is a fresh install run some svn command (e.g.
20758  
20759 \begin_inset Flex Code
20760 status collapsed
20761
20762 \begin_layout Plain Layout
20763 svn --version
20764 \end_layout
20765
20766 \end_inset
20767
20768 ) to create config files, which you will need to change later on.
20769 \end_layout
20770
20771 \begin_layout Enumerate
20772 Choose a ssh client for Windows.
20773  There are several possibilities, we will use the one from Putty tools
20774 \begin_inset Foot
20775 status open
20776
20777 \begin_layout Plain Layout
20778 \begin_inset Flex URL
20779 status collapsed
20780
20781 \begin_layout Plain Layout
20782
20783 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20784 \end_layout
20785
20786 \end_inset
20787
20788
20789 \end_layout
20790
20791 \end_inset
20792
20793 .
20794  You will need to set the connection up so that the client doesn't ask for
20795  any password from you.
20796  To keep things easy we will use only keys without any additional password
20797  protection etc.
20798 \end_layout
20799
20800 \begin_deeper
20801 \begin_layout Enumerate
20802 Generate keys by 
20803 \begin_inset Flex Code
20804 status collapsed
20805
20806 \begin_layout Plain Layout
20807 puttygen
20808 \end_layout
20809
20810 \end_inset
20811
20812 .
20813  Save your private .ppk key file and put the public one on the server side.
20814  If the SVN server runs on Linux, note that the format of the public key
20815  is not compatible with Linux openssh and you will need to direcly copy-paste
20816  the key from the “
20817 \emph on
20818 Public key for pasting into OpenSSH authorized_keys file
20819 \emph default
20820 :” edit field into the server's 
20821 \begin_inset Flex Code
20822 status collapsed
20823
20824 \begin_layout Plain Layout
20825 ~/.ssh/authorized_keys
20826 \end_layout
20827
20828 \end_inset
20829
20830
20831 \begin_inset Flex Code
20832 status collapsed
20833
20834 \begin_layout Plain Layout
20835 authorized_keys2
20836 \end_layout
20837
20838 \end_inset
20839
20840  file.
20841 \end_layout
20842
20843 \begin_layout Enumerate
20844 Get the Putty's 
20845 \begin_inset Flex Code
20846 status collapsed
20847
20848 \begin_layout Plain Layout
20849 plink
20850 \end_layout
20851
20852 \end_inset
20853
20854 .
20855  In the SVN config file
20856 \begin_inset Foot
20857 status collapsed
20858
20859 \begin_layout Plain Layout
20860 Exact path depends on Windows version, usually somewhere around 
20861 \begin_inset Flex Code
20862 status collapsed
20863
20864 \begin_layout Plain Layout
20865 c:
20866 \backslash
20867 Documents and Settings
20868 \backslash
20869 user
20870 \backslash
20871 Application Data
20872 \backslash
20873 Subversion
20874 \backslash
20875 config
20876 \end_layout
20877
20878 \end_inset
20879
20880  / 
20881 \begin_inset Flex Code
20882 status collapsed
20883
20884 \begin_layout Plain Layout
20885 AppData
20886 \backslash
20887 Roaming
20888 \backslash
20889 Subversion
20890 \end_layout
20891
20892 \end_inset
20893
20894 .
20895 \end_layout
20896
20897 \end_inset
20898
20899 , section [tunnels], setup ssh command, e.g.
20900  
20901 \begin_inset Flex Code
20902 status collapsed
20903
20904 \begin_layout Plain Layout
20905 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20906 \end_layout
20907
20908 \end_inset
20909
20910 .
20911 \begin_inset Foot
20912 status collapsed
20913
20914 \begin_layout Plain Layout
20915 It will usually take a lot of time to get exact command right and it depends
20916  on many things.
20917  For example do not have some remote server saved as a default session in
20918  Putty etc.
20919  If things fail, try to connect via plink without SVN first.
20920 \end_layout
20921
20922 \end_inset
20923
20924
20925 \end_layout
20926
20927 \end_deeper
20928 \begin_layout Enumerate
20929 Checkout the SVN archive, e.g.
20930  
20931 \begin_inset Flex Code
20932 status collapsed
20933
20934 \begin_layout Plain Layout
20935 svn co svn+ssh://user@server/repository_path
20936 \end_layout
20937
20938 \end_inset
20939
20940 .
20941 \end_layout
20942
20943 \begin_layout Subsubsection
20944 End-of-Line Conversions
20945 \end_layout
20946
20947 \begin_layout Standard
20948 When the collaborators are mixing Linux and Windows environments, LyX will
20949  use different line endings inside the .lyx files.
20950  This is not a problem as far as LyX functionality is concerned, but the
20951  commit diffs will be huge and merge-conflicts prone.
20952  Fortunately SVN itself knows
20953 \begin_inset Foot
20954 status collapsed
20955
20956 \begin_layout Plain Layout
20957 \begin_inset Flex URL
20958 status collapsed
20959
20960 \begin_layout Plain Layout
20961
20962 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20963 \end_layout
20964
20965 \end_inset
20966
20967
20968 \end_layout
20969
20970 \end_inset
20971
20972  how to deal with CR/LF problems when switching .lyx files to the 
20973 \begin_inset Flex Code
20974 status collapsed
20975
20976 \begin_layout Plain Layout
20977 native
20978 \end_layout
20979
20980 \end_inset
20981
20982  mode.
20983 \begin_inset Foot
20984 status collapsed
20985
20986 \begin_layout Plain Layout
20987 For the lazy guys: 
20988 \begin_inset Flex Code
20989 status collapsed
20990
20991 \begin_layout Plain Layout
20992 svn propset svn:eol-style native FILE_NAME
20993 \end_layout
20994
20995 \end_inset
20996
20997
20998 \end_layout
20999
21000 \end_inset
21001
21002
21003 \end_layout
21004
21005 \begin_layout Subsection
21006 Further tuning
21007 \end_layout
21008
21009 \begin_layout Standard
21010 With the recent addition of the vc-command function LyX power users are
21011  allowed to create their own commands for revision control.
21012 \end_layout
21013
21014 \begin_layout Standard
21015 As an example you can see how two TortoiseSVN commands could be integrated
21016  directly:
21017 \end_layout
21018
21019 \begin_layout Description
21020 Commit: 
21021 \begin_inset Flex Code
21022 status collapsed
21023
21024 \begin_layout Plain Layout
21025 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21026 \end_layout
21027
21028 \end_inset
21029
21030
21031 \end_layout
21032
21033 \begin_layout Description
21034 Revert: 
21035 \begin_inset Flex Code
21036 status collapsed
21037
21038 \begin_layout Plain Layout
21039 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21040 \end_layout
21041
21042 \end_inset
21043
21044
21045 \end_layout
21046
21047 \begin_layout Subsection
21048 Version control and Document comparison
21049 \end_layout
21050
21051 \begin_layout Standard
21052 One of the typical uses of version control is to inspect the changes between
21053  revisions, usually by creating 
21054 \begin_inset Flex Code
21055 status collapsed
21056
21057 \begin_layout Plain Layout
21058 diff
21059 \end_layout
21060
21061 \end_inset
21062
21063  dumps.
21064  While this is useful for plain text files, it is much less useful in the
21065  case of LyX files, which have more complicated structure.
21066  Hence we provide binding to the Document comparison feature.
21067  They are two ways of calling this feature - either by direct call of 
21068 \begin_inset Flex Code
21069 status collapsed
21070
21071 \begin_layout Plain Layout
21072 VC_COMPARE
21073 \end_layout
21074
21075 \end_inset
21076
21077  LyX function (for details see LyX functions manual) or by icon/menu item
21078  
21079 \begin_inset Flex MenuItem
21080 status collapsed
21081
21082 \begin_layout Plain Layout
21083 Compare with older revision...
21084 \end_layout
21085
21086 \end_inset
21087
21088 .
21089  One can either compare two chosen revisions of the document or he can simply
21090  compare the current version of edited text with older revisions (where
21091  '
21092 \begin_inset Flex MenuItem
21093 status collapsed
21094
21095 \begin_layout Plain Layout
21096 0
21097 \end_layout
21098
21099 \end_inset
21100
21101 ' revisions back means comparison of the edited file with last commited
21102  revision).
21103  
21104 \end_layout
21105
21106 \begin_layout Standard
21107 This feature is supported for SVN and RCS though due to the more complicated
21108  versioning scheme of RCS there is a constraint -- when addressing the revisions
21109  in dialog, numbers always point to the last number in RCS revision number,
21110  i.e.
21111  '35' in '1.2.35'.
21112 \end_layout
21113
21114 \begin_layout Section
21115 Literate Programming
21116 \end_layout
21117
21118 \begin_layout Standard
21119 Updated by 
21120 \noun on
21121 Kayvan Sylvan 
21122 \noun default
21123 (kayvan@sylvan.com)
21124 \noun on
21125
21126 \noun default
21127 original documentation written by 
21128 \noun on
21129 Edmar Wienskoski Jr.
21130
21131 \noun default
21132  (edmar-w-jr@technologist.com)
21133 \end_layout
21134
21135 \begin_layout Subsection
21136 Introduction
21137 \end_layout
21138
21139 \begin_layout Standard
21140 The main purpose of this documentation is to show you how to use LyX for
21141  literate programming, where it is assumed that you are familiar with this
21142  programming technique, and know what 
21143 \begin_inset Quotes eld
21144 \end_inset
21145
21146 tangling
21147 \begin_inset Quotes erd
21148 \end_inset
21149
21150  and 
21151 \begin_inset Quotes eld
21152 \end_inset
21153
21154 weaving
21155 \begin_inset Quotes erd
21156 \end_inset
21157
21158  means.
21159  If that is not the case, please follow the web links provided in the following
21160  sections.
21161  There is a lot of good documentation out there covering old development
21162  history to the latest tools tips.
21163 \end_layout
21164
21165 \begin_layout Standard
21166 It is also assumed that you are familiar with LyX itself to a point that
21167  you are comfortable changing your LyX preferences, and X resources file.
21168  If that is not the case please refer to other LyX documentation to cover
21169  your specific needs.
21170 \end_layout
21171
21172 \begin_layout Subsection
21173 Literate Programming
21174 \end_layout
21175
21176 \begin_layout Standard
21177 From the Literate Programming FAQ: 
21178 \end_layout
21179
21180 \begin_layout Quotation
21181 Literate programming is the combination of documentation and source together
21182  in a fashion suited for reading by human beings.
21183  In fact, literate programs should be enjoyable reading, even inviting!
21184  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21185  and documentation in a single file.
21186  Literate programming tools then parse the file to produce either readable
21187  documentation or compilable source.
21188  The WEB style of literate programming was created by D.
21189 \begin_inset space \thinspace{}
21190 \end_inset
21191
21192 E.
21193  Knuth during the development of his TeX typesetting software.
21194  
21195 \end_layout
21196
21197 \begin_layout Standard
21198 Another excerpt says:
21199 \end_layout
21200
21201 \begin_layout Quotation
21202
21203 \emph on
21204 How is literate programming different from verbose commenting?
21205 \end_layout
21206
21207 \begin_layout Quotation
21208 There are three distinguishing characteristics.
21209  In order of importance, they are: 
21210 \end_layout
21211
21212 \begin_deeper
21213 \begin_layout Itemize
21214 flexible order of elaboration 
21215 \end_layout
21216
21217 \begin_layout Itemize
21218 automatic support for browsing 
21219 \end_layout
21220
21221 \begin_layout Itemize
21222 typeset documentation, especially diagrams and mathematics 
21223 \end_layout
21224
21225 \end_deeper
21226 \begin_layout Standard
21227 Now that I sparked your curiosity, take a look in the references.
21228 \end_layout
21229
21230 \begin_layout Subsubsection
21231 References
21232 \end_layout
21233
21234 \begin_layout Standard
21235 The complete Literate Programming FAQ can be found at:
21236 \end_layout
21237
21238 \begin_layout Quote
21239 Literate Programming FAQ 
21240 \begin_inset Flex URL
21241 status collapsed
21242
21243 \begin_layout Plain Layout
21244
21245 http://www.literateprogramming.com/lpfaq.pdf
21246 \end_layout
21247
21248 \end_inset
21249
21250
21251 \end_layout
21252
21253 \begin_layout Standard
21254 The FAQ lists 23 (twenty three!) different literate programming tools.
21255  Where some are specialized or 
21256 \begin_inset Quotes eld
21257 \end_inset
21258
21259 tailored
21260 \begin_inset Quotes erd
21261 \end_inset
21262
21263  for particular programming languages, while other have general scope.
21264  I selected 
21265 \noun on
21266 Noweb
21267 \noun default
21268  for my own use for several reasons:
21269 \end_layout
21270
21271 \begin_layout Itemize
21272 It can generate the documentation either in LaTeX or HTML.
21273 \end_layout
21274
21275 \begin_layout Itemize
21276 It has a open architecture, i.
21277 \begin_inset space \thinspace{}
21278 \end_inset
21279
21280 g.
21281 \begin_inset space \space{}
21282 \end_inset
21283
21284 it is easy to plug in new filters and to perform special processing that
21285  you may need.
21286  
21287 \end_layout
21288
21289 \begin_layout Itemize
21290 There is a good selection of filters available already (the HTML is one
21291  of them).
21292 \end_layout
21293
21294 \begin_layout Itemize
21295 It is free.
21296 \end_layout
21297
21298 \begin_layout Standard
21299 The Noweb web page can be found at: 
21300 \end_layout
21301
21302 \begin_layout Quote
21303 Noweb home page 
21304 \begin_inset Flex URL
21305 status collapsed
21306
21307 \begin_layout Plain Layout
21308
21309 http://www.cs.virginia.edu/~nr/noweb/
21310 \end_layout
21311
21312 \end_inset
21313
21314
21315 \end_layout
21316
21317 \begin_layout Standard
21318 Starting from there you can reach many other interesting links and even
21319  some literate program examples.
21320 \end_layout
21321
21322 \begin_layout Subsection
21323 LyX and Literate Programming
21324 \end_layout
21325
21326 \begin_layout Standard
21327 The LyX support for Literate Programming is provided by using the generic
21328  LyX converters mechanism.
21329  This support is provided in a 
21330 \begin_inset Quotes eld
21331 \end_inset
21332
21333 Noweb independent
21334 \begin_inset Quotes erd
21335 \end_inset
21336
21337  way, i.
21338 \begin_inset space \thinspace{}
21339 \end_inset
21340
21341 g.
21342 \begin_inset space \space{}
21343 \end_inset
21344
21345 you will be able to use this new LyX feature with some other literate programmin
21346 g tool of your choice by just changing your LyX preferences.
21347 \end_layout
21348
21349 \begin_layout Subsubsection
21350 Generating documents and code (weaving and tangling)
21351 \end_layout
21352
21353 \begin_layout Paragraph
21354 Selecting the document class
21355 \end_layout
21356
21357 \begin_layout Standard
21358 If you have installed Noweb and LyX successfully, whenever you open a new
21359  document or try to change the document class of an existing one, you will
21360  find that there are three new document classes available:
21361 \end_layout
21362
21363 \begin_layout Itemize
21364 Article (Noweb)
21365 \end_layout
21366
21367 \begin_layout Itemize
21368 Book (Noweb)
21369 \end_layout
21370
21371 \begin_layout Itemize
21372 Report (Noweb)
21373 \end_layout
21374
21375 \begin_layout Standard
21376 You must select one of them to create your literate documents from.
21377  
21378 \end_layout
21379
21380 \begin_layout Standard
21381 Note that literate documents are not limited to these three classes.
21382  New classes can be generated from other styles like letter or in combination
21383  with other class variations like Article (AMS).
21384  If you have special needs that cannot be covered by one of the existing
21385  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21386  will arrange to insert a new entry, or teach you how to do it.
21387 \begin_inset Foot
21388 status collapsed
21389
21390 \begin_layout Plain Layout
21391 It is very simple, it involves the creation of a file with four lines, and
21392  re-running of the auto configuration.
21393 \end_layout
21394
21395 \end_inset
21396
21397  Moreover, if you use a literate tool other than Noweb you may need to create
21398  a new set of document classes for it.
21399 \end_layout
21400
21401 \begin_layout Paragraph
21402 Typing code in
21403 \end_layout
21404
21405 \begin_layout Standard
21406 LyX enables you to write code with a layout named 
21407 \noun on
21408 Scrap
21409 \noun default
21410 .
21411 \begin_inset Foot
21412 status collapsed
21413
21414 \begin_layout Plain Layout
21415 The equivalent Noweb term is 
21416 \begin_inset Quotes eld
21417 \end_inset
21418
21419 Chunk
21420 \begin_inset Quotes erd
21421 \end_inset
21422
21423 .
21424  For historical reasons, I got used to the term 
21425 \begin_inset Quotes eld
21426 \end_inset
21427
21428 scrap
21429 \begin_inset Quotes erd
21430 \end_inset
21431
21432  introduced by other literate tool named Nuweb, which I used for many years
21433  before rendering myself to Noweb.
21434 \end_layout
21435
21436 \end_inset
21437
21438  Noweb delimits scraps like this:
21439 \end_layout
21440
21441 \begin_layout LyX-Code
21442 <<My scrap>>=
21443 \end_layout
21444
21445 \begin_layout LyX-Code
21446   code
21447 \end_layout
21448
21449 \begin_layout LyX-Code
21450   more code
21451 \end_layout
21452
21453 \begin_layout LyX-Code
21454   even more code
21455 \end_layout
21456
21457 \begin_layout LyX-Code
21458   @
21459 \end_layout
21460
21461 \begin_layout Standard
21462 The problem is that whatever is written in between the << and the 
21463 \family typewriter
21464 @
21465 \family default
21466  must be taken literally, i.
21467 \begin_inset space \thinspace{}
21468 \end_inset
21469
21470 g.
21471 \begin_inset space \space{}
21472 \end_inset
21473
21474 LyX should be prevented from making any special interpretation of what has
21475  been written.
21476  This is handled by a special layout named Scrap, that works like a normal
21477  paragraph but has a free spacing capability.
21478 \end_layout
21479
21480 \begin_layout Standard
21481 The down side of the Scrap paragraph layout is that consecutive paragraphs
21482  of code will be spaced with one empty line in the source code and also
21483  in the printed documentation.
21484  The work around is to enter each line of code within a single Scrap, with
21485  a newline (ctrl-return).
21486  The example above will look like this:
21487 \begin_inset Foot
21488 status collapsed
21489
21490 \begin_layout Plain Layout
21491 If you have a printed version of this document you will not see any difference
21492  between the previous example and this one.
21493 \end_layout
21494
21495 \end_inset
21496
21497
21498 \end_layout
21499
21500 \begin_layout LyX-Code
21501 <<My scrap>>=
21502 \begin_inset Newline newline
21503 \end_inset
21504
21505   code
21506 \begin_inset Newline newline
21507 \end_inset
21508
21509   more code
21510 \begin_inset Newline newline
21511 \end_inset
21512
21513   even more code
21514 \begin_inset Newline newline
21515 \end_inset
21516
21517   @
21518 \end_layout
21519
21520 \begin_layout Standard
21521 This layout works fine.
21522  The only real inconvenience is that you have to type ctrl-return instead
21523  of a plain return.
21524 \begin_inset Foot
21525 status collapsed
21526
21527 \begin_layout Plain Layout
21528 It is in my list of 
21529 \begin_inset Quotes eld
21530 \end_inset
21531
21532 improvements
21533 \begin_inset Quotes erd
21534 \end_inset
21535
21536  to fix that.
21537 \end_layout
21538
21539 \end_inset
21540
21541
21542 \end_layout
21543
21544 \begin_layout Standard
21545 As a special note, you can also use the 
21546 \begin_inset Quotes eld
21547 \end_inset
21548
21549 %def
21550 \begin_inset Quotes erd
21551 \end_inset
21552
21553  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21554 rence:
21555 \end_layout
21556
21557 \begin_layout LyX-Code
21558 <<My scrap>>=
21559 \begin_inset Newline newline
21560 \end_inset
21561
21562   def some_function(args):
21563 \begin_inset Newline newline
21564 \end_inset
21565
21566     "This is the doc string for this function."
21567 \begin_inset Newline newline
21568 \end_inset
21569
21570     print "My args: ", args
21571 \end_layout
21572
21573 \begin_layout LyX-Code
21574 @ %def some_function
21575 \end_layout
21576
21577 \begin_layout Standard
21578 For an example of this usage and the resulting cross-reference output, look
21579  at the Literate python program in 
21580 \emph on
21581 LIBDIR/examples/listerrors.lyx
21582 \emph default
21583  which should make this all clear.
21584 \end_layout
21585
21586 \begin_layout Paragraph
21587 Generating the documentation
21588 \end_layout
21589
21590 \begin_layout Standard
21591 At this point you already have a new document file with a proper document
21592  class, and with some code and text on it.
21593  How do I print it? The answer is simple, you select 
21594 \family sans
21595 View\SpecialChar \menuseparator
21596 DVI,
21597 \family default
21598  etc.
21599  Just like you would do for a plain document.
21600  No special procedure is required.
21601 \end_layout
21602
21603 \begin_layout Standard
21604 To help orientate you, I will now explain what happens inside LyX:
21605 \end_layout
21606
21607 \begin_layout Enumerate
21608 When the 
21609 \family sans
21610 Update\SpecialChar \menuseparator
21611 DVI
21612 \family default
21613  menu option is chosen, a LaTeX file is generated.
21614  
21615 \end_layout
21616
21617 \begin_deeper
21618 \begin_layout Standard
21619 If the document is of any literate class the generated file will be named
21620  with an extension name defined by the 
21621 \begin_inset Quotes eld
21622 \end_inset
21623
21624 literate
21625 \begin_inset Quotes erd
21626 \end_inset
21627
21628  format (defined in the Preferences panel), otherwise the file will have
21629  the usual 
21630 \family typewriter
21631 .tex
21632 \family default
21633  extension.
21634 \end_layout
21635
21636 \end_deeper
21637 \begin_layout Enumerate
21638 Note that the only difference so far is in the name of the file, no special
21639  processing is required by LyX.
21640  Given that you formatted the code using the Scrap layout that, by itself,
21641  takes care of the business.
21642 \end_layout
21643
21644 \begin_layout Enumerate
21645 If the document is of any literate class LyX will then use the internal
21646  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21647 \begin_inset Foot
21648 status collapsed
21649
21650 \begin_layout Plain Layout
21651 The converters are defined in the 
21652 \family sans
21653 Tools\SpecialChar \menuseparator
21654 Preferences
21655 \family default
21656  panel, under the 
21657 \begin_inset Quotes eld
21658 \end_inset
21659
21660 Conversion
21661 \begin_inset Quotes erd
21662 \end_inset
21663
21664  tab.
21665  See section 
21666 \emph on
21667 Converters
21668 \emph default
21669  of the 
21670 \emph on
21671 Customization
21672 \emph default
21673  manual for general information about converters.
21674 \end_layout
21675
21676 \end_inset
21677
21678  to generate the LaTeX file.
21679 \end_layout
21680
21681 \begin_deeper
21682 \begin_layout Standard
21683 Otherwise it will just skip this step.
21684 \end_layout
21685
21686 \end_deeper
21687 \begin_layout Enumerate
21688 Finally, LaTeX is invoked and the regular post processing continues as in
21689  a plain document.
21690 \end_layout
21691
21692 \begin_layout Standard
21693 Independence from a particular 
21694 \begin_inset Quotes eld
21695 \end_inset
21696
21697 literate tool
21698 \begin_inset Quotes erd
21699 \end_inset
21700
21701  is easily achieved by changing the commands that are run by the various
21702  converters.
21703 \end_layout
21704
21705 \begin_layout Paragraph
21706 Generating the code
21707 \end_layout
21708
21709 \begin_layout Standard
21710 When the build menu option is chosen or the corresponding button in the
21711  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21712  Next, LyX invokes the 
21713 \family typewriter
21714 Noweb->Program
21715 \family default
21716  converter.
21717  This converter needs to be defined by the user and is not installed by
21718  default, though the Program format is.
21719  This converter (like any other converter) will have two parts:
21720 \end_layout
21721
21722 \begin_layout Enumerate
21723 The converter program itself.
21724  This program performs the conversion from the one format to the other (in
21725  this case, from the Noweb format to the Program pseudo-format).
21726 \end_layout
21727
21728 \begin_layout Enumerate
21729 The error log parser.
21730  This is a program whose sole purpose is to rewrite error messages in a
21731  format that LyX understands.
21732  This makes it possible for LyX to place error boxes in the right places
21733  in the file buffer.
21734 \end_layout
21735
21736 \begin_layout Standard
21737 The first part, the 
21738 \begin_inset Quotes eld
21739 \end_inset
21740
21741 Converter
21742 \begin_inset Quotes erd
21743 \end_inset
21744
21745  setting, should be set to 
21746 \begin_inset Quotes eld
21747 \end_inset
21748
21749
21750 \family typewriter
21751 build-script $$i
21752 \family default
21753
21754 \begin_inset Quotes erd
21755 \end_inset
21756
21757 .
21758  This basically means that LyX will call 
21759 \begin_inset Quotes eld
21760 \end_inset
21761
21762 build-script
21763 \begin_inset Quotes erd
21764 \end_inset
21765
21766  (a program or script) with the name of the Noweb file (normally a file
21767  in the LyX temp directory).
21768  
21769 \end_layout
21770
21771 \begin_layout Standard
21772 This is an implementation of 
21773 \begin_inset Quotes eld
21774 \end_inset
21775
21776 build-script
21777 \begin_inset Quotes erd
21778 \end_inset
21779
21780  that you can place in a directory on your path:
21781 \end_layout
21782
21783 \begin_layout LyX-Code
21784 #!/bin/sh
21785 \end_layout
21786
21787 \begin_layout LyX-Code
21788 #
21789 \end_layout
21790
21791 \begin_layout LyX-Code
21792 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21793 \end_layout
21794
21795 \begin_layout Standard
21796 The next part of the converter setting is the 
21797 \begin_inset Quotes eld
21798 \end_inset
21799
21800 Flags
21801 \begin_inset Quotes erd
21802 \end_inset
21803
21804  which is to be set to 
21805 \begin_inset Quotes eld
21806 \end_inset
21807
21808
21809 \family typewriter
21810 parselog=listerrors
21811 \family default
21812
21813 \begin_inset Quotes erd
21814 \end_inset
21815
21816 .
21817  This will run any errors that are generated by the 
21818 \begin_inset Quotes eld
21819 \end_inset
21820
21821 build-script
21822 \begin_inset Quotes erd
21823 \end_inset
21824
21825  process through the 
21826 \begin_inset Quotes eld
21827 \end_inset
21828
21829 listerrors
21830 \begin_inset Quotes erd
21831 \end_inset
21832
21833  program.
21834 \end_layout
21835
21836 \begin_layout Standard
21837 The converter code looks in 
21838 \emph on
21839 MYLYXDIR/scripts
21840 \emph default
21841  first, then in 
21842 \emph on
21843 LIBDIR/scripts
21844 \emph default
21845  then on the path for the 
21846 \begin_inset Quotes eld
21847 \end_inset
21848
21849 listerrors
21850 \begin_inset Quotes erd
21851 \end_inset
21852
21853  program.
21854 \end_layout
21855
21856 \begin_layout Standard
21857 The build will normally take place in LyX's temporary directory, so the
21858  files produced by the conversion will be in that directory.
21859  LyX will copy out what it regards as the `main' file, but the 
21860 \family typewriter
21861 Noweb->Program
21862 \family default
21863  conversion may produce several files, and so most of these would then be
21864  deleted when LyX was closed.
21865  The present solution is to use a `copier',
21866 \begin_inset Foot
21867 status collapsed
21868
21869 \begin_layout Plain Layout
21870 See section 
21871 \emph on
21872 Copiers
21873 \emph default
21874  of the 
21875 \emph on
21876 Customization
21877 \emph default
21878  manual for information on these.
21879 \end_layout
21880
21881 \end_inset
21882
21883  in this case, the 
21884 \family typewriter
21885 ext_copy.py
21886 \family default
21887  script in its default mode, so that the entire contents of the temporary
21888  directory is copied.
21889  More will get copied than is needed, to be sure, but nothing will be lost.
21890  If, however, you know what extensions the generated files will have, this
21891  can be improved by using the 
21892 \family typewriter
21893 -e
21894 \family default
21895  option to 
21896 \family typewriter
21897 ext_copy
21898 \family default
21899 .
21900  This option takes a comma-separated list of extensions to copy.
21901  So, for example, if the conversion will generate only files with the extensions
21902  
21903 \family typewriter
21904 .c
21905 \family default
21906  and 
21907 \family typewriter
21908 .h
21909 \family default
21910 , then the correct definition would be:
21911 \end_layout
21912
21913 \begin_layout LyX-Code
21914 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21915 \end_layout
21916
21917 \begin_layout Standard
21918 The result will be that only files with these two extensions will be copied
21919  out.
21920 \end_layout
21921
21922 \begin_layout Paragraph
21923 Build instructions in the document
21924 \end_layout
21925
21926 \begin_layout Standard
21927 The last piece of the integration between LyX and noweb is the 
21928 \begin_inset Quotes eld
21929 \end_inset
21930
21931 build-script
21932 \begin_inset Quotes erd
21933 \end_inset
21934
21935  scrap.
21936  Generally, the instructions for building your program should be embedded
21937  in a scrap of its own.
21938  The noweb-specific 
21939 \begin_inset Quotes eld
21940 \end_inset
21941
21942 build-script
21943 \begin_inset Quotes erd
21944 \end_inset
21945
21946  above uses the notangle command to look for this scrap (called 
21947 \begin_inset Quotes eld
21948 \end_inset
21949
21950 build-script
21951 \begin_inset Quotes erd
21952 \end_inset
21953
21954 ) and runs its contents through 
21955 \begin_inset Quotes eld
21956 \end_inset
21957
21958 sh
21959 \begin_inset Quotes erd
21960 \end_inset
21961
21962 .
21963 \end_layout
21964
21965 \begin_layout Standard
21966 Typically, such a scrap would look something like this:
21967 \end_layout
21968
21969 \begin_layout LyX-Code
21970 <<build-script>>=
21971 \begin_inset Newline newline
21972 \end_inset
21973
21974 #!/bin/sh
21975 \begin_inset Newline newline
21976 \end_inset
21977
21978
21979 \begin_inset Newline newline
21980 \end_inset
21981
21982 if [ -z "${NOWEB_SOURCE}" ]
21983 \begin_inset Newline newline
21984 \end_inset
21985
21986 then
21987 \begin_inset Newline newline
21988 \end_inset
21989
21990   NOWEB_SOURCE=myfile.nw
21991 \begin_inset Newline newline
21992 \end_inset
21993
21994 fi
21995 \begin_inset Newline newline
21996 \end_inset
21997
21998 [...
21999  code to extract files ...]
22000 \begin_inset Newline newline
22001 \end_inset
22002
22003 [...
22004  code to compile files ...]
22005 \begin_inset Newline newline
22006 \end_inset
22007
22008 @
22009 \end_layout
22010
22011 \begin_layout Standard
22012 Look in 
22013 \emph on
22014 LIBDIR/examples/listerrors.lyx
22015 \emph default
22016  or in 
22017 \emph on
22018 LIBDIR/examples/Literate.lyx
22019 \emph default
22020  which implement two versions of the 
22021 \begin_inset Quotes eld
22022 \end_inset
22023
22024 listerrors
22025 \begin_inset Quotes erd
22026 \end_inset
22027
22028  program for some illustrations of how all of these pieces go together or
22029  in 
22030 \emph on
22031 LIBDIR/examples/noweb2lyx.lyx.
22032
22033 \emph default
22034  Interestingly, these three files show off the language-indepence of the
22035  LyX literate programming support since they are written in Python, C and
22036  Perl respectively.
22037 \end_layout
22038
22039 \begin_layout Subsubsection
22040 Configuring LyX
22041 \end_layout
22042
22043 \begin_layout Standard
22044 All the Literate Programming support is configured by the 
22045 \family sans
22046 Tools\SpecialChar \menuseparator
22047 Preferences
22048 \family default
22049  panel in the 
22050 \begin_inset Quotes eld
22051 \end_inset
22052
22053 Conversion
22054 \begin_inset Quotes erd
22055 \end_inset
22056
22057  tab.
22058  The important parts are:
22059 \end_layout
22060
22061 \begin_layout Description
22062 the
22063 \begin_inset space ~
22064 \end_inset
22065
22066
22067 \begin_inset Quotes eld
22068 \end_inset
22069
22070 literate
22071 \begin_inset Quotes erd
22072 \end_inset
22073
22074
22075 \begin_inset space ~
22076 \end_inset
22077
22078 format Set up via the Formats tab, this is where the Noweb-specific pieces
22079  are set up.
22080  The 
22081 \family sans
22082 GUI Name
22083 \family default
22084  is set to 
22085 \family typewriter
22086 NoWeb
22087 \family default
22088 , the file extension is set to 
22089 \family typewriter
22090 .nw
22091 \family default
22092 .
22093  This tells LyX to create a file with a 
22094 \family typewriter
22095 .nw
22096 \family default
22097  extension in the first step of the conversion process.
22098 \end_layout
22099
22100 \begin_layout Description
22101 the
22102 \begin_inset space ~
22103 \end_inset
22104
22105
22106 \family sans
22107 Program
22108 \family default
22109
22110 \begin_inset space ~
22111 \end_inset
22112
22113 format This is an empty format whose sole purpose is to be the endpoint
22114  of a conversion (which then allows us to set up a converter for it).
22115 \end_layout
22116
22117 \begin_layout Description
22118
22119 \family sans
22120 NoWeb
22121 \family default
22122 ->
22123 \family sans
22124 LaTeX
22125 \family default
22126  This converter performs the 
22127 \begin_inset Quotes eld
22128 \end_inset
22129
22130 weaving
22131 \begin_inset Quotes erd
22132 \end_inset
22133
22134  of the literate document.
22135  For Noweb, it is set to 
22136 \begin_inset Quotes eld
22137 \end_inset
22138
22139
22140 \family typewriter
22141 noweave -delay -index $$i > $$o
22142 \family default
22143
22144 \begin_inset Quotes erd
22145 \end_inset
22146
22147
22148 \end_layout
22149
22150 \begin_layout Description
22151
22152 \family sans
22153 NoWeb
22154 \family default
22155 ->
22156 \family sans
22157 Program
22158 \family default
22159  This performs the 
22160 \begin_inset Quotes eld
22161 \end_inset
22162
22163 tangling step
22164 \begin_inset Quotes erd
22165 \end_inset
22166
22167 .
22168  As stated above, the Converter is set to 
22169 \begin_inset Quotes eld
22170 \end_inset
22171
22172
22173 \family typewriter
22174 build-script $$i
22175 \family default
22176
22177 \begin_inset Quotes erd
22178 \end_inset
22179
22180 , with Flags set to 
22181 \begin_inset Quotes eld
22182 \end_inset
22183
22184
22185 \family typewriter
22186 originaldir,parselog=listerrors
22187 \family default
22188
22189 \begin_inset Quotes erd
22190 \end_inset
22191
22192 .
22193 \end_layout
22194
22195 \begin_layout Subsubsection
22196 Debug extensions
22197 \end_layout
22198
22199 \begin_layout Standard
22200 There is also a new function implemented in the LyX server, the 
22201 \begin_inset Quotes eld
22202 \end_inset
22203
22204 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22205  
22206 \end_layout
22207
22208 \begin_layout Standard
22209 When debugging code with ddd/gdb, it is possible to invoke a text editor
22210  at the current execution position with a single key stroke.
22211  The default ddd configuration for that is shift-ctrl-V.
22212  It happens that you can define the editor command line invocation in ddd
22213  by accessing the 
22214 \family sans
22215 Edit\SpecialChar \menuseparator
22216 Preferences\SpecialChar \menuseparator
22217 Helpers
22218 \family default
22219  dialog and changing the "Edit Sources" entry.
22220 \end_layout
22221
22222 \begin_layout Standard
22223 I take advantage of the new created LyX server function and this ddd feature,
22224  and set 
22225 \begin_inset Quotes eld
22226 \end_inset
22227
22228 Edit Sources
22229 \begin_inset Quotes erd
22230 \end_inset
22231
22232  to:
22233 \end_layout
22234
22235 \begin_layout LyX-Code
22236 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22237 \end_layout
22238
22239 \begin_layout Standard
22240 With this, whenever you are using ddd and find a point in the program that
22241  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22242  ddd you forward this information to LyX through the LyX server and then
22243  the LyX window will show the same file with the cursor at the same position
22244  ddd was pointing to.
22245  No more guessing or long scrolling to locate a point in the program back
22246  from debugging !
22247 \end_layout
22248
22249 \begin_layout Standard
22250 Note however that you must enable the LyX server to get this feature working
22251  (it is disabled by default).
22252  You can enable it in 
22253 \family sans
22254 Preferences
22255 \family default
22256  (tabs 
22257 \family sans
22258 Inputs
22259 \family default
22260
22261 \family sans
22262 Paths
22263 \family default
22264 ) by entering in the 
22265 \family sans
22266 LyXserver pipe
22267 \family default
22268  a path like 
22269 \begin_inset Quotes eld
22270 \end_inset
22271
22272
22273 \family typewriter
22274 /home/<your-home-directory>/.lyx/lyxpipe
22275 \family default
22276
22277 \begin_inset Quotes erd
22278 \end_inset
22279
22280
22281 \end_layout
22282
22283 \begin_layout Standard
22284 Read the LyX server documentation in the 
22285 \emph on
22286 Customization Manual
22287 \emph default
22288  for further information.
22289 \end_layout
22290
22291 \begin_layout Subsubsection
22292 Toolbar extensions
22293 \end_layout
22294
22295 \begin_layout Standard
22296 There are six new buttons that can be added to your LyX toolbar.
22297  Five of these buttons are short cuts to layout styles: 
22298 \family sans
22299 Standard
22300 \family default
22301
22302 \family sans
22303 Section
22304 \family default
22305
22306 \family sans
22307 LaTeX
22308 \family default
22309
22310 \family sans
22311 LyX-Code
22312 \family default
22313 , and 
22314 \family sans
22315 Scrap
22316 \family default
22317 .
22318  The last one is a short cut to the 
22319 \begin_inset Quotes eld
22320 \end_inset
22321
22322 Build Program
22323 \begin_inset Quotes erd
22324 \end_inset
22325
22326  File menu entry.
22327  
22328 \end_layout
22329
22330 \begin_layout Standard
22331 LyX has a range of buttons that are available for tool bar customization.
22332  In my toolbar I like to combine the six short cuts above with two more:
22333  One for 
22334 \family sans
22335 View
22336 \family default
22337 \SpecialChar \menuseparator
22338
22339 \family sans
22340 Update
22341 \family default
22342 \SpecialChar \menuseparator
22343
22344 \family sans
22345 DVI
22346 \family default
22347  and the other for 
22348 \family sans
22349 View\SpecialChar \menuseparator
22350 DVI
22351 \family default
22352  File menu entries.
22353  Here is how it looks like:
22354 \end_layout
22355
22356 \begin_layout LyX-Code
22357 Toolbar
22358 \end_layout
22359
22360 \begin_layout LyX-Code
22361   Layouts
22362 \end_layout
22363
22364 \begin_layout LyX-Code
22365   Icon "layout Standard"
22366 \end_layout
22367
22368 \begin_layout LyX-Code
22369   Icon "layout Section"
22370 \end_layout
22371
22372 \begin_layout LyX-Code
22373   Icon "layout LaTeX"
22374 \end_layout
22375
22376 \begin_layout LyX-Code
22377   Icon "layout LyX-Code"
22378 \end_layout
22379
22380 \begin_layout LyX-Code
22381   Icon "layout Scrap"
22382 \end_layout
22383
22384 \begin_layout LyX-Code
22385   Separator
22386 \end_layout
22387
22388 \begin_layout LyX-Code
22389   Icon "buffer-view"
22390 \end_layout
22391
22392 \begin_layout LyX-Code
22393   Icon "buffer-typeset"
22394 \end_layout
22395
22396 \begin_layout LyX-Code
22397   Icon "build-program"
22398 \end_layout
22399
22400 \begin_layout LyX-Code
22401   Separator
22402 \end_layout
22403
22404 \begin_layout LyX-Code
22405 .
22406 \end_layout
22407
22408 \begin_layout LyX-Code
22409 .
22410 \end_layout
22411
22412 \begin_layout LyX-Code
22413 .
22414 \end_layout
22415
22416 \begin_layout LyX-Code
22417 End
22418 \end_layout
22419
22420 \begin_layout Subsubsection
22421 Colors customization
22422 \end_layout
22423
22424 \begin_layout Standard
22425 There are a number of colors in LyX that can be customized in 
22426 \family sans
22427 Preferences
22428 \family default
22429 .
22430  One of the things that bothers people is the LaTeX font color.
22431  The default color is red, since the scraps uses LaTeX font, and there is
22432  a lot of scraps in literate documents, you may get tired of seeing everything
22433  in red.
22434  You can change it by going to the tabs 
22435 \family sans
22436 Look&Feel
22437 \family default
22438
22439 \family sans
22440 Colors.
22441 \end_layout
22442
22443 \begin_layout Standard
22444 The next thing is the visible presence of the newline character in the screen.
22445  You can choose the color of this particular character and make it blend
22446  in the background.
22447  I recommend you choosing a color that is close to the background but not
22448  equal, that way you still can see it is there, but it is not bothering
22449  you anymore.
22450  
22451 \end_layout
22452
22453 \begin_layout Chapter
22454 Special features
22455 \end_layout
22456
22457 \begin_layout Standard
22458 You can do everything with LyX that you can do with LaTeX.
22459  However, LyX cannot support every LaTeX feature directly.
22460  But you can always use TeX Code.
22461  This chapter shows you some more special things you might want to use.
22462  For other special things you can do with figures, tables, floats, boxes
22463  and notes, have a look at the 
22464 \emph on
22465 EmbeddedObjects
22466 \emph default
22467  manual.
22468 \end_layout
22469
22470 \begin_layout Section
22471 Multiple Text Columns
22472 \end_layout
22473
22474 \begin_layout Standard
22475 This feature is independent of the option 
22476 \family sans
22477 Two-column document
22478 \family default
22479  in the document settings under 
22480 \family sans
22481 Text Layout
22482 \family default
22483 .
22484  If you want to have 2
22485 \begin_inset space ~
22486 \end_inset
22487
22488 columns for the whole document, it is recommended to use the 
22489 \family sans
22490 Two-column document
22491 \family default
22492  option.
22493  For all other cases use this feature.
22494 \end_layout
22495
22496 \begin_layout Standard
22497 To use multiple text columns in your document, you have to load the module
22498  
22499 \family sans
22500 Multiple Columns
22501 \family default
22502  (menu 
22503 \family sans
22504 Document\SpecialChar \menuseparator
22505 Settings\SpecialChar \menuseparator
22506 Modules
22507 \family default
22508 ) and must have the LaTeX-package 
22509 \series bold
22510 multicol
22511 \series default
22512
22513 \begin_inset Index idx
22514 status collapsed
22515
22516 \begin_layout Plain Layout
22517 LaTeX-packages ! multicol
22518 \end_layout
22519
22520 \end_inset
22521
22522  installed.
22523 \end_layout
22524
22525 \begin_layout Standard
22526 Footnotes within multiple columns will be placed at the bottom of the page
22527  and not under each column.
22528  Within the different columns you can use everything, with the limitation
22529  that for floats you need to use the float option 
22530 \family sans
22531 Span columns
22532 \family default
22533 .
22534 \end_layout
22535
22536 \begin_layout Subsection
22537 Basics
22538 \end_layout
22539
22540 \begin_layout Standard
22541 If you want to have 2 columns in your text, use the style 
22542 \family sans
22543 Begin Multiple Columns
22544 \family default
22545  where the columns should start.
22546  The content of the style is the number of the columns, so in this case
22547  use a 
22548 \begin_inset Quotes eld
22549 \end_inset
22550
22551 2
22552 \begin_inset Quotes erd
22553 \end_inset
22554
22555 .
22556  At the point where the columns should end use the style 
22557 \family sans
22558 End Multiple Columns
22559 \family default
22560  and keep it empty.
22561 \end_layout
22562
22563 \begin_layout Standard
22564 Here is an example:
22565 \end_layout
22566
22567 \begin_layout Begin Multiple Columns
22568 2
22569 \end_layout
22570
22571 \begin_layout Standard
22572 \noindent
22573
22574 \series bold
22575 \size small
22576 The Adventure of the Empty House
22577 \series default
22578
22579 \begin_inset Newline newline
22580 \end_inset
22581
22582 by 
22583 \noun on
22584 Sir Arthur Conan Doyle
22585 \end_layout
22586
22587 \begin_layout Standard
22588
22589 \size small
22590 It was in the spring of the year 1894 that all London was interested, and
22591  the fashionable world dismayed, by the murder of the Honourable Ronald
22592  Adair under most unusual and inexplicable circumstances.
22593  The public has already learned those particulars of the crime which came
22594  out in the police investigation, but a good deal was suppressed upon that
22595  occasion, since the case for the prosecution was so overwhelmingly strong
22596  that it was not necessary to bring forward all the facts.
22597  Only now, at the end of nearly ten years, am I allowed to supply those
22598  missing links which make up the whole of that remarkable chain.
22599  The crime was of interest in itself, but that interest was as nothing to
22600  me compared to the inconceivable sequel, which afforded me the greatest
22601  shock and surprise of any event in my adventurous life.
22602  Even now, after this long interval, I find myself thrilling as I think
22603  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22604 ty which utterly submerged my mind.
22605  Let me say to that public, which has shown some interest in those glimpses
22606  which I have occasionally given them of the thoughts and actions of a very
22607  remarkable man, that they are not to blame me if I have not shared my knowledge
22608  with them, for I should have considered it my first duty to do so, had
22609  I not been barred by a positive prohibition from his own lips, which was
22610  only withdrawn upon the third of last month.
22611 \end_layout
22612
22613 \begin_layout End Multiple Columns
22614
22615 \end_layout
22616
22617 \begin_layout Standard
22618 Here is an example with 3
22619 \begin_inset space ~
22620 \end_inset
22621
22622 columns:
22623 \end_layout
22624
22625 \begin_layout Begin Multiple Columns
22626 3
22627 \end_layout
22628
22629 \begin_layout Standard
22630
22631 \size footnotesize
22632 It can be imagined that my close intimacy with Sherlock Holmes had interested
22633  me deeply in crime, and that after his disappearance I never failed to
22634  read with care the various problems which came before the public.
22635  And I even attempted, more than once, for my own private satisfaction,
22636  to employ his methods in their solution, though with indifferent success.
22637  There was none, however, which appealed to me like this tragedy of Ronald
22638  Adair.
22639  As I read the evidence at the inquest, which led up to a verdict of willful
22640  murder against some person or persons unknown, I realized more clearly
22641  than I had ever done the loss which the community had sustained by the
22642  death of Sherlock Holmes.
22643  There were points about this strange business which would, I was sure,
22644  have specially appealed to him, and the efforts of the police would have
22645  been supplemented, or more probably anticipated, by the trained observation
22646  and the alert mind of the first criminal agent in Europe.
22647  All day, as I drove upon my round, I turned over the case in my mind and
22648  found no explanation which appeared to me to be adequate.
22649  At the risk of telling a twice-told tale, I will recapitulate the facts
22650  as they were known to the public at the conclusion of the inquest.
22651 \end_layout
22652
22653 \begin_layout End Multiple Columns
22654
22655 \end_layout
22656
22657 \begin_layout Standard
22658 You can have up to 10
22659 \begin_inset space ~
22660 \end_inset
22661
22662 columns if you want to, but that might not be very pleasant for the readers
22663  of your document.
22664 \end_layout
22665
22666 \begin_layout Standard
22667 \begin_inset Newpage newpage
22668 \end_inset
22669
22670
22671 \end_layout
22672
22673 \begin_layout Subsection
22674 Columns inside Columns
22675 \end_layout
22676
22677 \begin_layout Standard
22678 You can also have columns inside columns:
22679 \end_layout
22680
22681 \begin_layout Begin Multiple Columns
22682 2
22683 \end_layout
22684
22685 \begin_layout Standard
22686
22687 \size footnotesize
22688 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22689  at that time governor of one of the Australian colonies.
22690  Adair's mother had returned from Australia to undergo the operation for
22691  cataract, and she, her son Ronald, and her daughter Hilda were living together
22692  at 427 Park Lane.
22693 \end_layout
22694
22695 \begin_layout Begin Multiple Columns
22696 2
22697 \end_layout
22698
22699 \begin_layout Standard
22700
22701 \size footnotesize
22702 The youth moved in the best society–had, so far as was known, no enemies
22703  and no particular vices.
22704  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22705  had been broken off by mutual consent some months before, and there was
22706  no sign that it had left any very profound feeling behind it.
22707  For the rest {sic} the man's life moved in a narrow and conventional circle,
22708  for his habits were quiet and his nature unemotional.
22709  Yet it was upon this easy-going young aristocrat that death came, in most
22710  strange and unexpected form, between the hours of ten and eleven-twenty
22711  on the night of March 30, 1894.
22712 \end_layout
22713
22714 \begin_layout End Multiple Columns
22715
22716 \end_layout
22717
22718 \begin_layout Standard
22719
22720 \size footnotesize
22721 Ronald Adair was fond of cards–playing continually, but never for such stakes
22722  as would hurt him.
22723  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22724  It was shown that, after dinner on the day of his death, he had played
22725  a rubber of whist at the latter club.
22726  He had also played there in the afternoon.
22727
22728 \size default
22729  
22730 \size footnotesize
22731 The evidence of those who had played with him– Mr.
22732  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22733  and that there was a fairly equal fall of the cards.
22734  Adair might have lost five pounds, but not more.
22735  His fortune was a considerable one, and such a loss could not in any way
22736  affect him.
22737  He had played nearly every day at one club or other, but he was a cautious
22738  player, and usually rose a winner.
22739  It came out in evidence that, in partnership with Colonel Moran, he had
22740  actually won as much as four hundred and twenty pounds in a sitting, some
22741  weeks before, from Godfrey Milner and Lord Balmoral.
22742  So much for his recent history as it came out at the inquest.
22743 \end_layout
22744
22745 \begin_layout End Multiple Columns
22746
22747 \end_layout
22748
22749 \begin_layout Subsection
22750 Advanced Examples
22751 \end_layout
22752
22753 \begin_layout Standard
22754 The examples in this section show some more special features of multiple
22755  columns.
22756 \end_layout
22757
22758 \begin_layout Standard
22759 For more features of multiple columns, have a look at the documentation
22760  of the LaTeX-package 
22761 \series bold
22762 multicol
22763 \series default
22764
22765 \begin_inset Index idx
22766 status collapsed
22767
22768 \begin_layout Plain Layout
22769 LaTeX-packages ! multicol
22770 \end_layout
22771
22772 \end_inset
22773
22774
22775 \begin_inset CommandInset citation
22776 LatexCommand cite
22777 key "multicol"
22778
22779 \end_inset
22780
22781 .
22782 \end_layout
22783
22784 \begin_layout Subsubsection
22785 Preface
22786 \end_layout
22787
22788 \begin_layout Standard
22789 To add a preface text for multiple columns, add the command
22790 \end_layout
22791
22792 \begin_layout Standard
22793
22794 \series bold
22795 }[
22796 \end_layout
22797
22798 \begin_layout Standard
22799 as TeX Code behind the number of columns in the
22800 \family sans
22801  Begin Multiple Columns
22802 \family default
22803  style.
22804  behind the command write the text.
22805  At the end of the style use the command
22806 \end_layout
22807
22808 \begin_layout Standard
22809
22810 \series bold
22811 ]{
22812 \end_layout
22813
22814 \begin_layout Standard
22815 as TeX Code.
22816  An example with some preface text:
22817 \end_layout
22818
22819 \begin_layout Standard
22820 \begin_inset VSpace bigskip
22821 \end_inset
22822
22823
22824 \end_layout
22825
22826 \begin_layout Begin Multiple Columns
22827 2
22828 \begin_inset ERT
22829 status collapsed
22830
22831 \begin_layout Plain Layout
22832
22833 }[
22834 \end_layout
22835
22836 \end_inset
22837
22838 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22839
22840 \begin_inset ERT
22841 status collapsed
22842
22843 \begin_layout Plain Layout
22844
22845 ]{
22846 \end_layout
22847
22848 \end_inset
22849
22850
22851 \end_layout
22852
22853 \begin_layout Standard
22854
22855 \size small
22856 On the evening of the crime, he returned from the club exactly at ten.
22857  His mother and sister were out spending the evening with a relation.
22858  The servant deposed that she heard him enter the front room on the second
22859  floor, generally used as his sitting-room.
22860  She had lit a fire there, and as it smoked she had opened the window.
22861  No sound was heard from the room until eleven-twenty, the hour of the return
22862  of Lady Maynooth and her daughter.
22863  Desiring to say good-night, she attempted to enter her son's room.
22864  The door was locked on the inside, and no answer could be got to their
22865  cries and knocking.
22866  Help was obtained, and the door forced.
22867  The unfortunate young man was found lying near the table.
22868  His head had been horribly mutilated by an expanding revolver bullet, but
22869  no weapon of any sort was to be found in the room.
22870 \end_layout
22871
22872 \begin_layout End Multiple Columns
22873
22874 \end_layout
22875
22876 \begin_layout Standard
22877 You can also use a section heading as the preface if you use a section command
22878  as TeX Code behind the first TeX Code.
22879  For example the command
22880 \end_layout
22881
22882 \begin_layout Standard
22883
22884 \series bold
22885
22886 \backslash
22887 subsection{subsection title}
22888 \end_layout
22889
22890 \begin_layout Standard
22891 creates a subsection.
22892  In this example the preface is a subsubsection:
22893 \end_layout
22894
22895 \begin_layout Begin Multiple Columns
22896 2
22897 \begin_inset ERT
22898 status collapsed
22899
22900 \begin_layout Plain Layout
22901
22902 }[
22903 \end_layout
22904
22905 \end_inset
22906
22907
22908 \begin_inset ERT
22909 status collapsed
22910
22911 \begin_layout Plain Layout
22912
22913
22914 \backslash
22915 subsubsection{
22916 \end_layout
22917
22918 \end_inset
22919
22920 This is a subsubsection heading as a preface
22921 \begin_inset ERT
22922 status collapsed
22923
22924 \begin_layout Plain Layout
22925
22926 }
22927 \end_layout
22928
22929 \end_inset
22930
22931
22932 \begin_inset ERT
22933 status collapsed
22934
22935 \begin_layout Plain Layout
22936
22937 ]{
22938 \end_layout
22939
22940 \end_inset
22941
22942
22943 \end_layout
22944
22945 \begin_layout Standard
22946
22947 \size small
22948 A minute examination of the circumstances served only to make the case more
22949  complex.
22950  In the first place, no reason could be given why the young man should have
22951  fastened the door upon the inside.
22952  There was the possibility that the murderer had done this, and had afterwards
22953  escaped by the window.
22954  The drop was at least twenty feet, however, and a bed of crocuses in full
22955  bloom lay beneath.
22956  Neither the flowers nor the earth showed any sign of having been disturbed,
22957  nor were there any marks upon the narrow strip of grass which separated
22958  the house from the road.
22959  Apparently, therefore, it was the young man himself who had fastened the
22960  door.
22961  But how did he come by his death? No one could have climbed up to the window
22962  without leaving traces.
22963  Suppose a man had fired through the window, he would indeed be a remarkable
22964  shot who could with a revolver inflict so deadly a wound.
22965  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22966  a hundred yards of the house.
22967  No one had heard a shot.
22968 \end_layout
22969
22970 \begin_layout End Multiple Columns
22971
22972 \end_layout
22973
22974 \begin_layout Standard
22975 If there is less vertical space left on the page at the beginning of the
22976  multiple columns than needed for 6
22977 \begin_inset space ~
22978 \end_inset
22979
22980 text lines, a page break will be inserted before the multiple columns.
22981  Depending on the number of lines of the preface text, you might want to
22982  change this value.
22983  It is determined by inserting the command
22984 \end_layout
22985
22986 \begin_layout Standard
22987
22988 \series bold
22989 ][number
22990 \backslash
22991 baselineskip
22992 \end_layout
22993
22994 \begin_layout Standard
22995 as TeX Code behind the preface definition but before the final 
22996 \series bold
22997 ]{
22998 \series default
22999  command.
23000  
23001 \emph on
23002 number
23003 \emph default
23004  is hereby the number of text lines.
23005  In this example the space is set to 7
23006 \begin_inset space ~
23007 \end_inset
23008
23009 text lines:
23010 \end_layout
23011
23012 \begin_layout Begin Multiple Columns
23013 2
23014 \begin_inset ERT
23015 status collapsed
23016
23017 \begin_layout Plain Layout
23018
23019 }[
23020 \end_layout
23021
23022 \end_inset
23023
23024
23025 \begin_inset ERT
23026 status collapsed
23027
23028 \begin_layout Plain Layout
23029
23030
23031 \backslash
23032 subsubsection{
23033 \end_layout
23034
23035 \end_inset
23036
23037 This is the sectioning command
23038 \begin_inset Newline newline
23039 \end_inset
23040
23041 as a preface and
23042 \begin_inset Newline newline
23043 \end_inset
23044
23045 with multiple text lines
23046 \begin_inset ERT
23047 status collapsed
23048
23049 \begin_layout Plain Layout
23050
23051 }
23052 \end_layout
23053
23054 \end_inset
23055
23056
23057 \begin_inset ERT
23058 status collapsed
23059
23060 \begin_layout Plain Layout
23061
23062 ][7
23063 \backslash
23064 baselineskip
23065 \end_layout
23066
23067 \end_inset
23068
23069
23070 \begin_inset ERT
23071 status collapsed
23072
23073 \begin_layout Plain Layout
23074
23075 ]{
23076 \end_layout
23077
23078 \end_inset
23079
23080
23081 \end_layout
23082
23083 \begin_layout Standard
23084
23085 \size small
23086 On the evening of the crime, he returned from the club exactly at ten.
23087  His mother and sister were out spending the evening with a relation.
23088  The servant deposed that she heard him enter the front room on the second
23089  floor, generally used as his sitting-room.
23090  She had lit a fire there, and as it smoked she had opened the window.
23091  No sound was heard from the room until eleven-twenty, the hour of the return
23092  of Lady Maynooth and her daughter.
23093  Desiring to say good-night, she attempted to enter her son's room.
23094  The door was locked on the inside, and no answer could be got to their
23095  cries and knocking.
23096  Help was obtained, and the door forced.
23097  The unfortunate young man was found lying near the table.
23098  His head had been horribly mutilated by an expanding revolver bullet, but
23099  no weapon of any sort was to be found in the room.
23100 \end_layout
23101
23102 \begin_layout End Multiple Columns
23103
23104 \end_layout
23105
23106 \begin_layout Subsubsection
23107 Surrounding Space
23108 \end_layout
23109
23110 \begin_layout Standard
23111 The amount of space before and after multiple columns can be changed by
23112  changing the length 
23113 \series bold
23114
23115 \backslash
23116 multicolsep
23117 \series default
23118 .
23119  For example the command
23120 \end_layout
23121
23122 \begin_layout Standard
23123
23124 \series bold
23125
23126 \backslash
23127 setlength{
23128 \backslash
23129 multicolsep}{3cm}
23130 \end_layout
23131
23132 \begin_layout Standard
23133 in TeX Code changes its value to 3
23134 \begin_inset space \thinspace{}
23135 \end_inset
23136
23137 cm.
23138  The change must be made before the multiple columns' start.
23139  The predefined value is 13
23140 \begin_inset space \thinspace{}
23141 \end_inset
23142
23143 pt.
23144 \end_layout
23145
23146 \begin_layout Standard
23147 For this example 
23148 \series bold
23149
23150 \backslash
23151 multicolsep
23152 \series default
23153  was set to 2.5
23154 \begin_inset space \thinspace{}
23155 \end_inset
23156
23157 cm:
23158 \end_layout
23159
23160 \begin_layout Standard
23161 \begin_inset ERT
23162 status open
23163
23164 \begin_layout Plain Layout
23165
23166
23167 \backslash
23168 setlength{
23169 \backslash
23170 multicolsep}{2.5cm}
23171 \end_layout
23172
23173 \end_inset
23174
23175
23176 \end_layout
23177
23178 \begin_layout Begin Multiple Columns
23179 2
23180 \end_layout
23181
23182 \begin_layout Standard
23183
23184 \size small
23185 All day I turned these facts over in my mind, endeavouring to hit upon some
23186  theory which could reconcile them all, and to find that line of least resistanc
23187 e which my poor friend had declared to be the starting-point of every investigat
23188 ion.
23189  I confess that I made little progress.
23190  In the evening I strolled across the Park, and found myself about six o'clock
23191  at the Oxford Street end of Park Lane.
23192  A group of loafers upon the pavements, all staring up at a particular window,
23193  directed me to the house which I had come to see.
23194  A tall, thin man with coloured glasses, whom I strongly suspected of being
23195  a plain-clothes detective, was pointing out some theory of his own, while
23196  the others crowded round to listen to what he said.
23197  I got as near him as I could, but his observations seemed to me to be absurd,
23198  so I withdrew again in some disgust.
23199  As I did so I struck against an elderly, deformed man, who had been behind
23200  me, and I knocked down several books which he was carrying.
23201 \end_layout
23202
23203 \begin_layout End Multiple Columns
23204
23205 \end_layout
23206
23207 \begin_layout Standard
23208 \begin_inset Note Greyedout
23209 status open
23210
23211 \begin_layout Plain Layout
23212
23213 \series bold
23214 Note:
23215 \series default
23216  The values you set with 
23217 \series bold
23218
23219 \backslash
23220 setlength
23221 \series default
23222  will be used for all following multiple columns until to change them again.
23223 \end_layout
23224
23225 \end_inset
23226
23227
23228 \end_layout
23229
23230 \begin_layout Standard
23231 \begin_inset ERT
23232 status collapsed
23233
23234 \begin_layout Plain Layout
23235
23236
23237 \backslash
23238 setlength{
23239 \backslash
23240 multicolsep}{13pt}
23241 \end_layout
23242
23243 \end_inset
23244
23245
23246 \begin_inset Note Note
23247 status collapsed
23248
23249 \begin_layout Plain Layout
23250 go back to the default
23251 \end_layout
23252
23253 \end_inset
23254
23255
23256 \end_layout
23257
23258 \begin_layout Subsubsection
23259 Column Separation
23260 \end_layout
23261
23262 \begin_layout Standard
23263 The width of the columns is automatically calculated, but you can modify
23264  the space between the columns.
23265  This is done by changing the length 
23266 \series bold
23267
23268 \backslash
23269 columnsep
23270 \series default
23271 .
23272  Its predefined value is 10
23273 \begin_inset space \thinspace{}
23274 \end_inset
23275
23276 pt.
23277  Here is an example where 
23278 \series bold
23279
23280 \backslash
23281 columnsep
23282 \series default
23283  is set to 3
23284 \begin_inset space \thinspace{}
23285 \end_inset
23286
23287 cm:
23288 \end_layout
23289
23290 \begin_layout Standard
23291 \begin_inset ERT
23292 status open
23293
23294 \begin_layout Plain Layout
23295
23296
23297 \backslash
23298 setlength{
23299 \backslash
23300 columnsep}{3cm}
23301 \end_layout
23302
23303 \end_inset
23304
23305
23306 \end_layout
23307
23308 \begin_layout Begin Multiple Columns
23309 2
23310 \end_layout
23311
23312 \begin_layout Standard
23313
23314 \size small
23315 My observations of No.
23316 \begin_inset space \space{}
23317 \end_inset
23318
23319 427 Park Lane did little to clear up the problem in which I was interested.
23320  The house was separated from the street by a low wall and railing, the
23321  whole not more than five feet high.
23322  It was perfectly easy, therefore, for anyone to get into the garden, but
23323  the window was entirely inaccessible, since there was no water pipe or
23324  anything which could help the most active man to climb it.
23325  More puzzled than ever, I retraced my steps to Kensington.
23326  I had not been in my study five minutes when the maid entered to say that
23327  a person desired to see me.
23328  To my astonishment it was none other than my strange old book collector,
23329  his sharp, wizened face peering out from a frame of white hair, and his
23330  precious volumes, a dozen of them at least, wedged under his right arm.
23331 \end_layout
23332
23333 \begin_layout End Multiple Columns
23334
23335 \end_layout
23336
23337 \begin_layout Standard
23338 \begin_inset ERT
23339 status collapsed
23340
23341 \begin_layout Plain Layout
23342
23343
23344 \backslash
23345 setlength{
23346 \backslash
23347 columnsep}{10pt}
23348 \end_layout
23349
23350 \end_inset
23351
23352
23353 \begin_inset Note Note
23354 status collapsed
23355
23356 \begin_layout Plain Layout
23357 go back to the default
23358 \end_layout
23359
23360 \end_inset
23361
23362
23363 \end_layout
23364
23365 \begin_layout Subsubsection
23366 Vertical Lines
23367 \end_layout
23368
23369 \begin_layout Standard
23370 Between the columns a rule with a width of the length 
23371 \series bold
23372
23373 \backslash
23374 columnseprule
23375 \series default
23376  is placed.
23377  If this rule width is set to 0
23378 \begin_inset space \thinspace{}
23379 \end_inset
23380
23381 pt (this is the default), the rule is suppressed.
23382  In the following example, the line separating the columns is 2
23383 \begin_inset space \thinspace{}
23384 \end_inset
23385
23386 pt wide.
23387 \end_layout
23388
23389 \begin_layout Standard
23390 \begin_inset ERT
23391 status open
23392
23393 \begin_layout Plain Layout
23394
23395
23396 \backslash
23397 setlength{
23398 \backslash
23399 columnseprule}{2pt}
23400 \end_layout
23401
23402 \end_inset
23403
23404
23405 \end_layout
23406
23407 \begin_layout Begin Multiple Columns
23408 2
23409 \end_layout
23410
23411 \begin_layout Standard
23412
23413 \size small
23414 \begin_inset Quotes eld
23415 \end_inset
23416
23417 You're surprised to see me, sir,
23418 \begin_inset Quotes erd
23419 \end_inset
23420
23421  said he, in a strange, croaking voice.
23422 \end_layout
23423
23424 \begin_layout Standard
23425
23426 \size small
23427 I acknowledged that I was.
23428 \end_layout
23429
23430 \begin_layout Standard
23431
23432 \size small
23433 \begin_inset Quotes eld
23434 \end_inset
23435
23436 Well, I've a conscience, sir, and when I chanced to see you go into this
23437  house, as I came hobbling after you, I thought to myself, I'll just step
23438  in and see that kind gentleman, and tell him that if I was a bit gruff
23439  in my manner there was not any harm meant, and that I am much obliged to
23440  him for picking up my books.
23441 \begin_inset Quotes erd
23442 \end_inset
23443
23444
23445 \end_layout
23446
23447 \begin_layout Standard
23448
23449 \size small
23450 \begin_inset Quotes eld
23451 \end_inset
23452
23453 You make too much of a trifle,
23454 \begin_inset Quotes erd
23455 \end_inset
23456
23457  said I.
23458  
23459 \begin_inset Quotes eld
23460 \end_inset
23461
23462 May I ask how you knew who I was?
23463 \begin_inset Quotes erd
23464 \end_inset
23465
23466
23467 \end_layout
23468
23469 \begin_layout Standard
23470
23471 \size small
23472 \begin_inset Quotes eld
23473 \end_inset
23474
23475 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23476  you'll find my little bookshop at the corner of Church Street, and very
23477  happy to see you, I am sure.
23478  Maybe you collect yourself, sir.
23479  Here's 
23480 \noun on
23481 British
23482 \begin_inset space ~
23483 \end_inset
23484
23485 Birds
23486 \noun default
23487 , and 
23488 \noun on
23489 Catullus
23490 \noun default
23491 , and 
23492 \noun on
23493 The Holy War
23494 \noun default
23495 --a bargain, every one of them.
23496  With five volumes you could just fill that gap on that second shelf.
23497  It looks untidy, does it not, sir?
23498 \begin_inset Quotes erd
23499 \end_inset
23500
23501
23502 \end_layout
23503
23504 \begin_layout End Multiple Columns
23505
23506 \end_layout
23507
23508 \begin_layout Standard
23509 \begin_inset ERT
23510 status collapsed
23511
23512 \begin_layout Plain Layout
23513
23514
23515 \backslash
23516 setlength{
23517 \backslash
23518 columnseprule}{0pt}
23519 \end_layout
23520
23521 \end_inset
23522
23523
23524 \begin_inset Note Note
23525 status collapsed
23526
23527 \begin_layout Plain Layout
23528 go back to the default
23529 \end_layout
23530
23531 \end_inset
23532
23533
23534 \end_layout
23535
23536 \begin_layout Standard
23537 \begin_inset Newpage newpage
23538 \end_inset
23539
23540
23541 \end_layout
23542
23543 \begin_layout Section
23544 Non-standard Paragraph Shapes
23545 \end_layout
23546
23547 \begin_layout Standard
23548 \begin_inset ERT
23549 status collapsed
23550
23551 \begin_layout Plain Layout
23552
23553
23554 \backslash
23555 begin{sloppypar}
23556 \end_layout
23557
23558 \end_inset
23559
23560
23561 \end_layout
23562
23563 \begin_layout Standard
23564 \begin_inset ERT
23565 status collapsed
23566
23567 \begin_layout Plain Layout
23568
23569
23570 \backslash
23571 newdimen
23572 \backslash
23573 varunit 
23574 \end_layout
23575
23576 \begin_layout Plain Layout
23577
23578
23579 \backslash
23580 setlength{
23581 \backslash
23582 varunit}{4.5in}
23583 \end_layout
23584
23585 \end_inset
23586
23587
23588 \end_layout
23589
23590 \begin_layout Standard
23591 \noindent
23592 \begin_inset ERT
23593 status collapsed
23594
23595 \begin_layout Plain Layout
23596
23597
23598 \backslash
23599 parshape 19 0.45
23600 \backslash
23601 varunit 0.332
23602 \backslash
23603 varunit
23604 \end_layout
23605
23606 \begin_layout Plain Layout
23607
23608 0.40
23609 \backslash
23610 varunit 0.300
23611 \backslash
23612 varunit
23613 \end_layout
23614
23615 \begin_layout Plain Layout
23616
23617 0.35
23618 \backslash
23619 varunit 0.293
23620 \backslash
23621 varunit
23622 \end_layout
23623
23624 \begin_layout Plain Layout
23625
23626 0.30
23627 \backslash
23628 varunit 0.300
23629 \backslash
23630 varunit
23631 \end_layout
23632
23633 \begin_layout Plain Layout
23634
23635 0.25
23636 \backslash
23637 varunit 0.317
23638 \backslash
23639 varunit
23640 \end_layout
23641
23642 \begin_layout Plain Layout
23643
23644 0.20
23645 \backslash
23646 varunit 0.342
23647 \backslash
23648 varunit
23649 \end_layout
23650
23651 \begin_layout Plain Layout
23652
23653 0.15
23654 \backslash
23655 varunit 0.373
23656 \backslash
23657 varunit
23658 \end_layout
23659
23660 \begin_layout Plain Layout
23661
23662 0.10
23663 \backslash
23664 varunit 0.410
23665 \backslash
23666 varunit
23667 \end_layout
23668
23669 \begin_layout Plain Layout
23670
23671 0.05
23672 \backslash
23673 varunit 0.453
23674 \backslash
23675 varunit
23676 \end_layout
23677
23678 \begin_layout Plain Layout
23679
23680 0.00
23681 \backslash
23682 varunit 0.500
23683 \backslash
23684 varunit
23685 \end_layout
23686
23687 \begin_layout Plain Layout
23688
23689 0.05
23690 \backslash
23691 varunit 0.453
23692 \backslash
23693 varunit
23694 \end_layout
23695
23696 \begin_layout Plain Layout
23697
23698 0.10
23699 \backslash
23700 varunit 0.410
23701 \backslash
23702 varunit
23703 \end_layout
23704
23705 \begin_layout Plain Layout
23706
23707 0.15
23708 \backslash
23709 varunit 0.373
23710 \backslash
23711 varunit
23712 \end_layout
23713
23714 \begin_layout Plain Layout
23715
23716 0.20
23717 \backslash
23718 varunit 0.342
23719 \backslash
23720 varunit
23721 \end_layout
23722
23723 \begin_layout Plain Layout
23724
23725 0.25
23726 \backslash
23727 varunit 0.317
23728 \backslash
23729 varunit
23730 \end_layout
23731
23732 \begin_layout Plain Layout
23733
23734 0.30
23735 \backslash
23736 varunit 0.300
23737 \backslash
23738 varunit
23739 \end_layout
23740
23741 \begin_layout Plain Layout
23742
23743 0.35
23744 \backslash
23745 varunit 0.293
23746 \backslash
23747 varunit
23748 \end_layout
23749
23750 \begin_layout Plain Layout
23751
23752 0.40
23753 \backslash
23754 varunit 0.300
23755 \backslash
23756 varunit
23757 \end_layout
23758
23759 \begin_layout Plain Layout
23760
23761 0.45
23762 \backslash
23763 varunit 0.332
23764 \backslash
23765 varunit
23766 \end_layout
23767
23768 \begin_layout Plain Layout
23769
23770 \end_layout
23771
23772 \end_inset
23773
23774 There are times when the tyranny of rectangular paragraphs must be overthrown.
23775  In such situations, a call to the delightful plain TeX command 
23776 \family typewriter
23777
23778 \backslash
23779 parshape
23780 \family default
23781  is called for.
23782  As you can see, completely arbitrary shapes can be laid out with a suitable
23783  set of line length definitions.
23784  While this parshape may look a bit silly and useless, one could conceive
23785  of situations such as finely tuned dropped capitals, word wrapping around
23786  non-rectangular graphics, etc.
23787  which will benefit from such handcrafting.
23788 \end_layout
23789
23790 \begin_layout Standard
23791 \begin_inset VSpace bigskip
23792 \end_inset
23793
23794
23795 \end_layout
23796
23797 \begin_layout Standard
23798 The syntax is 
23799 \family typewriter
23800
23801 \backslash
23802 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23803  #nindent #nlength
23804 \family default
23805 , where 
23806 \family typewriter
23807 numlines
23808 \family default
23809  is the number of lines of text which define the paragraph.
23810  If there turn out to be fewer lines, the shape is truncated; if there are
23811  more, the excess lines have the same dimensions as the last line of the
23812  definition.
23813  The 
23814 \family typewriter
23815 #nindent
23816 \family default
23817  and 
23818 \family typewriter
23819 #nlength
23820 \family default
23821  entries specify the indentation of the line from the left margin, and the
23822  length of the line as measured from that point.
23823  The shape applies only to the current paragraph; everything is reset to
23824  normal for the next paragraph.
23825 \end_layout
23826
23827 \begin_layout Standard
23828 \begin_inset ERT
23829 status collapsed
23830
23831 \begin_layout Plain Layout
23832
23833
23834 \backslash
23835 end{sloppypar}
23836 \end_layout
23837
23838 \end_inset
23839
23840
23841 \end_layout
23842
23843 \begin_layout Bibliography
23844 \begin_inset CommandInset bibitem
23845 LatexCommand bibitem
23846 key "multicol"
23847
23848 \end_inset
23849
23850 Documentation of the LaTeX-package 
23851 \begin_inset CommandInset href
23852 LatexCommand href
23853 name "multicol"
23854 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23855
23856 \end_inset
23857
23858
23859 \begin_inset Index idx
23860 status collapsed
23861
23862 \begin_layout Plain Layout
23863 LaTeX-packages ! multicol
23864 \end_layout
23865
23866 \end_inset
23867
23868
23869 \end_layout
23870
23871 \end_body
23872 \end_document