]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Change i.g. to i.e. throughout.
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 425
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % used for multi-column text
37 \usepackage{multicol}
38
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
41 \end_preamble
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
44 \begin_modules
45 logicalmkup
46 theorems-ams
47 theorems-ams-extended
48 multicol
49 \end_modules
50 \maintain_unincluded_children false
51 \begin_local_layout
52 Format 7
53 InsetLayout CharStyle:MenuItem
54 LyxType               charstyle
55 LabelString           menu
56 LatexType             command
57 LatexName             menuitem
58 Font
59 Family              Sans
60 EndFont
61 Preamble
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
63 EndPreamble
64 End
65 \end_local_layout
66 \language english
67 \language_package default
68 \inputencoding auto
69 \fontencoding global
70 \font_roman default
71 \font_sans default
72 \font_typewriter default
73 \font_default_family default
74 \use_non_tex_fonts false
75 \font_sc false
76 \font_osf false
77 \font_sf_scale 100
78 \font_tt_scale 100
79
80 \graphics default
81 \default_output_format default
82 \output_sync 1
83 \bibtex_command default
84 \index_command default
85 \paperfontsize 12
86 \spacing single
87 \use_hyperref true
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
92 \pdf_bookmarks true
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
96 \pdf_breaklinks false
97 \pdf_pdfborder false
98 \pdf_colorlinks true
99 \pdf_backref false
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \papersize default
103 \use_geometry false
104 \use_package amsmath 1
105 \use_package esint 0
106 \use_package mathdots 1
107 \use_package mathtools 0
108 \use_package mhchem 1
109 \use_package undertilde 0
110 \cite_engine basic
111 \cite_engine_type numerical
112 \biblio_style plain
113 \use_bibtopic false
114 \use_indices false
115 \paperorientation portrait
116 \suppress_date false
117 \justification true
118 \use_refstyle 0
119 \notefontcolor #0000ff
120 \index Index
121 \shortcut idx
122 \color #008000
123 \end_index
124 \secnumdepth 3
125 \tocdepth 3
126 \paragraph_separation indent
127 \paragraph_indentation default
128 \quotes_language english
129 \papercolumns 1
130 \papersides 2
131 \paperpagestyle headings
132 \tracking_changes false
133 \output_changes false
134 \html_math_output 0
135 \html_css_as_file 0
136 \html_be_strict true
137 \end_header
138
139 \begin_body
140
141 \begin_layout Title
142 Additional LyX Features
143 \end_layout
144
145 \begin_layout Subtitle
146 Version 2.0.x
147 \end_layout
148
149 \begin_layout Author
150 by the LyX Team
151 \begin_inset Foot
152 status collapsed
153
154 \begin_layout Plain Layout
155 \noindent
156 Principal maintainer of this file is
157 \noun on
158  Richard Heck
159 \noun default
160 .
161  If you have comments or error corrections, please send them to the LyX
162  Documentation mailing list, 
163 \begin_inset Flex Code
164 status collapsed
165
166 \begin_layout Plain Layout
167 \noindent
168 <lyx-docs@lists.lyx.org>
169 \end_layout
170
171 \end_inset
172
173 .
174 \end_layout
175
176 \end_inset
177
178
179 \end_layout
180
181 \begin_layout Standard
182 \begin_inset CommandInset toc
183 LatexCommand tableofcontents
184
185 \end_inset
186
187
188 \end_layout
189
190 \begin_layout Chapter
191 Introduction
192 \end_layout
193
194 \begin_layout Standard
195 This manual is essentially Part II of the 
196 \emph on
197 User's Guide\SpecialChar \@.
198
199 \emph default
200  The reason for separating the two documents is simple: the 
201 \emph on
202 User's Guide
203 \emph default
204  is already quite lengthy, and it contains information on all of the basic
205  features one needs to know in order to prepare most documents.
206  However, the LyX Team has worked to make LyX extensible through various
207  configuration files and external packages.
208  That means that if you want to support the Fizzwizzle LaTeX package, you
209  can create a layout file (or module) for it without having to alter LyX
210  itself.
211  We've already had contributions of several new features this way, and some
212  of them are documented here.
213  There are also some more `advanced' features, such as how to control the
214  presentation of bibliographies and how to work with multi-part documents,
215  that are not covered in the 
216 \emph on
217 User's Guide
218 \emph default
219  and are discussed here.
220 \end_layout
221
222 \begin_layout Standard
223 This manual also documents some special features, like fax support, version
224  control, and SGML support, which require additional software to work properly.
225  There is also a chapter on LyX's support for HTML.
226  And lastly, there's a chapter of LaTeX tools and tips, things you can use
227  to spruce up your documents by directly using the powerful features of
228  LaTeX.
229  After all, LyX 
230 \emph on
231 is
232 \emph default
233  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
234 \end_layout
235
236 \begin_layout Standard
237 If you haven't read the 
238 \emph on
239 Introduction
240 \emph default
241  yet, you are definitely in the wrong manual.
242  The 
243 \emph on
244 Introduction
245 \emph default
246  is the first place to go, since it describes the notation and format of
247  all of the manuals.
248  You should also be thoroughly familiar with the 
249 \emph on
250 User's Guide
251 \emph default
252  and all of the basic features of LyX before attempting to read this one.
253 \end_layout
254
255 \begin_layout Standard
256 Since many of the topics in this manual depend heavily on LyX's interaction
257  with LaTeX, this first chapter covers the inner workings of LyX and how
258  to direct LyX to generate exactly the LaTeX code you want.
259  It is obviously for more seasoned LyX users.
260 \end_layout
261
262 \begin_layout Chapter
263 LyX and LaTeX
264 \end_layout
265
266 \begin_layout Section
267 How LyX Uses LaTeX
268 \end_layout
269
270 \begin_layout Standard
271 This chapter is for both TeX-nicians and the LaTeX-curious.
272  In it, we'll explain how LyX and LaTeX work together to produce printable
273  output.
274  This is the only place in any of the manuals where we assume you know something
275  about LaTeX.
276 \end_layout
277
278 \begin_layout Standard
279 At one time, LyX was called a 
280 \begin_inset Quotes eld
281 \end_inset
282
283 WYSIWYM frontend to LaTeX,
284 \begin_inset Quotes erd
285 \end_inset
286
287  but that's no longer true.
288  There are frontends to LaTeX out there.
289 \begin_inset Foot
290 status collapsed
291
292 \begin_layout Plain Layout
293 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
294  There are also the LaTeX modes for vi and emacs, of course.
295 \end_layout
296
297 \end_inset
298
299  These are basically text editors with the ability to run LaTeX and mark
300  any errors in the file you're editing.
301  Although LyX 
302 \emph on
303 is
304 \emph default
305  an editor, and it 
306 \emph on
307 does
308 \emph default
309  run LaTeX, and it also indicates errors in the file, it also does much,
310  much more.
311  For one thing, you don't need to know LaTeX to use LyX effectively.
312  And LyX has added its own extensions to LaTeX.
313  Try the following sometime: select 
314 \begin_inset Flex MenuItem
315 status collapsed
316
317 \begin_layout Plain Layout
318 Export\SpecialChar \menuseparator
319 LaTeX
320 \end_layout
321
322 \end_inset
323
324  from the 
325 \begin_inset Flex MenuItem
326 status collapsed
327
328 \begin_layout Plain Layout
329 File
330 \end_layout
331
332 \end_inset
333
334  menu (or 
335 \begin_inset Flex MenuItem
336 status collapsed
337
338 \begin_layout Plain Layout
339 View\SpecialChar \menuseparator
340 Source
341 \end_layout
342
343 \end_inset
344
345 ), then look at the preamble of the resulting 
346 \begin_inset Flex Code
347 status collapsed
348
349 \begin_layout Plain Layout
350 .tex
351 \end_layout
352
353 \end_inset
354
355  file.
356  You'll notice a variety of new macros defined specifically by LyX.
357  These macros are defined automatically, according to the features you use
358  in the document.
359 \end_layout
360
361 \begin_layout Standard
362 There are several commands that automatically invoke LaTeX.
363  They are:
364 \end_layout
365
366 \begin_layout Itemize
367 \begin_inset Flex MenuItem
368 status collapsed
369
370 \begin_layout Plain Layout
371 View\SpecialChar \menuseparator
372 View
373 \end_layout
374
375 \end_inset
376
377
378 \end_layout
379
380 \begin_layout Itemize
381 \begin_inset Flex MenuItem
382 status collapsed
383
384 \begin_layout Plain Layout
385 View\SpecialChar \menuseparator
386 Update
387 \end_layout
388
389 \end_inset
390
391
392 \end_layout
393
394 \begin_layout Itemize
395 \begin_inset Flex MenuItem
396 status collapsed
397
398 \begin_layout Plain Layout
399 File\SpecialChar \menuseparator
400 Print
401 \end_layout
402
403 \end_inset
404
405
406 \end_layout
407
408 \begin_layout Itemize
409 \begin_inset Flex MenuItem
410 status collapsed
411
412 \begin_layout Plain Layout
413 File\SpecialChar \menuseparator
414 Fax
415 \end_layout
416
417 \end_inset
418
419
420 \end_layout
421
422 \begin_layout Standard
423 They will only invoke LaTeX if the file has changed since the last time
424  LaTeX was run.
425  
426 \end_layout
427
428 \begin_layout Standard
429 When LyX runs LaTeX on the file you're editing, it performs these steps:
430 \end_layout
431
432 \begin_layout Enumerate
433 Convert the document to LaTeX and save to a file with the extension 
434 \begin_inset Flex Code
435 status collapsed
436
437 \begin_layout Plain Layout
438 .tex
439 \end_layout
440
441 \end_inset
442
443  in place of 
444 \begin_inset Flex Code
445 status collapsed
446
447 \begin_layout Plain Layout
448 .lyx
449 \end_layout
450
451 \end_inset
452
453 .
454 \end_layout
455
456 \begin_layout Enumerate
457 Run LaTeX on the 
458 \begin_inset Flex Code
459 status collapsed
460
461 \begin_layout Plain Layout
462 .tex
463 \end_layout
464
465 \end_inset
466
467  file (maybe several times), and run any other commands (such as 
468 \begin_inset Flex Code
469 status collapsed
470
471 \begin_layout Plain Layout
472 bibtex
473 \end_layout
474
475 \end_inset
476
477  or 
478 \begin_inset Flex Code
479 status collapsed
480
481 \begin_layout Plain Layout
482 makeindex
483 \end_layout
484
485 \end_inset
486
487 ) needed to compile the LaTeX file.
488 \end_layout
489
490 \begin_layout Enumerate
491 If there are any errors, show the error log.
492 \end_layout
493
494 \begin_layout Standard
495 If you have run LaTeX using 
496 \begin_inset Flex MenuItem
497 status collapsed
498
499 \begin_layout Plain Layout
500 View
501 \bar under
502 \SpecialChar \menuseparator
503
504 \bar default
505 DVI
506 \end_layout
507
508 \end_inset
509
510 , LyX then runs a DVI viewer to display the DVI-file.
511  If you have used 
512 \begin_inset Flex MenuItem
513 status collapsed
514
515 \begin_layout Plain Layout
516 View
517 \bar under
518 \SpecialChar \menuseparator
519
520 \bar default
521 PostScript
522 \end_layout
523
524 \end_inset
525
526 , LyX performs further steps:
527 \end_layout
528
529 \begin_layout Itemize
530 Run 
531 \begin_inset Flex Code
532 status collapsed
533
534 \begin_layout Plain Layout
535 dvips
536 \end_layout
537
538 \end_inset
539
540  to convert the DVI file to PostScript.
541 \end_layout
542
543 \begin_layout Itemize
544 Run a PostScript viewer, such as 
545 \begin_inset Flex Code
546 status collapsed
547
548 \begin_layout Plain Layout
549 ghostview
550 \end_layout
551
552 \end_inset
553
554 , to display the PostScript file.
555 \end_layout
556
557 \begin_layout Standard
558 LyX does similar things when viewing, or exporting, other formats.
559 \end_layout
560
561 \begin_layout Section
562 Translating LaTeX files into LyX
563 \end_layout
564
565 \begin_layout Standard
566 You can import a LaTeX file into LyX by using the 
567 \begin_inset Flex MenuItem
568 status collapsed
569
570 \begin_layout Plain Layout
571 File\SpecialChar \menuseparator
572 Import\SpecialChar \menuseparator
573 LaTeX
574 \end_layout
575
576 \end_inset
577
578  command in LyX.
579  This will call a program named 
580 \begin_inset Flex Code
581 status collapsed
582
583 \begin_layout Plain Layout
584 tex2lyx
585 \end_layout
586
587 \end_inset
588
589  which will create a file 
590 \begin_inset Flex Code
591 status collapsed
592
593 \begin_layout Plain Layout
594 foo.lyx
595 \end_layout
596
597 \end_inset
598
599  from the file 
600 \begin_inset Flex Code
601 status collapsed
602
603 \begin_layout Plain Layout
604 foo.tex
605 \end_layout
606
607 \end_inset
608
609 .
610  LyX will then open that file.
611 \begin_inset Foot
612 status collapsed
613
614 \begin_layout Plain Layout
615 \begin_inset Flex Code
616 status collapsed
617
618 \begin_layout Plain Layout
619 tex2lyx
620 \end_layout
621
622 \end_inset
623
624  can also be run from the command line, of course.
625 \end_layout
626
627 \end_inset
628
629
630 \end_layout
631
632 \begin_layout Standard
633 \begin_inset Flex Code
634 status collapsed
635
636 \begin_layout Plain Layout
637 tex2lyx
638 \end_layout
639
640 \end_inset
641
642  will translate most legal LaTeX, but not everything.
643  It will put things it doesn't understand into TeX code, so after translating
644  a file with 
645 \begin_inset Flex Code
646 status collapsed
647
648 \begin_layout Plain Layout
649 tex2lyx
650 \end_layout
651
652 \end_inset
653
654 , you can look for TeX code and hand-edit it until it looks right.
655 \end_layout
656
657 \begin_layout Standard
658 If you don't know what TeX code is, read the next section.
659 \end_layout
660
661 \begin_layout Section
662 \begin_inset CommandInset label
663 LatexCommand label
664 name "sec:Inserting-TeX-Code"
665
666 \end_inset
667
668 Inserting TeX Code into LyX Documents 
669 \end_layout
670
671 \begin_layout Standard
672 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
673  You can always insert TeX code into any LyX document.
674  LyX cannot, and will never be able to, display every possible LaTeX construct.
675  If ever you need to insert LaTeX commands into your LyX document, you can
676  use the 
677 \begin_inset Flex Code
678 status collapsed
679
680 \begin_layout Plain Layout
681 TeX Code
682 \end_layout
683
684 \end_inset
685
686  box, which you can insert into your document with 
687 \begin_inset Flex MenuItem
688 status collapsed
689
690 \begin_layout Plain Layout
691 Insert\SpecialChar \menuseparator
692 TeX Code
693 \end_layout
694
695 \end_inset
696
697  or the keyboard shortcut 
698 \begin_inset Info
699 type  "shortcut"
700 arg   "ert-insert"
701 \end_inset
702
703 .
704 \end_layout
705
706 \begin_layout Standard
707 Here's an example of inserting LaTeX commands in a LyX document.
708  The code looks like this:
709 \end_layout
710
711 \begin_layout LyX-Code
712
713 \backslash
714 begin{tabular}{ll}
715 \begin_inset Newline newline
716 \end_inset
717
718
719 \backslash
720 begin{minipage}{5cm}
721 \begin_inset Newline newline
722 \end_inset
723
724 This is an example of a minipage environment.
725  You 
726 \begin_inset Newline newline
727 \end_inset
728
729 can put nearly everything in it, even (non-floating) 
730 \begin_inset Newline newline
731 \end_inset
732
733 figures and tables.
734  
735 \begin_inset Newline newline
736 \end_inset
737
738
739 \backslash
740 end{minipage}
741 \begin_inset Newline newline
742 \end_inset
743
744 &
745 \begin_inset Newline newline
746 \end_inset
747
748
749 \backslash
750 begin{minipage}{5cm}
751 \begin_inset Newline newline
752 \end_inset
753
754
755 \backslash
756 begin{verbatim}
757 \begin_inset Newline newline
758 \end_inset
759
760
761 \backslash
762 begin{minipage}{5cm}
763 \begin_inset Newline newline
764 \end_inset
765
766 This ...
767  
768 \begin_inset Newline newline
769 \end_inset
770
771
772 \backslash
773 end{minipage}
774 \begin_inset Newline newline
775 \end_inset
776
777
778 \backslash
779 end{verbatim}
780 \begin_inset Newline newline
781 \end_inset
782
783
784 \backslash
785 end{minipage}
786 \begin_inset Newline newline
787 \end_inset
788
789
790 \backslash
791 end{tabular}
792 \end_layout
793
794 \begin_layout LyX-Code
795
796 \end_layout
797
798 \begin_layout Standard
799 The 
800 \begin_inset Flex Code
801 status collapsed
802
803 \begin_layout Plain Layout
804 TeX Code
805 \end_layout
806
807 \end_inset
808
809  box containing this text is directly after this paragraph.
810  Those of you reading the manual in LyX will only see the TeX code inset.
811  Those reading a printed version of the manuals will see the actual results:
812 \begin_inset VSpace bigskip
813 \end_inset
814
815
816 \end_layout
817
818 \begin_layout Standard
819 \begin_inset ERT
820 status open
821
822 \begin_layout Plain Layout
823
824
825 \backslash
826 begin{tabular}{ll}
827 \end_layout
828
829 \begin_layout Plain Layout
830
831
832 \backslash
833 begin{minipage}{5cm}
834 \end_layout
835
836 \begin_layout Plain Layout
837
838 This is an example of a minipage environment.
839  You can put nearly everything in it, even (non-floating) figures and tables.
840  
841 \end_layout
842
843 \begin_layout Plain Layout
844
845
846 \backslash
847 end{minipage}
848 \end_layout
849
850 \begin_layout Plain Layout
851
852 &
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
865 \backslash
866 begin{verbatim}
867 \end_layout
868
869 \begin_layout Plain Layout
870
871
872 \backslash
873 begin{minipage}{5cm}
874 \end_layout
875
876 \begin_layout Plain Layout
877
878 This ...
879  
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{verbatim}
894 \end_layout
895
896 \begin_layout Plain Layout
897
898
899 \backslash
900 end{minipage}
901 \end_layout
902
903 \begin_layout Plain Layout
904
905
906 \backslash
907 end{tabular}
908 \end_layout
909
910 \end_inset
911
912
913 \begin_inset VSpace bigskip
914 \end_inset
915
916
917 \end_layout
918
919 \begin_layout Standard
920 In addition to using TeX code, you can also create a separate file containing
921  some complex LaTeX structure and then use 
922 \begin_inset Flex MenuItem
923 status collapsed
924
925 \begin_layout Plain Layout
926 Insert\SpecialChar \menuseparator
927 Child
928 \begin_inset space ~
929 \end_inset
930
931 Document
932 \end_layout
933
934 \end_inset
935
936  to include your file (you should select the type 
937 \begin_inset Flex Code
938 status collapsed
939
940 \begin_layout Plain Layout
941 Input
942 \end_layout
943
944 \end_inset
945
946 ).
947  We recommend that you only do this if you have a 
948 \begin_inset Flex Code
949 status collapsed
950
951 \begin_layout Plain Layout
952 .tex
953 \end_layout
954
955 \end_inset
956
957  file which you 
958 \emph on
959 know
960 \emph default
961  works already.
962  Otherwise, you'll have a big job tracking down LaTeX errors.
963 \end_layout
964
965 \begin_layout Standard
966 There are a few last points to emphasize:
967 \end_layout
968
969 \begin_layout Itemize
970 LyX 
971 \emph on
972 does not
973 \emph default
974  check if your LaTeX code is correct.
975 \end_layout
976
977 \begin_layout Itemize
978 Beware of reinventing the wheel.
979 \end_layout
980
981 \begin_layout Standard
982 On that last point, LyX does have quite a few features tucked into it, and
983  more are coming.
984  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
985  feature before you decide you have to do it by hand.
986  Moreover, there are numerous LaTeX packages out there to do all sorts of
987  things, from labels to envelopes to fancy multipage tables.
988  Check out 
989 \begin_inset CommandInset href
990 LatexCommand href
991 name "CTAN"
992 target "http://www.ctan.org/"
993
994 \end_inset
995
996  for details.
997 \end_layout
998
999 \begin_layout Standard
1000 If you do need to do some wild and fancy things within your document, be
1001  sure to check out a good LaTeX book for assistance.
1002  There are a number of them listed in the bibliography of the 
1003 \emph on
1004 User's Guide
1005 \emph default
1006 .
1007 \end_layout
1008
1009 \begin_layout Section
1010 LyX and the LaTeX Preamble
1011 \end_layout
1012
1013 \begin_layout Subsection
1014 About the LaTeX Preamble
1015 \end_layout
1016
1017 \begin_layout Standard
1018 If you already know LaTeX, there is no need to explain here what the preamble
1019  is good for.
1020  If you don't, the following will give you some ideas—we recommend again
1021  that you consult a LaTeX book for further information.
1022  In any case, you should read the points below, because they explain what
1023  you can do and what you don't need to do in the LaTeX preamble of a LyX
1024  document.
1025 \end_layout
1026
1027 \begin_layout Standard
1028 The LaTeX preamble comes at the very beginning of a document, 
1029 \emph on
1030 before
1031 \emph default
1032  the text.
1033  It serves to:
1034 \end_layout
1035
1036 \begin_layout Itemize
1037 Declare the document class.
1038  
1039 \begin_inset Newline newline
1040 \end_inset
1041
1042 LyX already does this for you.
1043  If you're a seasoned LaTeX-nician, and you have a custom document class
1044  you want to use, check out the 
1045 \emph on
1046 Customization Manual
1047 \emph default
1048  for information on how to make LyX interface to it.
1049 \end_layout
1050
1051 \begin_layout Itemize
1052 Declare the usage of packages.
1053  
1054 \begin_inset Newline newline
1055 \end_inset
1056
1057 LaTeX packages provide special commands, which are only available within
1058  a document when the package has been declared in the preamble.
1059  In addition to providing special commands, the inclusion of a package can
1060  change the document.
1061  For example, the package 
1062 \begin_inset Flex Code
1063 status collapsed
1064
1065 \begin_layout Plain Layout
1066 indentfirst
1067 \end_layout
1068
1069 \end_inset
1070
1071  forces all paragraphs to be indented.
1072  There are other packages for labels, envelopes, margins, etc.
1073  
1074 \end_layout
1075
1076 \begin_layout Itemize
1077 Set counters, variables, lengths and widths.
1078  
1079 \begin_inset Newline newline
1080 \end_inset
1081
1082 There are several LaTeX counters and variables that 
1083 \emph on
1084 must
1085 \emph default
1086  be set globally from within the preamble in order to have the desired effect.
1087  (There are variables that you can set and reset inside the document, too.)
1088  Margins are a good example of something that must be set in the preamble.
1089  Another example is the label format for lists.
1090  You can actually set these just about anywhere, but it's best to do it
1091  just once, inside the preamble.
1092 \end_layout
1093
1094 \begin_layout Itemize
1095 Declare user defined commands (with 
1096 \begin_inset Flex Code
1097 status collapsed
1098
1099 \begin_layout Plain Layout
1100
1101 \backslash
1102 newcommand
1103 \end_layout
1104
1105 \end_inset
1106
1107  or 
1108 \begin_inset Flex Code
1109 status collapsed
1110
1111 \begin_layout Plain Layout
1112
1113 \backslash
1114 renewcommand
1115 \end_layout
1116
1117 \end_inset
1118
1119 ).
1120 \begin_inset Newline newline
1121 \end_inset
1122
1123 These are abbreviations for LaTeX commands which appear very often inside
1124  a document.
1125  Although the preamble is a good place to declare such commands, they 
1126 \emph on
1127 can
1128 \emph default
1129  be declared anywhere (before they are used for the first time, of course).
1130  This can be useful if there is a lot of raw LaTeX code in your document,
1131  which normally should not be the case.
1132 \end_layout
1133
1134 \begin_layout Standard
1135 LyX adds its own set of definitions to the preamble of the 
1136 \begin_inset Flex Code
1137 status collapsed
1138
1139 \begin_layout Plain Layout
1140 .tex
1141 \end_layout
1142
1143 \end_inset
1144
1145  file it produces.
1146  This makes LaTeX files generated by LyX portable.
1147 \end_layout
1148
1149 \begin_layout Subsection
1150 Changing the Preamble
1151 \end_layout
1152
1153 \begin_layout Standard
1154 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1155  can't change them without patching LyX itself.
1156  You can, however, add your own stuff to the preamble by selecting 
1157 \begin_inset Flex MenuItem
1158 status collapsed
1159
1160 \begin_layout Plain Layout
1161 LaTeX
1162 \begin_inset space ~
1163 \end_inset
1164
1165 Preamble
1166 \end_layout
1167
1168 \end_inset
1169
1170  in the 
1171 \begin_inset Flex MenuItem
1172 status collapsed
1173
1174 \begin_layout Plain Layout
1175 Document\SpecialChar \menuseparator
1176 Settings
1177 \end_layout
1178
1179 \end_inset
1180
1181  dialog.
1182  LyX adds anything in the 
1183 \begin_inset Flex MenuItem
1184 status collapsed
1185
1186 \begin_layout Plain Layout
1187 Preamble
1188 \end_layout
1189
1190 \end_inset
1191
1192  dialog to its own built-in preamble.
1193  Before adding your own declarations in the preamble, you should make sure
1194  that LyX doesn't already support what you want to do.
1195  (Remember what we said about reinventing the wheel?) Also, 
1196 \emph on
1197 make sure your preamble code is correct
1198 \emph default
1199 .
1200  LyX doesn't check it for you.
1201  If there is an error, you're likely to get an error like 
1202 \begin_inset Quotes eld
1203 \end_inset
1204
1205
1206 \begin_inset Flex Code
1207 status collapsed
1208
1209 \begin_layout Plain Layout
1210 Missing 
1211 \backslash
1212 begin{document}
1213 \end_layout
1214
1215 \end_inset
1216
1217
1218 \begin_inset Quotes erd
1219 \end_inset
1220
1221 .
1222  If you see this error, check your preamble.
1223 \end_layout
1224
1225 \begin_layout Subsection
1226 Examples
1227 \end_layout
1228
1229 \begin_layout Standard
1230 Here are some examples of what you can add to a preamble, and what they
1231  do.
1232 \end_layout
1233
1234 \begin_layout Subsubsection
1235 Example #1: Offsets
1236 \end_layout
1237
1238 \begin_layout Standard
1239 There are two variables under LaTeX that control page position: 
1240 \begin_inset Flex Code
1241 status collapsed
1242
1243 \begin_layout Plain Layout
1244
1245 \backslash
1246 hoffset
1247 \end_layout
1248
1249 \end_inset
1250
1251  and 
1252 \begin_inset Flex Code
1253 status collapsed
1254
1255 \begin_layout Plain Layout
1256
1257 \backslash
1258 voffset
1259 \end_layout
1260
1261 \end_inset
1262
1263 .
1264  Their names should be self-explanatory.
1265  These variables are useful if you think for a moment about computer labels.
1266  Sometimes, the size of a print medium and the area of the medium that you
1267  can actually print on aren't the same.
1268  This is where 
1269 \begin_inset Flex Code
1270 status collapsed
1271
1272 \begin_layout Plain Layout
1273
1274 \backslash
1275 hoffset
1276 \end_layout
1277
1278 \end_inset
1279
1280  and 
1281 \begin_inset Flex Code
1282 status collapsed
1283
1284 \begin_layout Plain Layout
1285
1286 \backslash
1287 voffset
1288 \end_layout
1289
1290 \end_inset
1291
1292  come in.
1293 \end_layout
1294
1295 \begin_layout Standard
1296 The default values for 
1297 \begin_inset Flex Code
1298 status collapsed
1299
1300 \begin_layout Plain Layout
1301
1302 \backslash
1303 hoffset
1304 \end_layout
1305
1306 \end_inset
1307
1308  and 
1309 \begin_inset Flex Code
1310 status collapsed
1311
1312 \begin_layout Plain Layout
1313
1314 \backslash
1315 voffset
1316 \end_layout
1317
1318 \end_inset
1319
1320  are both 0
1321 \begin_inset space \thinspace{}
1322 \end_inset
1323
1324 points, i.
1325 \begin_inset space \thinspace{}
1326 \end_inset
1327
1328 e.
1329 \begin_inset space \space{}
1330 \end_inset
1331
1332 the page isn't shifted.
1333  Unfortunately, some DVI drivers always seem to shift the page.
1334  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1335  If you're using LyX on a system that you don't personally maintain, and
1336  your sysadmin is a doofus, 
1337 \begin_inset Flex Code
1338 status collapsed
1339
1340 \begin_layout Plain Layout
1341
1342 \backslash
1343 hoffset
1344 \end_layout
1345
1346 \end_inset
1347
1348  and 
1349 \begin_inset Flex Code
1350 status collapsed
1351
1352 \begin_layout Plain Layout
1353
1354 \backslash
1355 voffset
1356 \end_layout
1357
1358 \end_inset
1359
1360  can save the day.
1361  Suppose your left and top margins are always 0.5
1362 \begin_inset space \thinspace{}
1363 \end_inset
1364
1365 inches too big.
1366  You can add this to the preamble:
1367 \end_layout
1368
1369 \begin_layout LyX-Code
1370
1371 \backslash
1372 setlength{
1373 \backslash
1374 hoffset}{-0.5 in}
1375 \end_layout
1376
1377 \begin_layout LyX-Code
1378
1379 \backslash
1380 setlength{
1381 \backslash
1382 voffset}{-0.5 in}
1383 \end_layout
1384
1385 \begin_layout Standard
1386 and your margins should now be correct.
1387 \end_layout
1388
1389 \begin_layout Subsubsection
1390 Example #2: Labels
1391 \end_layout
1392
1393 \begin_layout Standard
1394 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1395  There's a rather nice package, available at your nearest CTAN archive,
1396  for printing sheets of labels: 
1397 \begin_inset Flex Code
1398 status collapsed
1399
1400 \begin_layout Plain Layout
1401 labels.sty
1402 \end_layout
1403
1404 \end_inset
1405
1406 .
1407  Now, your system may not have this package installed by default.
1408  We leave that up to you to check.
1409  You'll also want to read the documentation for it; we're not going to do
1410  that for you.
1411  Since this is an example, however, we'll give you an example of how you
1412  use this package.
1413 \end_layout
1414
1415 \begin_layout Standard
1416 First, make sure you're using the 
1417 \begin_inset Flex Code
1418 status collapsed
1419
1420 \begin_layout Plain Layout
1421 article
1422 \end_layout
1423
1424 \end_inset
1425
1426  document class.
1427  Next, you need to put the following in your preamble:
1428 \end_layout
1429
1430 \begin_layout LyX-Code
1431
1432 \backslash
1433 usepackage{labels}
1434 \end_layout
1435
1436 \begin_layout LyX-Code
1437
1438 \backslash
1439 LabelCols=3
1440 \end_layout
1441
1442 \begin_layout LyX-Code
1443
1444 \backslash
1445 LabelRows=7
1446 \end_layout
1447
1448 \begin_layout LyX-Code
1449
1450 \backslash
1451 LeftBorder=8mm
1452 \end_layout
1453
1454 \begin_layout LyX-Code
1455
1456 \backslash
1457 RightBorder=8mm
1458 \end_layout
1459
1460 \begin_layout LyX-Code
1461
1462 \backslash
1463 TopBorder=9mm
1464 \end_layout
1465
1466 \begin_layout LyX-Code
1467
1468 \backslash
1469 BottomBorder=2mm
1470 \end_layout
1471
1472 \begin_layout Standard
1473 This sets things up for Avery label sheets, stock #5360.
1474  You're now ready to print labels, but you'll need to insert LaTeX code,
1475  placing the commands 
1476 \begin_inset Flex Code
1477 status collapsed
1478
1479 \begin_layout Plain Layout
1480
1481 \backslash
1482 begin{labels}
1483 \end_layout
1484
1485 \end_inset
1486
1487  and 
1488 \begin_inset Flex Code
1489 status collapsed
1490
1491 \begin_layout Plain Layout
1492
1493 \backslash
1494 end{labels}
1495 \end_layout
1496
1497 \end_inset
1498
1499  around each label text.
1500  This and other special features of 
1501 \begin_inset Flex Code
1502 status collapsed
1503
1504 \begin_layout Plain Layout
1505 labels.sty
1506 \end_layout
1507
1508 \end_inset
1509
1510  are explained in its documentation.
1511 \end_layout
1512
1513 \begin_layout Standard
1514 Someday, someone may write a LyX layout file to support this package directly.
1515  Maybe that someone is you.
1516 \end_layout
1517
1518 \begin_layout Subsubsection
1519 Example #3: Paragraph Indentation
1520 \end_layout
1521
1522 \begin_layout Standard
1523 Americans are trained to indent the first line of 
1524 \emph on
1525 every
1526 \emph default
1527  paragraph.
1528  As with all of their other weird quirks, most Americans will whine and
1529  moan until they can have their way and indent the first line of all paragraphs.
1530  (Yes, we're joking.
1531  (We are?) 
1532 \emph on
1533 Yeah
1534 \emph default
1535 , we are.)
1536 \end_layout
1537
1538 \begin_layout Standard
1539 Of course, this behavior isn't standard typography.
1540  In books, you typically only indent the first line of a paragraph 
1541 \emph on
1542 if
1543 \emph default
1544  it follows another one.
1545  The idea behind indenting the first line of a paragraph is to distinguish
1546  neighboring paragraphs from one another.
1547  If there is no previous paragraph—for example, if it follows a figure or
1548  is the first paragraph in a section—then there is no need for indentation.
1549  
1550 \end_layout
1551
1552 \begin_layout Standard
1553 If you're a typical American (we're still joking!), though, you don't care
1554  about such esoteric things; you want your indentation! Add this to the
1555  preamble:
1556 \end_layout
1557
1558 \begin_layout LyX-Code
1559
1560 \backslash
1561 usepackage{indentfirst}
1562 \end_layout
1563
1564 \begin_layout Standard
1565 If your TeX distribution isn't braindead, you'll have this package, and
1566  all of your paragraphs will get the indentation the Founding Fathers intended
1567  they should have.
1568 \end_layout
1569
1570 \begin_layout Subsubsection
1571 Example #4: This Document
1572 \end_layout
1573
1574 \begin_layout Standard
1575 You can also check out the preamble of this document to get an idea of some
1576  of the advanced things you can do.
1577 \end_layout
1578
1579 \begin_layout Section
1580 LyX and LaTeX Errors
1581 \end_layout
1582
1583 \begin_layout Standard
1584 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1585  going.
1586  It then uses the logfile from the LaTeX run to do a post-mortem.
1587  After analyzing the logfile, LyX displays a dialog listing the errors.
1588  Clicking on any one of them will take you to the position in your LyX file
1589  where the error occurred.
1590 \begin_inset Foot
1591 status collapsed
1592
1593 \begin_layout Plain Layout
1594 Well, usually.
1595  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1596  right line.
1597  There are also cases where LaTeX reports the error on one line, but the
1598  actual error is earlier.
1599  This is not unlike forgetting a closing brace in a program: You'll get
1600  an error, but only later.
1601 \end_layout
1602
1603 \end_inset
1604
1605
1606 \end_layout
1607
1608 \begin_layout Standard
1609 Some folks also like to look at the log file directly: It is available from
1610  
1611 \begin_inset Flex MenuItem
1612 status collapsed
1613
1614 \begin_layout Plain Layout
1615 Document
1616 \bar under
1617 \SpecialChar \menuseparator
1618
1619 \bar default
1620 Latex
1621 \begin_inset space ~
1622 \end_inset
1623
1624 Log
1625 \end_layout
1626
1627 \end_inset
1628
1629 .
1630  There are some fairly common error messages and warnings.
1631  We'll cover those here.
1632  You should look at a good LaTeX book for a complete listing.
1633 \end_layout
1634
1635 \begin_layout Itemize
1636 \begin_inset Flex Code
1637 status collapsed
1638
1639 \begin_layout Plain Layout
1640 LaTeX Warning
1641 \end_layout
1642
1643 \end_inset
1644
1645
1646 \begin_inset Newline newline
1647 \end_inset
1648
1649 Anything beginning with these words is a warning message for the purpose
1650  of 
1651 \begin_inset Quotes eld
1652 \end_inset
1653
1654 debugging
1655 \begin_inset Quotes erd
1656 \end_inset
1657
1658  the LaTeX code itself.
1659  You'll get messages like this if you added or changed cross-references
1660  or bibliography entries, in which case, LaTeX is trying to tell you that
1661  you need to make another run.
1662  You can by-and-large ignore these.
1663 \end_layout
1664
1665 \begin_layout Itemize
1666 \begin_inset Flex Code
1667 status collapsed
1668
1669 \begin_layout Plain Layout
1670 LaTeX Font Warning
1671 \end_layout
1672
1673 \end_inset
1674
1675
1676 \begin_inset Newline newline
1677 \end_inset
1678
1679 Another warning message, this time about fonts which LaTeX couldn't find.
1680  The rest of the message will often say something about a replacement font
1681  that LaTeX used.
1682  You can safely ignore these, too.
1683 \end_layout
1684
1685 \begin_layout Itemize
1686 \begin_inset Flex Code
1687 status collapsed
1688
1689 \begin_layout Plain Layout
1690 Overfull 
1691 \backslash
1692 hbox
1693 \end_layout
1694
1695 \end_inset
1696
1697
1698 \begin_inset Newline newline
1699 \end_inset
1700
1701 LaTeX absolutely 
1702 \emph on
1703 loves
1704 \emph default
1705  to spew these out.
1706  They are warnings about lines that were too long and run past the right
1707  margin.
1708  Almost always, this is unnoticeable in the final output.
1709  (It can be just a point or two.) Or, only one or two characters extend past
1710  the margin.
1711  LaTeX seems to generate at least one of these messages for just about any
1712  document you write.
1713 \begin_inset Newline newline
1714 \end_inset
1715
1716 You can ignore these messages.
1717  Your eyes will tell you if there's a problem with something that's too
1718  wide; just look at the output.
1719 \begin_inset Foot
1720 status collapsed
1721
1722 \begin_layout Plain Layout
1723 You can also enable the `draft' option in 
1724 \begin_inset Flex MenuItem
1725 status collapsed
1726
1727 \begin_layout Plain Layout
1728 Document
1729 \bar under
1730 \SpecialChar \menuseparator
1731
1732 \bar default
1733 Settings
1734 \end_layout
1735
1736 \end_inset
1737
1738 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1739 \end_layout
1740
1741 \end_inset
1742
1743
1744 \end_layout
1745
1746 \begin_layout Itemize
1747 \begin_inset Flex Code
1748 status collapsed
1749
1750 \begin_layout Plain Layout
1751 Underfull 
1752 \backslash
1753 hbox
1754 \end_layout
1755
1756 \end_inset
1757
1758
1759 \begin_inset Newline newline
1760 \end_inset
1761
1762 Not quite as common as its cousin.
1763  LaTeX seems to like to print lines that are a bit too wide as opposed to
1764  ones that are a bit too narrow.
1765  We have no idea why.
1766 \end_layout
1767
1768 \begin_layout Itemize
1769 \begin_inset Flex Code
1770 status collapsed
1771
1772 \begin_layout Plain Layout
1773 Overfull 
1774 \backslash
1775 vbox
1776 \end_layout
1777
1778 \end_inset
1779
1780  and 
1781 \begin_inset Flex Code
1782 status collapsed
1783
1784 \begin_layout Plain Layout
1785 Underfull 
1786 \backslash
1787 vbox
1788 \end_layout
1789
1790 \end_inset
1791
1792
1793 \begin_inset Newline newline
1794 \end_inset
1795
1796 Warnings about troubles breaking the page.
1797  Once again, just look at the output.
1798  Your eyes will tell you where something has gone wrong.
1799 \end_layout
1800
1801 \begin_layout Itemize
1802 \begin_inset Flex Code
1803 status collapsed
1804
1805 \begin_layout Plain Layout
1806 LaTeX Error: File 
1807 \begin_inset Quotes els
1808 \end_inset
1809
1810 Xxxx
1811 \begin_inset Quotes ers
1812 \end_inset
1813
1814  not found
1815 \end_layout
1816
1817 \end_inset
1818
1819
1820 \begin_inset Newline newline
1821 \end_inset
1822
1823 The file 
1824 \begin_inset Quotes eld
1825 \end_inset
1826
1827 Xxxx
1828 \begin_inset Quotes erd
1829 \end_inset
1830
1831  isn't installed on this system.
1832  This usually appears because some package your document needs isn't installed.
1833  If you didn't touch the preamble or didn't use the 
1834 \begin_inset Flex Code
1835 status collapsed
1836
1837 \begin_layout Plain Layout
1838
1839 \backslash
1840 usepackage{}
1841 \end_layout
1842
1843 \end_inset
1844
1845  command, then one of the packages LyX tried to load is missing.
1846  Use 
1847 \begin_inset Flex MenuItem
1848 status collapsed
1849
1850 \begin_layout Plain Layout
1851 Help\SpecialChar \menuseparator
1852 LaTeX Configuration
1853 \end_layout
1854
1855 \end_inset
1856
1857  to get a list of packages that LyX knows about.
1858  This file is updated whenever you reconfigure LyX (using 
1859 \begin_inset Flex MenuItem
1860 status collapsed
1861
1862 \begin_layout Plain Layout
1863 Tools\SpecialChar \menuseparator
1864 Reconfigure
1865 \end_layout
1866
1867 \end_inset
1868
1869 ) and tells you which packages have been detected and what they do.
1870 \begin_inset Newline newline
1871 \end_inset
1872
1873 If you did use the 
1874 \begin_inset Flex Code
1875 status collapsed
1876
1877 \begin_layout Plain Layout
1878
1879 \backslash
1880 usepackage{}
1881 \end_layout
1882
1883 \end_inset
1884
1885  command and the package in question isn't installed, then you'll need to
1886  install it yourself.
1887 \end_layout
1888
1889 \begin_layout Itemize
1890 \begin_inset Flex Code
1891 status collapsed
1892
1893 \begin_layout Plain Layout
1894 LaTeX Error: Unknown option
1895 \end_layout
1896
1897 \end_inset
1898
1899
1900 \begin_inset Newline newline
1901 \end_inset
1902
1903 Error messages beginning with this are trying to tell you that you specified
1904  a bad or undefined option to a package.
1905  Check the package's documentation.
1906 \end_layout
1907
1908 \begin_layout Itemize
1909 \begin_inset Flex Code
1910 status collapsed
1911
1912 \begin_layout Plain Layout
1913 Undefined control sequence
1914 \end_layout
1915
1916 \end_inset
1917
1918
1919 \begin_inset Newline newline
1920 \end_inset
1921
1922 If you've inserted LaTeX code into your document, but made a typo, you'll
1923  get one of these.
1924  You may have forgotten to load a package.
1925  In any case, this error message usually means that you used an undefined
1926  command.
1927  
1928 \end_layout
1929
1930 \begin_layout Standard
1931 There are other error and warning messages.
1932  Some are self-explanatory.
1933  These are usually LaTeX messages.
1934  Others are downright cryptic.
1935  These are usually TeX error messages, and we really have 
1936 \emph on
1937 no clue
1938 \emph default
1939  what they mean or how to decipher them.
1940  No-one does.
1941 \end_layout
1942
1943 \begin_layout Standard
1944 There's a general sequence you should follow if you get error messages:
1945 \end_layout
1946
1947 \begin_layout Enumerate
1948 Look at the LaTeX code you inserted for typos.
1949 \end_layout
1950
1951 \begin_layout Enumerate
1952 If there are no typos, check that you used the command(s) correctly.
1953 \end_layout
1954
1955 \begin_layout Enumerate
1956 If you get a bunch of error boxes piled up at the very top of the document—and
1957  especially if you see a 
1958 \begin_inset Quotes eld
1959 \end_inset
1960
1961
1962 \begin_inset Flex Code
1963 status collapsed
1964
1965 \begin_layout Plain Layout
1966 Missing 
1967 \backslash
1968 begin{document}
1969 \end_layout
1970
1971 \end_inset
1972
1973
1974 \begin_inset Quotes erd
1975 \end_inset
1976
1977  error—it means that there are errors in the preamble.
1978  Start debugging your preamble.
1979 \end_layout
1980
1981 \begin_layout Enumerate
1982 If you didn't add anything to the preamble and didn't add any LaTeX code
1983  to the document, the first suspect is your LaTeX distribution itself.
1984  Check for missing packages and install them.
1985 \end_layout
1986
1987 \begin_layout Enumerate
1988 Okay, so there are no missing packages.
1989  Did you use any of the fine-tuning options in LyX? Specifically, did you
1990  
1991 \emph on
1992 misuse
1993 \emph default
1994  any of them, like trying to manually insert lots of 
1995 \begin_inset Flex Code
1996 status collapsed
1997
1998 \begin_layout Plain Layout
1999 Protected
2000 \begin_inset space ~
2001 \end_inset
2002
2003 Blanks
2004 \end_layout
2005
2006 \end_inset
2007
2008
2009 \begin_inset Flex Code
2010 status collapsed
2011
2012 \begin_layout Plain Layout
2013 Linebreaks
2014 \end_layout
2015
2016 \end_inset
2017
2018 , or 
2019 \begin_inset Flex Code
2020 status collapsed
2021
2022 \begin_layout Plain Layout
2023 Pagebreaks
2024 \end_layout
2025
2026 \end_inset
2027
2028 ? Did you try to kludge something together with these instead of using the
2029  appropriate paragraph environment?
2030 \end_layout
2031
2032 \begin_layout Enumerate
2033 All right, you didn't use any of the fine-tuning options, you played by
2034  the rules.
2035  Did you try to pull a fancy maneuver? Did you do something funky inside
2036  a table or an equation, like inserting a graphic into a table cell?
2037 \end_layout
2038
2039 \begin_layout Enumerate
2040 Do you have long sections of text where LaTeX cannot find a place to break
2041  a line? By default, LaTeX is rather strict about how much extra inter-word
2042  spacing it will add in order to break a line.
2043  Preferably, you should rework the paragraph to avoid the problem.
2044  If this isn't an option, you can wrap your text in 
2045 \begin_inset Flex Code
2046 status collapsed
2047
2048 \begin_layout Plain Layout
2049
2050 \backslash
2051 sloppypar
2052 \end_layout
2053
2054 \end_inset
2055
2056  to make LaTeX's line breaking more, well, sloppy.
2057 \end_layout
2058
2059 \begin_layout Enumerate
2060 Did you go overboard with the nesting? LyX (currently) doesn't check to
2061  make sure you're in the limits for nesting environments.
2062  If you nested a bunch of environments to the 
2063 \begin_inset Formula $17^{\mathrm{th}}$
2064 \end_inset
2065
2066  level, that's the problem.
2067  (The limit in LaTeX is five.)
2068 \end_layout
2069
2070 \begin_layout Enumerate
2071 Okay, you didn't get any error messages, but your output looks awful.
2072  If you have a table or figure that's too wide or long for the page, you
2073  need to:
2074 \end_layout
2075
2076 \begin_deeper
2077 \begin_layout Enumerate
2078 rescale the figure so it fits.
2079 \end_layout
2080
2081 \begin_layout Enumerate
2082 trim down the table so it fits.
2083 \end_layout
2084
2085 \end_deeper
2086 \begin_layout Enumerate
2087 If something else is wrong with the output, and you didn't try to pull anything
2088  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2089 \end_layout
2090
2091 \begin_layout Standard
2092 If all this doesn't help—well, then 
2093 \emph on
2094 perhaps
2095 \emph default
2096  you might have found a bug in LyX\SpecialChar \ldots{}
2097 .
2098 \end_layout
2099
2100 \begin_layout Chapter
2101 Supplemental Tools
2102 \end_layout
2103
2104 \begin_layout Section
2105 Customizing Bibliographies with BibTeX
2106 \end_layout
2107
2108 \begin_layout Standard
2109 The most basic information about how to use BibTeX with LyX is contained
2110  in the section 
2111 \emph on
2112 Bibliography databases (BibTeX)
2113 \emph default
2114  of the 
2115 \emph on
2116 User's Guide
2117 \emph default
2118 .
2119  The following subsections explain special bibliography features supported
2120  by LyX.
2121 \end_layout
2122
2123 \begin_layout Subsection
2124 Alternative Citation Styles
2125 \end_layout
2126
2127 \begin_layout Standard
2128 Standard BibTeX uses numbers (e.
2129 \begin_inset space \thinspace{}
2130 \end_inset
2131
2132 g.
2133 \begin_inset space \space{}
2134 \end_inset
2135
2136
2137 \begin_inset Quotes eld
2138 \end_inset
2139
2140 [12]
2141 \begin_inset Quotes erd
2142 \end_inset
2143
2144 ) to refer to a cited work.
2145  However, in many scientific disciplines, other citation styles are in use.
2146  The most common one is the author-year style (e.
2147 \begin_inset space \thinspace{}
2148 \end_inset
2149
2150 g.
2151 \begin_inset space \space{}
2152 \end_inset
2153
2154
2155 \begin_inset Quotes eld
2156 \end_inset
2157
2158 Knuth 1984a
2159 \begin_inset Quotes erd
2160 \end_inset
2161
2162 ).
2163  LyX supports two packages that provide this style, 
2164 \begin_inset Flex Code
2165 status collapsed
2166
2167 \begin_layout Plain Layout
2168 natbib
2169 \end_layout
2170
2171 \end_inset
2172
2173  and 
2174 \begin_inset Flex Code
2175 status collapsed
2176
2177 \begin_layout Plain Layout
2178 jurabib
2179 \end_layout
2180
2181 \end_inset
2182
2183 .
2184  Both packages have their pros and cons, which cannot be listed in detail.
2185  If you only want to have simple author-year (or author-numerical) style,
2186  or if you want to use one of the countless style files for 
2187 \begin_inset Flex Code
2188 status collapsed
2189
2190 \begin_layout Plain Layout
2191 natbib
2192 \end_layout
2193
2194 \end_inset
2195
2196 , then the established 
2197 \begin_inset Flex Code
2198 status collapsed
2199
2200 \begin_layout Plain Layout
2201 natbib
2202 \end_layout
2203
2204 \end_inset
2205
2206  package is probably your choice.
2207  If you need special features like short title references, ibidem etc., you
2208  might consider the 
2209 \begin_inset Flex Code
2210 status collapsed
2211
2212 \begin_layout Plain Layout
2213 jurabib
2214 \end_layout
2215
2216 \end_inset
2217
2218  package.
2219 \end_layout
2220
2221 \begin_layout Standard
2222 The handling of both packages in LyX is basically the same.
2223  Go to 
2224 \begin_inset Flex MenuItem
2225 status collapsed
2226
2227 \begin_layout Plain Layout
2228 Document\SpecialChar \menuseparator
2229 Settings
2230 \end_layout
2231
2232 \end_inset
2233
2234  and select under 
2235 \begin_inset Flex MenuItem
2236 status collapsed
2237
2238 \begin_layout Plain Layout
2239 Bibliography
2240 \end_layout
2241
2242 \end_inset
2243
2244  the option 
2245 \begin_inset Flex MenuItem
2246 status collapsed
2247
2248 \begin_layout Plain Layout
2249 Natbib
2250 \end_layout
2251
2252 \end_inset
2253
2254  or 
2255 \begin_inset Flex MenuItem
2256 status collapsed
2257
2258 \begin_layout Plain Layout
2259 Jurabib
2260 \end_layout
2261
2262 \end_inset
2263
2264 .
2265  With both packages, you will get some extra features in the citation dialog
2266  and you can select the style of the reference (
2267 \begin_inset Quotes eld
2268 \end_inset
2269
2270 Knuth 1984
2271 \begin_inset Quotes erd
2272 \end_inset
2273
2274
2275 \begin_inset Quotes eld
2276 \end_inset
2277
2278 Knuth (1984)
2279 \begin_inset Quotes erd
2280 \end_inset
2281
2282
2283 \begin_inset Quotes eld
2284 \end_inset
2285
2286 Knuth, 1984
2287 \begin_inset Quotes erd
2288 \end_inset
2289
2290
2291 \begin_inset Quotes eld
2292 \end_inset
2293
2294 1984
2295 \begin_inset Quotes erd
2296 \end_inset
2297
2298  etc.).
2299  Note that both packages need specifically designed style files.
2300  They both ship their own, but there are lots of additional style files,
2301  and there is even an interactive style file builder
2302 \begin_inset Foot
2303 status collapsed
2304
2305 \begin_layout Plain Layout
2306 See 
2307 \begin_inset Flex URL
2308 status open
2309
2310 \begin_layout Plain Layout
2311
2312 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2313 \end_layout
2314
2315 \end_inset
2316
2317
2318 \end_layout
2319
2320 \end_inset
2321
2322  for 
2323 \begin_inset Flex Code
2324 status collapsed
2325
2326 \begin_layout Plain Layout
2327 natbib
2328 \end_layout
2329
2330 \end_inset
2331
2332 .
2333 \end_layout
2334
2335 \begin_layout Subsection
2336 Sectioned Bibliographies
2337 \end_layout
2338
2339 \begin_layout Standard
2340 Sometimes you might need to divide your bibliography into several sections.
2341  If you are for instance a historian, the possibility to separate sources
2342  and scientific works is most likely a 
2343 \begin_inset Quotes eld
2344 \end_inset
2345
2346 must have
2347 \begin_inset Quotes erd
2348 \end_inset
2349
2350 .
2351  Unfortunately, BibTeX itself does not allow you to do this.
2352  But with the help of some LaTeX packages, BibTeX can be extended to fit
2353  your needs.
2354 \end_layout
2355
2356 \begin_layout Standard
2357 LyX provides native support for one of these packages, 
2358 \family typewriter
2359 bibtopic
2360 \family default
2361 .
2362 \begin_inset Foot
2363 status collapsed
2364
2365 \begin_layout Plain Layout
2366 Available from 
2367 \begin_inset Flex URL
2368 status open
2369
2370 \begin_layout Plain Layout
2371
2372 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2373 \end_layout
2374
2375 \end_inset
2376
2377
2378 \end_layout
2379
2380 \end_inset
2381
2382  The advantage of this package (compared to other packages like 
2383 \family typewriter
2384 multibib
2385 \family default
2386 ) is that you don't need to define new citation commands.
2387  Instead, you need to prepare different bibliographic databases which include
2388  the entries for the different sections of the bibliography.
2389  For example: If you want to divide your bibliography into the sections
2390  
2391 \begin_inset Quotes eld
2392 \end_inset
2393
2394 Sources
2395 \begin_inset Quotes erd
2396 \end_inset
2397
2398  and 
2399 \begin_inset Quotes eld
2400 \end_inset
2401
2402 Scientific works
2403 \begin_inset Quotes erd
2404 \end_inset
2405
2406 , you first need to create two bibliographic databases, e.
2407 \begin_inset space \thinspace{}
2408 \end_inset
2409
2410 g.
2411 \begin_inset space \space{}
2412 \end_inset
2413
2414
2415 \begin_inset Flex Code
2416 status collapsed
2417
2418 \begin_layout Plain Layout
2419 sources.bib
2420 \end_layout
2421
2422 \end_inset
2423
2424  and 
2425 \begin_inset Flex Code
2426 status collapsed
2427
2428 \begin_layout Plain Layout
2429 scientific.bib
2430 \end_layout
2431
2432 \end_inset
2433
2434 .
2435  
2436 \end_layout
2437
2438 \begin_layout Standard
2439 Go to 
2440 \begin_inset Flex MenuItem
2441 status collapsed
2442
2443 \begin_layout Plain Layout
2444 Document\SpecialChar \menuseparator
2445 Settings
2446 \end_layout
2447
2448 \end_inset
2449
2450  and check under 
2451 \begin_inset Flex MenuItem
2452 status collapsed
2453
2454 \begin_layout Plain Layout
2455 Bibliography
2456 \end_layout
2457
2458 \end_inset
2459
2460  the option 
2461 \begin_inset Flex MenuItem
2462 status collapsed
2463
2464 \begin_layout Plain Layout
2465 Sectioned bibliography
2466 \end_layout
2467
2468 \end_inset
2469
2470 .
2471  Now you can insert multiple BibTeX bibliographies, one for each section
2472  of your bibliography.
2473  Returning to our example: Insert the BibTeX bibliography 
2474 \begin_inset Flex Code
2475 status collapsed
2476
2477 \begin_layout Plain Layout
2478 sources.bib
2479 \end_layout
2480
2481 \end_inset
2482
2483  and a second one for the database 
2484 \begin_inset Flex Code
2485 status collapsed
2486
2487 \begin_layout Plain Layout
2488 scientific.bib
2489 \end_layout
2490
2491 \end_inset
2492
2493 .
2494  You are free to use the same or different styles for each section.
2495  Additionally, you can choose if the bibliography section should contain
2496  
2497 \begin_inset Quotes eld
2498 \end_inset
2499
2500 all cited references
2501 \begin_inset Quotes erd
2502 \end_inset
2503
2504  of the specified database(s) (which is the default), 
2505 \begin_inset Quotes eld
2506 \end_inset
2507
2508 all uncited references
2509 \begin_inset Quotes erd
2510 \end_inset
2511
2512  or even 
2513 \begin_inset Quotes eld
2514 \end_inset
2515
2516 all references
2517 \begin_inset Quotes erd
2518 \end_inset
2519
2520 .
2521  This might be useful if you would like to separate your bibliography into
2522  three sections: 
2523 \begin_inset Quotes eld
2524 \end_inset
2525
2526 Cited sources
2527 \begin_inset Quotes erd
2528 \end_inset
2529
2530
2531 \begin_inset Quotes eld
2532 \end_inset
2533
2534 Uncited sources
2535 \begin_inset Quotes erd
2536 \end_inset
2537
2538 , and 
2539 \begin_inset Quotes eld
2540 \end_inset
2541
2542 Scientific works
2543 \begin_inset Quotes erd
2544 \end_inset
2545
2546 .
2547  The titles for the sections can be added as ordinary sections or subsections.
2548  Since 
2549 \begin_inset Flex Code
2550 status collapsed
2551
2552 \begin_layout Plain Layout
2553 bibtopic
2554 \end_layout
2555
2556 \end_inset
2557
2558  removes the bibliography title, you have to manually re-add that, too (as
2559  a chapter* or section*, for instance).
2560 \end_layout
2561
2562 \begin_layout Subsection
2563 Multiple Bibliographies
2564 \end_layout
2565
2566 \begin_layout Standard
2567 Multiple bibliographies, e.
2568 \begin_inset space \thinspace{}
2569 \end_inset
2570
2571 g.
2572 \begin_inset space \space{}
2573 \end_inset
2574
2575 a bibliography for each section or chapter of the document, are not supported
2576  by BibTeX itself.
2577  But the 
2578 \begin_inset Flex Code
2579 status collapsed
2580
2581 \begin_layout Plain Layout
2582 bibtopic
2583 \end_layout
2584
2585 \end_inset
2586
2587  package, which is used for the creation of sectioned bibliographies in
2588  LyX (see the previous section), provides an easy way to solve this task,
2589  if you are willing to use some 
2590 \begin_inset Flex MenuItem
2591 status collapsed
2592
2593 \begin_layout Plain Layout
2594 TeX Code
2595 \end_layout
2596
2597 \end_inset
2598
2599  (see section
2600 \begin_inset space ~
2601 \end_inset
2602
2603
2604 \begin_inset CommandInset ref
2605 LatexCommand ref
2606 reference "sec:Inserting-TeX-Code"
2607
2608 \end_inset
2609
2610 ).
2611 \begin_inset Foot
2612 status collapsed
2613
2614 \begin_layout Plain Layout
2615 An alternative approach is to use the 
2616 \begin_inset Flex Code
2617 status collapsed
2618
2619 \begin_layout Plain Layout
2620 chapterbib
2621 \end_layout
2622
2623 \end_inset
2624
2625  or 
2626 \begin_inset Flex Code
2627 status collapsed
2628
2629 \begin_layout Plain Layout
2630 bibunits
2631 \end_layout
2632
2633 \end_inset
2634
2635  package, respectively.
2636 \end_layout
2637
2638 \end_inset
2639
2640
2641 \end_layout
2642
2643 \begin_layout Standard
2644 First go to 
2645 \begin_inset Flex MenuItem
2646 status collapsed
2647
2648 \begin_layout Plain Layout
2649 Document\SpecialChar \menuseparator
2650 Settings
2651 \end_layout
2652
2653 \end_inset
2654
2655  and under 
2656 \begin_inset Flex MenuItem
2657 status collapsed
2658
2659 \begin_layout Plain Layout
2660 Bibliography
2661 \end_layout
2662
2663 \end_inset
2664
2665  check 
2666 \begin_inset Flex MenuItem
2667 status collapsed
2668
2669 \begin_layout Plain Layout
2670 Sectioned bibliography
2671 \end_layout
2672
2673 \end_inset
2674
2675 .
2676  In the document, you have to enclose the sections, which shall contain
2677  their own bibliography (including the BibTeX bibliography itself), between
2678  
2679 \begin_inset Flex Code
2680 status collapsed
2681
2682 \begin_layout Plain Layout
2683
2684 \backslash
2685 begin{btUnit}
2686 \end_layout
2687
2688 \end_inset
2689
2690  and 
2691 \begin_inset Flex Code
2692 status collapsed
2693
2694 \begin_layout Plain Layout
2695
2696 \backslash
2697 end{btUnit}
2698 \end_layout
2699
2700 \end_inset
2701
2702  (those commands have to be inserted as TeX code).
2703  The bibliography will contain all references that have been cited in the
2704  current 
2705 \begin_inset Flex Code
2706 status collapsed
2707
2708 \begin_layout Plain Layout
2709 btUnit
2710 \end_layout
2711
2712 \end_inset
2713
2714 .
2715  
2716 \series bold
2717 Note:
2718 \series default
2719  If you are using this approach, then every citation reference has to be
2720  inside some 
2721 \begin_inset Flex Code
2722 status collapsed
2723
2724 \begin_layout Plain Layout
2725 btUnit
2726 \end_layout
2727
2728 \end_inset
2729
2730 .
2731  Also, the 
2732 \begin_inset Flex Code
2733 status collapsed
2734
2735 \begin_layout Plain Layout
2736 btUnit
2737 \end_layout
2738
2739 \end_inset
2740
2741 s cannot be nested.
2742 \end_layout
2743
2744 \begin_layout Section
2745 Multipart Documents
2746 \end_layout
2747
2748 \begin_layout Subsection
2749 General Operation
2750 \end_layout
2751
2752 \begin_layout Standard
2753 When you are working on a large file with many sections, it is often convenient
2754  to break up the document into several files, or perhaps you have something
2755  where a table may change from time to time, but the preceding text does
2756  not.
2757  In these cases, you should seriously consider using multipart documents.
2758  For example, scientific papers often have five major sections: the introduction
2759 , observations, results, discussion, and conclusion.
2760  Each of these could be its own separate LyX file, with one 
2761 \begin_inset Quotes eld
2762 \end_inset
2763
2764 master
2765 \begin_inset Quotes erd
2766 \end_inset
2767
2768  file which contains the title, authors, abstract, references, etc., plus
2769  the five included files.
2770  It is important to note that each of these files is a full LyX file which
2771  can be formatted and printed on its own, as well as included in a master
2772  file.
2773  Each of these files must have the same document class, however—don't attempt
2774  to mix book classes with article classes.
2775  You may also include LaTeX files; however, these files must not have their
2776  own preamble (i.
2777 \begin_inset space \thinspace{}
2778 \end_inset
2779
2780 e.
2781 \begin_inset space \space{}
2782 \end_inset
2783
2784 everything up to and including the 
2785 \begin_inset Flex Code
2786 status collapsed
2787
2788 \begin_layout Plain Layout
2789
2790 \backslash
2791 begin{document}
2792 \end_layout
2793
2794 \end_inset
2795
2796  line as well as the 
2797 \begin_inset Flex Code
2798 status collapsed
2799
2800 \begin_layout Plain Layout
2801
2802 \backslash
2803 end{document}
2804 \end_layout
2805
2806 \end_inset
2807
2808  line must be deleted) or else errors will be generated when you try to
2809  make a DVI file.
2810 \end_layout
2811
2812 \begin_layout Standard
2813 LyX allows you to include files quite easily with 
2814 \begin_inset Flex MenuItem
2815 status collapsed
2816
2817 \begin_layout Plain Layout
2818 Insert\SpecialChar \menuseparator
2819 ChiId
2820 \begin_inset space ~
2821 \end_inset
2822
2823 Document
2824 \end_layout
2825
2826 \end_inset
2827
2828 .
2829  When you click on this selection a small box is inserted into the file
2830  at the current cursor location.
2831  Clicking on the box raises a dialog which allows you to select the file
2832  to be included, and the method of its inclusion.
2833  
2834 \end_layout
2835
2836 \begin_layout Standard
2837 The file selection box should by now be obvious.
2838  The three inclusion methods are 
2839 \begin_inset Quotes eld
2840 \end_inset
2841
2842 include
2843 \begin_inset Quotes erd
2844 \end_inset
2845
2846
2847 \begin_inset Quotes eld
2848 \end_inset
2849
2850 input
2851 \begin_inset Quotes erd
2852 \end_inset
2853
2854 , and 
2855 \begin_inset Quotes eld
2856 \end_inset
2857
2858 verbatim
2859 \begin_inset Quotes erd
2860 \end_inset
2861
2862 .
2863  The difference between 
2864 \begin_inset Quotes eld
2865 \end_inset
2866
2867 include
2868 \begin_inset Quotes erd
2869 \end_inset
2870
2871  and 
2872 \begin_inset Quotes eld
2873 \end_inset
2874
2875 input
2876 \begin_inset Quotes erd
2877 \end_inset
2878
2879  is really only meaningful to LaTeXperts, but the practical difference is
2880  that files that are 
2881 \begin_inset Quotes eld
2882 \end_inset
2883
2884 included
2885 \begin_inset Quotes erd
2886 \end_inset
2887
2888  are typeset beginning on a new page, while files that are 
2889 \begin_inset Quotes eld
2890 \end_inset
2891
2892 inputted
2893 \begin_inset Quotes erd
2894 \end_inset
2895
2896  are typeset starting on the current page.
2897 \end_layout
2898
2899 \begin_layout Standard
2900 Generally, the master file is converted into a full LaTeX file before typesettin
2901 g, while the included files are converted to LaTeX files that do not have
2902  all the preamble information.
2903 \end_layout
2904
2905 \begin_layout Standard
2906
2907 \begin_inset Quotes eld
2908 \end_inset
2909
2910 verbatim
2911 \begin_inset Quotes erd
2912 \end_inset
2913
2914  included file allows you to include a file typeset exactly as it appears
2915  in the file, i.
2916 \begin_inset space \thinspace{}
2917 \end_inset
2918
2919 e.
2920 \begin_inset space \space{}
2921 \end_inset
2922
2923 in 
2924 \begin_inset Flex Code
2925 status collapsed
2926
2927 \begin_layout Plain Layout
2928 verbatim
2929 \end_layout
2930
2931 \end_inset
2932
2933  mode, with the characters set in a fixed-width typewriter font.
2934  Normally, spaces in this file are invisible, though two consecutive spaces
2935  are conserved, unlike LyX's normal treatment of spaces.
2936  However, setting the 
2937 \begin_inset Flex MenuItem
2938 status collapsed
2939
2940 \begin_layout Plain Layout
2941 Mark
2942 \begin_inset space ~
2943 \end_inset
2944
2945 spaces
2946 \begin_inset space ~
2947 \end_inset
2948
2949 in
2950 \begin_inset space ~
2951 \end_inset
2952
2953 output
2954 \end_layout
2955
2956 \end_inset
2957
2958  checkbox typesets a mark to unambiguously define the presence of a space.
2959  
2960 \end_layout
2961
2962 \begin_layout Subsection
2963 Cross-References Between Files
2964 \end_layout
2965
2966 \begin_layout Standard
2967 \begin_inset Box Shadowbox
2968 position "t"
2969 hor_pos "c"
2970 has_inner_box 1
2971 inner_pos "t"
2972 use_parbox 0
2973 use_makebox 0
2974 width "100col%"
2975 special "none"
2976 height "1in"
2977 height_special "totalheight"
2978 status open
2979
2980 \begin_layout Plain Layout
2981 This section is somewhat out of date.
2982  Need to describe default master documents and how children are opened when
2983  the master is.
2984  [[FIXME]]
2985 \end_layout
2986
2987 \end_inset
2988
2989
2990 \end_layout
2991
2992 \begin_layout Standard
2993 It is possible to set up cross-references between the different files.
2994  First, open all the files in question: let's call them A and B in a two
2995  file example, where B is included in A.
2996  Let's say you insert a label in A, then want to reference it in B.
2997  Open the cross-reference dialog whilst in document B, and you can select
2998  the 
2999 \begin_inset Quotes eld
3000 \end_inset
3001
3002 buffer
3003 \begin_inset Quotes erd
3004 \end_inset
3005
3006  to use.
3007 \end_layout
3008
3009 \begin_layout Subsection
3010 Bibliography Lists in all Subdocuments
3011 \end_layout
3012
3013 \begin_layout Standard
3014 \begin_inset Box Frameless
3015 position "t"
3016 hor_pos "c"
3017 has_inner_box 1
3018 inner_pos "t"
3019 use_parbox 0
3020 use_makebox 0
3021 width "100col%"
3022 special "none"
3023 height "1in"
3024 height_special "totalheight"
3025 status open
3026
3027 \begin_layout Plain Layout
3028 This section also needs updating.
3029  There is now material about this on the wiki, and it could be copied here.
3030 \end_layout
3031
3032 \end_inset
3033
3034
3035 \end_layout
3036
3037 \begin_layout Standard
3038 Copy the bibliography list with all entries to all subdocuments and transform
3039  them to a comment.
3040  This way LyX will find the 
3041 \begin_inset Flex Code
3042 status collapsed
3043
3044 \begin_layout Plain Layout
3045 .bib
3046 \end_layout
3047
3048 \end_inset
3049
3050 -files and you can easily insert references without making the bibliography
3051  list visible.
3052 \end_layout
3053
3054 \begin_layout Standard
3055 As the bibliography list is in a comment, LaTeX won't use use it and the
3056  references will look like this: [?], instead of like this: [1].
3057  One solution is to use the LaTeX-package 
3058 \begin_inset Flex Code
3059 status collapsed
3060
3061 \begin_layout Plain Layout
3062 comment
3063 \end_layout
3064
3065 \end_inset
3066
3067  that will only include comments by processing the files separately.
3068  To do this, add in the LaTeX preamble of every subdocument the following:
3069 \end_layout
3070
3071 \begin_layout LyX-Code
3072
3073 \backslash
3074 usepackage{comment}
3075 \end_layout
3076
3077 \begin_layout LyX-Code
3078
3079 \backslash
3080 includecomment{comment}
3081 \end_layout
3082
3083 \begin_layout Standard
3084 See also 
3085 \begin_inset Flex URL
3086 status collapsed
3087
3088 \begin_layout Plain Layout
3089
3090 http://wiki.lyx.org/FAQ/Unsorted#toc31
3091 \end_layout
3092
3093 \end_inset
3094
3095 .
3096 \end_layout
3097
3098 \begin_layout Section
3099 LyX Archives
3100 \end_layout
3101
3102 \begin_layout Standard
3103 Users sometimes need to be able to 
3104 \begin_inset Quotes eld
3105 \end_inset
3106
3107 bundle
3108 \begin_inset Quotes erd
3109 \end_inset
3110
3111  a LyX file together with all the images (and other files) on which it depends,
3112  either for sending to a publisher or for sharing with a co-author.
3113  LyX 2.0 includes a Python script (
3114 \begin_inset Flex Code
3115 status collapsed
3116
3117 \begin_layout Plain Layout
3118 lyxpak.py
3119 \end_layout
3120
3121 \end_inset
3122
3123 ) that automates this process.
3124  To use it, you must have either the 
3125 \begin_inset Flex Code
3126 status collapsed
3127
3128 \begin_layout Plain Layout
3129 zipfile
3130 \end_layout
3131
3132 \end_inset
3133
3134  or 
3135 \begin_inset Flex Code
3136 status collapsed
3137
3138 \begin_layout Plain Layout
3139 tarfile
3140 \end_layout
3141
3142 \end_inset
3143
3144  python modules installed on your system.
3145  By default, the script prefers the 
3146 \begin_inset Flex Code
3147 status collapsed
3148
3149 \begin_layout Plain Layout
3150 gzip
3151 \end_layout
3152
3153 \end_inset
3154
3155 -compressed 
3156 \begin_inset Flex Code
3157 status collapsed
3158
3159 \begin_layout Plain Layout
3160 tar
3161 \end_layout
3162
3163 \end_inset
3164
3165  format on Unix-like systems and the 
3166 \begin_inset Flex Code
3167 status collapsed
3168
3169 \begin_layout Plain Layout
3170 zip
3171 \end_layout
3172
3173 \end_inset
3174
3175  format on Windows.
3176 \end_layout
3177
3178 \begin_layout Standard
3179 LyX's configuration process will set the script up to export a `LyX Archive',
3180  and this format will then be available under 
3181 \begin_inset Flex Code
3182 status collapsed
3183
3184 \begin_layout Plain Layout
3185 File\SpecialChar \menuseparator
3186 Export
3187 \end_layout
3188
3189 \end_inset
3190
3191 .
3192 \end_layout
3193
3194 \begin_layout Standard
3195 Independently of the platform, the generation of a particular archive format
3196  can be forced by adding either the 
3197 \begin_inset Flex Code
3198 status collapsed
3199
3200 \begin_layout Plain Layout
3201 -t
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 tar
3212 \end_layout
3213
3214 \end_inset
3215
3216  format) or 
3217 \begin_inset Flex Code
3218 status collapsed
3219
3220 \begin_layout Plain Layout
3221 -z
3222 \end_layout
3223
3224 \end_inset
3225
3226  (for the 
3227 \begin_inset Flex Code
3228 status collapsed
3229
3230 \begin_layout Plain Layout
3231 zip
3232 \end_layout
3233
3234 \end_inset
3235
3236  format) switch to the 
3237 \begin_inset Flex Code
3238 status collapsed
3239
3240 \begin_layout Plain Layout
3241 LyX\SpecialChar \menuseparator
3242 LyX Archive
3243 \end_layout
3244
3245 \end_inset
3246
3247  converter in 
3248 \begin_inset Flex Code
3249 status collapsed
3250
3251 \begin_layout Plain Layout
3252 Tools\SpecialChar \menuseparator
3253 Preferences\SpecialChar \menuseparator
3254 File Handling\SpecialChar \menuseparator
3255 Converters
3256 \end_layout
3257
3258 \end_inset
3259
3260 .
3261  (Make sure you add the switch after the script name, not before it.)
3262 \end_layout
3263
3264 \begin_layout Section
3265 Fancy Headers and Footers
3266 \end_layout
3267
3268 \begin_layout Standard
3269 The default page layout is rather plain; for an 
3270 \begin_inset Flex Code
3271 status collapsed
3272
3273 \begin_layout Plain Layout
3274 article
3275 \end_layout
3276
3277 \end_inset
3278
3279  document class, all you get is a centered page number at the bottom of
3280  the page.
3281  This document uses KOMA-script's book class, so it appears to be a bit
3282  fancier.
3283  But to really put on a show, you need to set the document page style to
3284  
3285 \begin_inset Quotes eld
3286 \end_inset
3287
3288 fancy
3289 \begin_inset Quotes erd
3290 \end_inset
3291
3292 , as mentioned in the 
3293 \emph on
3294 User Guide
3295 \emph default
3296 .
3297  This section describes the LaTeX code you need to insert in your LaTeX
3298  preamble in order to get the desired effects.
3299 \end_layout
3300
3301 \begin_layout Standard
3302 For more information on fancy headers, see the 
3303 \begin_inset Flex Code
3304 status collapsed
3305
3306 \begin_layout Plain Layout
3307 fancyhdr
3308 \end_layout
3309
3310 \end_inset
3311
3312  package documentation.
3313  (
3314 \begin_inset Flex URL
3315 status collapsed
3316
3317 \begin_layout Plain Layout
3318
3319 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3320 \end_layout
3321
3322 \end_inset
3323
3324 )
3325 \end_layout
3326
3327 \begin_layout Standard
3328 The page header is divided into three fields, not surprisingly labeled 
3329 \begin_inset Quotes eld
3330 \end_inset
3331
3332 left
3333 \begin_inset Quotes erd
3334 \end_inset
3335
3336
3337 \begin_inset Quotes eld
3338 \end_inset
3339
3340 center
3341 \begin_inset Quotes erd
3342 \end_inset
3343
3344 , and 
3345 \begin_inset Quotes eld
3346 \end_inset
3347
3348 right
3349 \begin_inset Quotes erd
3350 \end_inset
3351
3352 .
3353  The footer is also divided into these three fields.
3354  The LaTeX commands to set these fields in the simplest manner are 
3355 \begin_inset Flex Code
3356 status collapsed
3357
3358 \begin_layout Plain Layout
3359
3360 \backslash
3361 lhead
3362 \end_layout
3363
3364 \end_inset
3365
3366
3367 \begin_inset Flex Code
3368 status collapsed
3369
3370 \begin_layout Plain Layout
3371
3372 \backslash
3373 chead
3374 \end_layout
3375
3376 \end_inset
3377
3378
3379 \begin_inset Flex Code
3380 status collapsed
3381
3382 \begin_layout Plain Layout
3383
3384 \backslash
3385 rhead
3386 \end_layout
3387
3388 \end_inset
3389
3390
3391 \begin_inset Flex Code
3392 status collapsed
3393
3394 \begin_layout Plain Layout
3395
3396 \backslash
3397 lfoot
3398 \end_layout
3399
3400 \end_inset
3401
3402 , etc.
3403  Suppose you wish to put your name in the upper left hand corner of each
3404  page.
3405  Simply insert the following command in the preamble: 
3406 \end_layout
3407
3408 \begin_layout Standard
3409
3410 \family typewriter
3411
3412 \backslash
3413 lhead{John Q.
3414  DocWriter}
3415 \end_layout
3416
3417 \begin_layout Standard
3418 You will now see your name in the upper left.
3419  If a field has a default entry that you would like to get rid of (often
3420  the page number appears in the central footer) simply include a command
3421  with a blank argument, e.
3422 \begin_inset space \thinspace{}
3423 \end_inset
3424
3425 g.:
3426 \end_layout
3427
3428 \begin_layout Standard
3429
3430 \family typewriter
3431
3432 \backslash
3433 cfoot{}
3434 \end_layout
3435
3436 \begin_layout Standard
3437 Let's get really fancy: lets put the section number with the word 
3438 \begin_inset Quotes eld
3439 \end_inset
3440
3441 Section
3442 \begin_inset Quotes erd
3443 \end_inset
3444
3445  (e.
3446 \begin_inset space \thinspace{}
3447 \end_inset
3448
3449 g.
3450 \begin_inset space \space{}
3451 \end_inset
3452
3453 Section 3) in the upper left, the page number (e.
3454 \begin_inset space \thinspace{}
3455 \end_inset
3456
3457 g.
3458 \begin_inset space \space{}
3459 \end_inset
3460
3461 Page 4) in the upper right, your name in the lower left, and the date in
3462  the lower right.
3463  The following commands should now appear in the preamble:
3464 \end_layout
3465
3466 \begin_layout Standard
3467
3468 \family typewriter
3469
3470 \backslash
3471 lhead{Section 
3472 \backslash
3473 thesection}
3474 \end_layout
3475
3476 \begin_layout Standard
3477
3478 \family typewriter
3479
3480 \backslash
3481 chead{}
3482 \end_layout
3483
3484 \begin_layout Standard
3485
3486 \family typewriter
3487
3488 \backslash
3489 rhead{Page 
3490 \backslash
3491 thepage}
3492 \end_layout
3493
3494 \begin_layout Standard
3495
3496 \family typewriter
3497
3498 \backslash
3499 lfoot{John Q.
3500  DocWriter}
3501 \end_layout
3502
3503 \begin_layout Standard
3504
3505 \family typewriter
3506
3507 \backslash
3508 cfoot{}
3509 \end_layout
3510
3511 \begin_layout Standard
3512
3513 \family typewriter
3514
3515 \backslash
3516 rfoot{
3517 \backslash
3518 today}
3519 \end_layout
3520
3521 \begin_layout Standard
3522 The commands 
3523 \begin_inset Flex Code
3524 status collapsed
3525
3526 \begin_layout Plain Layout
3527
3528 \backslash
3529 thesection
3530 \end_layout
3531
3532 \end_inset
3533
3534  and 
3535 \begin_inset Flex Code
3536 status collapsed
3537
3538 \begin_layout Plain Layout
3539
3540 \backslash
3541 thepage
3542 \end_layout
3543
3544 \end_inset
3545
3546  access LaTeX's section and page counters, and so print out the current
3547  section and page numbers.
3548  
3549 \begin_inset Flex Code
3550 status collapsed
3551
3552 \begin_layout Plain Layout
3553
3554 \backslash
3555 today
3556 \end_layout
3557
3558 \end_inset
3559
3560  simply prints out today's date.
3561 \end_layout
3562
3563 \begin_layout Standard
3564 The thicknesses of the horizontal rules drawn beneath the header and above
3565  the footer can also be modified.
3566  If you don't want one of the rules, set its thickness to 0.
3567  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3568  Use commands
3569 \family typewriter
3570  
3571 \family default
3572 like 
3573 \begin_inset Flex Code
3574 status collapsed
3575
3576 \begin_layout Plain Layout
3577
3578 \backslash
3579 renewcommand{
3580 \backslash
3581 headrulewidth}{0.4pt}
3582 \end_layout
3583
3584 \end_inset
3585
3586  and 
3587 \begin_inset Flex Code
3588 status collapsed
3589
3590 \begin_layout Plain Layout
3591
3592 \backslash
3593 renewcommand{
3594 \backslash
3595 footrulewidth}{0.4pt}
3596 \end_layout
3597
3598 \end_inset
3599
3600  to set the thicknesses.
3601 \end_layout
3602
3603 \begin_layout Standard
3604 You can switch the header/footer settings on and off for individual pages
3605  using commands like 
3606 \begin_inset Flex Code
3607 status collapsed
3608
3609 \begin_layout Plain Layout
3610
3611 \backslash
3612 thispagestyle{empty}
3613 \end_layout
3614
3615 \end_inset
3616
3617
3618 \begin_inset Flex Code
3619 status collapsed
3620
3621 \begin_layout Plain Layout
3622
3623 \backslash
3624 thispagestyle{plain}
3625 \end_layout
3626
3627 \end_inset
3628
3629 , and 
3630 \begin_inset Flex Code
3631 status collapsed
3632
3633 \begin_layout Plain Layout
3634
3635 \backslash
3636 thispagestyle{fancy}
3637 \end_layout
3638
3639 \end_inset
3640
3641 .
3642  Simply insert them in the text on the page you want changed and mark them
3643  as TeX code.
3644  In fact, title pages are marked as plain by default, while following pages
3645  are marked fancy when using the global fancy setting.
3646 \end_layout
3647
3648 \begin_layout Standard
3649 As a final example, it is possible to include an image in the header or
3650  footer.
3651  Suppose you want to put a company logo in the upper lefthand corner.
3652  You might try something like
3653 \end_layout
3654
3655 \begin_layout Standard
3656
3657 \family typewriter
3658
3659 \backslash
3660 lhead{
3661 \backslash
3662 resizebox{1in}{!}{
3663 \backslash
3664 includegraphics{logo.eps}}}
3665 \end_layout
3666
3667 \begin_layout Standard
3668 \noindent
3669 (you may need to preface this with 
3670 \begin_inset Flex Code
3671 status collapsed
3672
3673 \begin_layout Plain Layout
3674 \noindent
3675
3676 \backslash
3677 usepackage{graphics}
3678 \end_layout
3679
3680 \end_inset
3681
3682  if you don't include graphics elsewhere in your document).
3683 \end_layout
3684
3685 \begin_layout Section
3686 Itemize Bullet Selection
3687 \begin_inset CommandInset label
3688 LatexCommand label
3689 name "sec:bullet"
3690
3691 \end_inset
3692
3693
3694 \end_layout
3695
3696 \begin_layout Standard
3697 by
3698 \noun on
3699  Allan Rae
3700 \end_layout
3701
3702 \begin_layout Subsection
3703 Introduction
3704 \end_layout
3705
3706 \begin_layout Standard
3707 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3708  Using this dialog you can easily specify what bullet shape to use at each
3709  level of an itemized list.
3710  These settings are document-wide so you won't be able to specify different
3711  sets of bullets for different paragraphs.
3712 \begin_inset Foot
3713 status collapsed
3714
3715 \begin_layout Plain Layout
3716 Well, actually you can but you'll have to do it by hand.
3717 \end_layout
3718
3719 \end_inset
3720
3721
3722 \end_layout
3723
3724 \begin_layout Subsection
3725 How it looks
3726 \end_layout
3727
3728 \begin_layout Standard
3729 Open the dialog by selecting the 
3730 \begin_inset Flex MenuItem
3731 status collapsed
3732
3733 \begin_layout Plain Layout
3734 Document\SpecialChar \menuseparator
3735 Settings
3736 \end_layout
3737
3738 \end_inset
3739
3740  menu item and then select the 
3741 \begin_inset Flex MenuItem
3742 status collapsed
3743
3744 \begin_layout Plain Layout
3745 Bullets
3746 \end_layout
3747
3748 \end_inset
3749
3750  tab.
3751 \end_layout
3752
3753 \begin_layout Standard
3754 The dialog provides you with a table of bullet shapes.
3755  A column of buttons on the left of the table provides access to the six
3756  different panels of bullet shapes.
3757  The row of buttons across the top is used to select which bullet depth
3758  you are changing.
3759  A text entry under the table shows the currently selected bullet shape's
3760  LaTeX equivalent and this can be edited if desired.
3761  If you do modify the text you will also need to specify any needed packages
3762  in the LaTeX preamble.
3763 \end_layout
3764
3765 \begin_layout Standard
3766 The six panels are divided up by the packages they require.
3767  The following table shows the mappings from button name to LaTeX package.
3768 \end_layout
3769
3770 \begin_layout Standard
3771 \align center
3772 \begin_inset Tabular
3773 <lyxtabular version="3" rows="7" columns="2">
3774 <features tabularvalignment="middle">
3775 <column alignment="center" valignment="top" width="0pt">
3776 <column alignment="center" valignment="top" width="0pt">
3777 <row>
3778 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3779 \begin_inset Text
3780
3781 \begin_layout Plain Layout
3782
3783 \family roman
3784 \series medium
3785 \shape up
3786 \size normal
3787 \emph off
3788 \bar no
3789 \noun off
3790 \color none
3791 Button
3792 \end_layout
3793
3794 \end_inset
3795 </cell>
3796 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3797 \begin_inset Text
3798
3799 \begin_layout Plain Layout
3800
3801 \family roman
3802 \series medium
3803 \shape up
3804 \size normal
3805 \emph off
3806 \bar no
3807 \noun off
3808 \color none
3809 Packages Required
3810 \end_layout
3811
3812 \end_inset
3813 </cell>
3814 </row>
3815 <row>
3816 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3817 \begin_inset Text
3818
3819 \begin_layout Plain Layout
3820
3821 \family sans
3822 \series medium
3823 \shape up
3824 \size normal
3825 \emph off
3826 \bar no
3827 \noun off
3828 \color none
3829 Standard
3830 \end_layout
3831
3832 \end_inset
3833 </cell>
3834 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3835 \begin_inset Text
3836
3837 \begin_layout Plain Layout
3838
3839 \series medium
3840 \shape up
3841 \size normal
3842 \emph off
3843 \bar no
3844 \noun off
3845 \color none
3846 base LaTeX
3847 \end_layout
3848
3849 \end_inset
3850 </cell>
3851 </row>
3852 <row>
3853 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3854 \begin_inset Text
3855
3856 \begin_layout Plain Layout
3857
3858 \family sans
3859 \series medium
3860 \shape up
3861 \size normal
3862 \emph off
3863 \bar no
3864 \noun off
3865 \color none
3866 Maths
3867 \end_layout
3868
3869 \end_inset
3870 </cell>
3871 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3872 \begin_inset Text
3873
3874 \begin_layout Plain Layout
3875
3876 \family typewriter
3877 \series medium
3878 \shape up
3879 \size normal
3880 \emph off
3881 \bar no
3882 \noun off
3883 \color none
3884 amssymb.sty
3885 \end_layout
3886
3887 \end_inset
3888 </cell>
3889 </row>
3890 <row>
3891 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3892 \begin_inset Text
3893
3894 \begin_layout Plain Layout
3895
3896 \family sans
3897 \series medium
3898 \shape up
3899 \size normal
3900 \emph off
3901 \bar no
3902 \noun off
3903 \color none
3904 Ding1
3905 \end_layout
3906
3907 \end_inset
3908 </cell>
3909 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3910 \begin_inset Text
3911
3912 \begin_layout Plain Layout
3913
3914 \family typewriter
3915 \series medium
3916 \shape up
3917 \size normal
3918 \emph off
3919 \bar no
3920 \noun off
3921 \color none
3922 pifont.sty
3923 \end_layout
3924
3925 \end_inset
3926 </cell>
3927 </row>
3928 <row>
3929 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3930 \begin_inset Text
3931
3932 \begin_layout Plain Layout
3933
3934 \family sans
3935 \series medium
3936 \shape up
3937 \size normal
3938 \emph off
3939 \bar no
3940 \noun off
3941 \color none
3942 Ding2
3943 \end_layout
3944
3945 \end_inset
3946 </cell>
3947 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3948 \begin_inset Text
3949
3950 \begin_layout Plain Layout
3951
3952 \family typewriter
3953 \series medium
3954 \shape up
3955 \size normal
3956 \emph off
3957 \bar no
3958 \noun off
3959 \color none
3960 pifont.sty
3961 \end_layout
3962
3963 \end_inset
3964 </cell>
3965 </row>
3966 <row>
3967 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3968 \begin_inset Text
3969
3970 \begin_layout Plain Layout
3971
3972 \family sans
3973 \series medium
3974 \shape up
3975 \size normal
3976 \emph off
3977 \bar no
3978 \noun off
3979 \color none
3980 Ding3
3981 \end_layout
3982
3983 \end_inset
3984 </cell>
3985 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3986 \begin_inset Text
3987
3988 \begin_layout Plain Layout
3989
3990 \family typewriter
3991 \series medium
3992 \shape up
3993 \size normal
3994 \emph off
3995 \bar no
3996 \noun off
3997 \color none
3998 pifont.sty
3999 \end_layout
4000
4001 \end_inset
4002 </cell>
4003 </row>
4004 <row>
4005 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4006 \begin_inset Text
4007
4008 \begin_layout Plain Layout
4009
4010 \family sans
4011 \series medium
4012 \shape up
4013 \size normal
4014 \emph off
4015 \bar no
4016 \noun off
4017 \color none
4018 Ding4
4019 \end_layout
4020
4021 \end_inset
4022 </cell>
4023 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4024 \begin_inset Text
4025
4026 \begin_layout Plain Layout
4027
4028 \family typewriter
4029 \series medium
4030 \shape up
4031 \size normal
4032 \emph off
4033 \bar no
4034 \noun off
4035 \color none
4036 pifont.sty
4037 \end_layout
4038
4039 \end_inset
4040 </cell>
4041 </row>
4042 </lyxtabular>
4043
4044 \end_inset
4045
4046
4047 \end_layout
4048
4049 \begin_layout Standard
4050 LyX doesn't stop you using bullets from packages you don't have.
4051  If you get errors from LaTeX when you try to view or print the file, then
4052  it is likely you are missing a package.
4053 \begin_inset Foot
4054 status collapsed
4055
4056 \begin_layout Plain Layout
4057 LyX doesn't restrict your use since you may be editing locally and exporting
4058  elsewhere.
4059 \end_layout
4060
4061 \end_inset
4062
4063
4064 \end_layout
4065
4066 \begin_layout Subsection
4067 How to use it
4068 \end_layout
4069
4070 \begin_layout Standard
4071 Select which bullet depth you want to change then select the bullet shape
4072  and size.
4073  Any changes will not be visible in LyX, but are visible when viewing the
4074  document.
4075 \end_layout
4076
4077 \begin_layout Standard
4078 You can reset a bullet shape to the default simply by clicking your right
4079  mouse button on the appropriate bullet depth button.
4080 \begin_inset Foot
4081 status collapsed
4082
4083 \begin_layout Plain Layout
4084 If you 
4085 \emph on
4086 really
4087 \emph default
4088  want to have multiple sets of paragraphs with different sets of bullets
4089  in each, then you're going to have to get your hands dirty with TeX code.
4090  The bullet selection dialog can help though because it provides you with
4091  the LaTeX code for a wide range of bullet shapes.
4092  To make your own custom paragraphs you have the following options:
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 let
4104 \backslash
4105 savelabelitemi=
4106 \backslash
4107 labelitemi
4108 \end_layout
4109
4110 \end_inset
4111
4112
4113 \end_layout
4114
4115 \begin_layout Plain Layout
4116 \begin_inset ERT
4117 status open
4118
4119 \begin_layout Plain Layout
4120
4121
4122 \backslash
4123 renewcommand
4124 \backslash
4125 labelitemi[0]{
4126 \backslash
4127 small
4128 \backslash
4129 (
4130 \backslash
4131 sharp
4132 \backslash
4133 )}
4134 \end_layout
4135
4136 \end_inset
4137
4138
4139 \end_layout
4140
4141 \begin_layout Itemize
4142 Use the LaTeX command 
4143 \begin_inset Flex Code
4144 status collapsed
4145
4146 \begin_layout Plain Layout
4147
4148 \backslash
4149 renewcommand{}{}
4150 \end_layout
4151
4152 \end_inset
4153
4154  to specify a new bullet shape for a given depth.
4155  You'll also need to save the current bullet shape so you can restore it
4156  again afterwards.
4157  In this itemized list the following LaTeX code was used to change the bullet
4158  used for the first depth.
4159 \end_layout
4160
4161 \begin_deeper
4162 \begin_layout LyX-Code
4163
4164 \backslash
4165 let
4166 \backslash
4167 savelabelitemi=
4168 \backslash
4169 labelitemi 
4170 \end_layout
4171
4172 \begin_layout LyX-Code
4173
4174 \backslash
4175 renewcommand
4176 \backslash
4177 labelitemi[0]{
4178 \backslash
4179 small
4180 \backslash
4181 (
4182 \backslash
4183 sharp
4184 \backslash
4185 )}
4186 \end_layout
4187
4188 \end_deeper
4189 \begin_layout Itemize
4190 Note that the itemize depth is specified in Roman numerals as part of the
4191  
4192 \family typewriter
4193
4194 \backslash
4195 labelitem
4196 \family default
4197  command.
4198 \end_layout
4199
4200 \begin_layout Itemize
4201 \begin_inset ERT
4202 status open
4203
4204 \begin_layout Plain Layout
4205
4206 [
4207 \backslash
4208 (
4209 \backslash
4210 star
4211 \backslash
4212 )]
4213 \end_layout
4214
4215 \end_inset
4216
4217  Specify each individual entry by starting each item with the bullet shape
4218  enclosed in square brackets and set as 
4219 \begin_inset Flex MenuItem
4220 status collapsed
4221
4222 \begin_layout Plain Layout
4223 TeX Code
4224 \end_layout
4225
4226 \end_inset
4227
4228 .
4229  For example, this item was started with 
4230 \begin_inset Flex Code
4231 status collapsed
4232
4233 \begin_layout Plain Layout
4234 [
4235 \backslash
4236 (
4237 \backslash
4238 star
4239 \backslash
4240 )]
4241 \end_layout
4242
4243 \end_inset
4244
4245 .
4246 \end_layout
4247
4248 \begin_layout Plain Layout
4249 \begin_inset ERT
4250 status open
4251
4252 \begin_layout Plain Layout
4253
4254
4255 \backslash
4256 renewcommand
4257 \backslash
4258 labelitemi[0]{
4259 \backslash
4260 savelabelitemi}
4261 \end_layout
4262
4263 \end_inset
4264
4265
4266 \end_layout
4267
4268 \begin_layout Plain Layout
4269 You'll also need to revert the labelitem back to its previous setting for
4270  the global bullet shape settings to remain in effect.
4271  The way used here was:
4272 \end_layout
4273
4274 \begin_layout LyX-Code
4275
4276 \backslash
4277 renewcommand
4278 \backslash
4279 labelitemi[0]{
4280 \backslash
4281 savelabelitemi}
4282 \end_layout
4283
4284 \end_inset
4285
4286
4287 \end_layout
4288
4289 \begin_layout Chapter
4290 LyX and the World Wide Web
4291 \end_layout
4292
4293 \begin_layout Standard
4294 LyX has long supported the export of documents to various web-friendly formats,
4295  such as HTML.
4296  Before verson 2.0, however, HTML export was always accomplished by the use
4297  of external converters.
4298 \begin_inset Foot
4299 status collapsed
4300
4301 \begin_layout Plain Layout
4302 For details on the use of external converters with LyX, see the 
4303 \emph on
4304 Converters
4305 \emph default
4306  section of the Customization manual.
4307 \end_layout
4308
4309 \end_inset
4310
4311  These fall into two large groups: there are converters that use LaTeX as
4312  an intermediate format, such as 
4313 \begin_inset Flex Code
4314 status collapsed
4315
4316 \begin_layout Plain Layout
4317 htlatex
4318 \end_layout
4319
4320 \end_inset
4321
4322
4323 \begin_inset Flex Code
4324 status collapsed
4325
4326 \begin_layout Plain Layout
4327 html2latex
4328 \end_layout
4329
4330 \end_inset
4331
4332 , and 
4333 \begin_inset Flex Code
4334 status collapsed
4335
4336 \begin_layout Plain Layout
4337 plastex
4338 \end_layout
4339
4340 \end_inset
4341
4342 , relying upon LyX to produce the LaTeX; and there is a converter that works
4343  directly on LyX files, 
4344 \begin_inset Flex Code
4345 status collapsed
4346
4347 \begin_layout Plain Layout
4348 eLyXer
4349 \end_layout
4350
4351 \end_inset
4352
4353 .
4354  All of these have different advantages and disadvantages.
4355  
4356 \end_layout
4357
4358 \begin_layout Standard
4359 The LaTeX-based converters have the advantage that, in principle, they know
4360  everything about the exported document that LaTeX does.
4361  Such converters do not care, for example, if a certain block of code was
4362  produced by LyX or was Evil Red Text.
4363  These converters know about 
4364 \begin_inset Flex Code
4365 status collapsed
4366
4367 \begin_layout Plain Layout
4368 aux
4369 \end_layout
4370
4371 \end_inset
4372
4373  files, counters, and references, and can often make use of the 
4374 \begin_inset Flex Code
4375 status collapsed
4376
4377 \begin_layout Plain Layout
4378 bbl
4379 \end_layout
4380
4381 \end_inset
4382
4383  files generated by BibTeX.
4384  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4385  said that only TeX itself understands TeX---and LaTeX-based converters
4386  will often choke on what seem to be quite simple constructs; complex ones
4387  can throw them completely, and as of this writing, for example, the 
4388 \emph on
4389 Embedded Objects
4390 \emph default
4391  manual will not export with 
4392 \begin_inset Flex Code
4393 status collapsed
4394
4395 \begin_layout Plain Layout
4396 htlatex
4397 \end_layout
4398
4399 \end_inset
4400
4401 , though the others will.
4402  The other issue concerns how math is handled.
4403  These converters typically convert the formulae into little pictures that
4404  are then linked from the HTML document.
4405  Since these are actually generated by LaTeX, they are accurate.
4406  But they do not scale well, and just getting them to look as if they are
4407  actually meant to be in your document---so that the font sizes seem to
4408  be roughly the same---can be a challenge.
4409 \end_layout
4410
4411 \begin_layout Standard
4412 Alex Fernandez's 
4413 \begin_inset Flex Code
4414 status collapsed
4415
4416 \begin_layout Plain Layout
4417 eLyXer
4418 \end_layout
4419
4420 \end_inset
4421
4422  (
4423 \begin_inset CommandInset href
4424 LatexCommand href
4425 name "http://elyxer.nongnu.org/"
4426 target "http://elyxer.nongnu.org/"
4427
4428 \end_inset
4429
4430 ) solves some of these problems.
4431  In particular, the formulae it produces scale perfectly, since it renders
4432  math using a combination of HTML and CSS rather than converting the formulae
4433  to images.
4434  But even moderately complex formula are rendered less well than with 
4435 \begin_inset Flex Code
4436 status collapsed
4437
4438 \begin_layout Plain Layout
4439 htlatex
4440 \end_layout
4441
4442 \end_inset
4443
4444 ; this reflects the limitations of HTML.
4445 \begin_inset Foot
4446 status collapsed
4447
4448 \begin_layout Plain Layout
4449 That said, 
4450 \begin_inset Flex Code
4451 status collapsed
4452
4453 \begin_layout Plain Layout
4454 eLyXer
4455 \end_layout
4456
4457 \end_inset
4458
4459  can also use jsMath and MathJax for equations, but this setting is only
4460  available globally and requires one to have access to a server that runs
4461  the backend.
4462 \end_layout
4463
4464 \end_inset
4465
4466  More importantly (as of version 1.1.1, at least), 
4467 \begin_inset Flex Code
4468 status collapsed
4469
4470 \begin_layout Plain Layout
4471 eLyXer
4472 \end_layout
4473
4474 \end_inset
4475
4476  has limited support for math macros and no support for user-defined paragraph
4477  or character styles.
4478  These limitations make 
4479 \begin_inset Flex Code
4480 status collapsed
4481
4482 \begin_layout Plain Layout
4483 eLyXer
4484 \end_layout
4485
4486 \end_inset
4487
4488  unsuitable for many of the documents LyX users produce.
4489  In principle, of course, these problems could be solved, but the LyX developers
4490  have decided to follow a different path and have made LyX itself capable
4491  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4492  plaintext.
4493 \end_layout
4494
4495 \begin_layout Standard
4496 As of this writing, XHTML output remains under development and should probably
4497  be regarded as 
4498 \begin_inset Quotes eld
4499 \end_inset
4500
4501 experimental
4502 \begin_inset Quotes erd
4503 \end_inset
4504
4505 .
4506 \begin_inset Foot
4507 status collapsed
4508
4509 \begin_layout Plain Layout
4510 The file 
4511 \begin_inset Flex Code
4512 status collapsed
4513
4514 \begin_layout Plain Layout
4515 development/HTML.notes
4516 \end_layout
4517
4518 \end_inset
4519
4520 , which can be found in the LyX source tree or 
4521 \begin_inset CommandInset href
4522 LatexCommand href
4523 name "accessed online"
4524 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4525
4526 \end_inset
4527
4528 , usually contains up-to-date information about the state of XHTML output.
4529  See also the list of XHTML bugs on 
4530 \begin_inset CommandInset href
4531 LatexCommand href
4532 name "the bug tracker"
4533 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"
4534
4535 \end_inset
4536
4537 .
4538 \end_layout
4539
4540 \end_inset
4541
4542  Still, the developers have chosen this approach because it has several
4543  potential advantages over the other two.
4544 \end_layout
4545
4546 \begin_layout Standard
4547 These advantages are primarily due to the fact that the XHTML output routines,
4548  since they are part of LyX, know everything LyX knows about the document
4549  being exported.
4550 \begin_inset Foot
4551 status collapsed
4552
4553 \begin_layout Plain Layout
4554 Another advantage is that, since these routines are internal to LyX, they
4555  are immune to changes in LyX's file format, or to changes in the semantics
4556  of existing insets.
4557 \end_layout
4558
4559 \end_inset
4560
4561  So they know about the table of contents (as displayed in the outline),
4562  about the counters associated with different paragraph styles, and about
4563  user-defined styles.
4564  The XHTML output routines know what LyX knows about internationalization,
4565  too, so they will output 
4566 \begin_inset Quotes eld
4567 \end_inset
4568
4569 Chapter 1
4570 \begin_inset Quotes erd
4571 \end_inset
4572
4573  or 
4574 \begin_inset Quotes eld
4575 \end_inset
4576
4577
4578 \lang ngerman
4579 Kapitel
4580 \lang english
4581  1
4582 \begin_inset Quotes erd
4583 \end_inset
4584
4585 , depending upon the language in effect at the time.
4586  
4587 \end_layout
4588
4589 \begin_layout Standard
4590 Quite generally, the output routines know what LyX knows about document
4591  layout, that is, about how the document is to be rendered on screen.
4592  We use this information when we output the document as XHTML.
4593  In particular, LyX 
4594 \emph on
4595 automatically
4596 \emph default
4597  generates CSS style information corresponding to the layout information
4598  it uses to render the document on screen: if section headings are supposed
4599  to be sans-serif and bold as seen in LyX, then (by default) they will be
4600  sans-serif and bold when viewed in a web browser, too.
4601  And this is true not just for pre-defined styles, like Section, but for
4602  any style, including user-defined styles.
4603  Indeed, the XHTML output routines make no distinction between user-defined
4604  paragraph and character styles and LyX's own pre-defined styles: in each
4605  case, everything LyX knows about the styles is contained in the layout
4606  files.
4607  And much the same is true as regards pre-defined textual insets, such as
4608  footnotes, and various custom insets.
4609  
4610 \end_layout
4611
4612 \begin_layout Standard
4613 The result is that XHTML output can be customized and extended in exactly
4614  the same way LaTeX output can be customized and extended: through layout
4615  files and modules.
4616  See chapter five of the 
4617 \emph on
4618 Customization 
4619 \emph default
4620 manual for the details.
4621 \end_layout
4622
4623 \begin_layout Standard
4624 The remainder of this chapter contains more detailed information on XHTML
4625  output, its limitations, and ways to work around those limitations.
4626 \end_layout
4627
4628 \begin_layout Section
4629 Math Output in XHTML
4630 \end_layout
4631
4632 \begin_layout Standard
4633 LyX offers four choices for how math is rendered.
4634  These have various advantages and disadvantages:
4635 \end_layout
4636
4637 \begin_layout Itemize
4638 MathML
4639 \begin_inset Newline newline
4640 \end_inset
4641
4642 MathML is a dialect of XML designed specifically for mathematics on the
4643  web, and it typically renders very well in browsers that support it.
4644  The disadvantage is that not all browsers support MathML, and support is
4645  not complete even in the Gecko-based browsers, such as Firefox.
4646 \begin_inset Newline newline
4647 \end_inset
4648
4649 If LyX is unable to render a formula as MathML---for example, if the formula
4650  uses the 
4651 \begin_inset Flex Code
4652 status collapsed
4653
4654 \begin_layout Plain Layout
4655 xymatrix
4656 \end_layout
4657
4658 \end_inset
4659
4660  package or ERT---then it will instead output the formula as an image.
4661  
4662 \end_layout
4663
4664 \begin_layout Itemize
4665 HTML
4666 \begin_inset Newline newline
4667 \end_inset
4668
4669 As mentioned above, 
4670 \begin_inset Flex Code
4671 status collapsed
4672
4673 \begin_layout Plain Layout
4674 elyxer
4675 \end_layout
4676
4677 \end_inset
4678
4679  outputs math as HTML, styled by CSS.
4680 \begin_inset Foot
4681 status collapsed
4682
4683 \begin_layout Plain Layout
4684 LyX has borrowed some of the CSS for its HTML output from 
4685 \begin_inset Flex Code
4686 status collapsed
4687
4688 \begin_layout Plain Layout
4689 elyxer
4690 \end_layout
4691
4692 \end_inset
4693
4694 .
4695 \end_layout
4696
4697 \end_inset
4698
4699  For simple formulae, this can work quite well, though with more complicated
4700  formulae it tends to break down.
4701  Still, this method has the advantage that it is very widely supported and
4702  so it may be appropriate for documents that contain only a little, fairly
4703  simple math.
4704 \begin_inset Newline newline
4705 \end_inset
4706
4707 If Lyx is unable to render a formula as HTML---for example, if the formula
4708  uses the 
4709 \begin_inset Flex Code
4710 status collapsed
4711
4712 \begin_layout Plain Layout
4713 xymatrix
4714 \end_layout
4715
4716 \end_inset
4717
4718  package or ERT---then it will instead output the formula as an image.
4719  
4720 \end_layout
4721
4722 \begin_layout Itemize
4723 Images
4724 \begin_inset Newline newline
4725 \end_inset
4726
4727 Like 
4728 \begin_inset Flex Code
4729 status collapsed
4730
4731 \begin_layout Plain Layout
4732 htlatex
4733 \end_layout
4734
4735 \end_inset
4736
4737 , LyX will output formulae as images, the very same images, in fact, that
4738  are used for instant preview.
4739 \begin_inset Foot
4740 status collapsed
4741
4742 \begin_layout Plain Layout
4743 Instant preview does 
4744 \emph on
4745 not 
4746 \emph default
4747 have to be on for images to be output, however.
4748 \end_layout
4749
4750 \end_inset
4751
4752  The advantage to this method is that the images are simply generated by
4753  LaTeX, so they are very accurate.
4754  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4755  so they do not scale terribly well, and one cannot copy them, etc.
4756  (As of this writing, there are also problems about equation numbering.
4757  See 
4758 \begin_inset CommandInset href
4759 LatexCommand href
4760 name "bug 6894"
4761 target "http://www.lyx.org/trac/ticket/6894"
4762
4763 \end_inset
4764
4765 .)
4766 \begin_inset Newline newline
4767 \end_inset
4768
4769 The size of the images can be controlled by setting the 
4770 \begin_inset Quotes eld
4771 \end_inset
4772
4773 Math Images Scaling
4774 \begin_inset Quotes erd
4775 \end_inset
4776
4777  parameter under 
4778 \begin_inset Flex MenuItem
4779 status collapsed
4780
4781 \begin_layout Plain Layout
4782 Document\SpecialChar \menuseparator
4783 Settings\SpecialChar \menuseparator
4784 Output
4785 \end_layout
4786
4787 \end_inset
4788
4789 .
4790 \begin_inset Foot
4791 status collapsed
4792
4793 \begin_layout Plain Layout
4794 For those who want to know, this controls the resolution of the image in
4795  dots per inch and is based upon a default of 75 dpi.
4796 \end_layout
4797
4798 \end_inset
4799
4800
4801 \begin_inset Newline newline
4802 \end_inset
4803
4804 If LyX for some reason fails to create an image for a formula (e.g., if a
4805  required LaTeX package is not installed), then it will fall back to outputing
4806  the raw LaTeX.
4807 \end_layout
4808
4809 \begin_layout Itemize
4810 LaTeX
4811 \begin_inset Newline newline
4812 \end_inset
4813
4814 Finally, LyX will happily output math as LaTeX.
4815  As well as being the output of last resort, this method can be used with
4816  such tools as 
4817 \begin_inset CommandInset href
4818 LatexCommand href
4819 name "jsMath"
4820 target "http://www.math.union.edu/~dpvc/jsMath/"
4821
4822 \end_inset
4823
4824 , which uses JavaScript to render LaTeX embedded in HTML documents.
4825  LyX wraps the LaTeX in either a 
4826 \begin_inset Flex Code
4827 status collapsed
4828
4829 \begin_layout Plain Layout
4830 span
4831 \end_layout
4832
4833 \end_inset
4834
4835  (for inline formulas) or 
4836 \begin_inset Flex Code
4837 status collapsed
4838
4839 \begin_layout Plain Layout
4840 div
4841 \end_layout
4842
4843 \end_inset
4844
4845  (for displayed formulas) with 
4846 \begin_inset Flex Code
4847 status collapsed
4848
4849 \begin_layout Plain Layout
4850 class='math'
4851 \end_layout
4852
4853 \end_inset
4854
4855 , as is required for jsMath.
4856 \end_layout
4857
4858 \begin_layout Standard
4859 One of these output methods must be selected under 
4860 \begin_inset Flex MenuItem
4861 status collapsed
4862
4863 \begin_layout Plain Layout
4864 Document\SpecialChar \menuseparator
4865 Settings\SpecialChar \menuseparator
4866 Output
4867 \end_layout
4868
4869 \end_inset
4870
4871 .
4872  By default, LyX outputs MathML.
4873  This is a document-wide setting, therefore.
4874 \end_layout
4875
4876 \begin_layout Standard
4877 Eventually, LyX will offer the user the option to select an alternate output
4878  method for a particular inset, say, one that isn't being rendered very
4879  well by MathML.
4880 \begin_inset Foot
4881 status collapsed
4882
4883 \begin_layout Plain Layout
4884 That said, since LyX falls back to images if the inset contains ERT, then
4885  one can force output as an image by putting some harmless ERT into the
4886  math, for example: 
4887 \begin_inset Formula $a=b\relax$
4888 \end_inset
4889
4890 .
4891 \end_layout
4892
4893 \end_inset
4894
4895
4896 \end_layout
4897
4898 \begin_layout Section
4899 Bibliography and Citations
4900 \end_layout
4901
4902 \begin_layout Standard
4903 XHTML output fully supports bibliographies and citations.
4904  
4905 \end_layout
4906
4907 \begin_layout Standard
4908 Citation labels are generated by the same machinery that generates LyX's
4909  on-screen labels, so the labels will look in the output much as they do
4910  in LyX, though better.
4911  If you are using numerical citations, then LyX will output numerical labels,
4912  such as [1] or [17], rather than simply showing the citation key in square
4913  brackets, as it does on-screen.
4914  If you are using author-year citations, then LyX will add lowercase letters
4915  to the years, just as BibTeX does, if it finds more than one citation for
4916  a given author-year combination.
4917  The labels will be printed with the bibliography entries.
4918  Note that there is, at present, no way to customize the appearance of the
4919  labels, for example, to choose between square brackets and parentheses.
4920 \end_layout
4921
4922 \begin_layout Standard
4923 Bibliography output is handled by the same machinery that handles the presentati
4924 on of reference information in the citation dialog, so you will see in the
4925  XHTML output pretty much what you would see if you were to look at a given
4926  entry in the citation dialog.
4927  The formatting can be customized in your layout file or, preferably, in
4928  a module.
4929  See the 
4930 \emph on
4931 Customization
4932 \emph default
4933  manual for the details.
4934 \end_layout
4935
4936 \begin_layout Standard
4937 The main defect at present is that cross-referenced information is printed
4938  with every entry with which it is associated.
4939  So you can see things like this:
4940 \end_layout
4941
4942 \begin_layout Quote
4943 Jason Stanley, 
4944 \begin_inset Quotes eld
4945 \end_inset
4946
4947 Context and Logical Form
4948 \begin_inset Quotes erd
4949 \end_inset
4950
4951 , in 
4952 \emph on
4953 Language in Context: Selected Essays
4954 \emph default
4955  (Oxford: Oxford University Press, 2007), pp.
4956  30--68.
4957 \end_layout
4958
4959 \begin_layout Quote
4960 Jason Stanley, 
4961 \begin_inset Quotes eld
4962 \end_inset
4963
4964 Semantics in Context
4965 \begin_inset Quotes erd
4966 \end_inset
4967
4968 , in 
4969 \emph on
4970 Language in Context: Selected Essays
4971 \emph default
4972  (Oxford: Oxford University Press, 2007), pp.
4973  201--30.
4974 \end_layout
4975
4976 \begin_layout Standard
4977 This should be fixed before long.
4978 \end_layout
4979
4980 \begin_layout Standard
4981 There is no support at present for sectioned bibliographies.
4982  If you have multiple bibliographies, then LyX will print the same bibliography
4983  over and over.
4984 \end_layout
4985
4986 \begin_layout Section
4987 Indexes
4988 \end_layout
4989
4990 \begin_layout Standard
4991 LyX will happily export indexes as XHTML, but with certain limitations at
4992  the moment.
4993 \end_layout
4994
4995 \begin_layout Standard
4996 Index export will be most reliable when you do not attempt to use the fancy
4997  constructs that are described in the section on indexes in the 
4998 \emph on
4999 User's Guide
5000 \emph default
5001 .
5002 \begin_inset Foot
5003 status collapsed
5004
5005 \begin_layout Plain Layout
5006 The main issue here is that LyX itself does not really handle these.
5007  It just lets you enter what you would have to enter in raw LaTeX.
5008 \end_layout
5009
5010 \end_inset
5011
5012  We'll describe how they are handled using the subsection headings from
5013  that section.
5014 \end_layout
5015
5016 \begin_layout Itemize
5017 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5018  these, but the entries must be separated by 
5019 \begin_inset Quotes eld
5020 \end_inset
5021
5022  ! 
5023 \begin_inset Quotes erd
5024 \end_inset
5025
5026 , that is, there must be spaces around the exclamation point.
5027  This is because it is otherwise too difficult to check for escaped exclamation
5028  points, ones in math, and so forth.
5029 \end_layout
5030
5031 \begin_layout Itemize
5032 Page Ranges: There is no support at all for page ranges, since these make
5033  no sense with XHMTL.
5034  Instead, you will just get two index entries, one at either end.
5035 \end_layout
5036
5037 \begin_layout Itemize
5038 Cross-referencing: There is no support for cross-referencing.
5039  If LyX finds an entry containing the 
5040 \begin_inset Quotes eld
5041 \end_inset
5042
5043 |see\SpecialChar \ldots{}
5044
5045 \begin_inset Quotes erd
5046 \end_inset
5047
5048  construct, it is just dropped, and the rest is treated as an ordinary index
5049  entry.
5050 \end_layout
5051
5052 \begin_layout Itemize
5053 Index Entry Order: LyX does support attempts to fix the sorting order.
5054  It will take what is before the first `@' it finds and use that for sorting,
5055  taking what follows the first `@' to be the actual entry.
5056  At present, LyX does not check for escaped `@', so do not try to index
5057  email addresses.
5058 \end_layout
5059
5060 \begin_layout Itemize
5061 Index Entry Layout: You can format entries by using the text style dialog,
5062  or by using any other method available within LyX itself.
5063  There is no support for constructs like: 
5064 \begin_inset Quotes eld
5065 \end_inset
5066
5067 entry|textbf
5068 \begin_inset Quotes erd
5069 \end_inset
5070
5071 .
5072  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5073  and everything that follows it.
5074 \end_layout
5075
5076 \begin_layout Itemize
5077 Multiple Indexes: There is no support for multiple indexes.
5078  Rather, all index entries will be printed as one large index.
5079  To avoid our printing several versions of the index, we print only the
5080  main index, so make sure you have one.
5081 \end_layout
5082
5083 \begin_layout Section
5084 Nomenclature and Glossary
5085 \end_layout
5086
5087 \begin_layout Standard
5088 There is at present no support for glossaries.
5089  Adding it would be fairly trivial, and welcome.
5090 \end_layout
5091
5092 \begin_layout Chapter
5093 The LyX Server
5094 \end_layout
5095
5096 \begin_layout Section
5097 Introduction
5098 \end_layout
5099
5100 \begin_layout Standard
5101 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5102  and retrieve information about the LyX internal state.
5103  This is only intended for advanced users, but they should find it useful.
5104  It is by writing to the LyX server, for example, that bibliography managers,
5105  such as JabRef, are able to 
5106 \begin_inset Quotes eld
5107 \end_inset
5108
5109 push
5110 \begin_inset Quotes erd
5111 \end_inset
5112
5113  citations to LyX.
5114 \end_layout
5115
5116 \begin_layout Section
5117 Starting the LyX Server
5118 \end_layout
5119
5120 \begin_layout Standard
5121 The LyX server works through the use of a pair of named pipes.
5122  These are usually located in 
5123 \begin_inset Flex Code
5124 status collapsed
5125
5126 \begin_layout Plain Layout
5127 UserDir
5128 \end_layout
5129
5130 \end_inset
5131
5132 , (except on Windows, where 
5133 \emph on
5134 local
5135 \emph default
5136  named pipes are special objects located in 
5137 \begin_inset Flex Code
5138 status collapsed
5139
5140 \begin_layout Plain Layout
5141
5142 \backslash
5143
5144 \backslash
5145 .
5146 \backslash
5147 pipe
5148 \end_layout
5149
5150 \end_inset
5151
5152 ) and have the names 
5153 \begin_inset Quotes eld
5154 \end_inset
5155
5156
5157 \begin_inset Flex Code
5158 status collapsed
5159
5160 \begin_layout Plain Layout
5161 lyxpipe.in
5162 \end_layout
5163
5164 \end_inset
5165
5166
5167 \begin_inset Quotes erd
5168 \end_inset
5169
5170  and 
5171 \begin_inset Quotes eld
5172 \end_inset
5173
5174
5175 \begin_inset Flex Code
5176 status collapsed
5177
5178 \begin_layout Plain Layout
5179 lyxpipe.out
5180 \end_layout
5181
5182 \end_inset
5183
5184
5185 \begin_inset Quotes erd
5186 \end_inset
5187
5188 .
5189  External programs write into 
5190 \begin_inset Flex Code
5191 status collapsed
5192
5193 \begin_layout Plain Layout
5194 lyxpipe.in
5195 \end_layout
5196
5197 \end_inset
5198
5199  and read back data from 
5200 \begin_inset Flex Code
5201 status collapsed
5202
5203 \begin_layout Plain Layout
5204 lyxpipe.out
5205 \end_layout
5206
5207 \end_inset
5208
5209 .
5210  The stem of the pipe names can be defined in the 
5211 \begin_inset Flex MenuItem
5212 status collapsed
5213
5214 \begin_layout Plain Layout
5215 Tools\SpecialChar \menuseparator
5216 Preferences
5217 \end_layout
5218
5219 \end_inset
5220
5221  dialog, for example 
5222 \begin_inset Flex Code
5223 status collapsed
5224
5225 \begin_layout Plain Layout
5226 "/home/myhome/lyxpipe"
5227 \end_layout
5228
5229 \end_inset
5230
5231 , or 
5232 \begin_inset Flex Code
5233 status collapsed
5234
5235 \begin_layout Plain Layout
5236 "
5237 \backslash
5238
5239 \backslash
5240 .
5241 \backslash
5242 pipe
5243 \backslash
5244 lyxpipe"
5245 \end_layout
5246
5247 \end_inset
5248
5249  on Windows (but any working path can be used).
5250  You 
5251 \emph on
5252 must
5253 \emph default
5254  configure this manually in order for the server to start.
5255 \end_layout
5256
5257 \begin_layout Standard
5258 LyX will add the '
5259 \begin_inset Flex Code
5260 status collapsed
5261
5262 \begin_layout Plain Layout
5263 .in
5264 \end_layout
5265
5266 \end_inset
5267
5268 ' and '
5269 \begin_inset Flex Code
5270 status collapsed
5271
5272 \begin_layout Plain Layout
5273 .out
5274 \end_layout
5275
5276 \end_inset
5277
5278 ' to create the pipes.
5279  If one of the pipes already exists, LyX will assume that another LyX process
5280  is already running and will not start the server.
5281  On POSIX (Unix like) systems, if for some other reason, an unused 
5282 \begin_inset Quotes eld
5283 \end_inset
5284
5285 stale
5286 \begin_inset Quotes erd
5287 \end_inset
5288
5289  pipe is left in existence when LyX closes, then LyX will try to delete
5290  it.
5291  If this fails for some reason, you will need to delete the pipes manually
5292  and then restart LyX.
5293  On Windows, pipes are deleted by the OS on program termination or crash,
5294  so 
5295 \begin_inset Quotes eld
5296 \end_inset
5297
5298 stale
5299 \begin_inset Quotes erd
5300 \end_inset
5301
5302  pipes should not be possible.
5303 \end_layout
5304
5305 \begin_layout Standard
5306 To have several LyX processes with servers at the same time, you have to
5307  use different configurations, perhaps by using separate user directories,
5308  each with its own 
5309 \begin_inset Flex Code
5310 status collapsed
5311
5312 \begin_layout Plain Layout
5313 preferences
5314 \end_layout
5315
5316 \end_inset
5317
5318  file, for each process.
5319 \end_layout
5320
5321 \begin_layout Standard
5322 If you are developing a client program, you might find it useful to enable
5323  debugging information from the LyX server.
5324  Do this by starting LyX as 
5325 \begin_inset Flex Code
5326 status collapsed
5327
5328 \begin_layout Plain Layout
5329 lyx -dbg lyxserver
5330 \end_layout
5331
5332 \end_inset
5333
5334 .
5335 \end_layout
5336
5337 \begin_layout Standard
5338 You can find a complete example client written in C in the source distribution
5339  as 
5340 \begin_inset Flex Code
5341 status collapsed
5342
5343 \begin_layout Plain Layout
5344 development/lyxserver/server_monitor.c
5345 \end_layout
5346
5347 \end_inset
5348
5349 .
5350 \end_layout
5351
5352 \begin_layout Standard
5353 Another useful tool is the command-line based clientfound in 
5354 \begin_inset Flex Code
5355 status collapsed
5356
5357 \begin_layout Plain Layout
5358 src/client/lyxclient
5359 \end_layout
5360
5361 \end_inset
5362
5363 .
5364 \end_layout
5365
5366 \begin_layout Section
5367 Normal communication
5368 \end_layout
5369
5370 \begin_layout Standard
5371 To issue a LyX call, the client writes a line of ASCII text into the input
5372  pipe.
5373  This line has the following format:
5374 \end_layout
5375
5376 \begin_layout Quote
5377 LYXCMD:
5378 \emph on
5379 clientname
5380 \emph default
5381 :
5382 \emph on
5383 function
5384 \emph default
5385 :
5386 \emph on
5387 argument
5388 \end_layout
5389
5390 \begin_layout Description
5391 clientname is a name that the client can choose arbitrarily.
5392  Its only use is that LyX will echo it if it sends an answer—so a client
5393  can dispatch results from different requesters.
5394 \end_layout
5395
5396 \begin_layout Description
5397 function is the function you want LyX to perform.
5398  It is the same as the commands you'd use in the minibuffer.
5399 \end_layout
5400
5401 \begin_layout Description
5402 argument is an optional argument which is meaningful only to some functions
5403  (for instance, the 
5404 \begin_inset Quotes eld
5405 \end_inset
5406
5407 self-insert
5408 \begin_inset Quotes erd
5409 \end_inset
5410
5411  LFUN will insert the argument as text at the cursor position).
5412 \end_layout
5413
5414 \begin_layout Standard
5415 The answer from LyX will arrive in the output pipe and be of the form
5416 \end_layout
5417
5418 \begin_layout Quote
5419 INFO:
5420 \emph on
5421 clientname
5422 \emph default
5423 :
5424 \emph on
5425 function
5426 \emph default
5427 :
5428 \emph on
5429 data
5430 \end_layout
5431
5432 \begin_layout Standard
5433 where 
5434 \emph on
5435 clientname
5436 \emph default
5437  and 
5438 \emph on
5439 function
5440 \emph default
5441  are just echoed from the command request, while 
5442 \emph on
5443 data
5444 \emph default
5445  is more or less useful information filled according to how the command
5446  execution worked out.
5447  Some commands, such as 
5448 \begin_inset Quotes eld
5449 \end_inset
5450
5451 font-state
5452 \begin_inset Quotes erd
5453 \end_inset
5454
5455 , will return information about the internal state of LyX, while other will
5456  return an empty data-response.
5457  This means that the command execution went fine.
5458 \end_layout
5459
5460 \begin_layout Standard
5461 In case of errors, the response from LyX will have this form
5462 \end_layout
5463
5464 \begin_layout Quote
5465 ERROR:
5466 \emph on
5467 clientname
5468 \emph default
5469 :
5470 \emph on
5471 function
5472 \emph default
5473 :
5474 \emph on
5475 error message
5476 \end_layout
5477
5478 \begin_layout Standard
5479 where the 
5480 \emph on
5481 error message
5482 \emph default
5483  should contain an explanation of why the command failed.
5484 \end_layout
5485
5486 \begin_layout Standard
5487 Examples:
5488 \end_layout
5489
5490 \begin_layout LyX-Code
5491 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5492 \begin_inset Newline newline
5493 \end_inset
5494
5495 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5496 \begin_inset Newline newline
5497 \end_inset
5498
5499 read a <~/.lyxpipe.out
5500 \begin_inset Newline newline
5501 \end_inset
5502
5503 echo $a
5504 \end_layout
5505
5506 \begin_layout Section
5507 Notification
5508 \end_layout
5509
5510 \begin_layout Standard
5511 LyX can notify clients of events going on asynchronously.
5512  Currently it will only do this if the user binds a key sequence with the
5513  function 
5514 \begin_inset Quotes eld
5515 \end_inset
5516
5517 notify
5518 \begin_inset Quotes erd
5519 \end_inset
5520
5521 .
5522  The format of the string LyX sends is as follows:
5523 \end_layout
5524
5525 \begin_layout Quote
5526 \begin_inset Flex Code
5527 status collapsed
5528
5529 \begin_layout Plain Layout
5530 NOTIFY:
5531 \end_layout
5532
5533 \end_inset
5534
5535
5536 \emph on
5537 key-sequence
5538 \end_layout
5539
5540 \begin_layout Standard
5541 where 
5542 \emph on
5543 key-sequence
5544 \emph default
5545  is the printed representation of the key sequence that was actually typed
5546  by the user.
5547 \end_layout
5548
5549 \begin_layout Standard
5550 This mechanism can be used to extend LyX's command set and implement macros.
5551  Bind some key sequence to 
5552 \begin_inset Quotes eld
5553 \end_inset
5554
5555 notify
5556 \begin_inset Quotes erd
5557 \end_inset
5558
5559 .
5560  Then start a client that listens on the output pipe, dispatches the command
5561  according to the sequence, and starts a function that may use LyX calls
5562  and LyX requests to issue a command or a series of commands to LyX.
5563 \end_layout
5564
5565 \begin_layout Section
5566 The simple LyX Server Protocol
5567 \end_layout
5568
5569 \begin_layout Standard
5570 LyX implements a simple protocol that can be used for session management.
5571  All messages are of the form
5572 \end_layout
5573
5574 \begin_layout Quote
5575 LYXSRV:
5576 \emph on
5577 clientname
5578 \emph default
5579 :
5580 \emph on
5581 protocol message
5582 \end_layout
5583
5584 \begin_layout Standard
5585 where 
5586 \emph on
5587 protocol message
5588 \emph default
5589  can be 
5590 \begin_inset Quotes eld
5591 \end_inset
5592
5593 hello
5594 \begin_inset Quotes erd
5595 \end_inset
5596
5597  or 
5598 \begin_inset Quotes eld
5599 \end_inset
5600
5601 bye
5602 \begin_inset Quotes erd
5603 \end_inset
5604
5605 .
5606  If 
5607 \begin_inset Quotes eld
5608 \end_inset
5609
5610 hello
5611 \begin_inset Quotes erd
5612 \end_inset
5613
5614  is received from a client, LyX will report back to inform the client that
5615  it's listening to it's messages, while 
5616 \begin_inset Quotes eld
5617 \end_inset
5618
5619 bye
5620 \begin_inset Quotes erd
5621 \end_inset
5622
5623  sent from LyX will inform clients that LyX is closing.
5624 \end_layout
5625
5626 \begin_layout Section
5627 Reverse DVI/PDF search
5628 \end_layout
5629
5630 \begin_layout Standard
5631 Some DVI/PDF viewers
5632 \begin_inset Foot
5633 status collapsed
5634
5635 \begin_layout Plain Layout
5636 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5637  Skim on Mac OSX and SumatraPDF on Windows.
5638 \end_layout
5639
5640 \end_inset
5641
5642  provide 
5643 \emph on
5644 reverse search
5645 \emph default
5646  facility (also called 
5647 \emph on
5648 inverse search
5649 \emph default
5650 ).
5651  This means that you can tell LyX to put the cursor to a specific line in
5652  the document by clicking at the respective position in the DVI/PDF output.
5653  To achieve this, the viewer must be able to communicate with LyX.
5654  This is done via the LyX server either by using the named pipe (
5655 \emph on
5656 lyxpipe
5657 \emph default
5658 ), or the UNIX domain socket (
5659 \emph on
5660 lyxsocket
5661 \emph default
5662 ) that LyX creates in its temporary directory (this is the way the 
5663 \begin_inset Flex Code
5664 status collapsed
5665
5666 \begin_layout Plain Layout
5667 lyxclient
5668 \end_layout
5669
5670 \end_inset
5671
5672  program communicates with LyX).
5673  In some cases, you need a helper script that mediates between the viewer
5674  and LyX, in others, the viewer can communicate with LyX directly.
5675  This depends on the selected viewer and on your operating system.
5676  The same applies to the way viewers need to be configured and the way the
5677  reverse search is actually performed.
5678  In what follows, we will thus describe how to setup reverse search for
5679  specific viewers.
5680  Before we turn to this, though, we will explain what needs to be done generally
5681  to enable reverse search in the DVI/PDF output.
5682 \end_layout
5683
5684 \begin_layout Subsection
5685 Automatic setup
5686 \begin_inset CommandInset label
5687 LatexCommand label
5688 name "sub:rev-search"
5689
5690 \end_inset
5691
5692
5693 \end_layout
5694
5695 \begin_layout Standard
5696 In most cases LyX will do the work for you by enabling the option 
5697 \begin_inset Flex MenuItem
5698 status collapsed
5699
5700 \begin_layout Plain Layout
5701 Synchronize with Output
5702 \end_layout
5703
5704 \end_inset
5705
5706  in the menu 
5707 \begin_inset Flex MenuItem
5708 status collapsed
5709
5710 \begin_layout Plain Layout
5711 Document\SpecialChar \menuseparator
5712 Settings\SpecialChar \menuseparator
5713 Output
5714 \end_layout
5715
5716 \end_inset
5717
5718 .
5719  In such a case LyX will automatically insert the necessary SyncTeX macro
5720  (for PDF) or load the srcltx package (for DVI) respectively.
5721  This option can be easily reached also on 
5722 \begin_inset Flex Code
5723 status collapsed
5724
5725 \begin_layout Plain Layout
5726 View/Update
5727 \end_layout
5728
5729 \end_inset
5730
5731  Toolbar.
5732 \end_layout
5733
5734 \begin_layout Standard
5735 If you need a different setting, you can select or input a custom macro
5736  from the drop down box just below 
5737 \begin_inset Flex MenuItem
5738 status collapsed
5739
5740 \begin_layout Plain Layout
5741 Document\SpecialChar \menuseparator
5742 Settings\SpecialChar \menuseparator
5743 Output\SpecialChar \menuseparator
5744 Synchronize with Output
5745 \end_layout
5746
5747 \end_inset
5748
5749 .
5750 \end_layout
5751
5752 \begin_layout Standard
5753 Note that the method 
5754 \begin_inset Flex Code
5755 status collapsed
5756
5757 \begin_layout Plain Layout
5758
5759 \backslash
5760 synctex=1
5761 \end_layout
5762
5763 \end_inset
5764
5765  enables gzip compression.
5766  If your viewer does not support it, you should instead use 
5767 \begin_inset Flex Code
5768 status collapsed
5769
5770 \begin_layout Plain Layout
5771
5772 \backslash
5773 synctex=-1
5774 \end_layout
5775
5776 \end_inset
5777
5778 .
5779 \end_layout
5780
5781 \begin_layout Standard
5782 Please aöso note that including the 
5783 \begin_inset Flex Code
5784 status collapsed
5785
5786 \begin_layout Plain Layout
5787 srcltx
5788 \end_layout
5789
5790 \end_inset
5791
5792  package or 
5793 \begin_inset Flex Code
5794 status collapsed
5795
5796 \begin_layout Plain Layout
5797 src-specials
5798 \end_layout
5799
5800 \end_inset
5801
5802  sometimes has an undesired impact on the typesetting.
5803  Thus, you should switch output synchronization off for the final typesetting
5804  if you use the 
5805 \begin_inset Flex Code
5806 status collapsed
5807
5808 \begin_layout Plain Layout
5809 srcltx
5810 \end_layout
5811
5812 \end_inset
5813
5814  package or 
5815 \begin_inset Flex Code
5816 status collapsed
5817
5818 \begin_layout Plain Layout
5819 src-specials
5820 \end_layout
5821
5822 \end_inset
5823
5824 .
5825  
5826 \end_layout
5827
5828 \begin_layout Standard
5829 In case you need some more special settings that are not covered by the
5830  automatic settings, read the next section about how to set up output synchroniz
5831 ation manually.
5832  If the automatic setup suits your needs, you can readily jump to section
5833 \begin_inset space ~
5834 \end_inset
5835
5836
5837 \begin_inset CommandInset ref
5838 LatexCommand ref
5839 reference "sub:configuring-viewers"
5840
5841 \end_inset
5842
5843 , where the necessary configuration steps in your viewer -- needed both
5844  with the automatic and the manual setup -- are described.
5845 \end_layout
5846
5847 \begin_layout Subsection
5848 Manual setup
5849 \end_layout
5850
5851 \begin_layout Standard
5852 LaTeX provides several different methods for reverse search.
5853  Some are built-in in the 
5854 \begin_inset Flex Code
5855 status collapsed
5856
5857 \begin_layout Plain Layout
5858 latex/pdflatex
5859 \end_layout
5860
5861 \end_inset
5862
5863  program, some are provided by external packages.
5864  Your choice depends on whether your LaTeX distribution already provides
5865  a given method (the built-in methods are rather new) and whether your viewer
5866  can cope with it.
5867  The available methods are described in the following.
5868 \end_layout
5869
5870 \begin_layout Subsubsection*
5871 Built-in DVI-search via src-specials (DVI only) 
5872 \end_layout
5873
5874 \begin_layout Standard
5875 This method provides the DVI file with the necessary information for reverse
5876  search.
5877  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5878  distribution should include it), and it works reliably.
5879  To enable it, change the 
5880 \begin_inset Flex MenuItem
5881 status collapsed
5882
5883 \begin_layout Plain Layout
5884 LaT
5885 \begin_inset ERT
5886 status collapsed
5887
5888 \begin_layout Plain Layout
5889
5890 {}
5891 \end_layout
5892
5893 \end_inset
5894
5895 eX (plain)->DVI
5896 \end_layout
5897
5898 \end_inset
5899
5900  or 
5901 \begin_inset Flex MenuItem
5902 status collapsed
5903
5904 \begin_layout Plain Layout
5905 LaT
5906 \begin_inset ERT
5907 status collapsed
5908
5909 \begin_layout Plain Layout
5910
5911 {}
5912 \end_layout
5913
5914 \end_inset
5915
5916 eX (plain)->DraftDVI
5917 \end_layout
5918
5919 \end_inset
5920
5921  converter in 
5922 \begin_inset Flex MenuItem
5923 status collapsed
5924
5925 \begin_layout Plain Layout
5926 Preferences\SpecialChar \menuseparator
5927 File Handling\SpecialChar \menuseparator
5928 Converters
5929 \end_layout
5930
5931 \end_inset
5932
5933  to 
5934 \begin_inset Flex Code
5935 status collapsed
5936
5937 \begin_layout Plain Layout
5938 latex -src-specials $$i
5939 \end_layout
5940
5941 \end_inset
5942
5943 .
5944  If this doesn't work, check if your TeX engine needs different options
5945  (the syntax might differ in some distributions).
5946 \end_layout
5947
5948 \begin_layout Subsubsection*
5949 External Packages (PDFSync and scrltx) 
5950 \end_layout
5951
5952 \begin_layout Standard
5953 The packages 
5954 \emph on
5955 pdfsync
5956 \emph default
5957  and 
5958 \emph on
5959 scrltx
5960 \emph default
5961  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5962  respectively.
5963  In order to enable it, load the packages in the LyX preamble: 
5964 \end_layout
5965
5966 \begin_layout Itemize
5967 \begin_inset Flex Code
5968 status collapsed
5969
5970 \begin_layout Plain Layout
5971
5972 \backslash
5973 usepackage{pdfsync}
5974 \end_layout
5975
5976 \end_inset
5977
5978  for reverse PDF search,
5979 \end_layout
5980
5981 \begin_layout Itemize
5982 \begin_inset Flex Code
5983 status collapsed
5984
5985 \begin_layout Plain Layout
5986
5987 \backslash
5988 usepackage[active]{srcltx}
5989 \end_layout
5990
5991 \end_inset
5992
5993  for reverse DVI search.
5994 \end_layout
5995
5996 \begin_layout Standard
5997 If you want to be able to perform both DVI and PDF reverse searches, you
5998  can also insert in the preamble the following lines
5999 \end_layout
6000
6001 \begin_layout LyX-Code
6002
6003 \backslash
6004 usepackage{ifpdf}
6005 \begin_inset Newline newline
6006 \end_inset
6007
6008
6009 \backslash
6010 ifpdf
6011 \begin_inset Newline newline
6012 \end_inset
6013
6014   
6015 \backslash
6016 usepackage{pdfsync}
6017 \begin_inset Newline newline
6018 \end_inset
6019
6020
6021 \backslash
6022 else
6023 \begin_inset Newline newline
6024 \end_inset
6025
6026   
6027 \backslash
6028 usepackage[active]{srcltx}
6029 \begin_inset Newline newline
6030 \end_inset
6031
6032
6033 \backslash
6034 fi
6035 \end_layout
6036
6037 \begin_layout Standard
6038 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6039  right package will be used.
6040 \end_layout
6041
6042 \begin_layout Standard
6043 Note that PDFSync might affect the output layout of your document.
6044  It is therefore advised to disable PDFsync for final documents.
6045 \end_layout
6046
6047 \begin_layout Subsubsection*
6048 Built-in reverse search via SyncTeX (DVI and PDF) 
6049 \end_layout
6050
6051 \begin_layout Standard
6052 Recent versions of 
6053 \begin_inset Flex Code
6054 status collapsed
6055
6056 \begin_layout Plain Layout
6057 (pdf)latex
6058 \end_layout
6059
6060 \end_inset
6061
6062  have built-in support for both PDF and DVI reverse search.
6063  This so-called 
6064 \emph on
6065 SyncTeX
6066 \emph default
6067  facility is basically the result of the integration of the PDFSync package
6068  to the pdftex program and its merge with the 
6069 \emph on
6070 scr-specials
6071 \emph default
6072  approach.
6073  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6074  to use it.
6075  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6076  already provide SyncTeX support.
6077 \end_layout
6078
6079 \begin_layout Standard
6080 To enable SyncTeX for DVI output, change the 
6081 \begin_inset Flex MenuItem
6082 status collapsed
6083
6084 \begin_layout Plain Layout
6085 LaT
6086 \begin_inset ERT
6087 status collapsed
6088
6089 \begin_layout Plain Layout
6090
6091 {}
6092 \end_layout
6093
6094 \end_inset
6095
6096 eX (plain) -> DVI
6097 \end_layout
6098
6099 \end_inset
6100
6101  or 
6102 \begin_inset Flex MenuItem
6103 status collapsed
6104
6105 \begin_layout Plain Layout
6106 LaT
6107 \begin_inset ERT
6108 status collapsed
6109
6110 \begin_layout Plain Layout
6111
6112 {}
6113 \end_layout
6114
6115 \end_inset
6116
6117 eX (plain) -> DraftDVI
6118 \end_layout
6119
6120 \end_inset
6121
6122  converter in 
6123 \begin_inset Flex MenuItem
6124 status collapsed
6125
6126 \begin_layout Plain Layout
6127 Preferences\SpecialChar \menuseparator
6128 File Handling\SpecialChar \menuseparator
6129 Converters
6130 \end_layout
6131
6132 \end_inset
6133
6134  to 
6135 \begin_inset Flex Code
6136 status collapsed
6137
6138 \begin_layout Plain Layout
6139 latex -synctex=1 $$i
6140 \end_layout
6141
6142 \end_inset
6143
6144 , and for PDF output, change the 
6145 \begin_inset Flex MenuItem
6146 status collapsed
6147
6148 \begin_layout Plain Layout
6149 LaT
6150 \begin_inset ERT
6151 status collapsed
6152
6153 \begin_layout Plain Layout
6154
6155 {}
6156 \end_layout
6157
6158 \end_inset
6159
6160 eX (pdflatex) -> PDF (pdflatex)
6161 \end_layout
6162
6163 \end_inset
6164
6165  or converter to 
6166 \begin_inset Flex Code
6167 status collapsed
6168
6169 \begin_layout Plain Layout
6170 pdflatex -synctex=1 $$i
6171 \end_layout
6172
6173 \end_inset
6174
6175 .
6176  Check the documentation of your viewer whether the viewer needs to be configure
6177 d for the use with SyncTeX.
6178 \begin_inset Foot
6179 status collapsed
6180
6181 \begin_layout Plain Layout
6182 Note that the option 
6183 \begin_inset Flex Code
6184 status collapsed
6185
6186 \begin_layout Plain Layout
6187 -synctex=1
6188 \end_layout
6189
6190 \end_inset
6191
6192  option enables gzip compression.
6193  If your viewer does not support it, you should instead use 
6194 \begin_inset Flex Code
6195 status collapsed
6196
6197 \begin_layout Plain Layout
6198 -synctex=-1
6199 \end_layout
6200
6201 \end_inset
6202
6203 .
6204 \end_layout
6205
6206 \end_inset
6207
6208
6209 \end_layout
6210
6211 \begin_layout Subsection
6212 Configuring and using specific viewers
6213 \begin_inset CommandInset label
6214 LatexCommand label
6215 name "sub:configuring-viewers"
6216
6217 \end_inset
6218
6219
6220 \end_layout
6221
6222 \begin_layout Subsubsection*
6223 Xdvi (all platforms)
6224 \end_layout
6225
6226 \begin_layout Standard
6227 If you use 
6228 \begin_inset Flex Code
6229 status collapsed
6230
6231 \begin_layout Plain Layout
6232 xdvi
6233 \end_layout
6234
6235 \end_inset
6236
6237 , you don't need to do anything else for performing a reverse DVI search,
6238  as LyX already provides the necessary hooks for automatically using the
6239  
6240 \begin_inset Flex Code
6241 status collapsed
6242
6243 \begin_layout Plain Layout
6244 lyxclient
6245 \end_layout
6246
6247 \end_inset
6248
6249  program.
6250  Just setup your document as described above (reverse search is triggered
6251  by Ctrl-click or Alt-click on Mac OSX, respectively).
6252 \end_layout
6253
6254 \begin_layout Standard
6255 However, if for whatever reason you want to use the named pipe instead of
6256  the socket for communicating with LyX, simply change the DVI viewer in
6257  
6258 \begin_inset Flex MenuItem
6259 status collapsed
6260
6261 \begin_layout Plain Layout
6262 Preferences\SpecialChar \menuseparator
6263 File Handling\SpecialChar \menuseparator
6264 File formats
6265 \end_layout
6266
6267 \end_inset
6268
6269  to
6270 \begin_inset Foot
6271 status collapsed
6272
6273 \begin_layout Plain Layout
6274 On Mac OSX you have to use 
6275 \begin_inset Flex Code
6276 status collapsed
6277
6278 \begin_layout Plain Layout
6279 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6280 \end_layout
6281
6282 \end_inset
6283
6284
6285 \end_layout
6286
6287 \end_inset
6288
6289  
6290 \begin_inset Flex Code
6291 status collapsed
6292
6293 \begin_layout Plain Layout
6294 xdvi -editor 'lyxeditor.sh %f %l'
6295 \end_layout
6296
6297 \end_inset
6298
6299 , where 
6300 \begin_inset Flex Code
6301 status collapsed
6302
6303 \begin_layout Plain Layout
6304 lyxeditor.sh
6305 \end_layout
6306
6307 \end_inset
6308
6309  is a suitable script.
6310  For example, a minimal shell script is the following one:
6311 \end_layout
6312
6313 \begin_layout LyX-Code
6314 #!/bin/sh
6315 \begin_inset Newline newline
6316 \end_inset
6317
6318 LYXPIPE="/path/to/lyxpipe"
6319 \begin_inset Newline newline
6320 \end_inset
6321
6322 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6323 \begin_inset Newline newline
6324 \end_inset
6325
6326 echo "$COMMAND" > "${LYXPIPE}".in || exit
6327 \begin_inset Newline newline
6328 \end_inset
6329
6330 read < "${LYXPIPE}".out || exit
6331 \end_layout
6332
6333 \begin_layout Standard
6334 where 
6335 \begin_inset Flex Code
6336 status collapsed
6337
6338 \begin_layout Plain Layout
6339 /path/to/lyxpipe
6340 \end_layout
6341
6342 \end_inset
6343
6344  is the Ly
6345 \begin_inset ERT
6346 status collapsed
6347
6348 \begin_layout Plain Layout
6349
6350 {}
6351 \end_layout
6352
6353 \end_inset
6354
6355 XServer pipe path specified in 
6356 \begin_inset Flex MenuItem
6357 status collapsed
6358
6359 \begin_layout Plain Layout
6360 Preferences\SpecialChar \menuseparator
6361 Paths
6362 \end_layout
6363
6364 \end_inset
6365
6366 .
6367 \begin_inset Foot
6368 status collapsed
6369
6370 \begin_layout Plain Layout
6371 In the 
6372 \begin_inset Flex Code
6373 status collapsed
6374
6375 \begin_layout Plain Layout
6376 development/tools
6377 \end_layout
6378
6379 \end_inset
6380
6381  folder of a source distribution you can find a 
6382 \begin_inset Flex Code
6383 status collapsed
6384
6385 \begin_layout Plain Layout
6386 lyxeditor
6387 \end_layout
6388
6389 \end_inset
6390
6391  script which is able to locate the 
6392 \emph on
6393 lyxpipe
6394 \emph default
6395  based on your preferences.
6396 \end_layout
6397
6398 \end_inset
6399
6400
6401 \end_layout
6402
6403 \begin_layout Subsubsection*
6404 MacDviX (Mac OSX)
6405 \end_layout
6406
6407 \begin_layout Standard
6408 At the end of 
6409 \begin_inset Flex Code
6410 status collapsed
6411
6412 \begin_layout Plain Layout
6413 /Applications/MacDviX_Folder/calleditor.script
6414 \end_layout
6415
6416 \end_inset
6417
6418 , add the following lines:
6419 \end_layout
6420
6421 \begin_layout LyX-Code
6422 /Applications/Ly
6423 \begin_inset ERT
6424 status collapsed
6425
6426 \begin_layout Plain Layout
6427
6428 {}
6429 \end_layout
6430
6431 \end_inset
6432
6433 X.app/Contents/MacOS/lyxeditor "$2" $1
6434 \begin_inset Newline newline
6435 \end_inset
6436
6437 exit 1
6438 \end_layout
6439
6440 \begin_layout Standard
6441 Modify the lines accordingly if you install LyX somewhere else than in the
6442  Applications folder.
6443 \end_layout
6444
6445 \begin_layout Standard
6446 Reverse search is triggered by Alt-click (OPTION-click).
6447 \end_layout
6448
6449 \begin_layout Subsubsection*
6450 Skim (Mac OSX)
6451 \end_layout
6452
6453 \begin_layout Standard
6454 Enter 
6455 \begin_inset Flex Code
6456 status collapsed
6457
6458 \begin_layout Plain Layout
6459 open -a Skim.app $$i
6460 \end_layout
6461
6462 \end_inset
6463
6464  to the viewer setting in 
6465 \begin_inset Flex MenuItem
6466 status collapsed
6467
6468 \begin_layout Plain Layout
6469 Preferences\SpecialChar \menuseparator
6470 File Handling\SpecialChar \menuseparator
6471 File formats\SpecialChar \menuseparator
6472 PDF (pdflatex)
6473 \end_layout
6474
6475 \end_inset
6476
6477 , and then in 
6478 \begin_inset Flex MenuItem
6479 status collapsed
6480
6481 \begin_layout Plain Layout
6482 Skim\SpecialChar \menuseparator
6483 Preferences\SpecialChar \menuseparator
6484 Sync
6485 \end_layout
6486
6487 \end_inset
6488
6489  select Ly
6490 \begin_inset ERT
6491 status collapsed
6492
6493 \begin_layout Plain Layout
6494
6495 {}
6496 \end_layout
6497
6498 \end_inset
6499
6500 X.
6501 \end_layout
6502
6503 \begin_layout Standard
6504 Reverse search is triggered by COMMAND-SHIFT-click
6505 \end_layout
6506
6507 \begin_layout Subsubsection*
6508 Okular (KDE)
6509 \end_layout
6510
6511 \begin_layout Standard
6512 Go to 
6513 \begin_inset Flex MenuItem
6514 status collapsed
6515
6516 \begin_layout Plain Layout
6517 Settings\SpecialChar \menuseparator
6518 Configure Okular\SpecialChar \ldots{}
6519 \SpecialChar \menuseparator
6520 Editor
6521 \end_layout
6522
6523 \end_inset
6524
6525 , select 
6526 \begin_inset Quotes eld
6527 \end_inset
6528
6529 Custom Text Editor
6530 \begin_inset Quotes erd
6531 \end_inset
6532
6533  and add the command 
6534 \begin_inset Flex Code
6535 status collapsed
6536
6537 \begin_layout Plain Layout
6538 lyxclient -g %f %l
6539 \end_layout
6540
6541 \end_inset
6542
6543 .
6544 \end_layout
6545
6546 \begin_layout Standard
6547 Reverse search is triggered by SHIFT-click.
6548 \end_layout
6549
6550 \begin_layout Subsubsection*
6551 YAP (Windows)
6552 \end_layout
6553
6554 \begin_layout Standard
6555 Launch yap, choose its 
6556 \begin_inset Flex MenuItem
6557 status collapsed
6558
6559 \begin_layout Plain Layout
6560 View\SpecialChar \menuseparator
6561 Options
6562 \end_layout
6563
6564 \end_inset
6565
6566  menu and select the 
6567 \begin_inset Quotes eld
6568 \end_inset
6569
6570 Inverse DVI Search
6571 \begin_inset Quotes erd
6572 \end_inset
6573
6574  tab.
6575  Click on the 
6576 \begin_inset Quotes eld
6577 \end_inset
6578
6579 New\SpecialChar \ldots{}
6580
6581 \begin_inset Quotes erd
6582 \end_inset
6583
6584  button and, in the window that opens, enter 
6585 \begin_inset Quotes eld
6586 \end_inset
6587
6588 LyX Editor
6589 \begin_inset Quotes erd
6590 \end_inset
6591
6592  (or any other name you like) in the 
6593 \begin_inset Quotes eld
6594 \end_inset
6595
6596 Name:
6597 \begin_inset Quotes erd
6598 \end_inset
6599
6600  field.
6601  Now click on the button labeled 
6602 \begin_inset Quotes eld
6603 \end_inset
6604
6605 \SpecialChar \ldots{}
6606
6607 \begin_inset Quotes erd
6608 \end_inset
6609
6610  to open a file dialog and navigate to the directory containing the batch
6611  file 
6612 \begin_inset Flex Code
6613 status collapsed
6614
6615 \begin_layout Plain Layout
6616 lyxeditor.bat
6617 \end_layout
6618
6619 \end_inset
6620
6621  (see below).
6622  Select 
6623 \begin_inset Flex Code
6624 status collapsed
6625
6626 \begin_layout Plain Layout
6627 lyxeditor.bat
6628 \end_layout
6629
6630 \end_inset
6631
6632  and then specify the program arguments as 
6633 \begin_inset Flex Code
6634 status collapsed
6635
6636 \begin_layout Plain Layout
6637 %f %l
6638 \end_layout
6639
6640 \end_inset
6641
6642 .
6643  The 
6644 \begin_inset Flex Code
6645 status collapsed
6646
6647 \begin_layout Plain Layout
6648 lyxeditor.bat
6649 \end_layout
6650
6651 \end_inset
6652
6653  wrapper is used for communicating with LyX through the 
6654 \emph on
6655 lyxpipe
6656 \emph default
6657  and is as follows:
6658 \end_layout
6659
6660 \begin_layout LyX-Code
6661 @echo off
6662 \begin_inset Newline newline
6663 \end_inset
6664
6665 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6666 \backslash
6667
6668 \backslash
6669 .
6670 \backslash
6671 pipe
6672 \backslash
6673 lyxpipe.in
6674 \begin_inset Newline newline
6675 \end_inset
6676
6677 type 
6678 \backslash
6679
6680 \backslash
6681 .
6682 \backslash
6683 pipe
6684 \backslash
6685 lyxpipe.out
6686 \end_layout
6687
6688 \begin_layout Standard
6689 Make sure that the LyXServer pipe path you specified in LyX is 
6690 \begin_inset Flex Code
6691 status collapsed
6692
6693 \begin_layout Plain Layout
6694
6695 \backslash
6696
6697 \backslash
6698 .
6699 \backslash
6700 pipe
6701 \backslash
6702 lyxpipe
6703 \end_layout
6704
6705 \end_inset
6706
6707 , otherwise change the 
6708 \begin_inset Flex Code
6709 status collapsed
6710
6711 \begin_layout Plain Layout
6712 lyxeditor.bat
6713 \end_layout
6714
6715 \end_inset
6716
6717  wrapper accordingly.
6718 \end_layout
6719
6720 \begin_layout Standard
6721 In yap, reverse search is triggered by double-click.
6722 \end_layout
6723
6724 \begin_layout Subsubsection*
6725 SumatraPDF (Windows)
6726 \end_layout
6727
6728 \begin_layout Standard
6729 In order to use SumatraPDF for inverse search, enter 
6730 \begin_inset Flex Code
6731 status collapsed
6732
6733 \begin_layout Plain Layout
6734 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6735 \end_layout
6736
6737 \end_inset
6738
6739  in the viewer setting in 
6740 \begin_inset Flex MenuItem
6741 status collapsed
6742
6743 \begin_layout Plain Layout
6744 Preferences\SpecialChar \menuseparator
6745 File Handling\SpecialChar \menuseparator
6746 File formats\SpecialChar \menuseparator
6747 PDF (pdflatex)
6748 \end_layout
6749
6750 \end_inset
6751
6752 , where 
6753 \begin_inset Flex Code
6754 status collapsed
6755
6756 \begin_layout Plain Layout
6757 lyxeditor.bat
6758 \end_layout
6759
6760 \end_inset
6761
6762  is the previous wrapper.
6763  If SumatraPDF.exe is not in your command PATH, use its full file name.
6764 \end_layout
6765
6766 \begin_layout Standard
6767 Reverse search is triggered by double-click.
6768 \end_layout
6769
6770 \begin_layout Subsubsection*
6771 YAP (Cygwin)
6772 \end_layout
6773
6774 \begin_layout Standard
6775 First of all, make sure that yap is your default DVI viewer in the Windows
6776  environment, then launch it, choose its 
6777 \begin_inset Flex MenuItem
6778 status collapsed
6779
6780 \begin_layout Plain Layout
6781 View\SpecialChar \menuseparator
6782 Options
6783 \end_layout
6784
6785 \end_inset
6786
6787  menu and select the 
6788 \begin_inset Quotes eld
6789 \end_inset
6790
6791 Inverse DVI Search
6792 \begin_inset Quotes erd
6793 \end_inset
6794
6795  tab.
6796  Click on the 
6797 \begin_inset Quotes eld
6798 \end_inset
6799
6800 New\SpecialChar \ldots{}
6801
6802 \begin_inset Quotes erd
6803 \end_inset
6804
6805  button and, in the window that opens, enter 
6806 \begin_inset Quotes eld
6807 \end_inset
6808
6809 LyX Editor
6810 \begin_inset Quotes erd
6811 \end_inset
6812
6813  (or any other name you like) in the 
6814 \begin_inset Quotes eld
6815 \end_inset
6816
6817 Name:
6818 \begin_inset Quotes erd
6819 \end_inset
6820
6821  field.
6822  Now click on the button labeled 
6823 \begin_inset Quotes eld
6824 \end_inset
6825
6826 \SpecialChar \ldots{}
6827
6828 \begin_inset Quotes erd
6829 \end_inset
6830
6831  to open a file dialog and navigate to the directory containing the 
6832 \begin_inset Flex Code
6833 status collapsed
6834
6835 \begin_layout Plain Layout
6836 lyxeditor.exe
6837 \end_layout
6838
6839 \end_inset
6840
6841  program (which is installed by default on Cygwin along with the LyX executable).
6842  Select 
6843 \begin_inset Flex Code
6844 status collapsed
6845
6846 \begin_layout Plain Layout
6847 lyxeditor.exe
6848 \end_layout
6849
6850 \end_inset
6851
6852  and then specify the program arguments as 
6853 \begin_inset Flex Code
6854 status collapsed
6855
6856 \begin_layout Plain Layout
6857 -g %f %l
6858 \end_layout
6859
6860 \end_inset
6861
6862 .
6863  In this way, you will be using the 
6864 \emph on
6865 lyxsocket
6866 \emph default
6867  for communicating with LyX.
6868  If, for whatever reason, you want to use the 
6869 \emph on
6870 lyxpipe
6871 \emph default
6872 , omit the 
6873 \begin_inset Flex Code
6874 status collapsed
6875
6876 \begin_layout Plain Layout
6877 -g
6878 \end_layout
6879
6880 \end_inset
6881
6882  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6883 \end_layout
6884
6885 \begin_layout Standard
6886 In yap, reverse search is triggered by double-click.
6887 \end_layout
6888
6889 \begin_layout Subsubsection*
6890 SumatraPDF (Cygwin)
6891 \end_layout
6892
6893 \begin_layout Standard
6894 In order to use SumatraPDF for inverse search, enter 
6895 \begin_inset Flex Code
6896 status collapsed
6897
6898 \begin_layout Plain Layout
6899 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6900 \end_layout
6901
6902 \end_inset
6903
6904  in the viewer setting in 
6905 \begin_inset Flex MenuItem
6906 status collapsed
6907
6908 \begin_layout Plain Layout
6909 Preferences\SpecialChar \menuseparator
6910 File Handling\SpecialChar \menuseparator
6911 File formats\SpecialChar \menuseparator
6912 PDF (pdflatex)
6913 \end_layout
6914
6915 \end_inset
6916
6917 .
6918  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6919  The 
6920 \begin_inset Flex Code
6921 status collapsed
6922
6923 \begin_layout Plain Layout
6924 -g
6925 \end_layout
6926
6927 \end_inset
6928
6929  enables communication via the 
6930 \emph on
6931 lyxsocket
6932 \emph default
6933 .
6934  Again, omit the 
6935 \begin_inset Flex Code
6936 status collapsed
6937
6938 \begin_layout Plain Layout
6939 -g
6940 \end_layout
6941
6942 \end_inset
6943
6944  option if you want to use the 
6945 \emph on
6946 lyxpipe
6947 \emph default
6948 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6949 \end_layout
6950
6951 \begin_layout Standard
6952 Reverse search is triggered by double-click.
6953 \end_layout
6954
6955 \begin_layout Section
6956 Forward search
6957 \end_layout
6958
6959 \begin_layout Standard
6960 Forward search is, as the name implies, in a sense the 
6961 \begin_inset Quotes eld
6962 \end_inset
6963
6964 opposite
6965 \begin_inset Quotes erd
6966 \end_inset
6967
6968  of reverse search.
6969  It allows you to let the viewer jump to a given position from within LyX.
6970  If forward search is set up (as described in what follows), you can put
6971  the cursor anywhere in your LyX document, and hit 
6972 \begin_inset Flex MenuItem
6973 status collapsed
6974
6975 \begin_layout Plain Layout
6976 Navigate\SpecialChar \menuseparator
6977 Forward search
6978 \end_layout
6979
6980 \end_inset
6981
6982  (or select 
6983 \begin_inset Flex MenuItem
6984 status collapsed
6985
6986 \begin_layout Plain Layout
6987 Forward search
6988 \end_layout
6989
6990 \end_inset
6991
6992  in the context menu via right mouse click), and then the viewer will jump
6993  to that position as well.
6994  This implies, of course, that your viewer supports this function.
6995 \end_layout
6996
6997 \begin_layout Standard
6998 To make forward search possible, you first need to provide the generated
6999  output PDF/DVI file with additional information about the TeX sources.
7000  This can be done via the methods described in the section 
7001 \begin_inset CommandInset ref
7002 LatexCommand ref
7003 reference "sub:rev-search"
7004
7005 \end_inset
7006
7007 .
7008 \end_layout
7009
7010 \begin_layout Standard
7011 Additionally, you need to configure LyX for using your viewers in 
7012 \begin_inset Flex MenuItem
7013 status collapsed
7014
7015 \begin_layout Plain Layout
7016 Tools\SpecialChar \menuseparator
7017 Preferences\SpecialChar \menuseparator
7018 Output\SpecialChar \menuseparator
7019 General
7020 \end_layout
7021
7022 \end_inset
7023
7024 .
7025  We provide a range of tested configurations for some viewers, which you
7026  can select from the drop down list.
7027  If none of these configurations suits you, you have to find out and enter
7028  a suitable configuration yourself.
7029  The definition syntax uses the following placeholders:
7030 \end_layout
7031
7032 \begin_layout Itemize
7033 \noindent
7034 \begin_inset Flex Code
7035 status collapsed
7036
7037 \begin_layout Plain Layout
7038 $$n
7039 \end_layout
7040
7041 \end_inset
7042
7043 : row number
7044 \end_layout
7045
7046 \begin_layout Itemize
7047 \noindent
7048 \begin_inset Flex Code
7049 status collapsed
7050
7051 \begin_layout Plain Layout
7052 $$t
7053 \end_layout
7054
7055 \end_inset
7056
7057 : name of the (temporary) exported .tex file
7058 \end_layout
7059
7060 \begin_layout Itemize
7061 \noindent
7062 \begin_inset Flex Code
7063 status collapsed
7064
7065 \begin_layout Plain Layout
7066 $$o
7067 \end_layout
7068
7069 \end_inset
7070
7071 : name of the exported output file (either dvi or pdf, depending on which
7072  one exists in the temporary directory)
7073 \end_layout
7074
7075 \begin_layout Standard
7076 Note that only some of the viewers provide full forward search functionality,
7077  among them yap, xdvi, okular and Sumatra PDF.
7078 \begin_inset Foot
7079 status collapsed
7080
7081 \begin_layout Plain Layout
7082 For Sumatra CMCDDE is needed --- downloadable from 
7083 \begin_inset CommandInset href
7084 LatexCommand href
7085 target "http://www.istri.fr/zip/CMCDDE.zip"
7086
7087 \end_inset
7088
7089
7090 \end_layout
7091
7092 \end_inset
7093
7094  While many of the widespread PDF viewers (most notably Adobe Reader) do
7095  not support forward search at all, some other viewers -- e.
7096 \begin_inset space \thinspace{}
7097 \end_inset
7098
7099 g.
7100  evince and xpdf -- allow at least to reload the document and jump to a
7101  specific page of the file, so you can at least navigate 
7102 \begin_inset Quotes eld
7103 \end_inset
7104
7105 near
7106 \begin_inset Quotes erd
7107 \end_inset
7108
7109 .
7110  This latter functionality is provided by an external call of synctex (see
7111  the predefined example configurations).
7112  
7113 \end_layout
7114
7115 \begin_layout Standard
7116 Forward search works both with DVI and PDF output.
7117  LyX simply checks which preview format you have used before (i.
7118 \begin_inset space \thinspace{}
7119 \end_inset
7120
7121 e., which format is already there in the temporary directory) and chooses
7122  the appropriate configuration for the respective format.
7123 \end_layout
7124
7125 \begin_layout Chapter
7126 Special Document Classes
7127 \end_layout
7128
7129 \begin_layout Section
7130 A&A Paper
7131 \end_layout
7132
7133 \begin_layout Standard
7134 by 
7135 \noun on
7136 Peter Sütterlin
7137 \end_layout
7138
7139 \begin_layout Subsection
7140 Introduction
7141 \end_layout
7142
7143 \begin_layout Standard
7144 This section describes how LyX can be used to write articles for submission
7145  to the scientific journal 
7146 \emph on
7147 Astronomy and Astrophysics
7148 \emph default
7149  (www.edpsciences.fr/aa/ 
7150 \begin_inset Flex URL
7151 status collapsed
7152
7153 \begin_layout Plain Layout
7154
7155 http://www.edpsciences.fr/aa/
7156 \end_layout
7157
7158 \end_inset
7159
7160 ) using Version 5.01 of the document class 
7161 \family typewriter
7162 aa.cls
7163 \family default
7164 .
7165  This package can be downloaded from the ftp site
7166 \end_layout
7167
7168 \begin_layout Standard
7169 \begin_inset VSpace medskip
7170 \end_inset
7171
7172
7173 \end_layout
7174
7175 \begin_layout Standard
7176 \align center
7177 \begin_inset Flex URL
7178 status collapsed
7179
7180 \begin_layout Plain Layout
7181
7182 ftp://ftp.edpsciences.org/pub/aa/readme.html
7183 \end_layout
7184
7185 \end_inset
7186
7187
7188 \end_layout
7189
7190 \begin_layout Standard
7191 \begin_inset VSpace medskip
7192 \end_inset
7193
7194
7195 \end_layout
7196
7197 \begin_layout Standard
7198 A manual comes together with that package, and this text is not meant to
7199  replace the original manual but is merely a short guide in how to realize
7200  the correct form of your paper.
7201  
7202 \end_layout
7203
7204 \begin_layout Standard
7205 Please note that the publisher of the journal was changed from Springer
7206  to EDP Sciences starting January 1, 2001.
7207  That change involved also some slight changes to the style files, namely
7208  the removal of the thesaurus command.
7209  The LyX class aa supports the newest version of these style files, V 5.01.
7210  If you have an older version installed, please upgrade.
7211  For compatibility, the old (version 4) layout has been kept as 
7212 \family sans
7213 article (A&A V4)
7214 \family default
7215 .
7216  Please refer to the comments in 
7217 \family typewriter
7218 LyXDir/layouts/aapaper.layout
7219 \family default
7220 .
7221 \end_layout
7222
7223 \begin_layout Subsection
7224 Getting started
7225 \end_layout
7226
7227 \begin_layout Standard
7228 It is recommended you start from the example template distributed with LyX.
7229  If you are not using a template, note the following settings:
7230 \end_layout
7231
7232 \begin_layout Itemize
7233 Select 
7234 \family sans
7235 article (A&A)
7236 \family default
7237  in the 
7238 \family sans
7239 Document\SpecialChar \menuseparator
7240 Settings
7241 \family default
7242  dialog (OK, that one was obvious).
7243 \end_layout
7244
7245 \begin_layout Itemize
7246 Don't change the option 
7247 \family sans
7248 Page
7249 \begin_inset space ~
7250 \end_inset
7251
7252 style
7253 \family default
7254 : Leave it set to 
7255 \family sans
7256 default
7257 \family default
7258 .
7259  The whole layout is done by the macros, you shouldn't change anything.
7260 \end_layout
7261
7262 \begin_layout Subsection
7263 The header block
7264 \end_layout
7265
7266 \begin_layout Standard
7267 First thing to enter is the header information.
7268  It consists of seven entries, of which some are optional.
7269  They are
7270 \end_layout
7271
7272 \begin_layout Itemize
7273
7274 \family sans
7275 Title
7276 \family default
7277 : [required] 
7278 \end_layout
7279
7280 \begin_layout Itemize
7281
7282 \family sans
7283 Subtitle
7284 \family default
7285 : [optional] 
7286 \end_layout
7287
7288 \begin_layout Itemize
7289
7290 \family sans
7291 Author
7292 \family default
7293 : [required]
7294 \end_layout
7295
7296 \begin_layout Itemize
7297
7298 \family sans
7299 Address
7300 \family default
7301 : [required]
7302 \end_layout
7303
7304 \begin_layout Itemize
7305
7306 \family sans
7307 Offprints
7308 \family default
7309 : [optional] if more than one author: whom to contact for offprint requests.
7310 \end_layout
7311
7312 \begin_layout Itemize
7313
7314 \family sans
7315 Mail
7316 \family default
7317 : [optional] mail address for contacts.
7318 \end_layout
7319
7320 \begin_layout Itemize
7321
7322 \family sans
7323 Date
7324 \family default
7325 : [required].
7326  Suggested format is 
7327 \family typewriter
7328 Received: <date>; Accepted <date> 
7329 \end_layout
7330
7331 \begin_layout Standard
7332 There is no need to issue the 
7333 \family typewriter
7334
7335 \backslash
7336 maketitle
7337 \family default
7338  command, this is done automatically by LyX when the header is finished.
7339  Although the order of the single header entries doesn't matter it is advised
7340  to keep the above sequence, just to get the best optics and meets the layout
7341  of the real document.
7342 \end_layout
7343
7344 \begin_layout Standard
7345 If you want to place footnotes in the header block, e.
7346 \begin_inset space \thinspace{}
7347 \end_inset
7348
7349 g.
7350 \begin_inset space \space{}
7351 \end_inset
7352
7353 to state your present address, just use the standard footnote via the menu
7354  
7355 \family sans
7356 Insert\SpecialChar \menuseparator
7357 Footnote.
7358
7359 \family default
7360  LyX will automagically use the term 
7361 \family typewriter
7362
7363 \backslash
7364 thanks{}
7365 \family default
7366  in that case.
7367 \end_layout
7368
7369 \begin_layout Standard
7370 In addition to these topics, the macros use three additional LaTeX commands
7371  that have no counterpart in LyX:
7372 \end_layout
7373
7374 \begin_layout Itemize
7375
7376 \family typewriter
7377
7378 \backslash
7379 and
7380 \family default
7381  to separate different names for more than one author and institute, respectivel
7382 y.
7383 \end_layout
7384
7385 \begin_layout Itemize
7386
7387 \family typewriter
7388
7389 \backslash
7390 inst{<nr>}
7391 \family default
7392 to mark corresponding author/institute pairs.
7393  The institutes are numbered sequentially as they appear in the 
7394 \family sans
7395 Address
7396 \family default
7397  field, so you have to put a marker to each author.
7398 \end_layout
7399
7400 \begin_layout Itemize
7401
7402 \family typewriter
7403
7404 \backslash
7405 email{address}
7406 \family default
7407  to supply an email address for fast contact.
7408 \end_layout
7409
7410 \begin_layout Standard
7411 In all cases, the appropriate command has to be entered in LyX and marked
7412  as LaTeX code.
7413  See the examples.
7414  
7415 \end_layout
7416
7417 \begin_layout Subsection
7418 The abstract
7419 \end_layout
7420
7421 \begin_layout Standard
7422 The abstract should immediately follow the header block.
7423  With version 5 the abstract environment was changed to a command, and there
7424  is now a resctriction to only one paragraph.
7425  In addition, it should contain an entry with the keywords.
7426  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7427  command 
7428 \family typewriter
7429
7430 \backslash
7431 keywords{}
7432 \family default
7433  by hand and mark it as LaTeX code.
7434  Refer to the example paper.
7435 \end_layout
7436
7437 \begin_layout Subsection
7438 Supported environments
7439 \end_layout
7440
7441 \begin_layout Standard
7442 The A&A paper layout supports the following environments for structuring
7443  your text:
7444 \end_layout
7445
7446 \begin_layout Itemize
7447
7448 \family sans
7449 Standard
7450 \end_layout
7451
7452 \begin_layout Itemize
7453
7454 \family sans
7455 Section
7456 \end_layout
7457
7458 \begin_layout Itemize
7459
7460 \family sans
7461 Subsection
7462 \end_layout
7463
7464 \begin_layout Itemize
7465
7466 \family sans
7467 Subsubsection
7468 \end_layout
7469
7470 \begin_layout Itemize
7471
7472 \family sans
7473 Itemize
7474 \end_layout
7475
7476 \begin_layout Itemize
7477
7478 \family sans
7479 Enumerate
7480 \end_layout
7481
7482 \begin_layout Itemize
7483
7484 \family sans
7485 Description
7486 \end_layout
7487
7488 \begin_layout Itemize
7489
7490 \family sans
7491 Caption
7492 \end_layout
7493
7494 \begin_layout Itemize
7495
7496 \family sans
7497 Abstract
7498 \end_layout
7499
7500 \begin_layout Itemize
7501
7502 \family sans
7503 Acknowledgment
7504 \end_layout
7505
7506 \begin_layout Itemize
7507
7508 \family sans
7509 Bibliography
7510 \end_layout
7511
7512 \begin_layout Itemize
7513
7514 \family sans
7515 LaTeX
7516 \end_layout
7517
7518 \begin_layout Subsection
7519 Commands not supported by LyX
7520 \end_layout
7521
7522 \begin_layout Standard
7523 Some commands are not yet supported by the 
7524 \family sans
7525 paper (A&A)
7526 \family default
7527  layout for LyX.
7528  Some have already been mentioned.
7529  For the sake of completeness, they are listed all together here:
7530 \end_layout
7531
7532 \begin_layout Itemize
7533
7534 \family typewriter
7535
7536 \backslash
7537 and
7538 \end_layout
7539
7540 \begin_layout Itemize
7541
7542 \family typewriter
7543
7544 \backslash
7545 email
7546 \end_layout
7547
7548 \begin_layout Itemize
7549
7550 \family typewriter
7551
7552 \backslash
7553 appendix
7554 \end_layout
7555
7556 \begin_layout Itemize
7557
7558 \family typewriter
7559
7560 \backslash
7561 authorrunning
7562 \end_layout
7563
7564 \begin_layout Itemize
7565
7566 \family typewriter
7567
7568 \backslash
7569 inst{}
7570 \end_layout
7571
7572 \begin_layout Itemize
7573
7574 \family typewriter
7575
7576 \backslash
7577 keywords{}
7578 \end_layout
7579
7580 \begin_layout Itemize
7581
7582 \family typewriter
7583
7584 \backslash
7585 object{}
7586 \end_layout
7587
7588 \begin_layout Itemize
7589
7590 \family typewriter
7591
7592 \backslash
7593 titlerunning{}
7594 \end_layout
7595
7596 \begin_layout Standard
7597 If you want to use any of these commands, you have to enter them yourself.
7598  
7599 \series bold
7600 Do not forget to mark them as LaTeX code!
7601 \end_layout
7602
7603 \begin_layout Subsection
7604 Figure and Table Floats
7605 \end_layout
7606
7607 \begin_layout Standard
7608 LyX provides support for the necessary float environments 
7609 \family sans
7610 figure, figure*, table
7611 \family default
7612  and 
7613 \family sans
7614 table*
7615 \family default
7616 , therefore we won't tell much about it here.
7617  Refer to the 
7618 \emph on
7619 User's
7620 \begin_inset space ~
7621 \end_inset
7622
7623 Guide
7624 \emph default
7625 .
7626  Just remember that tables should be left-aligned.
7627  For that, select the table and change the alignment in 
7628 \family sans
7629 Edit\SpecialChar \menuseparator
7630 Paragraph
7631 \begin_inset space ~
7632 \end_inset
7633
7634 Settings.
7635 \end_layout
7636
7637 \begin_layout Standard
7638 There is only one special thing: the figures with caption besides the figure.
7639  To create such a figure, you have to do the following:
7640 \end_layout
7641
7642 \begin_layout Enumerate
7643 Create a wide figure float: 
7644 \family sans
7645 Insert\SpecialChar \menuseparator
7646 Float\SpecialChar \menuseparator
7647 Figure
7648 \family default
7649 , then right click in the figure and select 
7650 \family sans
7651 \bar under
7652 S
7653 \bar default
7654 pan
7655 \begin_inset space ~
7656 \end_inset
7657
7658 columns
7659 \family default
7660 .
7661 \end_layout
7662
7663 \begin_layout Enumerate
7664 Enter your caption text.
7665 \end_layout
7666
7667 \begin_layout Enumerate
7668 Press 
7669 \family sans
7670 Return
7671 \family default
7672  to move the cursor above the caption.
7673 \end_layout
7674
7675 \begin_layout Enumerate
7676 Insert your figure
7677 \end_layout
7678
7679 \begin_layout Enumerate
7680 Position the cursor behind the figure and insert a horizontal fill: 
7681 \family sans
7682 Insert\SpecialChar \menuseparator
7683 Special
7684 \begin_inset space ~
7685 \end_inset
7686
7687 Character\SpecialChar \menuseparator
7688 Horizontal
7689 \begin_inset space ~
7690 \end_inset
7691
7692 Fill
7693 \family default
7694 .
7695 \end_layout
7696
7697 \begin_layout Enumerate
7698 Switch to LaTeX mode: 
7699 \family sans
7700 M-c
7701 \begin_inset space ~
7702 \end_inset
7703
7704 t
7705 \family default
7706 .
7707 \end_layout
7708
7709 \begin_layout Enumerate
7710 Enter 
7711 \family typewriter
7712
7713 \backslash
7714 parbox[b]{55mm}{
7715 \family default
7716 .
7717  
7718 \series bold
7719 Do not close the brace!
7720 \end_layout
7721
7722 \begin_layout Enumerate
7723 Position the cursor behind the caption text, switch to LaTeX mode and insert
7724  the closing brace: 
7725 \family sans
7726 M-c
7727 \begin_inset space ~
7728 \end_inset
7729
7730 t
7731 \family default
7732  
7733 \family typewriter
7734 }
7735 \family default
7736 .
7737 \end_layout
7738
7739 \begin_layout Standard
7740 Also, refer to the figures in the example paper.
7741 \end_layout
7742
7743 \begin_layout Subsection
7744 Referee layout
7745 \end_layout
7746
7747 \begin_layout Standard
7748 For submission, the paper has to be formated in a special double-spacing
7749  layout.
7750  For this purpose, you have to give the option 
7751 \family typewriter
7752 referee
7753 \family default
7754  to the documentclass.
7755  This must be done using the extra class options field in the 
7756 \family sans
7757 Document\SpecialChar \menuseparator
7758 Settings
7759 \family default
7760  dialog.
7761  Just enter the string 
7762 \family typewriter
7763 referee
7764 \family default
7765  there.
7766 \end_layout
7767
7768 \begin_layout Subsection
7769 The example paper
7770 \end_layout
7771
7772 \begin_layout Standard
7773 The 
7774 \family sans
7775 Examples
7776 \family default
7777  directory contains an example paper written with LyX.
7778  It is the example paper from the original macro package, translated to
7779  LyX.
7780  Use it for inspiration, and compare the original LaTeX code with LyX way
7781  of writing.
7782 \end_layout
7783
7784 \begin_layout Section
7785 AASTeX
7786 \end_layout
7787
7788 \begin_layout Standard
7789 by 
7790 \noun on
7791 Mike Ressler
7792 \end_layout
7793
7794 \begin_layout Subsection
7795 Introduction
7796 \end_layout
7797
7798 \begin_layout Standard
7799 AASTeX is a set of macros produced by the American Astronomical Society
7800  to facilitate electronic manuscript submission to the three journals they
7801  publish: the Astrophysical Journal (including the Letters and Supplement),
7802  the Astronomical Journal, and the Publications of the Astronomical Society
7803  of the Pacific.
7804  LyX has proven to be an excellent tool for generating these documents,
7805  especially given its equation, citation, and figure handling capabilities.
7806  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7807  is the version described here, or higher.
7808  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7809  incompatible with LyX.
7810  The AASTeX package may be downloaded from the AASTeX Web site
7811 \end_layout
7812
7813 \begin_layout Standard
7814 \begin_inset VSpace medskip
7815 \end_inset
7816
7817
7818 \end_layout
7819
7820 \begin_layout Standard
7821 \align center
7822 \begin_inset Flex URL
7823 status collapsed
7824
7825 \begin_layout Plain Layout
7826
7827 http://www.journals.uchicago.edu/AAS/AASTeX
7828 \end_layout
7829
7830 \end_inset
7831
7832
7833 \end_layout
7834
7835 \begin_layout Standard
7836 \begin_inset VSpace medskip
7837 \end_inset
7838
7839
7840 \end_layout
7841
7842 \begin_layout Standard
7843 A complete user guide is contained in that package and you should familiarize
7844  yourself with it thoroughly before embarking on writing a paper in LyX.
7845  LyX will not reduce the need to figure out all the AASTeX commands, it
7846  will only reduce the drudgery of typing everything in.
7847  It is your responsibility to ensure that the final exported LaTeX document
7848  conforms completely to the requirements of the journal to which you are
7849  submitting your paper.
7850 \end_layout
7851
7852 \begin_layout Subsection
7853 Starting a New Paper
7854 \end_layout
7855
7856 \begin_layout Standard
7857 I strongly suggest that you start with the AASTeX template file.
7858  Click on 
7859 \family sans
7860 File\SpecialChar \menuseparator
7861 New from
7862 \family default
7863  
7864 \family sans
7865 Template
7866 \family default
7867 , enter the new file name, then choose the 
7868 \family typewriter
7869 aastex.lyx
7870 \family default
7871  template.
7872  This will show the most common fields found in a manuscript.
7873  Simply overwrite the existing text (including the brackets, 
7874 \family typewriter
7875 <>
7876 \family default
7877 ) with the correct information.
7878  Many of the AASTeX commands and environments can be implemented directly
7879  in LyX, but some cannot: most noticeably 
7880 \family typewriter
7881
7882 \backslash
7883 altaffilmark
7884 \family default
7885  and 
7886 \family typewriter
7887
7888 \backslash
7889 altaffiltext
7890 \family default
7891 , which should stick out like a sore thumb if you actually just opened the
7892  template file.
7893  For commands such as these, the LaTeX code must be entered directly and
7894  marked as such.
7895  Such commands are referred to as TeX code, or Evil Red Text.
7896  I tried to minimize the amount of TeX code needed in an AASTeX document,
7897  but there is still a bit more required than any of us would like.
7898 \end_layout
7899
7900 \begin_layout Subsection
7901 Finishing Your Paper
7902 \end_layout
7903
7904 \begin_layout Standard
7905 When the paper is finished to your satisfaction and previews/prints correctly,
7906  there are a few 
7907 \begin_inset Quotes eld
7908 \end_inset
7909
7910 postprocessing
7911 \begin_inset Quotes erd
7912 \end_inset
7913
7914  actions which need to be done before you submit it to the journals.
7915  
7916 \end_layout
7917
7918 \begin_layout Enumerate
7919 Export your paper as a LaTeX file (
7920 \family sans
7921 File\SpecialChar \menuseparator
7922 Export\SpecialChar \menuseparator
7923 LaTeX
7924 \family default
7925 ).
7926  
7927 \end_layout
7928
7929 \begin_layout Enumerate
7930 Edit the resulting 
7931 \family typewriter
7932 .tex
7933 \family default
7934  file with your favorite text editor
7935 \end_layout
7936
7937 \begin_deeper
7938 \begin_layout Enumerate
7939 remove the comment lines before the 
7940 \family typewriter
7941
7942 \backslash
7943 documentclass
7944 \family default
7945  command
7946 \end_layout
7947
7948 \begin_layout Enumerate
7949 remove the 
7950 \family typewriter
7951
7952 \backslash
7953 usepackage...{fontenc}
7954 \family default
7955  line if it appears (usually just after 
7956 \family typewriter
7957
7958 \backslash
7959 documentclass
7960 \family default
7961 }; also remove the 
7962 \family typewriter
7963
7964 \backslash
7965 secnumdepth
7966 \family default
7967  line if it appears.
7968 \end_layout
7969
7970 \begin_layout Enumerate
7971 remove everything between (and including) the 
7972 \family typewriter
7973
7974 \backslash
7975 makeatletter
7976 \family default
7977  and 
7978 \family typewriter
7979
7980 \backslash
7981 makeatother
7982 \family default
7983  commands, except for any commands you specifically put into the LaTeX preamble
7984  (which should appear immediately after the 
7985 \begin_inset Quotes eld
7986 \end_inset
7987
7988 User specified LaTeX commands
7989 \begin_inset Quotes erd
7990 \end_inset
7991
7992  comment in the 
7993 \family typewriter
7994 .tex
7995 \family default
7996  file).
7997 \end_layout
7998
7999 \end_deeper
8000 \begin_layout Enumerate
8001 Run the resulting file through LaTeX to make sure it still processes correctly.
8002 \end_layout
8003
8004 \begin_layout Enumerate
8005 Reread the journal requirements to make sure your filenames and formats
8006  are correct.
8007 \end_layout
8008
8009 \begin_layout Enumerate
8010 Submit it.
8011 \end_layout
8012
8013 \begin_layout Subsection
8014 Comments On Specific Commands
8015 \end_layout
8016
8017 \begin_layout Standard
8018 I will not describe the detailed usage of the individual AASTeX commands:
8019  the AASTeX User Guide (
8020 \family typewriter
8021 aasguide.tex
8022 \family default
8023 ) gives a good description of each.
8024  Thus it's probably easiest for me to go down the list as found in the guide
8025  and offer comments where necessary.
8026  So let's begin \SpecialChar \ldots{}
8027
8028 \end_layout
8029
8030 \begin_layout Subsubsection
8031 Things that work as expected
8032 \end_layout
8033
8034 \begin_layout Standard
8035 Because they work as you might expect, I simply list them and the section
8036  they are found in: 
8037 \family typewriter
8038
8039 \backslash
8040 documentclass
8041 \family default
8042  (2.1.1), 
8043 \family typewriter
8044
8045 \backslash
8046 begin{document}
8047 \family default
8048  (2.2), 
8049 \family typewriter
8050
8051 \backslash
8052 title
8053 \family default
8054  (2.3), 
8055 \family typewriter
8056
8057 \backslash
8058 author
8059 \family default
8060  (2.3), 
8061 \family typewriter
8062
8063 \backslash
8064 affil
8065 \family default
8066  (2.3), 
8067 \family typewriter
8068
8069 \backslash
8070 abstract
8071 \family default
8072  (2.4), 
8073 \family typewriter
8074
8075 \backslash
8076 keywords
8077 \family default
8078  (2.5), 
8079 \family typewriter
8080
8081 \backslash
8082 section
8083 \family default
8084  (2.7), 
8085 \family typewriter
8086
8087 \backslash
8088 subsection
8089 \family default
8090  (2.7), 
8091 \family typewriter
8092
8093 \backslash
8094 subsubsection
8095 \family default
8096  (2.7), 
8097 \family typewriter
8098
8099 \backslash
8100 paragraph
8101 \family default
8102  (2.7), 
8103 \family typewriter
8104
8105 \backslash
8106 facility
8107 \family default
8108  (2.10), 
8109 \family typewriter
8110
8111 \backslash
8112 begin{displaymath}
8113 \family default
8114  (2.12), 
8115 \family typewriter
8116
8117 \backslash
8118 begin{equation}
8119 \family default
8120  (2.12), 
8121 \family typewriter
8122
8123 \backslash
8124 begin{eqnarray}
8125 \family default
8126  (2.12), 
8127 \family typewriter
8128
8129 \backslash
8130 begin{mathletters}
8131 \family default
8132  (2.12), 
8133 \family typewriter
8134
8135 \backslash
8136 begin{thebibliography}
8137 \family default
8138  (2.13.1), 
8139 \family typewriter
8140
8141 \backslash
8142 bibitem
8143 \family default
8144  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8145  graphicx figure commands (2.14.1), 
8146 \family typewriter
8147
8148 \backslash
8149 begin{table}
8150 \family default
8151  (2.15.4), 
8152 \family typewriter
8153
8154 \backslash
8155 begin{tabular}
8156 \family default
8157  (2.15.4), 
8158 \family typewriter
8159
8160 \backslash
8161 caption
8162 \family default
8163  (2.15.4), 
8164 \family typewriter
8165
8166 \backslash
8167 label
8168 \family default
8169  (2.15.4, amongst other places), 
8170 \family typewriter
8171
8172 \backslash
8173 tablerefs
8174 \family default
8175  (2.15.5), 
8176 \family typewriter
8177
8178 \backslash
8179 tablecomments
8180 \family default
8181  (2.15.5), 
8182 \family typewriter
8183
8184 \backslash
8185 url
8186 \family default
8187  (2.17.4), 
8188 \family typewriter
8189
8190 \backslash
8191 end{document}
8192 \family default
8193  (2.18).
8194 \end_layout
8195
8196 \begin_layout Standard
8197 The following style options also work correctly: 
8198 \family typewriter
8199 longabstract
8200 \family default
8201  (2.4), 
8202 \family typewriter
8203 preprint
8204 \family default
8205  (3.2.1), 
8206 \family typewriter
8207 preprint2
8208 \family default
8209  (3.2.2), 
8210 \family typewriter
8211 eqsecnum
8212 \family default
8213  (3.3), 
8214 \family typewriter
8215 flushrt
8216 \family default
8217  (3.4).
8218  Simply put them in the 
8219 \family sans
8220 Options
8221 \family default
8222  box in 
8223 \family sans
8224 Layout\SpecialChar \menuseparator
8225 Document
8226 \family default
8227 .
8228 \end_layout
8229
8230 \begin_layout Subsubsection
8231 Things that work, but require more comment
8232 \end_layout
8233
8234 \begin_layout Standard
8235 The following items work, but require a little more discussion:
8236 \end_layout
8237
8238 \begin_layout Itemize
8239 These items are reserved for use by the journal editors, but you can put
8240  them into the LaTeX preamble if you feel compelled to do so: 
8241 \family typewriter
8242
8243 \backslash
8244 received
8245 \family default
8246
8247 \family typewriter
8248
8249 \backslash
8250 revised
8251 \family default
8252
8253 \family typewriter
8254
8255 \backslash
8256 accepted
8257 \family default
8258
8259 \family typewriter
8260
8261 \backslash
8262 ccc
8263 \family default
8264
8265 \family typewriter
8266
8267 \backslash
8268 cpright
8269 \family default
8270  (all from 2.1.3)
8271 \end_layout
8272
8273 \begin_layout Itemize
8274 These items may be placed in the LaTeX preamble, and are included as blanks
8275  in the template file: 
8276 \family typewriter
8277
8278 \backslash
8279 slugcomment
8280 \family default
8281  (2.1.4), 
8282 \family typewriter
8283
8284 \backslash
8285 shorttitle
8286 \family default
8287  (2.1.5), 
8288 \family typewriter
8289
8290 \backslash
8291 shortauthors
8292 \family default
8293  (2.1.5)
8294 \end_layout
8295
8296 \begin_layout Itemize
8297
8298 \family typewriter
8299
8300 \backslash
8301 email
8302 \family default
8303  (2.3) – can only be used 
8304 \begin_inset Quotes eld
8305 \end_inset
8306
8307 standalone
8308 \begin_inset Quotes erd
8309 \end_inset
8310
8311 , not in the middle of a paragraph.
8312  Use TeX code if you need to embed it.
8313 \end_layout
8314
8315 \begin_layout Itemize
8316
8317 \family typewriter
8318
8319 \backslash
8320 and
8321 \family default
8322  (2.3) – will have extra {} after it.
8323  This should not cause an error.
8324 \end_layout
8325
8326 \begin_layout Itemize
8327
8328 \family typewriter
8329
8330 \backslash
8331 notetoeditor
8332 \family default
8333  (2.6) – can only be used 
8334 \begin_inset Quotes eld
8335 \end_inset
8336
8337 standalone
8338 \begin_inset Quotes erd
8339 \end_inset
8340
8341 , not in the middle of a paragraph.
8342  Use TeX code if you need to embed it.
8343 \end_layout
8344
8345 \begin_layout Itemize
8346
8347 \family typewriter
8348
8349 \backslash
8350 placetable
8351 \family default
8352  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8353  hand
8354 \end_layout
8355
8356 \begin_layout Itemize
8357
8358 \family typewriter
8359
8360 \backslash
8361 placefigure
8362 \family default
8363  (2.8) – same as for 
8364 \family typewriter
8365
8366 \backslash
8367 placetable
8368 \end_layout
8369
8370 \begin_layout Itemize
8371
8372 \family typewriter
8373
8374 \backslash
8375 acknowledgements
8376 \family default
8377  (2.9) – will have extra {} after it.
8378  This should not cause an error.
8379 \end_layout
8380
8381 \begin_layout Itemize
8382
8383 \family typewriter
8384
8385 \backslash
8386 appendix
8387 \family default
8388  (2.11) – will have extra {} after it.
8389  This should not cause an error.
8390 \end_layout
8391
8392 \begin_layout Itemize
8393
8394 \family typewriter
8395
8396 \backslash
8397 figcaption
8398 \family default
8399  (2.14.2) – you can insert an optional filename argument by placing the cursor
8400  at the beginning of the text and selecting 
8401 \family sans
8402 Insert\SpecialChar \menuseparator
8403 Short Title
8404 \family default
8405 .
8406  
8407 \begin_inset Quotes eld
8408 \end_inset
8409
8410 Short Title
8411 \begin_inset Quotes erd
8412 \end_inset
8413
8414  inserts an optional argument of the type needed by 
8415 \family typewriter
8416
8417 \backslash
8418 figcaption
8419 \family default
8420 .
8421  Hopefully it will be renamed someday.
8422 \end_layout
8423
8424 \begin_layout Itemize
8425
8426 \family typewriter
8427
8428 \backslash
8429 objectname
8430 \family default
8431  (2.17.1) – same as 
8432 \family typewriter
8433
8434 \backslash
8435 figcaption
8436 \family default
8437  for the catalog ID optional parameter
8438 \end_layout
8439
8440 \begin_layout Itemize
8441
8442 \family typewriter
8443
8444 \backslash
8445 dataset
8446 \family default
8447  (2.17.1) – same as 
8448 \family typewriter
8449
8450 \backslash
8451 figcaption
8452 \family default
8453  for the catalog ID optional parameter
8454 \end_layout
8455
8456 \begin_layout Subsubsection
8457 Things not implemented, use TeX code
8458 \end_layout
8459
8460 \begin_layout Standard
8461
8462 \family typewriter
8463
8464 \backslash
8465 altaffilmark
8466 \family default
8467  (2.3), 
8468 \family typewriter
8469
8470 \backslash
8471 altaffiltext
8472 \family default
8473  (2.3), 
8474 \family typewriter
8475
8476 \backslash
8477 eqnum
8478 \family default
8479  (2.12), 
8480 \family typewriter
8481
8482 \backslash
8483 setcounter{equation}
8484 \family default
8485  (2.12), Journal name abbreviations (2.13.4), 
8486 \family typewriter
8487
8488 \backslash
8489 figurenum
8490 \family default
8491  (2.14.1), 
8492 \family typewriter
8493
8494 \backslash
8495 epsscale
8496 \family default
8497  (2.14.1), 
8498 \family typewriter
8499
8500 \backslash
8501 plotone
8502 \family default
8503  (2.14.1), 
8504 \family typewriter
8505
8506 \backslash
8507 plottwo
8508 \family default
8509  (2.14.1), 
8510 \family typewriter
8511
8512 \backslash
8513 tablenum
8514 \family default
8515  (2.15.4), 
8516 \family typewriter
8517
8518 \backslash
8519 tableline
8520 \family default
8521  (2.15.4, insert it as the first element in the lefthand cell after where
8522  you want it.
8523  Don't use any of LyX's rules in the table), 
8524 \family typewriter
8525
8526 \backslash
8527 tablenotemark
8528 \family default
8529  (2.15.5), 
8530 \family typewriter
8531
8532 \backslash
8533 tablenotetext
8534 \family default
8535  (2.15.5), much of Misc (2.17, except 
8536 \family typewriter
8537
8538 \backslash
8539 objectname
8540 \family default
8541
8542 \family typewriter
8543
8544 \backslash
8545 dataset
8546 \family default
8547
8548 \family typewriter
8549
8550 \backslash
8551 url
8552 \family default
8553 , and 
8554 \family typewriter
8555
8556 \backslash
8557 email
8558 \family default
8559 ; see above), 
8560 \family typewriter
8561
8562 \backslash
8563 singlespace
8564 \family default
8565  (3.1), 
8566 \family typewriter
8567
8568 \backslash
8569 doublespace
8570 \family default
8571  (3.1), 
8572 \family typewriter
8573
8574 \backslash
8575 onecolumn
8576 \family default
8577  (3.2), 
8578 \family typewriter
8579
8580 \backslash
8581 twocolumn
8582 \family default
8583  (3.2)
8584 \end_layout
8585
8586 \begin_layout Subsubsection
8587 Things that cannot be implemented
8588 \end_layout
8589
8590 \begin_layout Standard
8591 \SpecialChar \ldots{}
8592  at least in any meaningful sort of way, so I suggest ignoring them.
8593  They are the references environment (2.13.3), and the deluxetable environment
8594  (2.15).
8595  If you really, really need to use deluxetable, I suggest editing it in
8596  a separate file with a text editor, then using 
8597 \family sans
8598 Insert\SpecialChar \menuseparator
8599 Child
8600 \begin_inset space ~
8601 \end_inset
8602
8603 Document
8604 \family default
8605  to include it in your LyX document.
8606  See the 
8607 \family typewriter
8608 aas_sample.lyx
8609 \family default
8610  file to see an example of this.
8611 \end_layout
8612
8613 \begin_layout Subsection
8614 FAQs, Tips, Tricks, and Other Ruminations
8615 \end_layout
8616
8617 \begin_layout Subsubsection
8618 Getting LyX and AASTeX to cooperate
8619 \end_layout
8620
8621 \begin_layout Standard
8622 It can be a bit tricky to get LyX to recognize a new layout and document
8623  class.
8624  When all else fails, do this:
8625 \end_layout
8626
8627 \begin_layout Enumerate
8628 Make certain that LaTeX can find AASTeX.
8629  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8630  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8631 \family typewriter
8632 sample.tex
8633 \family default
8634 .
8635 \end_layout
8636
8637 \begin_layout Enumerate
8638 Make certain that 
8639 \family typewriter
8640 aastex.layout
8641 \family default
8642  appears in LyX's 
8643 \family typewriter
8644 layouts
8645 \family default
8646  folder
8647 \end_layout
8648
8649 \begin_layout Enumerate
8650 Rerun 
8651 \family sans
8652 Tools\SpecialChar \menuseparator
8653 Reconfigure
8654 \family default
8655  in LyX, then restart LyX.
8656 \end_layout
8657
8658 \begin_layout Enumerate
8659 Open a regular new file, not from a template.
8660  Does AASTeX appear in the class list in 
8661 \family sans
8662 Document\SpecialChar \menuseparator
8663 Settings
8664 \family default
8665 ?
8666 \end_layout
8667
8668 \begin_layout Standard
8669 If you get a warning from an existing AASTeX document about not being able
8670  to find the AASTeX layout or a message about 
8671 \begin_inset Quotes eld
8672 \end_inset
8673
8674 You should not mix title layouts with normal ones
8675 \begin_inset Quotes erd
8676 \end_inset
8677
8678 , things haven't been installed correctly.
8679 \end_layout
8680
8681 \begin_layout Subsubsection
8682 LaTeX error processing a table 
8683 \end_layout
8684
8685 \begin_layout Standard
8686 LyX, by default, attempts to center the table caption/title.
8687  This seems to produce a bad interaction in AASTeX so you should click somewhere
8688  in the caption/title, then select 
8689 \family sans
8690 Edit\SpecialChar \menuseparator
8691 Paragraph
8692 \begin_inset space ~
8693 \end_inset
8694
8695 Settings
8696 \family default
8697 , then set the 
8698 \family sans
8699 Alignment
8700 \family default
8701  to 
8702 \family sans
8703 Block
8704 \family default
8705 .
8706  This took care of it for me.
8707 \end_layout
8708
8709 \begin_layout Subsubsection
8710 References
8711 \end_layout
8712
8713 \begin_layout Standard
8714 A couple of things: 1) I have noticed some funny spacing in the reference
8715  entries in the text.
8716  When you enter the bibliography item data, make sure their is 
8717 \emph on
8718 no
8719 \emph default
8720  space between the last author and the parenthesis setting off the year;
8721  
8722 \emph on
8723 e.
8724 \begin_inset space \thinspace{}
8725 \end_inset
8726
8727 g.
8728 \begin_inset space \space{}
8729 \end_inset
8730
8731
8732 \emph default
8733 type 
8734 \family typewriter
8735 Ressler(1992)
8736 \family default
8737 , not 
8738 \family typewriter
8739 Ressler (1992)
8740 \family default
8741 .
8742  2) Entering the references at all is not obvious.
8743  The easiest thing is to start typing your first reference at the end of
8744  the document, then mark it as type 
8745 \family sans
8746 References
8747 \family default
8748 .
8749  That will put a small gray box in front of what you just typed.
8750  Click on the box to fill in the rest of the information.
8751  For new references, go to the end of an existing reference and press return.
8752  That will create a new line with its own box, etc.
8753 \end_layout
8754
8755 \begin_layout Subsubsection
8756 Including EPS files
8757 \end_layout
8758
8759 \begin_layout Standard
8760 Even though AASTeX provides its own figure commands (
8761 \family typewriter
8762
8763 \backslash
8764 plotone
8765 \family default
8766 , for example), I much prefer LaTeX's standard figure commands (with the
8767  default graphicx).
8768  You can insert the 
8769 \family typewriter
8770
8771 \backslash
8772 plotone
8773 \family default
8774 , etc.
8775 \begin_inset space ~
8776 \end_inset
8777
8778 commands as TeX code into a Figure Float box if you desire, but I never
8779  have much luck getting the layout right.
8780  With the standard graphics, LyX will insert a 
8781 \family typewriter
8782
8783 \backslash
8784 usepackage{graphicx}
8785 \family default
8786  command into the LaTeX preamble and handle the figures in the standard
8787  LaTeX2e way, interspersing the figures in the text.
8788  I believe ApJ accepts figures exactly this way now; AJ might still use
8789  the 
8790 \begin_inset Quotes eld
8791 \end_inset
8792
8793 stack everything at the end
8794 \begin_inset Quotes erd
8795 \end_inset
8796
8797  technique.
8798 \end_layout
8799
8800 \begin_layout Subsubsection
8801 Things I could have done, but didn't
8802 \end_layout
8803
8804 \begin_layout Standard
8805 There are a few 
8806 \begin_inset Quotes eld
8807 \end_inset
8808
8809 pretty
8810 \begin_inset Quotes erd
8811 \end_inset
8812
8813  things I could have implemented, but chose not to.
8814  For instance, I saw no point in double-spacing the text in the LyX window,
8815  even though it is double-spaced in the paper manuscript.
8816  Also, I chose not to make separate layouts for the preprint and preprint2
8817  styles.
8818  Since I assume you will spend most of your time in the plain manuscript
8819  mode anyway, I decided not to chew up more disk space with this.
8820  
8821 \end_layout
8822
8823 \begin_layout Subsection
8824 Final Caveat
8825 \end_layout
8826
8827 \begin_layout Standard
8828 Your mileage may vary.
8829  I've now had papers published by both ApJ and AJ that have had 98% of the
8830  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8831  cleanups.
8832  I have had no trouble with the submission process, and I'm sure the journals
8833  were never aware that there might be a difference.
8834  So, go forth and publish!
8835 \end_layout
8836
8837 \begin_layout Section
8838 AMS LaTeX
8839 \end_layout
8840
8841 \begin_layout Standard
8842 by 
8843 \noun on
8844 David Johnson
8845 \noun default
8846 ; updated by 
8847 \noun on
8848 Richard Heck
8849 \end_layout
8850
8851 \begin_layout Standard
8852 \begin_inset VSpace bigskip
8853 \end_inset
8854
8855
8856 \end_layout
8857
8858 \begin_layout Standard
8859 \noindent
8860 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8861  papers to be submitted to American Mathematical Society publications.
8862  The layouts are not tailored to a specific journal, but easily can be.
8863  You should refer to the AMS documentation for specific instructions for
8864  each journal (usually it will entail only changing a single line in the
8865  TeX output).
8866  That documentation is available on the Web at 
8867 \begin_inset Flex URL
8868 status open
8869
8870 \begin_layout Plain Layout
8871
8872 http://www.ams.org
8873 \end_layout
8874
8875 \end_inset
8876
8877  or by ftp at 
8878 \begin_inset Flex URL
8879 status open
8880
8881 \begin_layout Plain Layout
8882
8883 ftp://ftp.ams.org/pub/tex/amslatex/
8884 \end_layout
8885
8886 \end_inset
8887
8888 .
8889  These layouts are appropriate, and useful, for any mathematical writing.
8890  
8891 \end_layout
8892
8893 \begin_layout Standard
8894 There are two basic AMS LaTeX layouts: 
8895 \end_layout
8896
8897 \begin_layout Itemize
8898 amsart: The standard AMS article format.
8899 \end_layout
8900
8901 \begin_layout Itemize
8902 amsbook: the standard AMS book (really, monograph) format.
8903  
8904 \end_layout
8905
8906 \begin_layout Standard
8907 The layouts themselves contain only the minimum necessary to use the AMS
8908  classes.
8909  They do not, in particular, contain any of the `theorem' environments used
8910  for setting theorems, lemmas, and the like.
8911  These are contained, instead, in the 
8912 \begin_inset Flex Code
8913 status collapsed
8914
8915 \begin_layout Plain Layout
8916 Theorems (AMS)
8917 \end_layout
8918
8919 \end_inset
8920
8921  module, which is loaded by default when when you select one of the AMS
8922  classes.
8923  (It can also be used with other classes and can be removed, if you would
8924  rather use something else.) Less commonly used environments are in the 
8925 \begin_inset Flex Code
8926 status collapsed
8927
8928 \begin_layout Plain Layout
8929 Theorems (AMS-Extended)
8930 \end_layout
8931
8932 \end_inset
8933
8934  module, which must be loaded manually.
8935 \end_layout
8936
8937 \begin_layout Standard
8938 By default, theorems and the like are numbered consecutively throughout
8939  the document, but this may be modified by loading the module 
8940 \begin_inset Flex Code
8941 status collapsed
8942
8943 \begin_layout Plain Layout
8944 Theorems (Order by Section)
8945 \end_layout
8946
8947 \end_inset
8948
8949  or, if you are using 
8950 \begin_inset Flex Code
8951 status collapsed
8952
8953 \begin_layout Plain Layout
8954 book (AMS)
8955 \end_layout
8956
8957 \end_inset
8958
8959 , the module 
8960 \begin_inset Flex Code
8961 status collapsed
8962
8963 \begin_layout Plain Layout
8964 Theorems (Order by Chapter)
8965 \end_layout
8966
8967 \end_inset
8968
8969 .
8970  These will number the results as 
8971 \begin_inset Formula $n.m$
8972 \end_inset
8973
8974 , where the first number refers to the section (or chapter) and the second
8975  refers to the total number of results so far in that section (or chapter).
8976  Many environments are also available unnumbered.
8977  These are indicated by an asterisk at the end.
8978  If you happen to want 
8979 \emph on
8980 only
8981 \emph default
8982  unnumbered results, the module 
8983 \begin_inset Flex Code
8984 status collapsed
8985
8986 \begin_layout Plain Layout
8987 Theorems (Starred)
8988 \end_layout
8989
8990 \end_inset
8991
8992  provides that option.
8993 \end_layout
8994
8995 \begin_layout Standard
8996 Note that these modules do not 
8997 \emph on
8998 have
8999 \emph default
9000  to be used with the AMS classes.
9001  It is perfectly possible to use the 
9002 \begin_inset Flex Code
9003 status collapsed
9004
9005 \begin_layout Plain Layout
9006 Theorems (AMS)
9007 \end_layout
9008
9009 \end_inset
9010
9011  module, and the others mentioned, with other classes, such as 
9012 \begin_inset Flex Code
9013 status collapsed
9014
9015 \begin_layout Plain Layout
9016 article
9017 \end_layout
9018
9019 \end_inset
9020
9021
9022 \begin_inset Flex Code
9023 status collapsed
9024
9025 \begin_layout Plain Layout
9026 report
9027 \end_layout
9028
9029 \end_inset
9030
9031
9032 \begin_inset Flex Code
9033 status collapsed
9034
9035 \begin_layout Plain Layout
9036 book (KOMA-script)
9037 \end_layout
9038
9039 \end_inset
9040
9041 , and so forth.
9042 \end_layout
9043
9044 \begin_layout Subsection
9045 What these layouts provide
9046 \end_layout
9047
9048 \begin_layout Standard
9049 There is a long list of included environments provided by these layouts.
9050  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9051  variety of `theorem' environments.
9052  However, the AMS recommends the environments that are available in LyX.
9053  
9054 \end_layout
9055
9056 \begin_layout Standard
9057 The following environments—as well as the standard environments, such as
9058  
9059 \begin_inset Flex Noun
9060 status collapsed
9061
9062 \begin_layout Plain Layout
9063 section
9064 \end_layout
9065
9066 \end_inset
9067
9068
9069 \begin_inset Flex Noun
9070 status collapsed
9071
9072 \begin_layout Plain Layout
9073 bibliography
9074 \end_layout
9075
9076 \end_inset
9077
9078
9079 \begin_inset Flex Noun
9080 status collapsed
9081
9082 \begin_layout Plain Layout
9083 title
9084 \end_layout
9085
9086 \end_inset
9087
9088
9089 \begin_inset Flex Noun
9090 status collapsed
9091
9092 \begin_layout Plain Layout
9093 author
9094 \end_layout
9095
9096 \end_inset
9097
9098 , and 
9099 \begin_inset Flex Noun
9100 status collapsed
9101
9102 \begin_layout Plain Layout
9103 date
9104 \end_layout
9105
9106 \end_inset
9107
9108 —are provided by 
9109 \begin_inset Flex Code
9110 status collapsed
9111
9112 \begin_layout Plain Layout
9113 article (AMS)
9114 \end_layout
9115
9116 \end_inset
9117
9118  and 
9119 \begin_inset Flex Code
9120 status collapsed
9121
9122 \begin_layout Plain Layout
9123 book (AMS)
9124 \end_layout
9125
9126 \end_inset
9127
9128 :
9129 \end_layout
9130
9131 \begin_layout Description
9132 Address This should be the author's permanent address.
9133 \end_layout
9134
9135 \begin_layout Description
9136 Current
9137 \begin_inset space ~
9138 \end_inset
9139
9140 Address This should be the author's temporary address at the time of submission,
9141  if different from the Address.
9142 \end_layout
9143
9144 \begin_layout Description
9145 Email Author's e-mail address
9146 \end_layout
9147
9148 \begin_layout Description
9149 URL Author's Web address, if desired.
9150 \end_layout
9151
9152 \begin_layout Description
9153 Keywords Key words or phrases used to identify specific topics discussed
9154  in the paper.
9155 \end_layout
9156
9157 \begin_layout Description
9158 Subjectclass These refer to the AMS Subject Classifications, published and
9159  described in 
9160 \emph on
9161 Mathematical Reviews
9162 \emph default
9163 .
9164  These are also available online at the AMS cites listed above.
9165 \end_layout
9166
9167 \begin_layout Description
9168 Thanks
9169 \end_layout
9170
9171 \begin_layout Description
9172 Dedicatory
9173 \end_layout
9174
9175 \begin_layout Description
9176 Translator
9177 \end_layout
9178
9179 \begin_layout Standard
9180 The following environments are provided by both the 
9181 \begin_inset Flex Code
9182 status collapsed
9183
9184 \begin_layout Plain Layout
9185 Theorems
9186 \end_layout
9187
9188 \end_inset
9189
9190  and 
9191 \begin_inset Flex Code
9192 status collapsed
9193
9194 \begin_layout Plain Layout
9195 Theorems (AMS)
9196 \end_layout
9197
9198 \end_inset
9199
9200  modules, in the latter case in both starred (unnumbered) and unstarred
9201  (numbered) versions.
9202  These same environments are provided only in the starred versions by the
9203  
9204 \begin_inset Flex Code
9205 status collapsed
9206
9207 \begin_layout Plain Layout
9208 Theorems (Starred)
9209 \end_layout
9210
9211 \end_inset
9212
9213  module:
9214 \end_layout
9215
9216 \begin_layout Theorem
9217 This is typically used for the statements of major results.
9218  
9219 \end_layout
9220
9221 \begin_layout Corollary*
9222 This is used for statements which follow fairly directly from previous statement
9223 s.
9224  Again, these can be major results.
9225  
9226 \end_layout
9227
9228 \begin_layout Lemma
9229 These are smaller results needed to prove other statements.
9230 \end_layout
9231
9232 \begin_layout Proposition
9233 These are less major results which (hopefully) add to the general theory
9234  being discussed.
9235 \end_layout
9236
9237 \begin_layout Conjecture
9238 These are statements provided without justification, which the author does
9239  not know how to prove, but which seem to be true (to the author, at least).
9240 \end_layout
9241
9242 \begin_layout Definition*
9243 Guess what this is for.
9244  The font is different for this environment than for the previous ones.
9245  
9246 \end_layout
9247
9248 \begin_layout Example*
9249 Used for examples illustrating proven results.
9250 \end_layout
9251
9252 \begin_layout Problem
9253 It's not really known what this is for.
9254  You should figure it out.
9255 \end_layout
9256
9257 \begin_layout Exercise*
9258 Write a description for this one.
9259 \end_layout
9260
9261 \begin_layout Remark
9262 This environment is also a type of theorem, usually a lesser sort of observation.
9263 \end_layout
9264
9265 \begin_layout Claim*
9266 Often used in the course of giving a proof of a larger result.
9267 \end_layout
9268
9269 \begin_layout Case
9270 Generally, these are used to break up long arguments, using specific instances
9271  of some condition.
9272  
9273 \end_layout
9274
9275 \begin_layout Case
9276 The numbering scheme for cases is on its own, not together with other numbered
9277  statements.
9278  
9279 \end_layout
9280
9281 \begin_layout Proof
9282 At the end of this environment, a QED symbol (usually a square, but it can
9283  vary with different styles) is placed.
9284  If you want to have other environments within this one—for example, Case
9285  environments—and have the QED symbol appear only after them, then the other
9286  environments need to be nested within the proof environment.
9287  See the section 
9288 \emph on
9289 Nesting Environments
9290 \emph default
9291  of the 
9292 \emph on
9293 User's Guide
9294 \emph default
9295  for information on nesting.
9296 \end_layout
9297
9298 \begin_layout Standard
9299 And these environments are provided by 
9300 \begin_inset Flex Code
9301 status collapsed
9302
9303 \begin_layout Plain Layout
9304 Theorems (AMS-Extended)
9305 \end_layout
9306
9307 \end_inset
9308
9309 :
9310 \end_layout
9311
9312 \begin_layout Criterion*
9313 A required condition.
9314 \end_layout
9315
9316 \begin_layout Algorithm*
9317 A general procedure to be used.
9318 \end_layout
9319
9320 \begin_layout Axiom*
9321 This is a property or statement taken as true within the system being discussed.
9322 \end_layout
9323
9324 \begin_layout Condition*
9325 Sometimes used to state a condition assumed within the present context of
9326  discussion.
9327 \end_layout
9328
9329 \begin_layout Note*
9330 Similar to a Remark.
9331 \end_layout
9332
9333 \begin_layout Notation*
9334 Used for the explanation of, yes, notation.
9335 \end_layout
9336
9337 \begin_layout Summary
9338 Do we really need to tell you? 
9339 \end_layout
9340
9341 \begin_layout Acknowledgement*
9342 Acknowledgement.
9343 \end_layout
9344
9345 \begin_layout Conclusion*
9346 Sometimes used at the end of a long train of argument.
9347 \end_layout
9348
9349 \begin_layout Fact
9350 Used in a way similar to Proposition, though perhaps lower on the scale.
9351 \end_layout
9352
9353 \begin_layout Standard
9354 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9355  fonts packages.
9356  They need to be available on your system in order to use these environments.
9357 \end_layout
9358
9359 \begin_layout Section
9360 AGU journals (
9361 \family sans
9362 aguplus
9363 \family default
9364 )
9365 \end_layout
9366
9367 \begin_layout Standard
9368 by 
9369 \shape smallcaps
9370 Martin Vermeer
9371 \end_layout
9372
9373 \begin_layout Subsection
9374 Description
9375 \end_layout
9376
9377 \begin_layout Standard
9378 These are the layout files for some of the journals of the American Geophysical
9379  Society.
9380  It is assumed that you have both the AGU's own class files and AGUplus
9381  installed (everything to be found at
9382 \begin_inset Flex URL
9383 status collapsed
9384
9385 \begin_layout Plain Layout
9386
9387 ftp://ftp.agu.org/journals/latex/journals
9388 \end_layout
9389
9390 \end_inset
9391
9392 ).
9393 \end_layout
9394
9395 \begin_layout Subsection
9396 New styles
9397 \end_layout
9398
9399 \begin_layout Standard
9400 Redefined are 
9401 \family sans
9402 Paragraph
9403 \family default
9404
9405 \family sans
9406 Paragraph*
9407 \family default
9408 .
9409  They are still called this in the LyX GUI, though their LaTeX equivalents
9410  in the AGU classes are 
9411 \family sans
9412 Subsubsubsection
9413 \family default
9414  and 
9415 \family sans
9416 Subsubsubsection*
9417 \family default
9418 .
9419 \end_layout
9420
9421 \begin_layout Standard
9422 Newly defined styles are 
9423 \family sans
9424 Left_Header
9425 \family default
9426
9427 \family sans
9428 Right_Header
9429 \family default
9430
9431 \family sans
9432 Received
9433 \family default
9434
9435 \family sans
9436 Revised
9437 \family default
9438
9439 \family sans
9440 Accepted
9441 \family default
9442
9443 \family sans
9444 CCC
9445 \family default
9446
9447 \family sans
9448 PaperId
9449 \family default
9450
9451 \family sans
9452 AuthorAddr
9453 \family default
9454
9455 \family sans
9456 SlugComment
9457 \family default
9458 .
9459  These are mostly manuscript attributes and defined in the AGU class documentati
9460 on.
9461 \end_layout
9462
9463 \begin_layout Standard
9464 I suspect this is still badly incomplete.
9465 \end_layout
9466
9467 \begin_layout Subsection
9468 New floats
9469 \end_layout
9470
9471 \begin_layout Standard
9472
9473 \family sans
9474 Planotable
9475 \family default
9476  and 
9477 \family sans
9478 Plate
9479 \family default
9480 .
9481  We also have a new 
9482 \family sans
9483 Table_Caption
9484 \family default
9485 .
9486 \end_layout
9487
9488 \begin_layout Subsection
9489 Supported journals
9490 \end_layout
9491
9492 \begin_layout Itemize
9493
9494 \emph on
9495 Journal of Geophysical Research
9496 \emph default
9497
9498 \family typewriter
9499 jgrga.layout
9500 \family default
9501  — Martin Vermeer
9502 \end_layout
9503
9504 \begin_layout Standard
9505 Add your own, it isn't so hard! Look at the 
9506 \family typewriter
9507 jgrga.layout
9508 \family default
9509  example and 
9510 \family typewriter
9511 aguplus.inc
9512 \family default
9513 .
9514 \end_layout
9515
9516 \begin_layout Subsection
9517 Bugs and things to remember
9518 \end_layout
9519
9520 \begin_layout Standard
9521 In order to use the new layouts, you must remember to do the following for
9522  a new document:
9523 \end_layout
9524
9525 \begin_layout Enumerate
9526
9527 \emph on
9528 Turn off babel
9529 \emph default
9530 .
9531  This can be done in the 
9532 \family sans
9533 Layout\SpecialChar \menuseparator
9534 Document
9535 \family default
9536  or 
9537 \family sans
9538 Document\SpecialChar \menuseparator
9539 Settings
9540 \family default
9541  menu item.
9542  (AGU articles are always in English, right? So 
9543 \emph on
9544 don't
9545 \emph default
9546  choose a language.)
9547 \end_layout
9548
9549 \begin_layout Enumerate
9550 Enter 
9551 \family typewriter
9552 jgrga
9553 \family default
9554  into the document's 
9555 \family sans
9556 Extra Options
9557 \family default
9558  field.
9559  (Yes, this is a bug.)
9560 \end_layout
9561
9562 \begin_layout Enumerate
9563 Make sure you use the 
9564 \family typewriter
9565 agu.bst
9566 \family default
9567  bibliography style, by entering 
9568 \family sans
9569 agu
9570 \family default
9571  into the second field of the BibTeX inset.
9572  None of the standard styles will do.
9573 \end_layout
9574
9575 \begin_layout Section
9576 Broadway
9577 \end_layout
9578
9579 \begin_layout Standard
9580 by 
9581 \shape smallcaps
9582 Garst Reese
9583 \end_layout
9584
9585 \begin_layout Subsection
9586 Introduction
9587 \end_layout
9588
9589 \begin_layout Standard
9590 Broadway is for writing plays.
9591  The format is more decorative than Hollywood, and much less standardized.
9592  This format should be suitable for workshops.
9593 \end_layout
9594
9595 \begin_layout Subsection
9596 Special problems
9597 \end_layout
9598
9599 \begin_layout Standard
9600 The same as in Hollywood.
9601 \end_layout
9602
9603 \begin_layout Subsection
9604 Special features
9605 \end_layout
9606
9607 \begin_layout Standard
9608 Insert the 
9609 \family sans
9610 Speaker
9611 \family default
9612  names as labels then cross-reference the label to insert the name.
9613  The cross-reference dialog will show the current cast of characters.
9614 \end_layout
9615
9616 \begin_layout Subsection
9617 Paper size and Margins
9618 \end_layout
9619
9620 \begin_layout Standard
9621 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9622 \end_layout
9623
9624 \begin_layout Subsection
9625 Environments
9626 \end_layout
9627
9628 \begin_layout Standard
9629 The following environments are available.
9630  You can use broadway.bind to get the bind keys shown at the right.
9631 \end_layout
9632
9633 \begin_layout Itemize
9634
9635 \family sans
9636 Standard
9637 \begin_inset Newline newline
9638 \end_inset
9639
9640
9641 \family default
9642 You should not have to use this, but it is here for anything that does not
9643  fit otherwise.
9644 \end_layout
9645
9646 \begin_layout Itemize
9647
9648 \family sans
9649 Narrative
9650 \begin_inset space \hfill{}
9651 \end_inset
9652
9653 M-z n
9654 \begin_inset Newline newline
9655 \end_inset
9656
9657
9658 \family default
9659 Used to describe stage setting and the action.
9660  First use of speaker names in all CAPs.
9661 \end_layout
9662
9663 \begin_layout Itemize
9664
9665 \family sans
9666 ACT
9667 \begin_inset space \hfill{}
9668 \end_inset
9669
9670 M-z a
9671 \begin_inset Newline newline
9672 \end_inset
9673
9674
9675 \family default
9676 Automatically numbered.
9677  On screen it will be arabic, but will print as Roman.
9678 \end_layout
9679
9680 \begin_layout Itemize
9681
9682 \family sans
9683 ACT*
9684 \begin_inset space \hfill{}
9685 \end_inset
9686
9687 M-z S at
9688 \begin_inset Newline newline
9689 \end_inset
9690
9691
9692 \family default
9693 Subtitle for 
9694 \family sans
9695 ACT.
9696
9697 \family default
9698  It is just centered text.
9699 \end_layout
9700
9701 \begin_layout Itemize
9702
9703 \family sans
9704 SCENE
9705 \begin_inset space \hfill{}
9706 \end_inset
9707
9708 M-z S-S
9709 \begin_inset Newline newline
9710 \end_inset
9711
9712
9713 \family default
9714 Not automatically numbered.
9715  You supply the number.
9716  This is because I couldn't figure out how.
9717 \end_layout
9718
9719 \begin_layout Itemize
9720
9721 \family sans
9722 AT_RISE:
9723 \begin_inset space \hfill{}
9724 \end_inset
9725
9726 M-z S-R
9727 \begin_inset Newline newline
9728 \end_inset
9729
9730
9731 \family default
9732 A special case of Narrative to describe the setting and action as the curtain
9733  rises.
9734 \end_layout
9735
9736 \begin_layout Itemize
9737
9738 \family sans
9739 Speaker
9740 \begin_inset space \hfill{}
9741 \end_inset
9742
9743 M-z s
9744 \begin_inset Newline newline
9745 \end_inset
9746
9747
9748 \family default
9749 The speaker's (actor's) title, centered in all CAPS.
9750 \end_layout
9751
9752 \begin_layout Itemize
9753
9754 \family sans
9755 Parenthetical
9756 \begin_inset space \hfill{}
9757 \end_inset
9758
9759 M-z p
9760 \begin_inset Newline newline
9761 \end_inset
9762
9763
9764 \family default
9765 Instructions to the speaker.
9766  The parentheses are automatically inserted.
9767  The ( will appear on screen, but both will be in the printed play.
9768  This environment is only used within 
9769 \family sans
9770 Dialogue
9771 \family default
9772 .
9773 \end_layout
9774
9775 \begin_layout Itemize
9776
9777 \family sans
9778 Dialogue
9779 \begin_inset space \hfill{}
9780 \end_inset
9781
9782 M-z d
9783 \begin_inset Newline newline
9784 \end_inset
9785
9786
9787 \family default
9788 What the Speaker says.
9789 \end_layout
9790
9791 \begin_layout Itemize
9792
9793 \family sans
9794 CURTAIN
9795 \begin_inset space \hfill{}
9796 \end_inset
9797
9798 M-z S-C
9799 \begin_inset Newline newline
9800 \end_inset
9801
9802
9803 \family default
9804 The curtain comes down.
9805 \end_layout
9806
9807 \begin_layout Itemize
9808
9809 \family sans
9810 Title
9811 \begin_inset space \hfill{}
9812 \end_inset
9813
9814 M-z S-T
9815 \end_layout
9816
9817 \begin_layout Itemize
9818
9819 \family sans
9820 Author
9821 \begin_inset space \hfill{}
9822 \end_inset
9823
9824 M-z S-A
9825 \end_layout
9826
9827 \begin_layout Itemize
9828
9829 \family sans
9830 Right_Address
9831 \begin_inset space \hfill{}
9832 \end_inset
9833
9834 M-z r
9835 \end_layout
9836
9837 \begin_layout Standard
9838 Hello there.
9839 \end_layout
9840
9841 \begin_layout Section
9842 Dinbrief
9843 \end_layout
9844
9845 \begin_layout Standard
9846 The document class 
9847 \family sans
9848 dinbrief
9849 \family default
9850  can be used to type letters according to German conventions.
9851  A template file is included in 
9852 \family typewriter
9853 .../lyx/share/templates
9854 \family default
9855  for you to use as a starting point.
9856 \end_layout
9857
9858 \begin_layout Section
9859 EGS journals (
9860 \family sans
9861 egs
9862 \family default
9863 )
9864 \end_layout
9865
9866 \begin_layout Standard
9867 by 
9868 \shape smallcaps
9869 Martin Vermeer
9870 \end_layout
9871
9872 \begin_layout Subsection
9873 Description
9874 \end_layout
9875
9876 \begin_layout Standard
9877 This is the layout file for the European Geophysical Society journals.
9878  The needed 
9879 \family typewriter
9880 egs.cls
9881 \family default
9882  can be downloaded from the web site of the EGS under 
9883 \begin_inset Flex URL
9884 status collapsed
9885
9886 \begin_layout Plain Layout
9887
9888 www.copernicus.org
9889 \end_layout
9890
9891 \end_inset
9892
9893 .
9894 \end_layout
9895
9896 \begin_layout Subsection
9897 New styles
9898 \end_layout
9899
9900 \begin_layout Standard
9901
9902 \family sans
9903 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9904  Accepted
9905 \family default
9906
9907 \family sans
9908 Offsets
9909 \family default
9910 .
9911  The current layout file is unfortunately very unmodular and would benefit
9912  from using the various 
9913 \family typewriter
9914 std*.inc
9915 \family default
9916  file inclusions.
9917 \end_layout
9918
9919 \begin_layout Section
9920 Elsevier Journals
9921 \end_layout
9922
9923 \begin_layout Standard
9924 See the LyX template file 
9925 \family typewriter
9926 elsarticle.lyx
9927 \family default
9928 .
9929  It contains all infos you need.
9930 \end_layout
9931
9932 \begin_layout Section
9933 Foils [aka 
9934 \family sans
9935 FoilTeX
9936 \family default
9937 ]
9938 \begin_inset CommandInset label
9939 LatexCommand label
9940 name "sec:foiltex"
9941
9942 \end_inset
9943
9944
9945 \end_layout
9946
9947 \begin_layout Standard
9948 by 
9949 \noun on
9950 Allan Rae
9951 \end_layout
9952
9953 \begin_layout Subsection
9954 Introduction
9955 \end_layout
9956
9957 \begin_layout Standard
9958 This section describes how to use LyX to make slides for overhead projectors.
9959  There are two document classes that can do this: the default slides class
9960  and the 
9961 \family sans
9962 FoilTeX
9963 \family default
9964  slides class.
9965  This section documents the latter.
9966 \end_layout
9967
9968 \begin_layout Standard
9969 I'm going to say this again, nice and clear, so that there's no misunderstanding
9970 :
9971 \end_layout
9972
9973 \begin_layout Standard
9974 \begin_inset VSpace bigskip
9975 \end_inset
9976
9977
9978 \end_layout
9979
9980 \begin_layout Standard
9981 \align center
9982
9983 \size large
9984 This section documents the class 
9985 \begin_inset Quotes eld
9986 \end_inset
9987
9988
9989 \family sans
9990 slides (FoilTeX)
9991 \family default
9992
9993 \begin_inset Quotes erd
9994 \end_inset
9995
9996  
9997 \emph on
9998 only.
9999 \end_layout
10000
10001 \begin_layout Standard
10002 \begin_inset VSpace bigskip
10003 \end_inset
10004
10005
10006 \end_layout
10007
10008 \begin_layout Standard
10009 If you're looking for the documentation for 
10010 \begin_inset Quotes eld
10011 \end_inset
10012
10013
10014 \family sans
10015 slides (default)
10016 \family default
10017
10018 \begin_inset Quotes erd
10019 \end_inset
10020
10021 , check out section
10022 \begin_inset space ~
10023 \end_inset
10024
10025
10026 \begin_inset CommandInset ref
10027 LatexCommand ref
10028 reference "sec:slitex"
10029
10030 \end_inset
10031
10032 .
10033  If your machine doesn't have the 
10034 \family sans
10035 foils
10036 \family default
10037  class [
10038 \begin_inset Quotes eld
10039 \end_inset
10040
10041
10042 \family sans
10043 slides (FoilTeX)
10044 \family default
10045
10046 \begin_inset Quotes erd
10047 \end_inset
10048
10049 ] installed, you'll probably have to use the default 
10050 \family sans
10051 slides
10052 \family default
10053  class, which isn't quite as good as 
10054 \family sans
10055 foils.
10056 \end_layout
10057
10058 \begin_layout Standard
10059 The 
10060 \family sans
10061 foils
10062 \family default
10063  class is designed for use with version 2.1 of the 
10064 \family sans
10065 foils.cls
10066 \family default
10067  LaTeX class file which is now an integral part of LaTeX2e.
10068 \end_layout
10069
10070 \begin_layout Subsection
10071 Getting Started
10072 \end_layout
10073
10074 \begin_layout Standard
10075 Obviously, to use this document class, you need to select 
10076 \begin_inset Quotes eld
10077 \end_inset
10078
10079
10080 \family sans
10081 slides (FoilTeX)
10082 \family default
10083
10084 \begin_inset Quotes erd
10085 \end_inset
10086
10087  from the 
10088 \family sans
10089 Class
10090 \family default
10091  entry in the 
10092 \family sans
10093 Document
10094 \begin_inset space ~
10095 \end_inset
10096
10097 Layout
10098 \family default
10099  dialog.
10100  There are some settings in the 
10101 \family sans
10102 Document
10103 \begin_inset space ~
10104 \end_inset
10105
10106 Layout
10107 \family default
10108  dialog that you should know about that are specific to this class:
10109 \end_layout
10110
10111 \begin_layout Itemize
10112 Don't change the options 
10113 \family sans
10114 Sides
10115 \family default
10116  and 
10117 \family sans
10118 Columns
10119 \family default
10120  on the 
10121 \family sans
10122 Document
10123 \begin_inset space ~
10124 \end_inset
10125
10126 Layout
10127 \family default
10128  dialog.
10129  They're ignored by the 
10130 \family sans
10131 foils
10132 \family default
10133  class.
10134 \end_layout
10135
10136 \begin_layout Itemize
10137 The default font size is 20
10138 \begin_inset space \thinspace{}
10139 \end_inset
10140
10141 pt with the other options being 17
10142 \begin_inset space \thinspace{}
10143 \end_inset
10144
10145 pt, 25
10146 \begin_inset space \thinspace{}
10147 \end_inset
10148
10149 pt and 30
10150 \begin_inset space \thinspace{}
10151 \end_inset
10152
10153 pt.
10154 \end_layout
10155
10156 \begin_layout Itemize
10157 The default font is 
10158 \family sans
10159 sans
10160 \family default
10161  
10162 \family sans
10163 serif
10164 \family default
10165  but all math equations are still typeset in the usual roman font.
10166 \end_layout
10167
10168 \begin_layout Itemize
10169
10170 \family sans
10171 FoilTeX
10172 \family default
10173  supports A4 and Letter paper sizes as well as a special size for working
10174  with 35
10175 \begin_inset space \thinspace{}
10176 \end_inset
10177
10178 mm slides.
10179  It doesn't support A5, B5, legal or executive paper sizes.
10180 \end_layout
10181
10182 \begin_layout Itemize
10183 Don't bother changing the 
10184 \family sans
10185 Float Placement
10186 \family default
10187  settings because they are ignored anyway.
10188  All floats appear where they are defined in the text.
10189 \end_layout
10190
10191 \begin_layout Itemize
10192 The 
10193 \family sans
10194 Pagestyle
10195 \family default
10196  setting behaves a bit differently for this class.
10197  
10198 \family sans
10199 FoilTeX
10200 \family default
10201  provides extensive footer and header capabilities including a user-defined
10202  logo.
10203  See section
10204 \begin_inset space ~
10205 \end_inset
10206
10207
10208 \begin_inset CommandInset ref
10209 LatexCommand ref
10210 reference "sec:foilfoot"
10211
10212 \end_inset
10213
10214  for more details.
10215  The title page is treated differently to all other pages in the document
10216  and is 
10217 \emph on
10218 always
10219 \emph default
10220  unnumbered and 
10221 \emph on
10222 always
10223 \emph default
10224  has the logo centered at the bottom of the page (if one is defined).
10225  The possible page style choices and what they do are as follows:
10226 \end_layout
10227
10228 \begin_deeper
10229 \begin_layout Labeling
10230 \labelwidthstring MMMMMMM
10231
10232 \family sans
10233 \series bold
10234 empty
10235 \family default
10236 \series default
10237  The final output contains no page numbers, or other headers or footers
10238  (except footnotes of course).
10239  
10240 \end_layout
10241
10242 \begin_layout Labeling
10243 \labelwidthstring MMMMMMM
10244
10245 \family sans
10246 \series bold
10247 plain
10248 \family default
10249 \series default
10250  The final output contains page numbers centered at the bottom of the page.
10251  No other headings or footers (other than footnotes).
10252 \end_layout
10253
10254 \begin_layout Labeling
10255 \labelwidthstring MMMMMMM
10256
10257 \series bold
10258 foilheadings
10259 \series default
10260  Page numbers in lower right corner.
10261  Additional headers and footers are also shown.
10262  This is also the default.
10263 \end_layout
10264
10265 \begin_layout Labeling
10266 \labelwidthstring MMMMMMM
10267
10268 \series bold
10269 fancy
10270 \series default
10271  Gives you access to the 
10272 \family sans
10273 fancyheadings
10274 \family default
10275  package although its use with 
10276 \family sans
10277 FoilTeX
10278 \family default
10279  is discouraged by the writer of the 
10280 \family sans
10281 FoilTeX
10282 \family default
10283  package because of some potential page layout clashes.
10284 \end_layout
10285
10286 \end_deeper
10287 \begin_layout Subsubsection
10288 Extra Options
10289 \end_layout
10290
10291 \begin_layout Standard
10292 The following options may be used in the extra class options in the 
10293 \family sans
10294 Document\SpecialChar \menuseparator
10295 Settings
10296 \family default
10297  dialog.
10298 \end_layout
10299
10300 \begin_layout Labeling
10301 \labelwidthstring MMMMMMx
10302
10303 \series bold
10304 35mmSlide
10305 \series default
10306  This sets up the page layout for 7.33
10307 \begin_inset space \thinspace{}
10308 \end_inset
10309
10310 in by 11
10311 \begin_inset space \thinspace{}
10312 \end_inset
10313
10314 in paper, which is about the same aspect ratio as a 35
10315 \begin_inset space \thinspace{}
10316 \end_inset
10317
10318 mm slide, making it a bit easier to work with this medium.
10319 \end_layout
10320
10321 \begin_layout Labeling
10322 \labelwidthstring MMMMMMx
10323
10324 \series bold
10325 headrule
10326 \series default
10327  Places a rule across the page below the header on every page except the
10328  title page.
10329 \end_layout
10330
10331 \begin_layout Labeling
10332 \labelwidthstring MMMMMMx
10333
10334 \series bold
10335 footrule
10336 \series default
10337  Places a rule across the page above the footer on every page except the
10338  title page.
10339 \end_layout
10340
10341 \begin_layout Labeling
10342 \labelwidthstring MMMMMMx
10343
10344 \series bold
10345 dvips
10346 \series default
10347  This is automatically set each time you create a new 
10348 \family sans
10349 foils
10350 \family default
10351  document.
10352  This option tells 
10353 \family sans
10354 FoilTeX
10355 \family default
10356  to use the dvips driver to rotate those pages that are set as landscape
10357  foils.
10358 \end_layout
10359
10360 \begin_layout Labeling
10361 \labelwidthstring MMMMMMx
10362
10363 \series bold
10364 landscape
10365 \series default
10366  Simply changes the page dimensions to those of a landscape page but doesn't
10367  do any rotation.
10368  Thus if you use this option you need to use an external program to rotate
10369  each page or feed your paper through your printer as landscape.
10370  Note that this option effectively reverses the roles of the 
10371 \family sans
10372 Foilhead
10373 \family default
10374  and 
10375 \family sans
10376 Rotatefoilhead
10377 \family default
10378  environments (don't worry these are described in the next section).
10379 \end_layout
10380
10381 \begin_layout Labeling
10382 \labelwidthstring MMMMMMx
10383
10384 \series bold
10385 leqno
10386 \series default
10387  Equation numbers on the left.
10388 \end_layout
10389
10390 \begin_layout Labeling
10391 \labelwidthstring MMMMMMx
10392
10393 \series bold
10394 fleqn
10395 \series default
10396  Flush-left equations.
10397 \end_layout
10398
10399 \begin_layout Subsection
10400 Supported Environments
10401 \end_layout
10402
10403 \begin_layout Standard
10404 Most of the environments commonly supported in other classes are also supported
10405  by the 
10406 \family sans
10407 foils
10408 \family default
10409  class.
10410  There are several additional environments provided by 
10411 \family sans
10412 FoilTeX
10413 \family default
10414  as well as a couple added by LyX.
10415  The following environments are shared with other classes:
10416 \end_layout
10417
10418 \begin_layout Standard
10419 \begin_inset ERT
10420 status open
10421
10422 \begin_layout Plain Layout
10423
10424
10425 \backslash
10426 begin{multicols}{2}
10427 \end_layout
10428
10429 \end_inset
10430
10431
10432 \end_layout
10433
10434 \begin_layout Itemize
10435
10436 \family sans
10437 Standard
10438 \end_layout
10439
10440 \begin_layout Itemize
10441
10442 \family sans
10443 Itemize
10444 \end_layout
10445
10446 \begin_layout Itemize
10447
10448 \family sans
10449 Enumerate
10450 \end_layout
10451
10452 \begin_layout Itemize
10453
10454 \family sans
10455 Description
10456 \end_layout
10457
10458 \begin_layout Itemize
10459
10460 \family sans
10461 List
10462 \end_layout
10463
10464 \begin_layout Itemize
10465
10466 \family sans
10467 LyX-Code
10468 \end_layout
10469
10470 \begin_layout Itemize
10471
10472 \family sans
10473 Verse
10474 \end_layout
10475
10476 \begin_layout Itemize
10477
10478 \family sans
10479 Quote
10480 \end_layout
10481
10482 \begin_layout Itemize
10483
10484 \family sans
10485 Quotation
10486 \end_layout
10487
10488 \begin_layout Itemize
10489
10490 \family sans
10491 Title
10492 \end_layout
10493
10494 \begin_layout Itemize
10495
10496 \family sans
10497 Author
10498 \end_layout
10499
10500 \begin_layout Itemize
10501
10502 \family sans
10503 Date
10504 \end_layout
10505
10506 \begin_layout Itemize
10507
10508 \family sans
10509 Abstract
10510 \end_layout
10511
10512 \begin_layout Itemize
10513
10514 \family sans
10515 Bibliography
10516 \end_layout
10517
10518 \begin_layout Itemize
10519
10520 \family sans
10521 Address
10522 \end_layout
10523
10524 \begin_layout Itemize
10525
10526 \family sans
10527 RightAddress
10528 \end_layout
10529
10530 \begin_layout Itemize
10531
10532 \family sans
10533 Caption
10534 \end_layout
10535
10536 \begin_layout Itemize
10537
10538 \family sans
10539 Comment
10540 \end_layout
10541
10542 \begin_layout Standard
10543 \begin_inset ERT
10544 status open
10545
10546 \begin_layout Plain Layout
10547
10548
10549 \backslash
10550 end{multicols}
10551 \end_layout
10552
10553 \end_inset
10554
10555
10556 \end_layout
10557
10558 \begin_layout Standard
10559 That is, all the major environments apart from the sectioning environments.
10560  Since foils are essentially self-contained sections, with a title and body,
10561  
10562 \family sans
10563 FoilTeX
10564 \family default
10565  provides specific commands for starting new foils and these are:
10566 \end_layout
10567
10568 \begin_layout Itemize
10569
10570 \family sans
10571 Foilhead
10572 \end_layout
10573
10574 \begin_layout Itemize
10575
10576 \family sans
10577 Rotatefoilhead
10578 \end_layout
10579
10580 \begin_layout Standard
10581 LyX also provides slightly modified versions of these two environments called:
10582 \end_layout
10583
10584 \begin_layout Itemize
10585
10586 \family sans
10587 ShortFoilhead
10588 \end_layout
10589
10590 \begin_layout Itemize
10591
10592 \family sans
10593 ShortRotatefoilhead
10594 \end_layout
10595
10596 \begin_layout Standard
10597 and the differences will be explained in the next section.
10598 \end_layout
10599
10600 \begin_layout Standard
10601 Since foils are often used in presenting ideas or new theorems and such
10602  
10603 \family sans
10604 FoilTeX
10605 \family default
10606  also provides a comprehensive box of goodies for presenting them:
10607 \end_layout
10608
10609 \begin_layout Standard
10610 \begin_inset ERT
10611 status open
10612
10613 \begin_layout Plain Layout
10614
10615
10616 \backslash
10617 begin{multicols}{2}
10618 \end_layout
10619
10620 \end_inset
10621
10622
10623 \end_layout
10624
10625 \begin_layout Itemize
10626
10627 \family sans
10628 Theorem
10629 \end_layout
10630
10631 \begin_layout Itemize
10632
10633 \family sans
10634 Lemma
10635 \end_layout
10636
10637 \begin_layout Itemize
10638
10639 \family sans
10640 Corollary
10641 \end_layout
10642
10643 \begin_layout Itemize
10644
10645 \family sans
10646 Proposition
10647 \end_layout
10648
10649 \begin_layout Itemize
10650
10651 \family sans
10652 Definition
10653 \end_layout
10654
10655 \begin_layout Itemize
10656
10657 \family sans
10658 Proof
10659 \end_layout
10660
10661 \begin_layout Itemize
10662
10663 \family sans
10664 Theorem*
10665 \end_layout
10666
10667 \begin_layout Itemize
10668
10669 \family sans
10670 Lemma*
10671 \end_layout
10672
10673 \begin_layout Itemize
10674
10675 \family sans
10676 Corollary*
10677 \end_layout
10678
10679 \begin_layout Itemize
10680
10681 \family sans
10682 Proposition*
10683 \end_layout
10684
10685 \begin_layout Itemize
10686
10687 \family sans
10688 Definition*
10689 \end_layout
10690
10691 \begin_layout Standard
10692 \begin_inset ERT
10693 status open
10694
10695 \begin_layout Plain Layout
10696
10697
10698 \backslash
10699 end{multicols}
10700 \end_layout
10701
10702 \end_inset
10703
10704
10705 \end_layout
10706
10707 \begin_layout Standard
10708 The starred versions are unnumbered while the unstarred versions are numbered.
10709  There are also two list environments added by LyX and these are:
10710 \end_layout
10711
10712 \begin_layout Itemize
10713
10714 \family sans
10715 TickList
10716 \end_layout
10717
10718 \begin_layout Itemize
10719
10720 \family sans
10721 CrossList
10722 \end_layout
10723
10724 \begin_layout Standard
10725
10726 \family sans
10727 FoilTeX
10728 \family default
10729  provides some powerful header and footer capabilities that are best set
10730  in the preamble although they may be set at any point in a document.
10731  If you want to change these settings in your document the best place to
10732  do so is at the very top of a foil, i.
10733 \begin_inset space \thinspace{}
10734 \end_inset
10735
10736 e.
10737 \emph on
10738
10739 \begin_inset space \space{}
10740 \end_inset
10741
10742
10743 \emph default
10744 straight after the foilhead.
10745 \end_layout
10746
10747 \begin_layout Standard
10748 For this purpose, the following command styles are provided [
10749 \shape smallcaps
10750 Martin Vermeer
10751 \shape default
10752 ]:
10753 \end_layout
10754
10755 \begin_layout Standard
10756 \begin_inset ERT
10757 status open
10758
10759 \begin_layout Plain Layout
10760
10761
10762 \backslash
10763 begin{multicols}{2}
10764 \end_layout
10765
10766 \end_inset
10767
10768
10769 \end_layout
10770
10771 \begin_layout Itemize
10772
10773 \family sans
10774 My
10775 \begin_inset space ~
10776 \end_inset
10777
10778 Logo
10779 \end_layout
10780
10781 \begin_layout Itemize
10782
10783 \family sans
10784 Restriction
10785 \end_layout
10786
10787 \begin_layout Itemize
10788
10789 \family sans
10790 Right
10791 \begin_inset space ~
10792 \end_inset
10793
10794 Footer
10795 \end_layout
10796
10797 \begin_layout Itemize
10798
10799 \family sans
10800 Right
10801 \begin_inset space ~
10802 \end_inset
10803
10804 Header
10805 \end_layout
10806
10807 \begin_layout Itemize
10808
10809 \family sans
10810 Left
10811 \begin_inset space ~
10812 \end_inset
10813
10814 Header
10815 \end_layout
10816
10817 \begin_deeper
10818 \begin_layout Standard
10819 \begin_inset space ~
10820 \end_inset
10821
10822
10823 \end_layout
10824
10825 \end_deeper
10826 \begin_layout Standard
10827 \begin_inset ERT
10828 status open
10829
10830 \begin_layout Plain Layout
10831
10832
10833 \backslash
10834 end{multicols}
10835 \end_layout
10836
10837 \end_inset
10838
10839
10840 \end_layout
10841
10842 \begin_layout Standard
10843 There are also a few commands provided by 
10844 \family sans
10845 FoilTeX
10846 \family default
10847  that aren't directly supported by LyX but I'll tell you what they do and
10848  how to use them in section
10849 \begin_inset space ~
10850 \end_inset
10851
10852
10853 \begin_inset CommandInset ref
10854 LatexCommand ref
10855 reference "sec:unsuppfoils"
10856
10857 \end_inset
10858
10859 .
10860 \end_layout
10861
10862 \begin_layout Subsection
10863 Building a Set of Foils
10864 \end_layout
10865
10866 \begin_layout Standard
10867 This section will give a simple introduction to using the different environments
10868  to build a set of foils.
10869  If you want to see an example set of foils, take a look at the 
10870 \family typewriter
10871 Foils.lyx
10872 \family default
10873  file you find in LyX's 
10874 \family typewriter
10875 examples
10876 \family default
10877  folder.
10878 \end_layout
10879
10880 \begin_layout Subsubsection
10881 Give It a Title Page
10882 \end_layout
10883
10884 \begin_layout Standard
10885 Unlike other classes that provide 
10886 \family sans
10887 Title
10888 \family default
10889
10890 \family sans
10891 Author
10892 \family default
10893
10894 \family sans
10895 Date
10896 \family default
10897  and 
10898 \family sans
10899 Abstract
10900 \family default
10901  environments, 
10902 \family sans
10903 foils
10904 \family default
10905  creates the title on a page of its own.
10906  If you leave out the 
10907 \family sans
10908 Date
10909 \family default
10910  environment LaTeX will substitute the current date (every time you regenerate
10911  the output).
10912 \end_layout
10913
10914 \begin_layout Subsubsection
10915 Start a New Foil
10916 \end_layout
10917
10918 \begin_layout Standard
10919 As I mentioned earlier, there are four ways of starting a new foil.
10920  For portrait foils you should use 
10921 \family sans
10922 Foilhead
10923 \family default
10924  or 
10925 \family sans
10926 ShortFoilhead.
10927
10928 \family default
10929  The difference between these two environments is the amount of space between
10930  the title of the foil (the foilhead) and the body of the foil.
10931 \end_layout
10932
10933 \begin_layout Standard
10934 Landscape foils are generated using the 
10935 \family sans
10936 Rotatefoilhead
10937 \family default
10938  and 
10939 \family sans
10940 ShortRotatefoilhead
10941 \family default
10942  environments.
10943  Again the only difference is the spacing between foilhead and body.
10944  Both of the short versions have 0.5 inches less separation between the foilhead
10945  and the body.
10946  
10947 \end_layout
10948
10949 \begin_layout Standard
10950 One problem with the support for landscape foils is the requirement that
10951  you have to use the 
10952 \family typewriter
10953 dvips
10954 \family default
10955  driver to generate the PostScript output otherwise the foils won't be rotated.
10956  It is possible to get landscape foils even if you haven't got the 
10957 \family typewriter
10958 dvips
10959 \family default
10960  driver provided you can feed your foils sideways through your printer ;-)
10961 \end_layout
10962
10963 \begin_layout Subsubsection
10964 Theorems, Lemmas, Proofs and more
10965 \end_layout
10966
10967 \begin_layout Standard
10968 Due to a small bug in LyX you can't have two of the same type of these environme
10969 nts directly following each other.
10970  They must be separated by something.
10971  If you try, you will just be extending the previous environment as if you
10972  had merged the two environments together.
10973  So, how do you get around this problem? The simplest option is to insert
10974  some text between the two environments or add a 
10975 \family sans
10976 LaTeX
10977 \family default
10978  environment between the two with just a 
10979 \begin_inset Quotes eld
10980 \end_inset
10981
10982
10983 \family typewriter
10984 %
10985 \family default
10986
10987 \begin_inset Quotes erd
10988 \end_inset
10989
10990  in it.
10991  This will force LyX to produce two separate environments and hence the
10992  correct LaTeX output.
10993  An example is provided in the example file included with the LyX distribution.
10994  Remember, this problem only occurs if you are trying to place two of the
10995  same type of theorem-like environments one directly after the other.
10996 \end_layout
10997
10998 \begin_layout Subsubsection
10999 Lists
11000 \end_layout
11001
11002 \begin_layout Standard
11003 You get all the commonly supported list styles found in other classes as
11004  well as two new ones.
11005  I'll only describe the new ones here.
11006  If you want to find out more about the other list environments check out
11007  the 
11008 \emph on
11009 User's Guide.
11010
11011 \emph default
11012  If you intend to use itemized lists you might also want to read about the
11013  
11014 \family sans
11015 Itemize
11016 \begin_inset space ~
11017 \end_inset
11018
11019 Bullet
11020 \begin_inset space ~
11021 \end_inset
11022
11023 Selection
11024 \family default
11025  dialog described above in section
11026 \begin_inset space ~
11027 \end_inset
11028
11029
11030 \begin_inset CommandInset ref
11031 LatexCommand ref
11032 reference "sec:bullet"
11033
11034 \end_inset
11035
11036 .
11037 \end_layout
11038
11039 \begin_layout Standard
11040 The two new list styles, 
11041 \family sans
11042 TickList
11043 \family default
11044  and 
11045 \family sans
11046 CrossList
11047 \family default
11048 , are designed to make it easier for you to create lists of do's and don'ts
11049  or right and wrong by providing dedicated environments that use a tick
11050  or a cross as the label of the list.
11051  These lists are in fact dedicated variants of the 
11052 \family sans
11053 Itemize
11054 \family default
11055  environment.
11056  They do however require that you have the 
11057 \family typewriter
11058 psnfss
11059 \family default
11060  packages installed.
11061 \end_layout
11062
11063 \begin_layout Subsubsection
11064 Figures and Tables
11065 \end_layout
11066
11067 \begin_layout Standard
11068
11069 \family sans
11070 FoilTeX
11071 \family default
11072  redefines the floating tables and figures so that they appear exactly where
11073  they are in the text rather than pushing them to the top of the page or
11074  to some user specified location.
11075  In fact if you change the float placement settings they are simply ignored.
11076 \end_layout
11077
11078 \begin_layout Subsubsection
11079 Page Headers and Footers
11080 \begin_inset CommandInset label
11081 LatexCommand label
11082 name "sec:foilfoot"
11083
11084 \end_inset
11085
11086
11087 \end_layout
11088
11089 \begin_layout Standard
11090
11091 \family sans
11092 My
11093 \begin_inset space ~
11094 \end_inset
11095
11096 Logo
11097 \family default
11098  and 
11099 \family sans
11100 Restriction
11101 \family default
11102  are two commands used to control the left-footer text string.
11103  The first is meant to allow you to include a graphic logo on your foils
11104  and defaults to 
11105 \begin_inset Quotes eld
11106 \end_inset
11107
11108 -Typeset by 
11109 \family sans
11110 FoilTeX
11111 \family default
11112 -
11113 \begin_inset Quotes erd
11114 \end_inset
11115
11116 .
11117  While the second is meant to provide a classification for the audience,
11118  
11119 \emph on
11120 e.
11121 \begin_inset space \thinspace{}
11122 \end_inset
11123
11124 g.
11125 \emph default
11126
11127 \begin_inset space \space{}
11128 \end_inset
11129
11130 Confidential.
11131  It is empty by default.
11132 \end_layout
11133
11134 \begin_layout Standard
11135 The remaining page corners can be filled by 
11136 \family sans
11137 Right
11138 \begin_inset space ~
11139 \end_inset
11140
11141 Footer
11142 \family default
11143  (which defaults to page numbers), 
11144 \family sans
11145 Right
11146 \begin_inset space ~
11147 \end_inset
11148
11149 Header
11150 \family default
11151  (top right) and 
11152 \family sans
11153 Left
11154 \begin_inset space ~
11155 \end_inset
11156
11157 Header
11158 \family default
11159  (top left).
11160 \end_layout
11161
11162 \begin_layout Subsection
11163 Unsupported 
11164 \family sans
11165 FoilTeX
11166 \family default
11167  Goodies
11168 \begin_inset CommandInset label
11169 LatexCommand label
11170 name "sec:unsuppfoils"
11171
11172 \end_inset
11173
11174
11175 \end_layout
11176
11177 \begin_layout Standard
11178 All the commands mentioned below need to be set in a 
11179 \family sans
11180 LaTeX
11181 \family default
11182  environment or as 
11183 \family sans
11184 TeX
11185 \family default
11186  within another environment.
11187 \end_layout
11188
11189 \begin_layout Subsubsection
11190 Lengths
11191 \end_layout
11192
11193 \begin_layout Standard
11194 All lengths are adjusted using the 
11195 \family typewriter
11196
11197 \backslash
11198 setlength{
11199 \family default
11200 \emph on
11201 lengthname
11202 \family typewriter
11203 \emph default
11204 }{
11205 \family default
11206 \emph on
11207 newlength
11208 \family typewriter
11209 \emph default
11210 }
11211 \family default
11212  command.
11213  Where 
11214 \emph on
11215 lengthname
11216 \emph default
11217  should be replaced by the name given to the length you want to change and
11218  
11219 \emph on
11220 newlength
11221 \emph default
11222  is the length value.
11223  All lengths should be specified in units of length such as inches (
11224 \family typewriter
11225 in
11226 \family default
11227 ), millimeters (
11228 \family typewriter
11229 mm
11230 \family default
11231 ) or points (
11232 \family typewriter
11233 pt
11234 \family default
11235 ) or relative to some document or font-based length such as 
11236 \family typewriter
11237
11238 \backslash
11239 textwidth
11240 \family default
11241 .
11242  
11243 \end_layout
11244
11245 \begin_layout Standard
11246 It's possible to change the spacing between a foilhead and the body of the
11247  foil by adjusting the length specified by 
11248 \family typewriter
11249
11250 \backslash
11251 foilheadskip
11252 \family default
11253 .
11254  For example, to make 
11255 \emph on
11256 all
11257 \emph default
11258  foilheads 0.5
11259 \begin_inset space \space{}
11260 \end_inset
11261
11262 in closer to their bodies put the following in the preamble: 
11263 \family typewriter
11264
11265 \backslash
11266 setlength{
11267 \backslash
11268 foilheadskip}{-0.5in}
11269 \end_layout
11270
11271 \begin_layout Standard
11272 The spacings around floats can be adjusted by setting these lengths:
11273 \end_layout
11274
11275 \begin_layout Labeling
11276 \labelwidthstring MMMMMMMMMMM
11277
11278 \family typewriter
11279
11280 \backslash
11281 abovefloatskip
11282 \family default
11283  Separation between the text and the top of the float
11284 \end_layout
11285
11286 \begin_layout Labeling
11287 \labelwidthstring MMMMMMMMMMM
11288
11289 \family typewriter
11290
11291 \backslash
11292 abovecaptionskip
11293 \family default
11294  Separation between the float and the caption
11295 \end_layout
11296
11297 \begin_layout Labeling
11298 \labelwidthstring MMMMMMMMMMM
11299
11300 \family typewriter
11301
11302 \backslash
11303 belowcaptionskip
11304 \family default
11305  Separation between the caption and the following text
11306 \end_layout
11307
11308 \begin_layout Labeling
11309 \labelwidthstring MMMMMMMMMMM
11310
11311 \family typewriter
11312
11313 \backslash
11314 captionwidth
11315 \family default
11316  You can make the captions narrower than the surrounding text by adjusting
11317  this length.
11318  Best done relative to 
11319 \family typewriter
11320
11321 \backslash
11322 textwidth
11323 \family default
11324 .
11325 \end_layout
11326
11327 \begin_layout Standard
11328 There are also several title page related lengths that you may find useful
11329  if you have a long title or several authors:
11330 \end_layout
11331
11332 \begin_layout Labeling
11333 \labelwidthstring MMMMMMMMMMM
11334
11335 \family typewriter
11336
11337 \backslash
11338 abovetitleskip
11339 \family default
11340  Separation from headers to 
11341 \family sans
11342 Title
11343 \end_layout
11344
11345 \begin_layout Labeling
11346 \labelwidthstring MMMMMMMMMMM
11347
11348 \family typewriter
11349
11350 \backslash
11351 titleauthorskip
11352 \family default
11353  between 
11354 \family sans
11355 Title
11356 \family default
11357  and 
11358 \family sans
11359 Author
11360 \family default
11361  environments
11362 \end_layout
11363
11364 \begin_layout Labeling
11365 \labelwidthstring MMMMMMMMMMM
11366
11367 \family typewriter
11368
11369 \backslash
11370 authorauthorskip
11371 \family default
11372  between multiple 
11373 \family sans
11374 Author
11375 \family default
11376  lines
11377 \end_layout
11378
11379 \begin_layout Labeling
11380 \labelwidthstring MMMMMMMMMMM
11381
11382 \family typewriter
11383
11384 \backslash
11385 authordateskip
11386 \family default
11387  between the 
11388 \family sans
11389 Author
11390 \family default
11391  and the 
11392 \family sans
11393 Date
11394 \end_layout
11395
11396 \begin_layout Labeling
11397 \labelwidthstring MMMMMMMMMMM
11398
11399 \family typewriter
11400
11401 \backslash
11402 dateabstractskip
11403 \family default
11404  between the 
11405 \family sans
11406 Date
11407 \family default
11408  and the 
11409 \family sans
11410 Abstract
11411 \end_layout
11412
11413 \begin_layout Standard
11414 The last length related command affects all the list environments.
11415  If you place 
11416 \family typewriter
11417
11418 \backslash
11419 zerolistvertdimens
11420 \family default
11421  
11422 \emph on
11423 inside
11424 \emph default
11425  a list environment then all the vertical spacing between the list items
11426  is removed.
11427  Note that this is a command not a length so it doesn't require 
11428 \family typewriter
11429
11430 \backslash
11431 setlength
11432 \family default
11433  like the stuff mentioned above.
11434 \end_layout
11435
11436 \begin_layout Subsubsection
11437 Headers and Footers
11438 \end_layout
11439
11440 \begin_layout Standard
11441 The 
11442 \family typewriter
11443
11444 \backslash
11445 LogoOn
11446 \family default
11447  and 
11448 \family typewriter
11449
11450 \backslash
11451 LogoOff
11452 \family default
11453  commands control whether the logo in the 
11454 \family sans
11455 MyLogo
11456 \family default
11457  definition appear on a given page.
11458  If you put 
11459 \family typewriter
11460
11461 \backslash
11462 LogoOff
11463 \family default
11464  in the preamble then none of the foils will have the logo on them.
11465  If you don't want the logo on a particular page place the 
11466 \family typewriter
11467
11468 \backslash
11469 LogoOff
11470 \family default
11471  directly after the foilhead of that page and the 
11472 \family typewriter
11473
11474 \backslash
11475 LogoOn
11476 \family default
11477  directly after the next foilhead.
11478 \end_layout
11479
11480 \begin_layout Standard
11481 If you decide to use the 
11482 \family sans
11483 fancy
11484 \family default
11485  page style setting in the 
11486 \family sans
11487 Document
11488 \begin_inset space ~
11489 \end_inset
11490
11491 Layout
11492 \family default
11493  dialog you should probably add 
11494 \family typewriter
11495
11496 \backslash
11497 let
11498 \backslash
11499 headwidth
11500 \backslash
11501 textwidth
11502 \family default
11503  to your preamble so headers and footers on landscape pages are correctly
11504  placed when rotated.
11505  This is due to some clashes between the page layouts provided by the 
11506 \family sans
11507 fancyheadings
11508 \family default
11509  package and the 
11510 \family sans
11511 foils
11512 \family default
11513  class.
11514 \end_layout
11515
11516 \begin_layout Section
11517 Hollywood (Hollywood spec scripts)
11518 \end_layout
11519
11520 \begin_layout Standard
11521 by 
11522 \shape smallcaps
11523 Garst Reese
11524 \end_layout
11525
11526 \begin_layout Subsection
11527 Introduction
11528 \end_layout
11529
11530 \begin_layout Standard
11531 Getting the format of a Hollywood script right is a 
11532 \begin_inset Quotes eld
11533 \end_inset
11534
11535 rite of passage.
11536 \begin_inset Quotes erd
11537 \end_inset
11538
11539  It is designed to make the readers focus on content and to be easy and
11540  familiar for the actors to read.
11541  Each page of a script should be one minute of film.
11542  Nothing goes in a script that you cannot see or hear on screen.
11543  The courier 12 pt font should be used throughout.
11544  No italics.
11545 \end_layout
11546
11547 \begin_layout Subsection
11548 Special problems
11549 \end_layout
11550
11551 \begin_layout Standard
11552 Speakers' lines should NEVER break in mid-sentence.
11553  If a speaker's lines continue over a page break, repeat the 
11554 \family sans
11555 Speaker
11556 \family default
11557  title followed by (Cont'd).
11558 \end_layout
11559
11560 \begin_layout Subsection
11561 Special features
11562 \end_layout
11563
11564 \begin_layout Standard
11565 Insert the 
11566 \family sans
11567 Speaker
11568 \family default
11569  names as labels then cross-reference the label to insert the name.
11570  The cross-reference dialog will show the current cast of characters.
11571  You can use this to insert the speaker name in narratives also.
11572 \end_layout
11573
11574 \begin_layout Subsection
11575 Paper size and Margins
11576 \end_layout
11577
11578 \begin_layout Standard
11579 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11580 \end_layout
11581
11582 \begin_layout Subsection
11583 Environments
11584 \end_layout
11585
11586 \begin_layout Standard
11587 The following environments are available.
11588  You can use hollywood.bind to get the bind keys shown at the right.
11589 \end_layout
11590
11591 \begin_layout Itemize
11592
11593 \family sans
11594 Standard
11595 \begin_inset Newline newline
11596 \end_inset
11597
11598
11599 \family default
11600 Used where nothing else works.
11601  Try to avoid it.
11602 \end_layout
11603
11604 \begin_layout Itemize
11605
11606 \family sans
11607 FADE_IN
11608 \family default
11609 :
11610 \begin_inset space \hfill{}
11611 \end_inset
11612
11613
11614 \family sans
11615 M-z S-I
11616 \family default
11617
11618 \begin_inset Newline newline
11619 \end_inset
11620
11621 Usually followed by something like 
11622 \begin_inset Quotes eld
11623 \end_inset
11624
11625 on Sally waking up.
11626 \begin_inset Quotes erd
11627 \end_inset
11628
11629
11630 \end_layout
11631
11632 \begin_layout Itemize
11633
11634 \family sans
11635 INT:
11636 \begin_inset space \hfill{}
11637 \end_inset
11638
11639 M-z i
11640 \begin_inset Newline newline
11641 \end_inset
11642
11643
11644 \family default
11645 Introduces a new INTERIOR camera set-up.
11646  Always followed by DAY or NIGHT, or something similar to define the lighting
11647  required.
11648  Everthing on this line in CAPS.
11649 \end_layout
11650
11651 \begin_layout Itemize
11652
11653 \family sans
11654 EXT:
11655 \begin_inset space \hfill{}
11656 \end_inset
11657
11658 M-z e
11659 \begin_inset Newline newline
11660 \end_inset
11661
11662
11663 \family default
11664 Introduces a new EXTERIOR camera set-up.
11665  Everthing on this line in CAPS.
11666 \end_layout
11667
11668 \begin_layout Itemize
11669
11670 \family sans
11671 Speaker
11672 \begin_inset space \hfill{}
11673 \end_inset
11674
11675 M-z s
11676 \begin_inset Newline newline
11677 \end_inset
11678
11679
11680 \family default
11681 The character speaking.
11682 \end_layout
11683
11684 \begin_layout Itemize
11685
11686 \family sans
11687 Parenthetical
11688 \begin_inset space \hfill{}
11689 \end_inset
11690
11691 M-z p
11692 \begin_inset Newline newline
11693 \end_inset
11694
11695
11696 \family default
11697 Instructions to the speaker.
11698  The () are automatically inserted, but only the ( will show in LyX.
11699  Both will be printed.
11700 \end_layout
11701
11702 \begin_layout Itemize
11703
11704 \family sans
11705 Dialogue
11706 \begin_inset space \hfill{}
11707 \end_inset
11708
11709 M-z d
11710 \begin_inset Newline newline
11711 \end_inset
11712
11713
11714 \family default
11715 What the 
11716 \family sans
11717 Speaker
11718 \family default
11719  says.
11720 \end_layout
11721
11722 \begin_layout Itemize
11723
11724 \family sans
11725 Transition
11726 \begin_inset space \hfill{}
11727 \end_inset
11728
11729 M-z t
11730 \begin_inset Newline newline
11731 \end_inset
11732
11733
11734 \family default
11735 Camera movement instruction.
11736  e.
11737 \begin_inset space \thinspace{}
11738 \end_inset
11739
11740 g.
11741 \begin_inset space \space{}
11742 \end_inset
11743
11744 CUT TO:
11745 \end_layout
11746
11747 \begin_layout Itemize
11748
11749 \family sans
11750 FADE OUT:
11751 \begin_inset space \hfill{}
11752 \end_inset
11753
11754 M-z S-I
11755 \end_layout
11756
11757 \begin_layout Itemize
11758
11759 \family sans
11760 Author
11761 \begin_inset space \hfill{}
11762 \end_inset
11763
11764 M-z S-A
11765 \end_layout
11766
11767 \begin_layout Itemize
11768
11769 \family sans
11770 Title
11771 \begin_inset space \hfill{}
11772 \end_inset
11773
11774 M-z S-T
11775 \end_layout
11776
11777 \begin_layout Itemize
11778
11779 \family sans
11780 Right_Address
11781 \begin_inset space \hfill{}
11782 \end_inset
11783
11784 M-z r
11785 \end_layout
11786
11787 \begin_layout Subsection
11788 Script jargon
11789 \end_layout
11790
11791 \begin_layout Itemize
11792 (O.S) — off screen
11793 \end_layout
11794
11795 \begin_layout Itemize
11796 (V.0) — voice over
11797 \end_layout
11798
11799 \begin_layout Itemize
11800 b.
11801 \begin_inset space \thinspace{}
11802 \end_inset
11803
11804 g.
11805  — background
11806 \end_layout
11807
11808 \begin_layout Itemize
11809 C.U.
11810  — close-up
11811 \end_layout
11812
11813 \begin_layout Itemize
11814 PAN — camera movement
11815 \end_layout
11816
11817 \begin_layout Itemize
11818 INSERT — cut to close-up of
11819 \end_layout
11820
11821 \begin_layout Section
11822 ijmpc and ijmpd
11823 \end_layout
11824
11825 \begin_layout Standard
11826 by 
11827 \noun on
11828 Panayotis Papasotiriou
11829 \end_layout
11830
11831 \begin_layout Subsection
11832 Overview
11833 \end_layout
11834
11835 \begin_layout Standard
11836 The ijmpc package is a set of macros that facilitates electronic manuscript
11837  submission to the 
11838 \emph on
11839 International Journal of Modern Physics C
11840 \emph default
11841 .
11842  Similarly, the ijmpd package is for creating manuscripts to be submitted
11843  to the 
11844 \emph on
11845 International Journal of Modern Physics D
11846 \emph default
11847 .
11848  Both journals are published by World Scientific.
11849  The corresponding document classes are named 
11850 \family typewriter
11851 ws-ijmpc.cls
11852 \family default
11853  and 
11854 \family typewriter
11855 ws-ijmpd.cls
11856 \family default
11857 , respectively.
11858  These files, together with instructions for the authors, can be downloaded
11859  from the sites 
11860 \begin_inset Flex URL
11861 status collapsed
11862
11863 \begin_layout Plain Layout
11864
11865 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11866 \end_layout
11867
11868 \end_inset
11869
11870  and 
11871 \begin_inset Flex URL
11872 status collapsed
11873
11874 \begin_layout Plain Layout
11875
11876 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11877 \end_layout
11878
11879 \end_inset
11880
11881 .
11882  Both packages are modified versions of the standard 
11883 \begin_inset Quotes eld
11884 \end_inset
11885
11886 article
11887 \begin_inset Quotes erd
11888 \end_inset
11889
11890  package, and they are almost (but not exactly) identical.
11891  Most of their features are supported by LyX.
11892  I have used LyX successfully to write articles submitted to both journals
11893  without any problem.
11894 \end_layout
11895
11896 \begin_layout Subsection
11897 Writing a paper
11898 \end_layout
11899
11900 \begin_layout Standard
11901 As usual, the easiest way to write a paper is to start with a template.
11902  Click on 
11903 \family sans
11904 File\SpecialChar \menuseparator
11905 New from
11906 \family default
11907  
11908 \family sans
11909 \bar under
11910 T
11911 \bar default
11912 emplate
11913 \family default
11914 , then choose the 
11915 \family typewriter
11916 ijmpc.lyx
11917 \family default
11918  or 
11919 \family typewriter
11920 ijmpd.lyx
11921 \family default
11922  template.
11923  This will give an (almost) empty document that includes the most common
11924  fields found in a manuscript.
11925  Simply overwrite the existing text (including the brackets, 
11926 \family typewriter
11927 <>
11928 \family default
11929 ) with your text.
11930  You should keep in mind the following remarks.
11931 \end_layout
11932
11933 \begin_layout Enumerate
11934 LyX won't let you change the font size and the page style of the document,
11935  because such modifications are not allowed by both packages.
11936 \end_layout
11937
11938 \begin_layout Enumerate
11939 The language of the document should not be changed.
11940  Before previewing your paper, be sure that the babel package is not used.
11941  To do this, click on 
11942 \family sans
11943 Tools\SpecialChar \menuseparator
11944 Preferences
11945 \family default
11946 , select the 
11947 \family sans
11948 Lang Opts
11949 \family default
11950  tab, deselect the 
11951 \family sans
11952 Use babel
11953 \family default
11954  checkbox in the language settings, and click on 
11955 \family sans
11956 Apply
11957 \family default
11958  (or 
11959 \family sans
11960 Save
11961 \family default
11962 , if you wish to make this change permanent).
11963 \end_layout
11964
11965 \begin_layout Enumerate
11966 The 
11967 \begin_inset Quotes eld
11968 \end_inset
11969
11970 Keywords
11971 \begin_inset Quotes erd
11972 \end_inset
11973
11974  style must be used to define keywords.
11975 \end_layout
11976
11977 \begin_layout Enumerate
11978 The ijmpc package provides a style named 
11979 \begin_inset Quotes eld
11980 \end_inset
11981
11982 Classification Codes
11983 \begin_inset Quotes erd
11984 \end_inset
11985
11986 , which can be used to define classification codes, such as PACS numbers.
11987  Note that this facility is not supported by the ijmpd package.
11988 \end_layout
11989
11990 \begin_layout Enumerate
11991 Several new environments are available: 
11992 \begin_inset Quotes eld
11993 \end_inset
11994
11995 Definition
11996 \begin_inset Quotes erd
11997 \end_inset
11998
11999
12000 \begin_inset Quotes eld
12001 \end_inset
12002
12003 Step
12004 \begin_inset Quotes erd
12005 \end_inset
12006
12007
12008 \begin_inset Quotes eld
12009 \end_inset
12010
12011 Example
12012 \begin_inset Quotes erd
12013 \end_inset
12014
12015
12016 \begin_inset Quotes eld
12017 \end_inset
12018
12019 Remark
12020 \begin_inset Quotes erd
12021 \end_inset
12022
12023
12024 \begin_inset Quotes eld
12025 \end_inset
12026
12027 Notation
12028 \begin_inset Quotes erd
12029 \end_inset
12030
12031
12032 \begin_inset Quotes eld
12033 \end_inset
12034
12035 Theorem
12036 \begin_inset Quotes erd
12037 \end_inset
12038
12039
12040 \begin_inset Quotes eld
12041 \end_inset
12042
12043 Proof
12044 \begin_inset Quotes erd
12045 \end_inset
12046
12047
12048 \begin_inset Quotes eld
12049 \end_inset
12050
12051 Corollary
12052 \begin_inset Quotes erd
12053 \end_inset
12054
12055
12056 \begin_inset Quotes eld
12057 \end_inset
12058
12059 Lemma
12060 \begin_inset Quotes erd
12061 \end_inset
12062
12063
12064 \begin_inset Quotes eld
12065 \end_inset
12066
12067 Proposition
12068 \begin_inset Quotes erd
12069 \end_inset
12070
12071
12072 \begin_inset Quotes eld
12073 \end_inset
12074
12075 Prop
12076 \begin_inset Quotes erd
12077 \end_inset
12078
12079
12080 \begin_inset Quotes eld
12081 \end_inset
12082
12083 Question
12084 \begin_inset Quotes erd
12085 \end_inset
12086
12087
12088 \begin_inset Quotes eld
12089 \end_inset
12090
12091 Claim
12092 \begin_inset Quotes erd
12093 \end_inset
12094
12095 , and 
12096 \begin_inset Quotes eld
12097 \end_inset
12098
12099 Conjecture
12100 \begin_inset Quotes erd
12101 \end_inset
12102
12103 .
12104  Their use is more or less obvious.
12105  LyX supports all these environments; it will use the proper label, text
12106  style, and numbering scheme for each of them.
12107 \end_layout
12108
12109 \begin_layout Enumerate
12110 Both packages use basic citations; the natbib package should not be used.
12111  In LyX, citation references are shown as usual; in the output, citations
12112  are shown as superscripts.
12113  If you want to use a citation as normal text, you should use the 
12114 \family typewriter
12115 refcite
12116 \family default
12117  command, e.
12118 \begin_inset space \thinspace{}
12119 \end_inset
12120
12121 g.
12122 \begin_inset space \space{}
12123 \end_inset
12124
12125
12126 \begin_inset Quotes eld
12127 \end_inset
12128
12129 See Ref.
12130 \begin_inset space \space{}
12131 \end_inset
12132
12133
12134 \family typewriter
12135
12136 \backslash
12137 refcite{key}
12138 \family default
12139
12140 \begin_inset Quotes erd
12141 \end_inset
12142
12143 .
12144 \end_layout
12145
12146 \begin_layout Enumerate
12147 There is no 
12148 \begin_inset Quotes eld
12149 \end_inset
12150
12151 Acknowledgments
12152 \begin_inset Quotes erd
12153 \end_inset
12154
12155  section in both packages.
12156  To put acknowledgments, just use the 
12157 \begin_inset Quotes eld
12158 \end_inset
12159
12160 Section*
12161 \begin_inset Quotes erd
12162 \end_inset
12163
12164  environment.
12165 \end_layout
12166
12167 \begin_layout Enumerate
12168 Appendices may be added to the paper, 
12169 \emph on
12170 after
12171 \emph default
12172  the Acknowledgments and 
12173 \shape italic
12174 before
12175 \shape default
12176  the References.
12177  LyX provides a special environment, called 
12178 \begin_inset Quotes eld
12179 \end_inset
12180
12181 Appendices Section
12182 \begin_inset Quotes erd
12183 \end_inset
12184
12185  which marks the beginning of the appendices.
12186  This environment should be left blank; it just sends a LaTeX command, but
12187  nothing is really printed.
12188  In LyX, the word 
12189 \begin_inset Quotes eld
12190 \end_inset
12191
12192 Appendix
12193 \begin_inset Quotes erd
12194 \end_inset
12195
12196  is printed with blue letters, as a signal that all sections after that
12197  point are appendices.
12198  To write an appendix, use the 
12199 \begin_inset Quotes eld
12200 \end_inset
12201
12202 Appendix
12203 \begin_inset Quotes erd
12204 \end_inset
12205
12206  environment.
12207  LyX will number each appendix with capital letters, as required by both
12208  journals.
12209  Note that 
12210 \begin_inset Quotes eld
12211 \end_inset
12212
12213 Appendices Section
12214 \begin_inset Quotes erd
12215 \end_inset
12216
12217  
12218 \emph on
12219 must
12220 \emph default
12221  be present before the first appendix; if not, all appendices will be numbered
12222  as normal sections in the output.
12223 \end_layout
12224
12225 \begin_layout Enumerate
12226 The ijmpc and the ijmpd packages use the 
12227 \family typewriter
12228 tbl
12229 \family default
12230  command to implement table captions.
12231  As a result, a table created by LyX is printed correctly, but its caption
12232  is ignored.
12233  However, you can use some TeX code to overcome this problem, so that captions
12234  are printed as expected.
12235  To do so, create a float table as usual, remove the caption, and replace
12236  it with the TeX code 
12237 \family typewriter
12238
12239 \backslash
12240 tbl{
12241 \emph on
12242 your table caption
12243 \emph default
12244 }{
12245 \family default
12246  (sic); you must also the TeX code 
12247 \family typewriter
12248 }
12249 \family default
12250  immediately after the tabular material.
12251  Study the example table included in the template files to see how this
12252  trick is implemented.
12253  Alternatively, If you need table captions, you should implement the whole
12254  table float in a 
12255 \family typewriter
12256 .tex
12257 \family default
12258  file, then include this file to the LyX document (
12259 \family sans
12260 Insert\SpecialChar \menuseparator
12261 File\SpecialChar \menuseparator
12262 Child
12263 \begin_inset space ~
12264 \end_inset
12265
12266 Document
12267 \family default
12268 ).
12269  Details on how to create a table float can be found in the files 
12270 \family typewriter
12271 ws-ijmpc.tex
12272 \family default
12273  and 
12274 \family typewriter
12275 ws-ijmpd.tex
12276 \family default
12277 , included in the corresponding packages.
12278 \end_layout
12279
12280 \begin_layout Subsection
12281 Preparing a paper for submission
12282 \end_layout
12283
12284 \begin_layout Standard
12285 Before you submit your paper you must export the LyX document as a LaTeX
12286  file (
12287 \family sans
12288 File\SpecialChar \menuseparator
12289 Export\SpecialChar \menuseparator
12290 LaTeX
12291 \family default
12292 )
12293 \begin_inset Foot
12294 status open
12295
12296 \begin_layout Plain Layout
12297 Actually you have the choice between LaTeX (plain) and pdflatex.
12298  If you intend to use pdflatex to prepare the paper, you should use the
12299  pdflatex option so that included graphics are converted to PDF format,
12300  ready for use by pdflatex.
12301 \end_layout
12302
12303 \end_inset
12304
12305 , then make the following changes to the resulting 
12306 \family typewriter
12307 .tex
12308 \family default
12309  file.
12310 \end_layout
12311
12312 \begin_layout Enumerate
12313 Remove the comment lines before the 
12314 \family typewriter
12315
12316 \backslash
12317 documentclass
12318 \family default
12319  command.
12320 \end_layout
12321
12322 \begin_layout Enumerate
12323 Remove everything between (and including) the 
12324 \family typewriter
12325
12326 \backslash
12327 makeatletter
12328 \family default
12329  and 
12330 \family typewriter
12331
12332 \backslash
12333 makeatother
12334 \family default
12335  commands, except for any commands you specifically put into the LaTeX preamble.
12336 \end_layout
12337
12338 \begin_layout Standard
12339 The modified 
12340 \family typewriter
12341 .tex
12342 \family default
12343  file should be saved and processed through LaTeX as many times as necessary.
12344  You may also want to check the resulting 
12345 \family typewriter
12346 .dvi
12347 \family default
12348  document.
12349 \end_layout
12350
12351 \begin_layout Subsection
12352 Use of TeX code
12353 \end_layout
12354
12355 \begin_layout Standard
12356 The use of TeX code is reduced to two commands, which must be placed at
12357  the top of the document.
12358  If you started writing your paper by using the 
12359 \family typewriter
12360 ijmpc.lyx
12361 \family default
12362  or the 
12363 \family typewriter
12364 ijmpd.lyx
12365 \family default
12366  template, the TeX code needed is already in its place; you usually don't
12367  need to delete it.
12368  You may only modify the first TeX code to specify the information printed
12369  to the top of odd and even pages (authors' names and short paper's title,
12370  respectively).
12371  This TeX code must have the form 
12372 \family typewriter
12373
12374 \backslash
12375 markboth{Authors' Names}{Short Paper's Title}
12376 \family default
12377 .
12378 \end_layout
12379
12380 \begin_layout Section
12381 iopart
12382 \end_layout
12383
12384 \begin_layout Standard
12385 by 
12386 \noun on
12387 Uwe Stöhr
12388 \end_layout
12389
12390 \begin_layout Subsection
12391 Overview
12392 \end_layout
12393
12394 \begin_layout Standard
12395 The iopart package provides a document class to create electronic manuscript
12396  submission to the journals published by the Institute of Physics.
12397  Instructions for the authors how to create a paper using the iopart class
12398  can be downloaded together with the iopart package from the site 
12399 \begin_inset Flex URL
12400 status collapsed
12401
12402 \begin_layout Plain Layout
12403
12404 ftp://ftp.iop.org/pub/journals/latex2e
12405 \end_layout
12406
12407 \end_inset
12408
12409 .
12410 \end_layout
12411
12412 \begin_layout Subsection
12413 Writing a paper
12414 \end_layout
12415
12416 \begin_layout Standard
12417 The easiest way to write a paper is to start with the file 
12418 \emph on
12419 IOP-article.lyx
12420 \emph default
12421  that is available in LyX's examples files folder.
12422  Open this file, save it under a new name, and start writing.
12423  The example file explains how to use the special text environments.
12424  Here are the most important advices:
12425 \end_layout
12426
12427 \begin_layout Itemize
12428 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12429  two options 
12430 \family sans
12431 Use AMS math package
12432 \family default
12433  in the document settings under 
12434 \family sans
12435 Math Options
12436 \family default
12437  are not used!
12438 \end_layout
12439
12440 \begin_layout Itemize
12441
12442 \size normal
12443 The title environment defines the kind of your paper.
12444  So use one of the following environments for the title:
12445 \end_layout
12446
12447 \begin_deeper
12448 \begin_layout Itemize
12449
12450 \family sans
12451 \size normal
12452 Title
12453 \family default
12454  for a Paper
12455 \end_layout
12456
12457 \begin_layout Itemize
12458
12459 \family sans
12460 \size normal
12461 Review
12462 \family default
12463  for a Review
12464 \end_layout
12465
12466 \begin_layout Itemize
12467
12468 \family sans
12469 \size normal
12470 Topical
12471 \family default
12472  for a Topical review
12473 \end_layout
12474
12475 \begin_layout Itemize
12476
12477 \family sans
12478 \size normal
12479 Comment
12480 \family default
12481  for a Comment
12482 \end_layout
12483
12484 \begin_layout Itemize
12485
12486 \family sans
12487 \size normal
12488 Note
12489 \family default
12490  for a Note
12491 \end_layout
12492
12493 \begin_layout Itemize
12494
12495 \family sans
12496 \size normal
12497 Paper
12498 \family default
12499  for a Paper (same as Title)
12500 \end_layout
12501
12502 \begin_layout Itemize
12503
12504 \family sans
12505 \size normal
12506 Prelim
12507 \family default
12508  for a Preliminary communication
12509 \end_layout
12510
12511 \begin_layout Itemize
12512
12513 \family sans
12514 \size normal
12515 Rapid
12516 \family default
12517  for a Rapid communication
12518 \end_layout
12519
12520 \begin_layout Itemize
12521
12522 \family sans
12523 \size normal
12524 Letter
12525 \family default
12526  for a Letter to the editor
12527 \end_layout
12528
12529 \end_deeper
12530 \begin_layout Itemize
12531
12532 \size normal
12533 All title environments except of 
12534 \family sans
12535 Letter
12536 \family default
12537  can have an optional short title.
12538 \end_layout
12539
12540 \begin_layout Itemize
12541 There is a general title environment 
12542 \family sans
12543 Article
12544 \family default
12545  which is not directly supported by the LyX.
12546  This can be used as TeX code when your document doesn't fit into one of
12547  the other title types.
12548 \end_layout
12549
12550 \begin_layout Standard
12551 For more informations like hints for special table and formula formatting,
12552  look at the IOP author guidelines.
12553 \end_layout
12554
12555 \begin_layout Section
12556 Kluwer
12557 \end_layout
12558
12559 \begin_layout Standard
12560 by 
12561 \noun on
12562 Panayotis Papasotiriou
12563 \end_layout
12564
12565 \begin_layout Subsection
12566 Overview
12567 \end_layout
12568
12569 \begin_layout Standard
12570 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12571  that facilitates electronic manuscript submission to the journals they
12572  publish.
12573  Most known of them (at least in my domain of interest) are 
12574 \emph on
12575 Astrophysics and Space Science
12576 \emph default
12577  and 
12578 \emph on
12579 Solar Physics
12580 \emph default
12581 , but there are many others (see a complete list at 
12582 \begin_inset Flex URL
12583 status open
12584
12585 \begin_layout Plain Layout
12586
12587 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12588 \end_layout
12589
12590 \end_inset
12591
12592 ).
12593  The Kluwer package may be downloaded from the site 
12594 \begin_inset Flex URL
12595 status collapsed
12596
12597 \begin_layout Plain Layout
12598
12599 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12600 \end_layout
12601
12602 \end_inset
12603
12604 .
12605  A complete user guide is contained in that package (but it can also be
12606  downloaded separately).
12607 \end_layout
12608
12609 \begin_layout Standard
12610 LyX supports many features of the package but not everything.
12611  However, the TeX code needed is reduced to some 
12612 \begin_inset Quotes eld
12613 \end_inset
12614
12615 peculiar
12616 \begin_inset Quotes erd
12617 \end_inset
12618
12619  commands of the package (see
12620 \begin_inset space ~
12621 \end_inset
12622
12623
12624 \begin_inset CommandInset ref
12625 LatexCommand ref
12626 reference "subsec:kluwer_peculiarities"
12627
12628 \end_inset
12629
12630 ).
12631  I have recently used LyX to write an article submitted to the 
12632 \emph on
12633 Astrophysics and Space Science
12634 \emph default
12635  without any problem.
12636 \end_layout
12637
12638 \begin_layout Subsection
12639 Writing a paper
12640 \end_layout
12641
12642 \begin_layout Standard
12643 The easiest way to write a paper is to start with the Kluwer template file.
12644  Click on 
12645 \family sans
12646 File\SpecialChar \menuseparator
12647 New from
12648 \family default
12649  
12650 \family sans
12651 Template
12652 \family default
12653 , then choose the 
12654 \family typewriter
12655 kluwer.lyx
12656 \family default
12657  template.
12658  This will give an (almost) empty document that includes the most common
12659  fields found in a manuscript and a short description of their use.
12660  As in most templates, simply overwrite the existing text (including the
12661  brackets, 
12662 \family typewriter
12663 <>
12664 \family default
12665 ) with the correct information.
12666 \end_layout
12667
12668 \begin_layout Subsection
12669 Preparing a paper for submission
12670 \end_layout
12671
12672 \begin_layout Standard
12673 As in the AASTeX package, before you submit your paper to a journal you
12674  must 
12675 \begin_inset Quotes eld
12676 \end_inset
12677
12678 postprocess
12679 \begin_inset Quotes erd
12680 \end_inset
12681
12682  it as follows.
12683 \end_layout
12684
12685 \begin_layout Enumerate
12686 Export your paper as a LaTeX file.
12687  To do this, click on 
12688 \family sans
12689 File\SpecialChar \menuseparator
12690 Export\SpecialChar \menuseparator
12691 LaTeX
12692 \family default
12693 .
12694  
12695 \end_layout
12696
12697 \begin_layout Enumerate
12698 Edit the resulting 
12699 \family typewriter
12700 .tex
12701 \family default
12702  file with a text editor and make the following changes
12703 \end_layout
12704
12705 \begin_deeper
12706 \begin_layout Enumerate
12707 remove the comment lines before the 
12708 \family typewriter
12709
12710 \backslash
12711 documentclass
12712 \family default
12713  command,
12714 \end_layout
12715
12716 \begin_layout Enumerate
12717 remove everything between (and including) the 
12718 \family typewriter
12719
12720 \backslash
12721 makeatletter
12722 \family default
12723  and 
12724 \family typewriter
12725
12726 \backslash
12727 makeatother
12728 \family default
12729  commands, except for any commands you specifically put into the LaTeX preamble.
12730 \end_layout
12731
12732 \begin_layout Standard
12733 Save the resulting 
12734 \family typewriter
12735 .tex
12736 \family default
12737  file.
12738 \end_layout
12739
12740 \end_deeper
12741 \begin_layout Enumerate
12742 Run the 
12743 \family typewriter
12744 .tex
12745 \family default
12746  file through LaTeX as many times as necessary (usually up to three).
12747 \end_layout
12748
12749 \begin_layout Enumerate
12750 View the resulting 
12751 \family typewriter
12752 .dvi
12753 \family default
12754  document using, e.
12755 \begin_inset space \thinspace{}
12756 \end_inset
12757
12758 g.
12759 \begin_inset space \space{}
12760 \end_inset
12761
12762
12763 \family sans
12764 xdvi
12765 \family default
12766 , and check if everything is OK (it should, if you didn't make any mistake).
12767 \end_layout
12768
12769 \begin_layout Subsection
12770 \begin_inset Quotes eld
12771 \end_inset
12772
12773 Peculiarities
12774 \begin_inset Quotes erd
12775 \end_inset
12776
12777  of the Kluwer package
12778 \begin_inset CommandInset label
12779 LatexCommand label
12780 name "subsec:kluwer_peculiarities"
12781
12782 \end_inset
12783
12784
12785 \end_layout
12786
12787 \begin_layout Standard
12788 The Kluwer package has the following 
12789 \begin_inset Quotes eld
12790 \end_inset
12791
12792 peculiarities
12793 \begin_inset Quotes erd
12794 \end_inset
12795
12796 .
12797 \end_layout
12798
12799 \begin_layout Enumerate
12800 It is possible to write multiple articles in the same LaTeX file
12801 \begin_inset Foot
12802 status collapsed
12803
12804 \begin_layout Plain Layout
12805 I can't imagine any good reason to do this.
12806 \end_layout
12807
12808 \end_inset
12809
12810 .
12811  Each article must be included in the environment 
12812 \begin_inset Quotes eld
12813 \end_inset
12814
12815 article
12816 \begin_inset Quotes erd
12817 \end_inset
12818
12819 .
12820  Unfortunately, this environment cannot be omitted, even if you write just
12821  one article.
12822  Therefore, each article starts with the command 
12823 \family typewriter
12824
12825 \backslash
12826 begin{article}
12827 \family default
12828  and, obviously, ends with the command 
12829 \family typewriter
12830
12831 \backslash
12832 end{article}
12833 \family default
12834 .
12835  Although this can be implemented in LyX, I didn't included it, since it
12836  looks ugly and can confuse the novice user.
12837  Therefore, you need to enter them directly and mark them as LaTeX code
12838  (the well-known 
12839 \begin_inset Quotes eld
12840 \end_inset
12841
12842 TeX code
12843 \begin_inset Quotes erd
12844 \end_inset
12845
12846 ).
12847 \end_layout
12848
12849 \begin_layout Enumerate
12850 Information given at the beginning of the article (i.
12851 \begin_inset space \thinspace{}
12852 \end_inset
12853
12854 e.
12855 \begin_inset space \space{}
12856 \end_inset
12857
12858 title, subtitle, author, institution, running title, running author, abstract
12859  and keywords) must be included in an environment called 
12860 \begin_inset Quotes eld
12861 \end_inset
12862
12863 opening
12864 \begin_inset Quotes erd
12865 \end_inset
12866
12867 .
12868  This is not implemented in LyX, so you must enter title, subtitle etc.
12869 \begin_inset space ~
12870 \end_inset
12871
12872 between two TeX code lines (
12873 \family typewriter
12874
12875 \backslash
12876 begin{opening}
12877 \family default
12878  and 
12879 \family typewriter
12880
12881 \backslash
12882 end{opening}
12883 \family default
12884 ).
12885 \end_layout
12886
12887 \begin_layout Enumerate
12888 According to the user manual, the label of each bibliography item must be
12889  written as 
12890 \family typewriter
12891
12892 \backslash
12893 protect
12894 \backslash
12895 citeauthoryear{
12896 \family default
12897 \emph on
12898 author(s)
12899 \family typewriter
12900 \emph default
12901 }{
12902 \family default
12903 \emph on
12904 year
12905 \family typewriter
12906 \emph default
12907 }
12908 \family default
12909 .
12910 \end_layout
12911
12912 \begin_layout Standard
12913 The 
12914 \family typewriter
12915 kluwer.lyx
12916 \family default
12917  template takes care of all these 
12918 \begin_inset Quotes eld
12919 \end_inset
12920
12921 peculiarities
12922 \begin_inset Quotes erd
12923 \end_inset
12924
12925 .
12926  If you start a new paper using this template you don't need to do anything
12927  special.
12928  Just 
12929 \end_layout
12930
12931 \begin_layout Enumerate
12932 don't delete the TeX code included in the template, and
12933 \end_layout
12934
12935 \begin_layout Enumerate
12936 copy the example bibliography item included in the template and modify it
12937  as necessary to enter new bibliography items.
12938 \end_layout
12939
12940 \begin_layout Section
12941 Koma-Script
12942 \end_layout
12943
12944 \begin_layout Standard
12945 by 
12946 \noun on
12947 Bernd Rellermeyer
12948 \end_layout
12949
12950 \begin_layout Subsection
12951 Overview
12952 \end_layout
12953
12954 \begin_layout Standard
12955 The LyX document classes 
12956 \emph on
12957 article (koma-script)
12958 \emph default
12959
12960 \emph on
12961 report (koma-script)
12962 \emph default
12963
12964 \emph on
12965 book
12966 \emph default
12967  
12968 \emph on
12969 (koma-script)
12970 \emph default
12971 , and 
12972 \emph on
12973 letter
12974 \emph default
12975  
12976 \emph on
12977 (koma-script)
12978 \emph default
12979  correspond to the LaTeX document classes 
12980 \family typewriter
12981 scrartcl.cls
12982 \family default
12983
12984 \family typewriter
12985 scrreprt.cls
12986 \family default
12987
12988 \family typewriter
12989 scrbook.cls
12990 \family default
12991 , and 
12992 \family typewriter
12993 scrlettr.cls
12994 \family default
12995 , resp.
12996 \begin_inset space ~
12997 \end_inset
12998
12999 of the Koma-Script family.
13000  They are replacements for the standard document classes 
13001 \family typewriter
13002 article.cls
13003 \family default
13004
13005 \family typewriter
13006 report.cls
13007 \family default
13008
13009 \family typewriter
13010 book.cls
13011 \family default
13012  and 
13013 \family typewriter
13014 letter.cls
13015 \family default
13016 , resp., and fit better to European typography conventions in a number of
13017  points.
13018 \end_layout
13019
13020 \begin_layout Itemize
13021 Standard character size is 11pt in 
13022 \emph on
13023 article (koma-script)
13024 \emph default
13025
13026 \emph on
13027 report (koma-script)
13028 \emph default
13029 , and 
13030 \emph on
13031 book (koma-script)
13032 \emph default
13033 , and 12pt in 
13034 \emph on
13035 letter (koma-script)
13036 \emph default
13037 .
13038 \end_layout
13039
13040 \begin_layout Itemize
13041 Headings, labels of the description environment, and a number of elements
13042  of the 
13043 \emph on
13044 letter (koma-script)
13045 \emph default
13046  document class are set in a bold sans serif font.
13047 \begin_inset Foot
13048 status collapsed
13049
13050 \begin_layout Plain Layout
13051 There is a big difference between the bold sans serif old cm fonts and new
13052  ec fonts, especially in the appearance of headings.
13053  In comparison, the ec bold sans serif fonts look a bit thin.
13054  Here the LaTeX package 
13055 \family typewriter
13056 cmsd.sty by
13057 \family default
13058  
13059 \shape smallcaps
13060 Walter Schmidt
13061 \shape default
13062  helps to produce the 
13063 \begin_inset Quotes eld
13064 \end_inset
13065
13066 usual
13067 \begin_inset Quotes erd
13068 \end_inset
13069
13070  appearance when using the ec fonts.
13071 \end_layout
13072
13073 \end_inset
13074
13075  The numbering of chapter headings is made in the same way as the numbering
13076  of section headings, that is without the extra line 
13077 \begin_inset Quotes eld
13078 \end_inset
13079
13080 Chapter\SpecialChar \ldots{}
13081
13082 \begin_inset Quotes erd
13083 \end_inset
13084
13085 .
13086  In addition, the appearance of the headings can be modified by using a
13087  number of options (in LyX to be entered in the field 
13088 \family sans
13089 Extra
13090 \begin_inset space ~
13091 \end_inset
13092
13093 Options
13094 \family default
13095  of the dialog 
13096 \family sans
13097 Layout\SpecialChar \menuseparator
13098 Document
13099 \family default
13100 ).
13101  
13102 \end_layout
13103
13104 \begin_layout Itemize
13105 The main means in the Koma-Script document classes to design the type area
13106  are the options 
13107 \family sans
13108 BCOR
13109 \family default
13110  and 
13111 \family sans
13112 DIV
13113 \family default
13114  (in LyX to be entered in the extra class options field in the dialog 
13115 \family sans
13116 Document\SpecialChar \menuseparator
13117 Settings
13118 \family default
13119 ).
13120  They make a clearer modification of page margins possible as do the options
13121  of the dialog 
13122 \family sans
13123 Document\SpecialChar \menuseparator
13124 Settings
13125 \family default
13126 .
13127  
13128 \end_layout
13129
13130 \begin_layout Itemize
13131 The LaTeX document classes of the Koma-Script family define a number of
13132  additional commands.
13133  Those part of it which makes sense in LyX is implemented in corresponding
13134  paragraph types.
13135 \end_layout
13136
13137 \begin_layout Standard
13138 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13139  can be found in the Koma-Script documentation 
13140 \emph on
13141 scrguide
13142 \emph default
13143  (German) and 
13144 \emph on
13145 scrguien
13146 \emph default
13147  (English).
13148 \end_layout
13149
13150 \begin_layout Subsection
13151 article (koma-script), report (koma-script), and book (koma-script)
13152 \end_layout
13153
13154 \begin_layout Standard
13155 The document classes 
13156 \emph on
13157 article (koma-script)
13158 \emph default
13159
13160 \emph on
13161 report (koma-script)
13162 \emph default
13163 , and 
13164 \emph on
13165 book
13166 \emph default
13167  
13168 \emph on
13169 (koma-script)
13170 \emph default
13171  are implemented in the layout files 
13172 \family typewriter
13173 scrartcl.layout
13174 \family default
13175
13176 \family typewriter
13177 scrreprt.layout
13178 \family default
13179 , and 
13180 \family typewriter
13181 scrbook.layout
13182 \family default
13183 , resp.
13184  They contain all the paragraph types of the corresponding standard document
13185  classes 
13186 \emph on
13187 article
13188 \emph default
13189
13190 \emph on
13191 report
13192 \emph default
13193 , and 
13194 \emph on
13195 book
13196 \emph default
13197 , resp., partly modified, with the exception of the LyX specific 
13198 \family sans
13199 List
13200 \family default
13201 -type, which is replaced by the new 
13202 \family sans
13203 Labeling
13204 \family default
13205 -type having the same functionality.
13206  Beside the 
13207 \family sans
13208 Labeling
13209 \family default
13210 -Type there is a number of new paragraph types added.
13211  They are 
13212 \emph on
13213 not
13214 \emph default
13215  part of 
13216 \emph on
13217 letter (koma-script)
13218 \emph default
13219 .
13220 \end_layout
13221
13222 \begin_layout Itemize
13223
13224 \family sans
13225 Addpart, Addchap
13226 \family default
13227
13228 \family sans
13229 Addsec
13230 \family default
13231 : are equivalents to 
13232 \family sans
13233 Part*, Chapter*
13234 \family default
13235  and 
13236 \family sans
13237 Section*
13238 \family default
13239 , resp., additionally inserting an entry in the table of contents.
13240  
13241 \family sans
13242 Addpart
13243 \family default
13244  and 
13245 \family sans
13246 Addchap
13247 \family default
13248  are not contained in 
13249 \emph on
13250 article (koma-script)
13251 \emph default
13252 .
13253 \end_layout
13254
13255 \begin_layout Itemize
13256
13257 \family sans
13258 Addchap*
13259 \family default
13260
13261 \family sans
13262 Addsec*
13263 \family default
13264 : behave exactly as 
13265 \family sans
13266 Addchap
13267 \family default
13268  and 
13269 \family sans
13270 Addsec
13271 \family default
13272 , resp., additionally clearing running heads.
13273  
13274 \family sans
13275 Addchap*
13276 \family default
13277  is not contained in 
13278 \emph on
13279 article (koma-script)
13280 \emph default
13281 .
13282 \begin_inset Foot
13283 status collapsed
13284
13285 \begin_layout Plain Layout
13286 There is also an 
13287 \family typewriter
13288
13289 \backslash
13290 addpart*
13291 \family default
13292  command in 
13293 \emph on
13294 book (koma-script)
13295 \emph default
13296  and in 
13297 \emph on
13298 report (koma-script)
13299 \emph default
13300 , but since this is identical to 
13301 \family sans
13302 Part*
13303 \family default
13304 , is has not been implemented in LyX.
13305 \end_layout
13306
13307 \end_inset
13308
13309
13310 \end_layout
13311
13312 \begin_layout Itemize
13313
13314 \family sans
13315 Minisec
13316 \family default
13317 : generates a heading directly above the following paragraph in the standard
13318  character size without affecting the structure of the document.
13319 \end_layout
13320
13321 \begin_layout Itemize
13322
13323 \family sans
13324 Captionabove
13325 \family default
13326  and 
13327 \family sans
13328 Captionbelow
13329 \family default
13330  are special captions which respect the different space settings needed
13331  for captions placed above or below an element (if you follow strict typographic
13332  rules, you might want to place table captions always above the table).
13333  You can also use the class option 
13334 \family typewriter
13335 tablecaptionsabove
13336 \family default
13337 , which will switch 
13338 \family sans
13339 caption
13340 \family default
13341  to 
13342 \family sans
13343 captionabove
13344 \family default
13345  for tables and 
13346 \family sans
13347 captionbelow
13348 \family default
13349  for figures.
13350  You need at least Koma-Script version 2.8q to use this.
13351 \end_layout
13352
13353 \begin_layout Itemize
13354
13355 \family sans
13356 Dictum
13357 \family default
13358 : can be used to set a bonmot, e.
13359 \begin_inset space \thinspace{}
13360 \end_inset
13361
13362 g.
13363 \begin_inset space \space{}
13364 \end_inset
13365
13366 at the beginning of a chapter.
13367  If you use the optional argument (
13368 \family sans
13369 Insert\SpecialChar \menuseparator
13370 Short
13371 \begin_inset space ~
13372 \end_inset
13373
13374 Title
13375 \family default
13376 ), you can insert the dictum's author there.
13377  Dictum and author are separated by a line.
13378  You need at least Koma-Script version 2.8q to use this.
13379  
13380 \family sans
13381 Dictum
13382 \family default
13383  is not contained in 
13384 \emph on
13385 article (koma-script)
13386 \emph default
13387 .
13388 \end_layout
13389
13390 \begin_layout Standard
13391 The following types, together with the standard types 
13392 \family sans
13393 Title
13394 \family default
13395
13396 \family sans
13397 Author
13398 \family default
13399 , and 
13400 \family sans
13401 Date
13402 \family default
13403 , form the title area of the document.
13404  They must be entered ahead of the first 
13405 \begin_inset Quotes eld
13406 \end_inset
13407
13408 ordinary
13409 \begin_inset Quotes erd
13410 \end_inset
13411
13412  paragraph.
13413 \begin_inset Foot
13414 status collapsed
13415
13416 \begin_layout Plain Layout
13417 The corresponding LaTeX commands must appear before the 
13418 \family typewriter
13419
13420 \backslash
13421 maketitle
13422 \family default
13423  command.
13424 \end_layout
13425
13426 \end_inset
13427
13428  When such a type is used more than once, the latter usage overwrites the
13429  former one, that means, for every type only the latest usage is valid.
13430  The order of the different types however has, like 
13431 \family sans
13432 Title
13433 \family default
13434
13435 \family sans
13436 Author
13437 \family default
13438 , and 
13439 \family sans
13440 Date
13441 \family default
13442 , no effect on the appearance of the produced document.
13443 \end_layout
13444
13445 \begin_layout Itemize
13446
13447 \family sans
13448 Subject
13449 \family default
13450 : produces a centered paragraph above 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 subject of the document.
13463 \end_layout
13464
13465 \begin_layout Itemize
13466
13467 \family sans
13468 Publishers
13469 \family default
13470 : produces a centered paragraph below the ordinary title (
13471 \family sans
13472 Title
13473 \family default
13474
13475 \family sans
13476 Author
13477 \family default
13478
13479 \family sans
13480 Date
13481 \family default
13482 ) for the publishers' name.
13483 \end_layout
13484
13485 \begin_layout Itemize
13486
13487 \family sans
13488 Dedication
13489 \family default
13490 : in 
13491 \emph on
13492 report (koma-script)
13493 \emph default
13494  and 
13495 \emph on
13496 book (koma-script)
13497 \emph default
13498  produces a centered paragraph on its own page behind the title page, or
13499  in 
13500 \emph on
13501 article (koma-script)
13502 \emph default
13503  produces a centered paragraph below the ordinary title (
13504 \family sans
13505 Title
13506 \family default
13507
13508 \family sans
13509 Author
13510 \family default
13511
13512 \family sans
13513 Date
13514 \family default
13515
13516 \family sans
13517 Publishers
13518 \family default
13519 ) for a dedication.
13520 \end_layout
13521
13522 \begin_layout Itemize
13523
13524 \family sans
13525 Titlehead
13526 \family default
13527 : produces a left aligned paragraph above the ordinary title (
13528 \family sans
13529 Title
13530 \family default
13531
13532 \family sans
13533 Author
13534 \family default
13535
13536 \family sans
13537 Date
13538 \family default
13539
13540 \family sans
13541 Subject
13542 \family default
13543 ) for a document`s head.
13544 \end_layout
13545
13546 \begin_layout Itemize
13547
13548 \family sans
13549 Uppertitleback
13550 \family default
13551 : produces in a double-sided print in 
13552 \emph on
13553 report (koma-script)
13554 \emph default
13555  and 
13556 \emph on
13557 book (koma-script)
13558 \emph default
13559  a left-aligned paragraph at the top of the title page`s back or has no
13560  effect in a single-sided print or in 
13561 \emph on
13562 article (koma-script)
13563 \emph default
13564 .
13565 \end_layout
13566
13567 \begin_layout Itemize
13568
13569 \family sans
13570 Lowertitleback
13571 \family default
13572 : produces in a double-sided print in 
13573 \emph on
13574 report (koma-script)
13575 \emph default
13576  and 
13577 \emph on
13578 book (koma-script)
13579 \emph default
13580  a left-aligned paragraph at the bottom of the title page`s back or has
13581  no effect in a single-sided print or in 
13582 \emph on
13583 article (koma-script)
13584 \emph default
13585 .
13586 \end_layout
13587
13588 \begin_layout Itemize
13589
13590 \family sans
13591 Extratitle
13592 \family default
13593 : produces a special 
13594 \begin_inset Quotes eld
13595 \end_inset
13596
13597 dirty
13598 \begin_inset Quotes erd
13599 \end_inset
13600
13601  page ahead of the actual document containing a paragraph without special
13602  formatting.
13603 \end_layout
13604
13605 \begin_layout Standard
13606 The layout files for the document classes 
13607 \emph on
13608 article (koma-script)
13609 \emph default
13610
13611 \emph on
13612 report (koma-script)
13613 \emph default
13614 , and 
13615 \emph on
13616 book (koma-script)
13617 \emph default
13618  do include the file 
13619 \family typewriter
13620 scrmacros.inc
13621 \family default
13622 .
13623  This is thought of as a place to define your own types.
13624  Copy scrmacros
13625 \family typewriter
13626 .inc
13627 \family default
13628  in your personal layout directory and edit the file!
13629 \end_layout
13630
13631 \begin_layout Subsection
13632 letter (koma-script)
13633 \end_layout
13634
13635 \begin_layout Standard
13636 \noindent
13637 The document class 
13638 \emph on
13639 letter (koma-script)
13640 \emph default
13641  is implemented in the layout file 
13642 \family typewriter
13643 scrlettr.layout
13644 \family default
13645 .
13646  It contains all the paragraph types of the corresponding standard document
13647  class 
13648 \emph on
13649 letter
13650 \emph default
13651 , partly modified, with the exception of the LyX specific types 
13652 \family sans
13653 LyX-Code
13654 \family default
13655  and 
13656 \family sans
13657 Comment
13658 \family default
13659  and the 
13660 \family sans
13661 List
13662 \family default
13663  type, which is replaced by the new 
13664 \family sans
13665 Labeling
13666 \family default
13667  type.
13668  In addition, it contains, in contrast to the standard document class, the
13669  standard types 
13670 \family sans
13671 LaTeX
13672 \family default
13673
13674 \family sans
13675 Quotation
13676 \family default
13677
13678 \family sans
13679 Quote
13680 \family default
13681 , and 
13682 \family sans
13683 Verse
13684 \family default
13685 .
13686  Furthermore, there are a number of new letter specific types.
13687 \end_layout
13688
13689 \begin_layout Standard
13690 The appearance of the letter produced by this document class can be controlled
13691  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13692 \begin_inset Foot
13693 status collapsed
13694
13695 \begin_layout Plain Layout
13696 For example, the standard appearance of the letter`s heading, consisting
13697  of name and address, is quite self-willed.
13698  An 
13699 \begin_inset Quotes eld
13700 \end_inset
13701
13702 ordinary
13703 \begin_inset Quotes erd
13704 \end_inset
13705
13706  heading is produced by the following LaTeX commands in the preamble:
13707 \end_layout
13708
13709 \begin_layout LyX-Code
13710
13711 \backslash
13712 firsthead{
13713 \backslash
13714 parbox[b]{
13715 \backslash
13716 textwidth}
13717 \end_layout
13718
13719 \begin_layout LyX-Code
13720   {
13721 \backslash
13722 ignorespaces 
13723 \backslash
13724 fromname
13725 \backslash
13726
13727 \backslash
13728  
13729 \backslash
13730 ignorespaces 
13731 \backslash
13732 fromaddress}} 
13733 \end_layout
13734
13735 \begin_layout LyX-Code
13736
13737 \backslash
13738 nexthead{
13739 \backslash
13740 parbox[b]{
13741 \backslash
13742 textwidth}
13743 \end_layout
13744
13745 \begin_layout LyX-Code
13746   {
13747 \backslash
13748 ignorespaces 
13749 \backslash
13750 fromname 
13751 \backslash
13752 hfill 
13753 \backslash
13754 ignorespaces 
13755 \backslash
13756 pagename
13757 \backslash
13758  
13759 \backslash
13760 thepage}}
13761 \end_layout
13762
13763 \end_inset
13764
13765  A detailed German description of such LaTeX commands can be found in the
13766  Koma-Script documentation 
13767 \emph on
13768 scrguide
13769 \emph default
13770 .
13771  With it, the letter's author can produce his personal letter layout.
13772 \end_layout
13773
13774 \begin_layout Standard
13775 The types 
13776 \family sans
13777 Letter
13778 \family default
13779  and 
13780 \family sans
13781 Opening
13782 \family default
13783  define the beginning of the letter and must be used in every letter.
13784  To emphasize them in the LyX document class, they are marked with the letter
13785  
13786 \shape italic
13787 L
13788 \shape default
13789  or 
13790 \shape italic
13791 O
13792 \shape default
13793 , resp.
13794 \begin_inset space ~
13795 \end_inset
13796
13797 in the left margin.
13798  It is possible to write any number of letters in one file.
13799  An 
13800 \family sans
13801 Opening
13802 \family default
13803  type produces a new letter using the same addressee and a 
13804 \family sans
13805 Letter
13806 \family default
13807  type produces a new addressee.
13808  The types 
13809 \family sans
13810 Closing
13811 \family default
13812
13813 \family sans
13814 PS
13815 \family default
13816
13817 \family sans
13818 CC
13819 \family default
13820 , and 
13821 \family sans
13822 Encl
13823 \family default
13824  are ordinary paragraph types and can also be used several times in one
13825  and the same letter.
13826 \end_layout
13827
13828 \begin_layout Itemize
13829
13830 \family sans
13831 Letter
13832 \family default
13833 : produces a paragraph for the addressee and implicitly defines the beginning
13834  of the letter.
13835 \end_layout
13836
13837 \begin_layout Itemize
13838
13839 \family sans
13840 Opening
13841 \family default
13842 : produces a paragraph for the form of address and implicitly produces a
13843  new letter.
13844 \end_layout
13845
13846 \begin_layout Itemize
13847
13848 \family sans
13849 Closing
13850 \family default
13851 : produces a paragraph for a close.
13852 \end_layout
13853
13854 \begin_layout Itemize
13855
13856 \family sans
13857 PS
13858 \family default
13859 : produces a paragraph for a postscript.
13860 \end_layout
13861
13862 \begin_layout Itemize
13863
13864 \family sans
13865 CC
13866 \family default
13867 : produces a paragraph for a distribution list.
13868 \end_layout
13869
13870 \begin_layout Itemize
13871
13872 \family sans
13873 Encl
13874 \family default
13875 : produces a paragraph for enclosures.
13876 \end_layout
13877
13878 \begin_layout Standard
13879 The types 
13880 \family sans
13881 Name
13882 \family default
13883
13884 \family sans
13885 Signature
13886 \family default
13887
13888 \family sans
13889 Address
13890 \family default
13891
13892 \family sans
13893 Telephone
13894 \family default
13895
13896 \family sans
13897 Place
13898 \family default
13899
13900 \family sans
13901 Backaddress
13902 \family default
13903
13904 \family sans
13905 Specialmail
13906 \family default
13907
13908 \family sans
13909 Location
13910 \family default
13911
13912 \family sans
13913 Title
13914 \family default
13915 , and 
13916 \family sans
13917 Subject
13918 \family default
13919  are input types provided with a label to enter information, which will
13920  be processed by the document class.
13921 \begin_inset Foot
13922 status open
13923
13924 \begin_layout Plain Layout
13925 It could be seen as a matter of inconsequence, that the types 
13926 \family sans
13927 Letter
13928 \family default
13929  and 
13930 \family sans
13931 Opening
13932 \family default
13933  described above are not such input types as well.
13934  Because of the special meaning of those types, however, I have implemented
13935  them as ordinary paragraph types with a one letter mark in the left margin.
13936  Moreover, it would affect my feeling of symmetry, if the 
13937 \family sans
13938 Opening
13939 \family default
13940  type and the 
13941 \family sans
13942 Closing
13943 \family default
13944  type had such a serious different appearance.
13945 \end_layout
13946
13947 \end_inset
13948
13949  The types must be used ahead of the corresponding 
13950 \family sans
13951 Opening
13952 \family default
13953  type.
13954 \end_layout
13955
13956 \begin_layout Standard
13957 An implementation of these types in a WYSIWYG fashion does not seem to make
13958  sense, because the real appearance of the produced letter does not only
13959  depend on the usage of the particular type, but also on other factors.
13960  For example, a signature entered in the 
13961 \family sans
13962 Signature
13963 \family default
13964  type will in the standard behavior appear in the produced letter only,
13965  when in the same letter also a 
13966 \family sans
13967 Closing
13968 \family default
13969  type is used.
13970  The entered value of the 
13971 \family sans
13972 Telephone
13973 \family default
13974  type will in the standard behavior not appear in the produced letter at
13975  all.
13976  The possibility to design the letter`s heading freely is already indicated
13977  in a footnote above.
13978 \end_layout
13979
13980 \begin_layout Standard
13981 The input types can also be used as empty paragraphs.
13982  This makes sense e.
13983 \begin_inset space \thinspace{}
13984 \end_inset
13985
13986 g.
13987 \begin_inset space \space{}
13988 \end_inset
13989
13990 for the 
13991 \family sans
13992 Signature
13993 \family default
13994  type.
13995  If the 
13996 \family sans
13997 Signature
13998 \family default
13999  type is not used at all, in the standard behavior the value of the 
14000 \family sans
14001 Name
14002 \family default
14003  type is used as signature, whereas if an empty 
14004 \family sans
14005 Signature
14006 \family default
14007  type is used, no signature value is defined.
14008 \end_layout
14009
14010 \begin_layout Standard
14011 By using the input types it is possible to write a letter template, containing
14012  filled input types with your personal dates (name, address, etc.) and empty
14013  input types for other dates you want to enter.
14014 \end_layout
14015
14016 \begin_layout Itemize
14017
14018 \family sans
14019 Name
14020 \family default
14021 : sender's name, in the standard behavior appears as a centered paragraph
14022  in small caps in the letter`s heading.
14023 \end_layout
14024
14025 \begin_layout Itemize
14026
14027 \family sans
14028 Signature
14029 \family default
14030 : sender's signature, in the standard behavior appears below the 
14031 \family sans
14032 Closing
14033 \family default
14034  type.
14035  If no 
14036 \family sans
14037 Signature
14038 \family default
14039  type is used, the value of the 
14040 \family sans
14041 Name
14042 \family default
14043  type appears instead.
14044 \end_layout
14045
14046 \begin_layout Itemize
14047
14048 \family sans
14049 Address
14050 \family default
14051 : sender's address, in the standard behavior appears in a centered paragraph
14052  in the letter`s heading below the sender's name.
14053 \end_layout
14054
14055 \begin_layout Itemize
14056
14057 \family sans
14058 Telephone
14059 \family default
14060 : sender's telephone number, in the standard behavior only sets the LaTeX
14061  variable 
14062 \family typewriter
14063
14064 \backslash
14065 telephonenum
14066 \family default
14067 .
14068 \end_layout
14069
14070 \begin_layout Itemize
14071
14072 \family sans
14073 Place
14074 \family default
14075 : place of the letter`s making.
14076 \end_layout
14077
14078 \begin_layout Itemize
14079
14080 \family sans
14081 Date
14082 \family default
14083 : date of the letter`s making.
14084  
14085 \family sans
14086 Place
14087 \family default
14088  and 
14089 \family sans
14090 Date
14091 \family default
14092 , in the standard behavior, produce the place and the date in a right-aligned
14093  line below the addressee's field.
14094  If an empty 
14095 \family sans
14096 Date
14097 \family default
14098  type is used, neither place nor date appear, independent of the value of
14099  the 
14100 \family sans
14101 Place
14102 \family default
14103  type.
14104  If no 
14105 \family sans
14106 Date
14107 \family default
14108  type is used, the date of the letter `s production is used.
14109 \end_layout
14110
14111 \begin_layout Itemize
14112
14113 \family sans
14114 Backaddress
14115 \family default
14116 : sender`s back address, in the standard behavior appears above the addressee's
14117  field in a small sans serif font.
14118 \end_layout
14119
14120 \begin_layout Itemize
14121
14122 \family sans
14123 Specialmail
14124 \family default
14125 : special mail information, in the standard behavior appears underlined
14126  above the addressee's field below the back address.
14127 \end_layout
14128
14129 \begin_layout Itemize
14130
14131 \family sans
14132 Location
14133 \family default
14134 : additional information, in the standard behavior appears on right side
14135  below the addressee`s field.
14136 \end_layout
14137
14138 \begin_layout Itemize
14139
14140 \family sans
14141 Title
14142 \family default
14143 : the letter's title, in the standard behavior appears in a big, bold, sans
14144  serif font above the subject.
14145 \end_layout
14146
14147 \begin_layout Itemize
14148
14149 \family sans
14150 Subject
14151 \family default
14152 : the letter's subject, in the standard behavior appears in a bold font
14153  above the 
14154 \family sans
14155 Opening
14156 \family default
14157  paragraph.
14158 \end_layout
14159
14160 \begin_layout Standard
14161 The types 
14162 \family sans
14163 Yourref
14164 \family default
14165
14166 \family sans
14167 Yourmail
14168 \family default
14169
14170 \family sans
14171 Myref
14172 \family default
14173
14174 \family sans
14175 Customer
14176 \family default
14177 , and 
14178 \family sans
14179 Invoice
14180 \family default
14181  produce a business letter like line above the 
14182 \family sans
14183 Title
14184 \family default
14185  line containing the fields 
14186 \begin_inset Quotes eld
14187 \end_inset
14188
14189 Your ref.
14190 \begin_inset Quotes erd
14191 \end_inset
14192
14193
14194 \begin_inset Quotes eld
14195 \end_inset
14196
14197 Your letter of
14198 \begin_inset Quotes erd
14199 \end_inset
14200
14201
14202 \begin_inset Quotes eld
14203 \end_inset
14204
14205 Our ref.
14206 \begin_inset Quotes erd
14207 \end_inset
14208
14209
14210 \begin_inset Quotes eld
14211 \end_inset
14212
14213 Customer no.
14214 \begin_inset Quotes erd
14215 \end_inset
14216
14217
14218 \begin_inset Quotes eld
14219 \end_inset
14220
14221 Invoice no.
14222 \begin_inset Quotes erd
14223 \end_inset
14224
14225 , and 
14226 \begin_inset Quotes eld
14227 \end_inset
14228
14229 Date
14230 \begin_inset Quotes erd
14231 \end_inset
14232
14233 .
14234  For the date field, the value of the 
14235 \family sans
14236 Date
14237 \family default
14238  type is used.
14239  If one of these 
14240 \begin_inset Quotes eld
14241 \end_inset
14242
14243 business letter types
14244 \begin_inset Quotes erd
14245 \end_inset
14246
14247  is used, the value of the 
14248 \family sans
14249 Place
14250 \family default
14251  type however does not appear, but only the LaTeX variable 
14252 \family typewriter
14253
14254 \backslash
14255 fromplace
14256 \family default
14257  is set.
14258  The ordinary output of place and date in a right-aligned line below the
14259  addressee`s field is suppressed.
14260  The types are implemented as input types provided with a label and must
14261  be used ahead of the corresponding 
14262 \family sans
14263 Opening
14264 \family default
14265  type.
14266 \end_layout
14267
14268 \begin_layout Itemize
14269
14270 \family sans
14271 Yourref
14272 \family default
14273 : Your ref.
14274 \end_layout
14275
14276 \begin_layout Itemize
14277
14278 \family sans
14279 Yourmail
14280 \family default
14281 : Your letter of.
14282 \end_layout
14283
14284 \begin_layout Itemize
14285
14286 \family sans
14287 Myref
14288 \family default
14289 : Our ref.
14290 \end_layout
14291
14292 \begin_layout Itemize
14293
14294 \family sans
14295 Customer
14296 \family default
14297 : Customer no.
14298 \end_layout
14299
14300 \begin_layout Itemize
14301
14302 \family sans
14303 Invoice
14304 \family default
14305 : Invoice no.
14306 \end_layout
14307
14308 \begin_layout Subsection
14309 The new letter class: letter (koma-script v.2)
14310 \end_layout
14311
14312 \begin_layout Standard
14313 by 
14314 \noun on
14315 Jürgen Spitzmüller
14316 \end_layout
14317
14318 \begin_layout Standard
14319 \begin_inset VSpace medskip
14320 \end_inset
14321
14322
14323 \end_layout
14324
14325 \begin_layout Standard
14326 \noindent
14327 Koma-Script version 2.8 has introduced a new letter class 
14328 \family typewriter
14329 scrlttr2
14330 \family default
14331  which supersedes the now unsupported 
14332 \family typewriter
14333 scrlettr
14334 \family default
14335 .
14336  It has — on the LaTeX side — a completely new interface and is not compatible
14337  with the old class.
14338  Therefore, LyX supports both, though it is recommended you use the new
14339  class.
14340 \end_layout
14341
14342 \begin_layout Standard
14343 This class covers the same functionality as 
14344 \emph on
14345 letter (koma-script),
14346 \emph default
14347  and a few more.
14348  The basic items are 
14349 \family sans
14350 Address
14351 \family default
14352  (receiver's address, same as 
14353 \family sans
14354 Letter
14355 \family default
14356  in the old layout), 
14357 \family sans
14358 Opening
14359 \family default
14360 , and 
14361 \family sans
14362 Closing
14363 \family default
14364 .
14365  
14366 \family sans
14367 NextAddress
14368 \family default
14369  will start a new letter (i.
14370 \begin_inset space \thinspace{}
14371 \end_inset
14372
14373 e.
14374 \begin_inset space \space{}
14375 \end_inset
14376
14377 you can write several letters per document).
14378  New elements are sender's 
14379 \family sans
14380 E-Mail
14381 \family default
14382
14383 \family sans
14384 URL
14385 \family default
14386
14387 \family sans
14388 Fax
14389 \family default
14390
14391 \family sans
14392 Bank
14393 \family default
14394  and the possibility to use a 
14395 \family sans
14396 Logo
14397 \family default
14398  (via 
14399 \family sans
14400 Insert\SpecialChar \menuseparator
14401 Graphics
14402 \family default
14403 ) in the header.
14404 \end_layout
14405
14406 \begin_layout Standard
14407 The biggest improvement is, though, that the letter's layout is configurable
14408  to meet almost any needs.
14409  This can be done via the preamble or with a special style file (Letter
14410  Class Option, extension 
14411 \family typewriter
14412 *.lco
14413 \family default
14414 ), that will be read in as a class option.
14415 \begin_inset Foot
14416 status collapsed
14417
14418 \begin_layout Plain Layout
14419 The KOMA package comes with some default 
14420 \family typewriter
14421 *.lco
14422 \family default
14423  files.
14424  There is, for instance, a 
14425 \family typewriter
14426 DIN.lco
14427 \family default
14428  file that follows german typesetting rules, or a 
14429 \family typewriter
14430 KOMAold.lco
14431 \family default
14432  that provides the default layout of the old 
14433 \family typewriter
14434 scrlettr
14435 \family default
14436  class.
14437  The latter can be loaded with the class option 
14438 \family typewriter
14439 KOMAold
14440 \family default
14441 , inserted via the 
14442 \family sans
14443 \bar under
14444 L
14445 \bar default
14446 ayout\SpecialChar \menuseparator
14447
14448 \bar under
14449 D
14450 \bar default
14451 ocument\SpecialChar \menuseparator
14452 Extra Options
14453 \family default
14454  field.
14455 \end_layout
14456
14457 \end_inset
14458
14459  Have a look at the 
14460 \emph on
14461 koma-letter2
14462 \emph default
14463  template that is included in LyX for examples.
14464  A detailed description is to be found in the Koma-Script documentation
14465  (
14466 \emph on
14467 scrguide
14468 \emph default
14469 ).
14470 \end_layout
14471
14472 \begin_layout Subsection
14473 Problems
14474 \end_layout
14475
14476 \begin_layout Standard
14477 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14478  some problems.
14479 \end_layout
14480
14481 \begin_layout Itemize
14482 The chapter number of a 
14483 \family sans
14484 Chapter
14485 \family default
14486  type appears on a line of its own above the chapter heading instead of
14487  appearing in the same line ahead of it.
14488  The cause for that is the LyX internal behavior for the labeltype 
14489 \family sans
14490 Counter_Chapter
14491 \family default
14492  in the layout file.
14493 \end_layout
14494
14495 \begin_layout Itemize
14496 The headings of the types 
14497 \family sans
14498 Addchap
14499 \family default
14500  and 
14501 \family sans
14502 Addsec
14503 \family default
14504  are only put in the 
14505 \begin_inset Quotes eld
14506 \end_inset
14507
14508 true
14509 \begin_inset Quotes erd
14510 \end_inset
14511
14512  LaTeX table of contents, but not in the LyX table of contents (
14513 \family sans
14514 Document\SpecialChar \menuseparator
14515 Table
14516 \begin_inset space ~
14517 \end_inset
14518
14519 of
14520 \begin_inset space ~
14521 \end_inset
14522
14523 Contents
14524 \family default
14525 ).
14526 \end_layout
14527
14528 \begin_layout Itemize
14529 The paragraphs in a 
14530 \emph on
14531 letter
14532 \emph default
14533  document class appear in a skip separation mode, not indented.
14534  This is the standard behavior, no special LaTeX commands are needed for
14535  that.
14536  But in the 
14537 \family sans
14538 Document\SpecialChar \menuseparator
14539 Settings
14540 \family default
14541  dialog the corresponding radio button indicates 
14542 \family sans
14543 Indent
14544 \family default
14545 .
14546  A 
14547 \family sans
14548 Skip
14549 \family default
14550  value always has the effect that extra LaTeX commands are inserted in the
14551  document to produce the gap, which is not what is wanted in this case.
14552 \end_layout
14553
14554 \begin_layout Section
14555 Memoir
14556 \end_layout
14557
14558 \begin_layout Standard
14559 By 
14560 \noun on
14561 Jürgen Spitzmüller
14562 \end_layout
14563
14564 \begin_layout Subsection
14565 Overview
14566 \end_layout
14567
14568 \begin_layout Standard
14569 Memoir is a very powerful and constantly evolving class.
14570  It has been designed with regard to fictional and non-fictional literature.
14571  Its aim is to let the user have maximum control over the typesetting of
14572  his document.
14573  Memoir is based on the standard book class, but it can also emulate the
14574  article class (see below).
14575 \end_layout
14576
14577 \begin_layout Standard
14578 Peter Wilson, the developer of Memoir, is known as the author of lots of
14579  useful packages in the LaTeX world.
14580  Most of them have been merged with Memoir.
14581  Therefore, it is much easier to layout the table of contents, appendices,
14582  chapter designs and such.
14583  LyX, though, does not support all of these goodies natively.
14584  Some of them might be added to forthcoming releases
14585 \begin_inset Foot
14586 status collapsed
14587
14588 \begin_layout Plain Layout
14589 You are invited to send suggestions to 
14590 \begin_inset Flex URL
14591 status collapsed
14592
14593 \begin_layout Plain Layout
14594
14595 lyx-devel@lists.lyx.org
14596 \end_layout
14597
14598 \end_inset
14599
14600 .
14601 \end_layout
14602
14603 \end_inset
14604
14605 , lots will probably never be supported, due to the limitations of LyX's
14606  framework.
14607  Of course you can still use all features with the help of some native LaTeX
14608  commands (TeX code
14609 \begin_inset Foot
14610 status collapsed
14611
14612 \begin_layout Plain Layout
14613 Cf.
14614 \begin_inset ERT
14615 status collapsed
14616
14617 \begin_layout Plain Layout
14618
14619
14620 \backslash
14621  
14622 \end_layout
14623
14624 \end_inset
14625
14626 section
14627 \begin_inset space ~
14628 \end_inset
14629
14630
14631 \begin_inset CommandInset ref
14632 LatexCommand ref
14633 reference "sec:Inserting-TeX-Code"
14634
14635 \end_inset
14636
14637  for details.
14638 \end_layout
14639
14640 \end_inset
14641
14642 ).
14643  In this section, we can only list those features that are natively supported
14644  by LyX.
14645  For detailed descriptions (and for the rest of features) we recommend you
14646  have a look at the detailed manual of the Memoir class
14647 \begin_inset Foot
14648 status collapsed
14649
14650 \begin_layout Plain Layout
14651 Cf.
14652 \begin_inset ERT
14653 status collapsed
14654
14655 \begin_layout Plain Layout
14656
14657
14658 \backslash
14659  
14660 \end_layout
14661
14662 \end_inset
14663
14664
14665 \begin_inset Flex URL
14666 status collapsed
14667
14668 \begin_layout Plain Layout
14669
14670 CTAN:/macros/latex/memoir/memman.pdf
14671 \end_layout
14672
14673 \end_inset
14674
14675 .
14676 \end_layout
14677
14678 \end_inset
14679
14680 , which is not only a user guide for the class, but also both a comprehensive
14681  description on good typesetting and a superb example for good typesetting
14682  itself.
14683 \end_layout
14684
14685 \begin_layout Subsection
14686 Basic features and restrictions
14687 \end_layout
14688
14689 \begin_layout Standard
14690 Memoir supports basically all features of the standard book classes.
14691  There are, however, some differences, as follows:
14692 \end_layout
14693
14694 \begin_layout Description
14695 Font
14696 \begin_inset space ~
14697 \end_inset
14698
14699 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14700 \end_layout
14701
14702 \begin_layout Description
14703 Page
14704 \begin_inset space ~
14705 \end_inset
14706
14707 style: The fancy page style is not supported, due to a command clash between
14708  Memoir and the fancyhdr package (they both define a command with the same
14709  name, which confuses LaTeX).
14710  Instead, Memoir comes with a number of its own page styles (see 
14711 \family sans
14712 Layout\SpecialChar \menuseparator
14713 Document\SpecialChar \menuseparator
14714 Page
14715 \begin_inset space ~
14716 \end_inset
14717
14718 Style
14719 \family default
14720 ).
14721  If you want to use these for the chapter pages, you have to use the command
14722  
14723 \family typewriter
14724
14725 \backslash
14726 chapterstyle
14727 \family default
14728  in the main text or in preamble (e.
14729 \begin_inset space \thinspace{}
14730 \end_inset
14731
14732 g.
14733 \begin_inset space \space{}
14734 \end_inset
14735
14736
14737 \family typewriter
14738
14739 \backslash
14740 chapterstyle{companion}
14741 \family default
14742 ).
14743 \end_layout
14744
14745 \begin_layout Description
14746 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14747  optional argument in the standard classes.
14748  With this, you can specify an alternative version of the title for the
14749  table of contents and the headers (for instance, if the title is too long).
14750  In LyX, you can do this via 
14751 \family sans
14752 Insert\SpecialChar \menuseparator
14753 Short
14754 \begin_inset space ~
14755 \end_inset
14756
14757 Title
14758 \family default
14759  at the beginning of a chapter/section.
14760  Memoir features a second optional argument and thus separates the table
14761  of contents from the header.
14762  You can define three variants of a title with this: one for the main text,
14763  one for the table of contents, and one for the headers.
14764  Simply insert two optional arguments if you need this feature, the first
14765  one containing the short title for the Table of Contents, the second one
14766  containing an alternative short title for the headers.
14767 \end_layout
14768
14769 \begin_layout Description
14770 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14771  of contents, the list of figures and the list of table start a new page
14772  automatically.
14773  Memoir does not follow this route.
14774  You have to insert a page break yourself, if you want to have one.
14775 \end_layout
14776
14777 \begin_layout Description
14778 Titlepage: For some unknown reason, Memoir uses pagination on the title
14779  page (in the standard classes, title pages are 
14780 \begin_inset Quotes eld
14781 \end_inset
14782
14783 empty
14784 \begin_inset Quotes erd
14785 \end_inset
14786
14787 ).
14788  If you want an empty title page, type 
14789 \family typewriter
14790
14791 \backslash
14792 aliaspagestyle{title}{empty}
14793 \family default
14794  in the preamble.
14795 \end_layout
14796
14797 \begin_layout Description
14798 Article: With the class option 
14799 \emph on
14800 article
14801 \emph default
14802  (to be inserted in 
14803 \family sans
14804 Layout\SpecialChar \menuseparator
14805 Document\SpecialChar \menuseparator
14806 Extra
14807 \begin_inset space ~
14808 \end_inset
14809
14810 Options
14811 \family default
14812 ), you can emulate article style.
14813  That is, counters (footnotes, figures, tables etc.) will not be reset on
14814  new chapters, chapters don't start a new page (but are—in contrary to 
14815 \begin_inset Quotes eld
14816 \end_inset
14817
14818 real
14819 \begin_inset Quotes erd
14820 \end_inset
14821
14822  article classes—still allowed), parts, though, use their own page, as in
14823  book.
14824 \end_layout
14825
14826 \begin_layout Description
14827 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14828  font commands, which have been used in the old LaTeX version 2.09 (e.
14829 \begin_inset space \thinspace{}
14830 \end_inset
14831
14832 g.
14833 \begin_inset space \space{}
14834 \end_inset
14835
14836
14837 \family typewriter
14838
14839 \backslash
14840 rm
14841 \family default
14842
14843 \family typewriter
14844
14845 \backslash
14846 it
14847 \family default
14848 ).
14849  It produces an error and stops LaTeX whenever such a command appears.
14850  The class option 
14851 \emph on
14852 oldfontcommands
14853 \emph default
14854  reallows the commands and spits out warnings instead (which does at least
14855  not stop LaTeX).
14856  Since a lot of packages and particularly BibTeX style files are still using
14857  those commands, we have decided to use this option by default.
14858 \end_layout
14859
14860 \begin_layout Subsection
14861 Extra features
14862 \end_layout
14863
14864 \begin_layout Standard
14865 We will only describe the features supported by LyX (which is not much currently
14866 ).
14867  Please consult the Memoir manual
14868 \begin_inset Foot
14869 status collapsed
14870
14871 \begin_layout Plain Layout
14872 Cf.
14873 \begin_inset ERT
14874 status collapsed
14875
14876 \begin_layout Plain Layout
14877
14878
14879 \backslash
14880  
14881 \end_layout
14882
14883 \end_inset
14884
14885
14886 \begin_inset Flex URL
14887 status collapsed
14888
14889 \begin_layout Plain Layout
14890
14891 CTAN:/macros/latex/memoir/memman.pdf
14892 \end_layout
14893
14894 \end_inset
14895
14896 .
14897 \end_layout
14898
14899 \end_inset
14900
14901  for details.
14902 \end_layout
14903
14904 \begin_layout Description
14905 Abstract: You may wonder why an abstract is an extra feature.
14906  Well, it is in book class.
14907  Usually books don't have abstracts.
14908  Memoir, however, has.
14909  You can use it wherever and how often you like.
14910 \end_layout
14911
14912 \begin_layout Description
14913 Chapterprecis: You may know this older typesetting style: The contents of
14914  a chapter are summarized below the title and also in the table of contents
14915  (e.
14916 \begin_inset space \thinspace{}
14917 \end_inset
14918
14919 g.
14920 \begin_inset space \space{}
14921 \end_inset
14922
14923
14924 \emph on
14925 Our hero arrives in Troia; he loses some friends; he finds others
14926 \emph default
14927 ).
14928  Chapterprecis does exactly this.
14929  It is therefore only sensible below a chapter.
14930 \end_layout
14931
14932 \begin_layout Description
14933 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14934  The epigraph environment provides an elegant way of typesetting such a
14935  motto.
14936  The motto itself (text) and its author (source) are divided by a short
14937  line.
14938  Unfortunately, we have to fool LyX a bit here again, since the environment
14939  needs two arguments (text and source).
14940  In this case, we have to use curly brackets (in TeX mode) between the two
14941  arguments: 
14942 \emph on
14943 <smart slogan>
14944 \emph default
14945  
14946 \family typewriter
14947 }{
14948 \family default
14949  
14950 \emph on
14951 <author of the slogan>.
14952 \end_layout
14953
14954 \begin_layout Description
14955 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14956  complex figurative poems).
14957  LyX can only support a few of them.
14958  One is poemtitle, which is a centered title for poems, which will also
14959  be added to the table of contents (verse is the standard environment for
14960  poems.
14961  Memoir has some enhanced versions of verse, but you need to use TeX code,
14962  because they have to be nested inside regular verse environments, which
14963  is not possible with LyX).
14964 \end_layout
14965
14966 \begin_layout Description
14967 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14968 \end_layout
14969
14970 \begin_layout Section
14971 Article (mwart), book (mwbk) and report (mwrep)
14972 \begin_inset Argument
14973 status collapsed
14974
14975 \begin_layout Plain Layout
14976 The 
14977 \family typewriter
14978 mw
14979 \family default
14980  Classes
14981 \end_layout
14982
14983 \end_inset
14984
14985
14986 \end_layout
14987
14988 \begin_layout Standard
14989 by 
14990 \noun on
14991 Tomasz Luczak
14992 \end_layout
14993
14994 \begin_layout Standard
14995 The LyX document classes 
14996 \emph on
14997 article (mwart)
14998 \emph default
14999
15000 \emph on
15001 report (mwrep)
15002 \emph default
15003  and 
15004 \emph on
15005 book
15006 \emph default
15007  
15008 \emph on
15009 (mwbk)
15010 \emph default
15011  correspond to the LaTeX document classes 
15012 \family typewriter
15013 mwart.cls
15014 \family default
15015
15016 \family typewriter
15017 mwrep.cls
15018 \family default
15019  and 
15020 \family typewriter
15021 mwbk.cls
15022 \family default
15023 , resp.
15024  They are replacements for the standard document classes 
15025 \family typewriter
15026 article.cls
15027 \family default
15028
15029 \family typewriter
15030 report.cls
15031 \family default
15032  and 
15033 \family typewriter
15034 book.cls
15035 \family default
15036 , resp., and fit better to Polish typography conventions in a number of points.
15037  
15038 \end_layout
15039
15040 \begin_layout Standard
15041 Basic differences:
15042 \end_layout
15043
15044 \begin_layout Itemize
15045 Unnumbered titles (with star, e.
15046 \begin_inset space \thinspace{}
15047 \end_inset
15048
15049 g.
15050 \begin_inset space \space{}
15051 \end_inset
15052
15053
15054 \family sans
15055 Section*
15056 \family default
15057 ) are added into table of contents,
15058 \end_layout
15059
15060 \begin_layout Itemize
15061 Additional page styles:
15062 \end_layout
15063
15064 \begin_deeper
15065 \begin_layout Description
15066 uheadings header with separated lines,
15067 \end_layout
15068
15069 \begin_layout Description
15070 myheadings custom header, contents headers via commands: 
15071 \family typewriter
15072
15073 \backslash
15074 markright
15075 \family default
15076  and 
15077 \family typewriter
15078
15079 \backslash
15080 markboth
15081 \family default
15082 ,
15083 \end_layout
15084
15085 \begin_layout Description
15086 myuheadings custom header with separated lines,
15087 \end_layout
15088
15089 \begin_layout Description
15090 outer page number is placed on outer side of page
15091 \end_layout
15092
15093 \end_deeper
15094 \begin_layout Itemize
15095 Options 
15096 \end_layout
15097
15098 \begin_deeper
15099 \begin_layout Description
15100 rmheadings serif titles — default,
15101 \end_layout
15102
15103 \begin_layout Description
15104 sfheadings sansserif titles,
15105 \end_layout
15106
15107 \begin_layout Description
15108 authortitle on title page first placed is author next title — default,
15109 \end_layout
15110
15111 \begin_layout Description
15112 titleauthor on title page first placed is title next author,
15113 \end_layout
15114
15115 \begin_layout Description
15116 withmarginpar reserve place on page for margins.
15117 \end_layout
15118
15119 \end_deeper
15120 \begin_layout Section
15121 Paper
15122 \end_layout
15123
15124 \begin_layout Standard
15125 The document class 
15126 \family sans
15127 paper
15128 \family default
15129  provides an alternative to the standard 
15130 \family sans
15131 article
15132 \family default
15133  class.
15134  It provides similar functionality, but you might prefer this layout with
15135  sans serif sections, headings, and more.
15136 \end_layout
15137
15138 \begin_layout Section
15139 RevTeX4
15140 \end_layout
15141
15142 \begin_layout Standard
15143 by 
15144 \noun on
15145 Amir Karger
15146 \end_layout
15147
15148 \begin_layout Standard
15149 \begin_inset VSpace bigskip
15150 \end_inset
15151
15152
15153 \end_layout
15154
15155 \begin_layout Standard
15156 \noindent
15157 The 
15158 \family sans
15159 Revtex
15160 \begin_inset space ~
15161 \end_inset
15162
15163 4
15164 \family default
15165  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15166 \begin_inset Formula $\beta$
15167 \end_inset
15168
15169  release of May, 1999) class.
15170 \end_layout
15171
15172 \begin_layout Standard
15173 LyX has a 
15174 \family sans
15175 Revtex
15176 \family default
15177  textclass, which works with RevTeX 3.1.
15178  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15179  That means that it doesn't interact very well with LyX, which requires
15180  LaTeX2e, although it has been kludged to work.
15181  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15182  LyX with the 
15183 \family sans
15184 RevTeX
15185 \begin_inset space ~
15186 \end_inset
15187
15188 4
15189 \family default
15190  textclass should also be pretty easy to use.
15191 \end_layout
15192
15193 \begin_layout Standard
15194 These documents are supposed to be used in 
15195 \emph on
15196 addition
15197 \emph default
15198  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15199  macros, and assume you'll know what to put in the preamble if necessary.
15200 \end_layout
15201
15202 \begin_layout Subsection
15203 Installation
15204 \end_layout
15205
15206 \begin_layout Standard
15207 All you need to do is install RevTeX 4, as described in the package's README
15208  file.
15209  The package can be found at The RevTeX 4 Web Site 
15210 \begin_inset Flex URL
15211 status collapsed
15212
15213 \begin_layout Plain Layout
15214
15215 http://publish.aps.org/revtex4/
15216 \end_layout
15217
15218 \end_inset
15219
15220 .
15221  Install it somewhere that LaTeX can see it.
15222  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15223  (i.
15224 \begin_inset space \thinspace{}
15225 \end_inset
15226
15227 e.
15228 \begin_inset space \space{}
15229 \end_inset
15230
15231 not the directory where you installed the class file.) Then, if you reconfigure
15232  LyX, it will find the class file and let you use the RevTeX4 textclass.
15233 \end_layout
15234
15235 \begin_layout Standard
15236 Probably the easiest way to get started is either to import a RevTeX 4 document
15237  using 
15238 \family typewriter
15239 tex2lyx
15240 \family default
15241 , or to use the 
15242 \family sans
15243 Revtex
15244 \begin_inset space ~
15245 \end_inset
15246
15247 4
15248 \family default
15249  template, found in the templates directory.
15250 \end_layout
15251
15252 \begin_layout Subsection
15253 Preamble Matter
15254 \end_layout
15255
15256 \begin_layout Standard
15257 Optional arguments to 
15258 \family typewriter
15259
15260 \backslash
15261 documentclass
15262 \family default
15263 , like 
15264 \begin_inset Quotes eld
15265 \end_inset
15266
15267 preprint
15268 \begin_inset Quotes erd
15269 \end_inset
15270
15271  and 
15272 \begin_inset Quotes eld
15273 \end_inset
15274
15275 aps
15276 \begin_inset Quotes erd
15277 \end_inset
15278
15279 , go in the 
15280 \family sans
15281 E
15282 \bar under
15283 x
15284 \bar default
15285 tra
15286 \begin_inset space ~
15287 \end_inset
15288
15289 Options
15290 \family default
15291  field in the 
15292 \family sans
15293 Document
15294 \begin_inset space ~
15295 \end_inset
15296
15297 Layout
15298 \family default
15299  dialog, as usual.
15300  Remember that in RevTeX, at least one optional argument is required! 
15301 \end_layout
15302
15303 \begin_layout Standard
15304 Other preamble matter, like 
15305 \family typewriter
15306
15307 \backslash
15308 draft
15309 \family default
15310  etc.
15311 \begin_inset space ~
15312 \end_inset
15313
15314 goes in the 
15315 \family sans
15316 LaTeX
15317 \begin_inset space ~
15318 \end_inset
15319
15320 Preamble
15321 \family default
15322  dialog, also as usual.
15323 \end_layout
15324
15325 \begin_layout Subsection
15326 Layouts
15327 \end_layout
15328
15329 \begin_layout Standard
15330 The layouts basically correspond to the commands in RevTeX4.0.
15331  For example, the Email layout corresponds to 
15332 \family typewriter
15333
15334 \backslash
15335 email{}
15336 \family default
15337 .
15338  Note that (at least as of RevTeX 4.0 Beta), the 
15339 \family sans
15340 Address
15341 \family default
15342  and 
15343 \family sans
15344 Affiliation
15345 \family default
15346  layouts are exactly equivalent, so you shouldn't need to use both.
15347 \begin_inset Foot
15348 status collapsed
15349
15350 \begin_layout Plain Layout
15351 In case you're curious, both were included so that 
15352 \family typewriter
15353 tex2lyx
15354 \family default
15355  would be able to translate both 
15356 \family typewriter
15357
15358 \backslash
15359 address
15360 \family default
15361  and 
15362 \family typewriter
15363
15364 \backslash
15365 affiliation
15366 \family default
15367 .
15368 \end_layout
15369
15370 \end_inset
15371
15372
15373 \end_layout
15374
15375 \begin_layout Subsection
15376 Important Notes
15377 \end_layout
15378
15379 \begin_layout Standard
15380 There are a couple of important unique aspects of RevTeX 4 which might cause
15381  bugs that will be even more confusing in LyX.
15382 \end_layout
15383
15384 \begin_layout Standard
15385 In RevTeX, the 
15386 \family typewriter
15387
15388 \backslash
15389 thanks
15390 \family default
15391  command goes 
15392 \emph on
15393 outside
15394 \emph default
15395  the 
15396 \family typewriter
15397
15398 \backslash
15399 author
15400 \family default
15401  command.
15402  The LyX equivalent is that there is a separate Thanks layout.
15403  Do 
15404 \emph on
15405 not
15406 \emph default
15407  write footnotes in the 
15408 \family sans
15409 Author
15410 \family default
15411  layout, or weird things may happen.
15412  See the RevTeX 4 documentation for more details.
15413 \end_layout
15414
15415 \begin_layout Standard
15416 Also, the 
15417 \family sans
15418 Author
15419 \begin_inset space ~
15420 \end_inset
15421
15422 Email
15423 \family default
15424
15425 \family sans
15426 Author
15427 \begin_inset space ~
15428 \end_inset
15429
15430 URL
15431 \family default
15432 , and 
15433 \family sans
15434 Thanks
15435 \family default
15436  layouts must be placed 
15437 \emph on
15438 in between
15439 \emph default
15440  the 
15441 \family sans
15442 Author
15443 \family default
15444  layout and the corresponding 
15445 \family sans
15446 Address
15447 \family default
15448  (or equivalent 
15449 \family sans
15450 Affiliation
15451 \family default
15452 ) layout.
15453  If you put the 
15454 \family sans
15455 Thanks
15456 \family default
15457  after the 
15458 \family sans
15459 Address
15460 \family default
15461 , the LaTeX won't compile.
15462 \end_layout
15463
15464 \begin_layout Subsection
15465 Drawbacks
15466 \end_layout
15467
15468 \begin_layout Standard
15469 The main problem with this layout is that you can't use the optional arguments
15470  to layouts like Email and Title.
15471  (The problem is not unique to this layout; you can't use optional arguments
15472  to the Section layouts either.) This means that after you export that file
15473  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15474  need to edit the LaTeX file with a text editor to add the optional arguments
15475  to set, e.
15476 \begin_inset space \thinspace{}
15477 \end_inset
15478
15479 g.
15480 \begin_inset space \space{}
15481 \end_inset
15482
15483 the running title for the page headers.
15484  Lacking these layouts makes the 
15485 \family typewriter
15486
15487 \backslash
15488 altaffiliation
15489 \family default
15490  (and the equivalent 
15491 \family typewriter
15492
15493 \backslash
15494 altaddress
15495 \family default
15496 ) useless, so the corresponding layouts don't exist, and will have to be
15497  added by hand.
15498 \begin_inset Foot
15499 status collapsed
15500
15501 \begin_layout Plain Layout
15502
15503 \emph on
15504 Note from JMarc:
15505 \emph default
15506  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15507  has not been updated yet to take advantage of it.
15508 \end_layout
15509
15510 \end_inset
15511
15512  
15513 \end_layout
15514
15515 \begin_layout Section
15516 Springer Journals (
15517 \family sans
15518 svjour
15519 \family default
15520 )
15521 \end_layout
15522
15523 \begin_layout Standard
15524 by 
15525 \noun on
15526 Martin Vermeer
15527 \end_layout
15528
15529 \begin_layout Subsection
15530 Description
15531 \end_layout
15532
15533 \begin_layout Standard
15534 These are the layout files for some of the journal formats used by Springer
15535  Verlag and listed on 
15536 \begin_inset Flex URL
15537 status collapsed
15538
15539 \begin_layout Plain Layout
15540
15541 http://www.springer.de/author/tex/help-journals.html
15542 \end_layout
15543
15544 \end_inset
15545
15546 , where you should also go to fetch the class files (yes, these are LaTeX2e
15547  now!).
15548  It is a modular system: the things common to all journals are implemented
15549  in 
15550 \family typewriter
15551 svjour.inc
15552 \family default
15553 , which journal-specific layout files (such as, e.
15554 \begin_inset space \thinspace{}
15555 \end_inset
15556
15557 g.
15558 \begin_inset space \space{}
15559 \end_inset
15560
15561
15562 \family typewriter
15563 svjog.layout
15564 \family default
15565  for Journal of Geodesy) can include.
15566 \end_layout
15567
15568 \begin_layout Standard
15569 This means that implementing support for any other Springer journal on this
15570  list is as simple as writing your own 
15571 \family typewriter
15572 sv
15573 \family default
15574 <myjournal>
15575 \family typewriter
15576 .layout
15577 \family default
15578  file following the outline given in 
15579 \family typewriter
15580 svjog.layout
15581 \family default
15582 .
15583  
15584 \end_layout
15585
15586 \begin_layout Standard
15587 It is reasonably well tested only for the Journal of Geodesy.
15588  
15589 \family typewriter
15590 svjour
15591 \family default
15592  and 
15593 \family typewriter
15594 svjog
15595 \family default
15596  come with the standard LyX distribution.
15597  Install the relevant class file (downloaded from Springer) in a proper
15598  directory, reconfigure LaTeX (in the teTeX case by running 
15599 \family typewriter
15600 texhash
15601 \family default
15602 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15603  and it should work.
15604 \end_layout
15605
15606 \begin_layout Subsection
15607 New styles
15608 \end_layout
15609
15610 \begin_layout Standard
15611 A large number of theorem-like styles — 
15612 \family sans
15613 Claim, Conjecture,
15614 \family default
15615  
15616 \family sans
15617 \SpecialChar \ldots{}
15618 Theorem
15619 \family default
15620 .
15621 \end_layout
15622
15623 \begin_layout Standard
15624
15625 \family sans
15626 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15627  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15628 \family default
15629 .
15630  See the Springer class file documentation for details.
15631 \end_layout
15632
15633 \begin_layout Subsection
15634 Supported journals
15635 \end_layout
15636
15637 \begin_layout Itemize
15638
15639 \emph on
15640 Journal of Geodesy
15641 \emph default
15642
15643 \family typewriter
15644 svjog.layout
15645 \family default
15646  — Martin Vermeer
15647 \end_layout
15648
15649 \begin_layout Itemize
15650
15651 \emph on
15652 Probability Theory and Related Fields
15653 \emph default
15654
15655 \family typewriter
15656 svprobth.layout
15657 \family default
15658  — Jean-Marc Lasgouttes
15659 \end_layout
15660
15661 \begin_layout Standard
15662 Add your own, it isn't so hard!
15663 \end_layout
15664
15665 \begin_layout Subsection
15666 Credits
15667 \end_layout
15668
15669 \begin_layout Standard
15670 These files are partly based on the older 
15671 \family typewriter
15672 ejour2.layout
15673 \family default
15674 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15675  file from Springer.
15676  All this, and the 
15677 \family typewriter
15678 ejour2
15679 \family default
15680  layout, are now defunct.
15681  Jean-Marc Lasgouttes helped out big in making me find my way around the
15682  LyX layout file mechanism.
15683 \end_layout
15684
15685 \begin_layout Subsection
15686 Bugs
15687 \end_layout
15688
15689 \begin_layout Standard
15690 Probably.
15691  But probably less than in the old hacked-LaTeX 
15692 \family typewriter
15693 ejour2
15694 \family default
15695 .
15696 \end_layout
15697
15698 \begin_layout Standard
15699 Limitations e.
15700 \begin_inset space \thinspace{}
15701 \end_inset
15702
15703 g.: does not display the number for theorem-like layouts, just #.
15704 \end_layout
15705
15706 \begin_layout Section
15707 Slides [aka 
15708 \noun on
15709 SliTeX
15710 \noun default
15711 ]
15712 \begin_inset CommandInset label
15713 LatexCommand label
15714 name "sec:slitex"
15715
15716 \end_inset
15717
15718
15719 \end_layout
15720
15721 \begin_layout Standard
15722 by 
15723 \noun on
15724 John Weiss
15725 \noun default
15726  
15727 \end_layout
15728
15729 \begin_layout Subsection
15730 Introduction
15731 \end_layout
15732
15733 \begin_layout Standard
15734 This section describes how to use LyX to make slides for overhead projectors.
15735  There are two document classes that can do this: the default slides class
15736  and the 
15737 \family sans
15738 FoilTeX
15739 \family default
15740  slides class.
15741  This section documents the former.
15742 \end_layout
15743
15744 \begin_layout Standard
15745 I'm going to say this again, nice and clear, so that there's no misunderstanding
15746 :
15747 \end_layout
15748
15749 \begin_layout Standard
15750 \begin_inset VSpace bigskip
15751 \end_inset
15752
15753
15754 \end_layout
15755
15756 \begin_layout Standard
15757 \align center
15758
15759 \size large
15760 This section documents the class 
15761 \begin_inset Quotes eld
15762 \end_inset
15763
15764
15765 \family sans
15766 slides (default)
15767 \family default
15768
15769 \begin_inset Quotes erd
15770 \end_inset
15771
15772  
15773 \emph on
15774 only.
15775 \end_layout
15776
15777 \begin_layout Standard
15778 \begin_inset VSpace bigskip
15779 \end_inset
15780
15781
15782 \end_layout
15783
15784 \begin_layout Standard
15785 If you're looking for the documentation for 
15786 \begin_inset Quotes eld
15787 \end_inset
15788
15789
15790 \family sans
15791 slides (FoilTeX)
15792 \family default
15793
15794 \begin_inset Quotes erd
15795 \end_inset
15796
15797 , check out section
15798 \begin_inset space ~
15799 \end_inset
15800
15801
15802 \begin_inset CommandInset ref
15803 LatexCommand ref
15804 reference "sec:foiltex"
15805
15806 \end_inset
15807
15808 .
15809  The 
15810 \family sans
15811 foils
15812 \family default
15813  class [
15814 \begin_inset Quotes eld
15815 \end_inset
15816
15817
15818 \family sans
15819 slides (FoilTeX)
15820 \family default
15821
15822 \begin_inset Quotes erd
15823 \end_inset
15824
15825 ] is actually somewhat better than the default 
15826 \family sans
15827 slides
15828 \family default
15829  class,
15830 \begin_inset Foot
15831 status collapsed
15832
15833 \begin_layout Plain Layout
15834 \SpecialChar \ldots{}
15835 or so I've been told repeatedly by its advocates.
15836  Having never used it, I have no idea if this claim is true or not.
15837 \end_layout
15838
15839 \end_inset
15840
15841  which this section documents.
15842 \end_layout
15843
15844 \begin_layout Standard
15845 This class is the LaTeX2e improvement of the old 
15846 \noun on
15847 SliTeX
15848 \noun default
15849  package.
15850  Every LaTeX2e distribution includes this class [which I'll just refer to
15851  as 
15852 \begin_inset Quotes eld
15853 \end_inset
15854
15855
15856 \family sans
15857 slides
15858 \family default
15859
15860 \begin_inset Quotes erd
15861 \end_inset
15862
15863  from now on], so you're bound to have it.
15864  As I noted earlier, there are other classes, such as 
15865 \family sans
15866 foils
15867 \family default
15868 , which also produce slides for overhead projectors and do a better job
15869  at it.
15870  However, there are some things which 
15871 \family sans
15872 slides
15873 \family default
15874  can do which the others can't, such as generate overlays.
15875  Read on to learn more!
15876 \end_layout
15877
15878 \begin_layout Subsection
15879 Getting Started
15880 \begin_inset CommandInset label
15881 LatexCommand label
15882 name "sec:slidesetup"
15883
15884 \end_inset
15885
15886
15887 \end_layout
15888
15889 \begin_layout Standard
15890 Obviously, to use this document class, you need to select 
15891 \begin_inset Quotes eld
15892 \end_inset
15893
15894
15895 \family sans
15896 slides (default)
15897 \family default
15898
15899 \begin_inset Quotes erd
15900 \end_inset
15901
15902  from the class list in the 
15903 \family sans
15904 Document\SpecialChar \menuseparator
15905 Settings
15906 \family default
15907  dialog.
15908  There are some other special things you should know about this class:
15909 \end_layout
15910
15911 \begin_layout Itemize
15912 Don't bother changing the options 
15913 \family sans
15914 Sides and Columns
15915 \family default
15916 .
15917  They're not supported by the 
15918 \family sans
15919 slides
15920 \family default
15921  class, anyways.
15922 \end_layout
15923
15924 \begin_layout Itemize
15925 The option 
15926 \family sans
15927 Page
15928 \begin_inset space ~
15929 \end_inset
15930
15931 style
15932 \family default
15933  behaves a bit differently for this class.
15934  The possible choices and what they do are as follows:
15935 \end_layout
15936
15937 \begin_deeper
15938 \begin_layout Description
15939
15940 \family sans
15941 plain
15942 \family default
15943  The final output contains page numbers in the lower right corner.
15944 \end_layout
15945
15946 \begin_layout Description
15947
15948 \family sans
15949 headings
15950 \family default
15951  Like 
15952 \family sans
15953 plain
15954 \family default
15955 , but also prints out any time markers you've put in.
15956  This is the default.
15957 \end_layout
15958
15959 \begin_layout Description
15960
15961 \family sans
15962 empty
15963 \family default
15964  The final output contains no page numbers, time markers, or alignment markers.
15965 \end_layout
15966
15967 \end_deeper
15968 \begin_layout Itemize
15969 The 
15970 \family sans
15971 slides
15972 \family default
15973  class has an extra option: 
15974 \family typewriter
15975 clock
15976 \family default
15977 .
15978  To use it, put 
15979 \begin_inset Quotes eld
15980 \end_inset
15981
15982
15983 \family typewriter
15984 clock
15985 \family default
15986
15987 \begin_inset Quotes erd
15988 \end_inset
15989
15990  in the extra class options.
15991 \end_layout
15992
15993 \begin_deeper
15994 \begin_layout Standard
15995 Using this options allows you to add time markers to 
15996 \family sans
15997 Note
15998 \family default
15999 s.
16000  See section
16001 \begin_inset space ~
16002 \end_inset
16003
16004
16005 \begin_inset CommandInset ref
16006 LatexCommand ref
16007 reference "sec:slideNote"
16008
16009 \end_inset
16010
16011  for more details.
16012 \end_layout
16013
16014 \end_deeper
16015 \begin_layout Standard
16016 You can also use the template file 
16017 \begin_inset Quotes eld
16018 \end_inset
16019
16020
16021 \family typewriter
16022 slides.lyx
16023 \family default
16024
16025 \begin_inset Quotes erd
16026 \end_inset
16027
16028  to automatically set up a document to use the 
16029 \family sans
16030 slides
16031 \family default
16032  class [using 
16033 \family sans
16034 File\SpecialChar \menuseparator
16035 New
16036 \begin_inset space ~
16037 \end_inset
16038
16039 from
16040 \begin_inset space ~
16041 \end_inset
16042
16043 Template
16044 \family default
16045  to open your new document].
16046  The template file also contains some examples of the special paragraph
16047  environments used by this class.
16048  I'll describe those next.
16049 \end_layout
16050
16051 \begin_layout Subsection
16052 Paragraph Environments
16053 \end_layout
16054
16055 \begin_layout Subsubsection
16056 Supported Environments
16057 \end_layout
16058
16059 \begin_layout Standard
16060 The first thing you'll notice when you start up a new 
16061 \family sans
16062 slides
16063 \family default
16064  document is the font size and type: it's the equivalent of the size 
16065 \begin_inset Quotes eld
16066 \end_inset
16067
16068
16069 \family sans
16070 Largest
16071 \family default
16072
16073 \begin_inset Quotes erd
16074 \end_inset
16075
16076  in the 
16077 \family sans
16078 Sans
16079 \begin_inset space ~
16080 \end_inset
16081
16082 Serif
16083 \family default
16084  font.
16085  This is also what's used in the output.
16086  Think of this as a 
16087 \begin_inset Quotes eld
16088 \end_inset
16089
16090 visual cue
16091 \begin_inset Quotes erd
16092 \end_inset
16093
16094  to remind you that this is a slide.
16095  Your final slides will use a larger font; ergo, you'll have less space.
16096  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16097 \end_layout
16098
16099 \begin_layout Standard
16100 The next thing that becomes obvious is the changes to the paragraph environment
16101  pull-down box [at the far-left end of the toolbar].
16102  Most of the paragraph environments you're used to seeing are missing.
16103  There are also five new ones.
16104  That's because the 
16105 \family sans
16106 slides
16107 \family default
16108  class itself only supports certain paragraph environments:
16109 \end_layout
16110
16111 \begin_layout Itemize
16112
16113 \family sans
16114 Standard
16115 \end_layout
16116
16117 \begin_layout Itemize
16118
16119 \family sans
16120 Itemize
16121 \end_layout
16122
16123 \begin_layout Itemize
16124
16125 \family sans
16126 Enumerate
16127 \end_layout
16128
16129 \begin_layout Itemize
16130
16131 \family sans
16132 Description
16133 \end_layout
16134
16135 \begin_layout Itemize
16136
16137 \family sans
16138 List
16139 \end_layout
16140
16141 \begin_layout Itemize
16142
16143 \family sans
16144 Quotation
16145 \end_layout
16146
16147 \begin_layout Itemize
16148
16149 \family sans
16150 Quote
16151 \end_layout
16152
16153 \begin_layout Itemize
16154
16155 \family sans
16156 Verse
16157 \end_layout
16158
16159 \begin_layout Itemize
16160
16161 \family sans
16162 Caption
16163 \end_layout
16164
16165 \begin_layout Itemize
16166
16167 \family sans
16168 LyX-Code
16169 \end_layout
16170
16171 \begin_layout Itemize
16172
16173 \family sans
16174 Comment
16175 \end_layout
16176
16177 \begin_layout Standard
16178 All of the other standard environments, including the section-heading environmen
16179 ts, aren't used in the 
16180 \family sans
16181 slides
16182 \family default
16183  class.
16184 \end_layout
16185
16186 \begin_layout Standard
16187 On the other hand, you'll notice the following new environments:
16188 \end_layout
16189
16190 \begin_layout Itemize
16191
16192 \family sans
16193 Slide
16194 \end_layout
16195
16196 \begin_layout Itemize
16197
16198 \family sans
16199 Overlay
16200 \end_layout
16201
16202 \begin_layout Itemize
16203
16204 \family sans
16205 Note
16206 \end_layout
16207
16208 \begin_layout Itemize
16209
16210 \family sans
16211 InvisibleText
16212 \end_layout
16213
16214 \begin_layout Itemize
16215
16216 \family sans
16217 VisibleText
16218 \end_layout
16219
16220 \begin_layout Standard
16221 These five are kind of quirky, due to a 
16222 \begin_inset Quotes eld
16223 \end_inset
16224
16225 feature
16226 \begin_inset Quotes erd
16227 \end_inset
16228
16229  in LyX.
16230  You see, LyX doesn't permit you to nest any other paragraph environment
16231  into an empty environment.
16232  Now, that's fine and dandy, but it means that you wouldn't be able to start
16233  a slide with anything except plain text.
16234  To deal with this, I've performed a little 
16235 \begin_inset Quotes eld
16236 \end_inset
16237
16238 LaTeX magic.
16239 \begin_inset Quotes erd
16240 \end_inset
16241
16242  
16243 \end_layout
16244
16245 \begin_layout Subsubsection
16246 Quirks of the New Environments
16247 \begin_inset CommandInset label
16248 LatexCommand label
16249 name "sec:slideQuirk"
16250
16251 \end_inset
16252
16253
16254 \end_layout
16255
16256 \begin_layout Standard
16257 All five of the new paragraph environments are somewhat quirky due to inherent
16258  limitiations in the current version of LyX.
16259  As I just mentioned, LyX forbids environments that begin with another environme
16260 nt.
16261  To get around this, the 
16262 \family sans
16263 Slide
16264 \family default
16265  environment isn't a paragraph environment as described in the 
16266 \emph on
16267 User's Guide
16268 \emph default
16269 .
16270  
16271 \end_layout
16272
16273 \begin_layout Standard
16274 You should consider 
16275 \family sans
16276 Slide
16277 \family default
16278
16279 \family sans
16280 Overlay
16281 \family default
16282 , and 
16283 \family sans
16284 Note
16285 \family default
16286  to be 
16287 \begin_inset Quotes eld
16288 \end_inset
16289
16290 pseudo-environments.
16291 \begin_inset Quotes erd
16292 \end_inset
16293
16294  They look like a section heading or a 
16295 \begin_inset Quotes eld
16296 \end_inset
16297
16298
16299 \family sans
16300 Caption
16301 \family default
16302 ,
16303 \begin_inset Quotes erd
16304 \end_inset
16305
16306  but really begin a [and, if necessary, end the previous] paragraph environment.
16307  Likewise, treat 
16308 \family sans
16309 InvisibleText
16310 \family default
16311  and 
16312 \family sans
16313 VisibleText
16314 \family default
16315  as 
16316 \begin_inset Quotes eld
16317 \end_inset
16318
16319 pseudo-commands.
16320 \begin_inset Quotes erd
16321 \end_inset
16322
16323  These two perform some action.
16324 \end_layout
16325
16326 \begin_layout Standard
16327 A common feature of all five environments, 
16328 \family sans
16329 Slide
16330 \family default
16331
16332 \family sans
16333 Overlay
16334 \family default
16335
16336 \family sans
16337 Note
16338 \family default
16339
16340 \family sans
16341 InvisibleText
16342 \family default
16343  and 
16344 \family sans
16345 VisibleText
16346 \family default
16347 , is a rather long-ish label.
16348  The text following this label — ordinarily the contents of the paragraph
16349  environment — is utterly irrelevant for 
16350 \family sans
16351 Slide
16352 \family default
16353
16354 \family sans
16355 Overlay
16356 \family default
16357
16358 \family sans
16359 Note
16360 \family default
16361
16362 \family sans
16363 InvisibleText
16364 \family default
16365  and 
16366 \family sans
16367 VisibleText
16368 \family default
16369 .
16370  LyX completely ignores it.
16371  In fact, you can leave these five environments completely empty.
16372  
16373 \end_layout
16374
16375 \begin_layout Standard
16376 While you don't 
16377 \emph on
16378 have
16379 \emph default
16380  to put any text after the rather long-ish label, you might want to.
16381  This could be a short description of the contents of the 
16382 \family sans
16383 Slide
16384 \family default
16385 , for example.
16386  In that case, enter your descriptive comment and hit 
16387 \family sans
16388 Return
16389 \family default
16390  as you normally would.
16391 \end_layout
16392
16393 \begin_layout Standard
16394 If, on the other hand, you don't want to enter any descriptive text, you'll
16395  hit another LyX quirk.
16396  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16397  environment until you put something in the old one.
16398  So, do this:
16399 \end_layout
16400
16401 \begin_layout Itemize
16402 Start entering the text that will 
16403 \emph on
16404 follow
16405 \emph default
16406  the new 
16407 \family sans
16408 Slide
16409 \family default
16410
16411 \family sans
16412 Overlay
16413 \family default
16414
16415 \family sans
16416 Note
16417 \family default
16418
16419 \family sans
16420 InvisibleText
16421 \family default
16422  or 
16423 \family sans
16424 VisibleText
16425 \family default
16426 .
16427  
16428 \end_layout
16429
16430 \begin_layout Itemize
16431 Now move to the beginning of that paragraph.
16432  
16433 \end_layout
16434
16435 \begin_layout Itemize
16436 Next, hit 
16437 \family sans
16438 Return
16439 \family default
16440 .
16441  
16442 \end_layout
16443
16444 \begin_layout Itemize
16445 Finally, change this new, empty paragraph to a 
16446 \family sans
16447 Slide
16448 \family default
16449
16450 \family sans
16451 Overlay
16452 \family default
16453
16454 \family sans
16455 Note
16456 \family default
16457
16458 \family sans
16459 InvisibleText
16460 \family default
16461  or 
16462 \family sans
16463 VisibleText
16464 \family default
16465 .
16466  
16467 \end_layout
16468
16469 \begin_layout Standard
16470 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16471
16472 \end_layout
16473
16474 \begin_layout Subsection
16475 Making a Presentation with 
16476 \family sans
16477 Slide
16478 \family default
16479
16480 \family sans
16481 Overlay
16482 \family default
16483  and 
16484 \family sans
16485 Note
16486 \end_layout
16487
16488 \begin_layout Subsubsection
16489 Using the 
16490 \family sans
16491 Slide
16492 \family default
16493  Environment
16494 \end_layout
16495
16496 \begin_layout Standard
16497 If you're expecting this section to teach you how to actually make a presentatio
16498 n, you'll be sorely disappointed.
16499  Naturally, I'll describe all of the ways the 
16500 \family sans
16501 slides
16502 \family default
16503  class can assist you in preparing the materials for a presentation.
16504  Filling in the contents, however, is up to you.
16505  [Then again, that 
16506 \emph on
16507 is
16508 \emph default
16509  the LyX philosophy.]
16510 \end_layout
16511
16512 \begin_layout Standard
16513 Choosing the 
16514 \family sans
16515 Slide
16516 \family default
16517  environment [in the manner described in section
16518 \begin_inset space ~
16519 \end_inset
16520
16521
16522 \begin_inset CommandInset ref
16523 LatexCommand ref
16524 reference "sec:slideQuirk"
16525
16526 \end_inset
16527
16528 ] tells LyX to begin a new slide [duh].
16529  The label for this environment/
16530 \begin_inset Quotes erd
16531 \end_inset
16532
16533 pseudo-command
16534 \begin_inset Quotes erd
16535 \end_inset
16536
16537  is an 
16538 \begin_inset Quotes eld
16539 \end_inset
16540
16541 ASCII line,
16542 \begin_inset Quotes erd
16543 \end_inset
16544
16545  in cool blue, followed by the label, 
16546 \begin_inset Quotes eld
16547 \end_inset
16548
16549 NewSlide:
16550 \begin_inset Quotes erd
16551 \end_inset
16552
16553 .
16554  Any text or paragraph environments that follow this one go on the new slide.
16555  It's that simple.
16556 \end_layout
16557
16558 \begin_layout Standard
16559 Slides are probably the only time you'll need to forcibly end pages in LyX
16560  (this can be specified in the 
16561 \family sans
16562 Paragraph Layout
16563 \family default
16564  dialog).
16565  In fact, you'll want to, once you finish entering the contents of one slide.
16566  If you've entered more text than can physically fit on a slide, the extra
16567  overflows onto a new slide.
16568  I don't recommend doing this, however, since the overflow slide won't have
16569  any page number on it.
16570  Furthermore, it may interfere with any 
16571 \family sans
16572 Overlay
16573 \family default
16574  you've made to accompany the oversized 
16575 \family sans
16576 Slide
16577 \family default
16578 .
16579 \end_layout
16580
16581 \begin_layout Standard
16582 The 
16583 \family sans
16584 Overlay
16585 \family default
16586  and 
16587 \family sans
16588 Note
16589 \family default
16590  environments work the same way as the 
16591 \family sans
16592 Slide
16593 \family default
16594  environment.
16595  They both create an 
16596 \begin_inset Quotes eld
16597 \end_inset
16598
16599 ASCII line
16600 \begin_inset Quotes erd
16601 \end_inset
16602
16603  followed by a label [
16604 \begin_inset Quotes eld
16605 \end_inset
16606
16607 NewOverlay:
16608 \begin_inset Quotes erd
16609 \end_inset
16610
16611  and 
16612 \begin_inset Quotes eld
16613 \end_inset
16614
16615 NewNote:
16616 \begin_inset Quotes erd
16617 \end_inset
16618
16619 , respectively].
16620  The color is a stunning magenta instead of blue, and the 
16621 \begin_inset Quotes eld
16622 \end_inset
16623
16624 ASCII line
16625 \begin_inset Quotes erd
16626 \end_inset
16627
16628  will look different, in style and in length.
16629  The label fonts of all three also differ from one another.
16630 \end_layout
16631
16632 \begin_layout Standard
16633 As with a 
16634 \family sans
16635 Slide
16636 \family default
16637 , if the contents of a 
16638 \family sans
16639 Note
16640 \family default
16641  or 
16642 \family sans
16643 Overlay
16644 \family default
16645  exceed the physical size of a slide or sheet of paper, the extra will overflow
16646  onto a new sheet.
16647  Again, you should avoid this.
16648  It defeats the whole purpose of 
16649 \family sans
16650 Note
16651 \family default
16652 s and 
16653 \family sans
16654 Overlay
16655 \family default
16656 s.
16657 \end_layout
16658
16659 \begin_layout Subsubsection
16660 Using 
16661 \family sans
16662 Overlay
16663 \family default
16664  with 
16665 \family sans
16666 Slide
16667 \end_layout
16668
16669 \begin_layout Standard
16670 The idea behind an 
16671 \family sans
16672 Overlay
16673 \family default
16674  is a slide that sits atop another slide.
16675  Perhaps you wish to discuss a figure on the main 
16676 \family sans
16677 Slide
16678 \family default
16679  before displaying the text associated with it.
16680  One way to accomplish this is tape a flap of dark paper over the part of
16681  the 
16682 \family sans
16683 Slide
16684 \family default
16685  you want to display later.
16686  This method fails, however, if you wish to overlap one graph with another,
16687  for example.
16688  You would then have to fumble while speaking to align the two separate,
16689  overlapping 
16690 \family sans
16691 Slide
16692 \family default
16693 s to align the two graphs.
16694  The use of an 
16695 \family sans
16696 Overlay
16697 \family default
16698  environment in both cases makes life much easier.
16699 \end_layout
16700
16701 \begin_layout Standard
16702 Each 
16703 \family sans
16704 Overlay
16705 \family default
16706  receives the page number of its 
16707 \begin_inset Quotes eld
16708 \end_inset
16709
16710 parent
16711 \begin_inset Quotes erd
16712 \end_inset
16713
16714  
16715 \family sans
16716 Slide
16717 \family default
16718 , appended by 
16719 \begin_inset Quotes eld
16720 \end_inset
16721
16722
16723 \family typewriter
16724 -a
16725 \family default
16726
16727 \begin_inset Quotes erd
16728 \end_inset
16729
16730 .
16731 \begin_inset Foot
16732 status collapsed
16733
16734 \begin_layout Plain Layout
16735 Presumably, mutliple 
16736 \family sans
16737 Overlay
16738 \family default
16739 s would have 
16740 \begin_inset Quotes eld
16741 \end_inset
16742
16743
16744 \family typewriter
16745 -a
16746 \family default
16747
16748 \begin_inset Quotes erd
16749 \end_inset
16750
16751
16752 \begin_inset Quotes eld
16753 \end_inset
16754
16755
16756 \family typewriter
16757 -b
16758 \family default
16759
16760 \begin_inset Quotes erd
16761 \end_inset
16762
16763
16764 \begin_inset Quotes eld
16765 \end_inset
16766
16767
16768 \family typewriter
16769 -c
16770 \family default
16771
16772 \begin_inset Quotes erd
16773 \end_inset
16774
16775 , etc.
16776 \begin_inset space ~
16777 \end_inset
16778
16779 appended to the page number of the parent 
16780 \family sans
16781 Slide
16782 \family default
16783 .
16784  
16785 \end_layout
16786
16787 \end_inset
16788
16789  Clearly, you want the contents of both the 
16790 \family sans
16791 Slide
16792 \family default
16793  and the 
16794 \family sans
16795 Overlay
16796 \family default
16797  to each fit on a single physical slide! You should probably consider an
16798  
16799 \family sans
16800 Overlay
16801 \family default
16802  as 
16803 \begin_inset Quotes eld
16804 \end_inset
16805
16806 part of
16807 \begin_inset Quotes erd
16808 \end_inset
16809
16810  a 
16811 \family sans
16812 Slide
16813 \family default
16814 .
16815  Indeed, the LyX 
16816 \family sans
16817 slides
16818 \family default
16819  class provides a visual cue for this: the label at the start of an 
16820 \family sans
16821 Overlay
16822 \family default
16823  is shorter than that at the start of a 
16824 \family sans
16825 Slide
16826 \family default
16827 .
16828  Lastly, when you generate printable output, you'll find alignment markers
16829  in all four corners of both the 
16830 \family sans
16831 Overlay
16832 \family default
16833  page and its parent 
16834 \family sans
16835 Slide
16836 \family default
16837 .
16838  These will assist you in lining up the two physical slides.
16839 \end_layout
16840
16841 \begin_layout Standard
16842 The major problem in overlaying two slides is aligning the contents of the
16843  two transparencies.
16844  How much space should you leave for that graph on the second slide? Worse
16845  still, what if you want a graph and a sentence on second slide, but there
16846  is text on the main transparency that goes in between them? You could try
16847  and insert vertical space of the right size.
16848  The better way is to use 
16849 \family sans
16850 InvisibleText
16851 \family default
16852  and 
16853 \family sans
16854 VisibleText
16855 \family default
16856 .
16857 \end_layout
16858
16859 \begin_layout Standard
16860 As their names imply, 
16861 \family sans
16862 InvisibleText
16863 \family default
16864  and 
16865 \family sans
16866 VisibleText
16867 \family default
16868  are two command-like paragraph environments that make all subsequent text
16869  invisible and visible, respectively.
16870  Note from section
16871 \begin_inset space ~
16872 \end_inset
16873
16874
16875 \begin_inset CommandInset ref
16876 LatexCommand ref
16877 reference "sec:slideQuirk"
16878
16879 \end_inset
16880
16881  that you don't place anything 
16882 \emph on
16883 into
16884 \emph default
16885  these two environments, however.
16886  When you create an 
16887 \family sans
16888 InvisibleText
16889 \family default
16890 , it inserts a centered, sky-blue label into the page reading 
16891 \begin_inset Quotes eld
16892 \end_inset
16893
16894 <Invisible Text Follows>
16895 \begin_inset Quotes erd
16896 \end_inset
16897
16898 .
16899  For paragraphs following this label, the parts of the 
16900 \family sans
16901 Slide
16902 \family default
16903  [or 
16904 \family sans
16905 Overlay
16906 \family default
16907 ; it doesn't matter which] where they would be contain instead blank space.
16908  
16909 \end_layout
16910
16911 \begin_layout Standard
16912 For 
16913 \family sans
16914 VisibleText
16915 \family default
16916 , the corresponding centered label is 
16917 \begin_inset Quotes eld
16918 \end_inset
16919
16920 <Visible Text Follows>
16921 \begin_inset Quotes erd
16922 \end_inset
16923
16924  in blazing green.
16925  Paragraphs following this label behave normally.
16926  Note that the beginning of a new 
16927 \family sans
16928 Slide
16929 \family default
16930
16931 \family sans
16932 Overlay
16933 \family default
16934 , or 
16935 \family sans
16936 Note
16937 \family default
16938  automatically shuts off an 
16939 \family sans
16940 InvisibleText
16941 \family default
16942 .
16943  It's therefore not necessary to use 
16944 \family sans
16945 VisibleText
16946 \family default
16947  at the end of a 
16948 \family sans
16949 Slide
16950 \family default
16951 .
16952 \end_layout
16953
16954 \begin_layout Standard
16955 By now, it should be obvious how to create overlay transparencies using
16956  the proper combination of 
16957 \family sans
16958 InvisibleText
16959 \family default
16960  and 
16961 \family sans
16962 VisibleText
16963 \family default
16964  on a 
16965 \family sans
16966 Slide
16967 \family default
16968  and 
16969 \family sans
16970 Overlay
16971 \family default
16972 :
16973 \end_layout
16974
16975 \begin_layout Enumerate
16976 Create a 
16977 \family sans
16978 Slide
16979 \family default
16980 , including everything that will appear on it, whether on the main slide
16981  or on the 
16982 \family sans
16983 Overlay
16984 \family default
16985 .
16986 \end_layout
16987
16988 \begin_layout Enumerate
16989 Before each figure or paragraph that will appear only on the 
16990 \family sans
16991 Overlay
16992 \family default
16993 , insert an 
16994 \family sans
16995 InvisibleText
16996 \family default
16997  environment.
16998  If necessary, insert a 
16999 \family sans
17000 VisibleText
17001 \family default
17002  environment after the 
17003 \family sans
17004 Overlay
17005 \family default
17006 -only text.
17007 \end_layout
17008
17009 \begin_layout Enumerate
17010 Start an 
17011 \family sans
17012 Overlay
17013 \family default
17014  immediately following the 
17015 \family sans
17016 Slide
17017 \family default
17018 .
17019 \end_layout
17020
17021 \begin_layout Enumerate
17022 Copy the contents of this 
17023 \family sans
17024 Slide
17025 \family default
17026  into the 
17027 \family sans
17028 Overlay
17029 \family default
17030 .
17031 \end_layout
17032
17033 \begin_layout Enumerate
17034 Within the 
17035 \family sans
17036 Overlay
17037 \family default
17038 , change all of the 
17039 \family sans
17040 InvisibleText
17041 \family default
17042  lines to 
17043 \family sans
17044 VisibleText
17045 \family default
17046  and vice-versa.
17047 \end_layout
17048
17049 \begin_layout Standard
17050 That's it.
17051  You've just made an 
17052 \family sans
17053 Overlay
17054 \family default
17055 .
17056 \end_layout
17057
17058 \begin_layout Standard
17059 There's one problem with the way I've designed the LyX 
17060 \family sans
17061 slides
17062 \family default
17063  class: you can't make text in the middle of a paragraph invisible, nor
17064  make text in the middle of an invisible paragraph visible again.
17065  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17066 \begin_inset Foot
17067 status collapsed
17068
17069 \begin_layout Plain Layout
17070 The commands of interest are: 
17071 \end_layout
17072
17073 \begin_layout Itemize
17074
17075 \family typewriter
17076 {
17077 \backslash
17078 invisible \SpecialChar \ldots{}
17079  }
17080 \end_layout
17081
17082 \begin_layout Itemize
17083
17084 \family typewriter
17085 {
17086 \backslash
17087 visible \SpecialChar \ldots{}
17088  }
17089 \end_layout
17090
17091 \begin_layout Plain Layout
17092 \SpecialChar \ldots{}
17093 and need to be marked as TeX.
17094  The text whose 
17095 \begin_inset Quotes eld
17096 \end_inset
17097
17098 visibility
17099 \begin_inset Quotes erd
17100 \end_inset
17101
17102  you wish to change goes in between the brackets [and after the 
17103 \family typewriter
17104
17105 \backslash
17106 invisible
17107 \family default
17108  or 
17109 \family typewriter
17110
17111 \backslash
17112 visible
17113 \family default
17114  command].
17115  If you don't know how to mark text as TeX, see the appropriate section
17116  of the 
17117 \emph on
17118 User's Guide
17119 \emph default
17120 .
17121 \end_layout
17122
17123 \end_inset
17124
17125
17126 \end_layout
17127
17128 \begin_layout Subsubsection
17129 Using 
17130 \family sans
17131 Note
17132 \family default
17133  with 
17134 \family sans
17135 Slide
17136 \family default
17137
17138 \begin_inset CommandInset label
17139 LatexCommand label
17140 name "sec:slideNote"
17141
17142 \end_inset
17143
17144
17145 \end_layout
17146
17147 \begin_layout Standard
17148 Like an 
17149 \family sans
17150 Overlay
17151 \family default
17152 , a 
17153 \family sans
17154 Note
17155 \family default
17156  is associated with a 
17157 \begin_inset Quotes eld
17158 \end_inset
17159
17160 parent
17161 \begin_inset Quotes erd
17162 \end_inset
17163
17164  
17165 \family sans
17166 Slide
17167 \family default
17168 .
17169  Here, too, the LyX 
17170 \family sans
17171 slides
17172 \family default
17173  class provides visual cues.
17174  The label for a 
17175 \family sans
17176 Note
17177 \family default
17178  is shorter than that of a 
17179 \family sans
17180 Slide
17181 \family default
17182  [yet longer than that of an 
17183 \family sans
17184 Overlay
17185 \family default
17186 ] and, like the label of an 
17187 \family sans
17188 Overlay
17189 \family default
17190  is shockingly magenta.
17191  Additionally, the printed 
17192 \family sans
17193 Note
17194 \family default
17195  has the page number of its 
17196 \begin_inset Quotes eld
17197 \end_inset
17198
17199 parent
17200 \begin_inset Quotes erd
17201 \end_inset
17202
17203  
17204 \family sans
17205 Slide
17206 \family default
17207 , appended by 
17208 \begin_inset Quotes eld
17209 \end_inset
17210
17211
17212 \family typewriter
17213 -
17214 \family default
17215 1
17216 \begin_inset Quotes erd
17217 \end_inset
17218
17219
17220 \begin_inset Quotes eld
17221 \end_inset
17222
17223
17224 \family typewriter
17225 -
17226 \family default
17227 2
17228 \begin_inset Quotes erd
17229 \end_inset
17230
17231
17232 \begin_inset Quotes eld
17233 \end_inset
17234
17235
17236 \family typewriter
17237 -
17238 \family default
17239 3
17240 \begin_inset Quotes erd
17241 \end_inset
17242
17243 , etc.
17244  You can have multiple 
17245 \family sans
17246 Note
17247 \family default
17248 s associated with a single 
17249 \family sans
17250 Slide
17251 \family default
17252 , and, as with 
17253 \family sans
17254 Slide
17255 \family default
17256  and 
17257 \family sans
17258 Overlay
17259 \family default
17260 , you'll probably want to break up long 
17261 \family sans
17262 Note
17263 \family default
17264 s so that they fit on a single sheet of paper.
17265 \end_layout
17266
17267 \begin_layout Standard
17268 The purpose of a 
17269 \family sans
17270 Note
17271 \family default
17272  is obvious: it contains anything additional you might want to say about
17273  a 
17274 \family sans
17275 Slide
17276 \family default
17277 .
17278  It could also be used as a sheet of reminders for a particular 
17279 \family sans
17280 Slide
17281 \family default
17282 .
17283  In the case of the latter, you might want to make use of time markers.
17284  Currently, the LyX 
17285 \family sans
17286 slides
17287 \family default
17288  class has no 
17289 \begin_inset Quotes eld
17290 \end_inset
17291
17292 native
17293 \begin_inset Quotes erd
17294 \end_inset
17295
17296  support for time markers, a 
17297 \noun on
17298 SliTeX
17299 \noun default
17300  feature.
17301  So, you'll have to resort to using the LaTeX codes.
17302 \end_layout
17303
17304 \begin_layout Standard
17305 To use time markers, you'll need to specify the extra class option 
17306 \begin_inset Quotes eld
17307 \end_inset
17308
17309
17310 \family typewriter
17311 clock
17312 \family default
17313
17314 \begin_inset Quotes erd
17315 \end_inset
17316
17317  [see section
17318 \begin_inset space ~
17319 \end_inset
17320
17321
17322 \begin_inset CommandInset ref
17323 LatexCommand ref
17324 reference "sec:slidesetup"
17325
17326 \end_inset
17327
17328 ].
17329  This option turns on timing marks, which will appear in the lower-left-hand
17330  corner of every 
17331 \family sans
17332 Note
17333 \family default
17334  you generate.
17335  To set what appears in the time marker, you use the LaTeX commands 
17336 \begin_inset Quotes eld
17337 \end_inset
17338
17339
17340 \family typewriter
17341
17342 \backslash
17343 settime{}
17344 \family default
17345
17346 \begin_inset Quotes erd
17347 \end_inset
17348
17349  and 
17350 \begin_inset Quotes eld
17351 \end_inset
17352
17353
17354 \family typewriter
17355
17356 \backslash
17357 addtime{}
17358 \family default
17359
17360 \begin_inset Quotes erd
17361 \end_inset
17362
17363 .
17364  The arguments of both commands are time measured in seconds.
17365  
17366 \begin_inset Quotes eld
17367 \end_inset
17368
17369
17370 \family typewriter
17371
17372 \backslash
17373 settime{}
17374 \family default
17375
17376 \begin_inset Quotes erd
17377 \end_inset
17378
17379  sets the time marker to a given time.
17380  
17381 \begin_inset Quotes eld
17382 \end_inset
17383
17384
17385 \family typewriter
17386
17387 \backslash
17388 addtime{}
17389 \family default
17390
17391 \begin_inset Quotes erd
17392 \end_inset
17393
17394  increments the time marker by the specified amount.
17395  Using time markers and 
17396 \family sans
17397 Note
17398 \family default
17399 s in this fashion, you can remind yourself how much time to spend on a particula
17400
17401 \family sans
17402 Slide
17403 \family default
17404 .
17405 \end_layout
17406
17407 \begin_layout Standard
17408 There's one last feature to describe.
17409  Clearly, you'd like to print out all of your 
17410 \family sans
17411 Slide
17412 \family default
17413 s and 
17414 \family sans
17415 Overlay
17416 \family default
17417 s on transparencies while printing all of your 
17418 \family sans
17419 Note
17420 \family default
17421 s on plain paper.
17422  However, a 
17423 \family sans
17424 Note
17425 \family default
17426  
17427 \emph on
17428 must
17429 \emph default
17430  follow the 
17431 \family sans
17432 Slide
17433 \family default
17434  with which it is associated.
17435  What's a person to do?
17436 \end_layout
17437
17438 \begin_layout Standard
17439 Luckily, there are two LaTeX commands that allow you to select what to print
17440  out.
17441  Both must be placed into the preamble of your document.
17442  The command 
17443 \begin_inset Quotes eld
17444 \end_inset
17445
17446
17447 \family typewriter
17448
17449 \backslash
17450 onlyslides{
17451 \backslash
17452 slides}
17453 \family default
17454
17455 \begin_inset Quotes erd
17456 \end_inset
17457
17458  will cause the output to contain only the 
17459 \family sans
17460 Slide
17461 \family default
17462 s and 
17463 \family sans
17464 Overlay
17465 \family default
17466 s.
17467  Correspondingly, the command 
17468 \begin_inset Quotes eld
17469 \end_inset
17470
17471
17472 \family typewriter
17473
17474 \backslash
17475 onlynotes{
17476 \backslash
17477 notes}
17478 \family default
17479
17480 \begin_inset Quotes erd
17481 \end_inset
17482
17483  prevents the output of anything but 
17484 \family sans
17485 Note
17486 \family default
17487 s.
17488  I'd advise placing both commands in the preamble and initially comment
17489  both out.
17490  You can then preview your entire presentation as you write.
17491  When you're done writing, you can then uncomment one of the two to select
17492  what you want to print.
17493  I like to uncomment 
17494 \begin_inset Quotes eld
17495 \end_inset
17496
17497
17498 \family typewriter
17499
17500 \backslash
17501 onlyslides{
17502 \backslash
17503 slides}
17504 \family default
17505
17506 \begin_inset Quotes erd
17507 \end_inset
17508
17509  , print to a file with 
17510 \begin_inset Quotes eld
17511 \end_inset
17512
17513
17514 \family typewriter
17515 -slides
17516 \family default
17517
17518 \begin_inset Quotes erd
17519 \end_inset
17520
17521  in its name, comment it back out, then uncomment 
17522 \begin_inset Quotes eld
17523 \end_inset
17524
17525
17526 \family typewriter
17527
17528 \backslash
17529 onlynotes{
17530 \backslash
17531 notes}
17532 \family default
17533
17534 \begin_inset Quotes erd
17535 \end_inset
17536
17537  and print to a 
17538 \begin_inset Quotes eld
17539 \end_inset
17540
17541
17542 \family typewriter
17543 *-notes.ps
17544 \family default
17545
17546 \begin_inset Quotes erd
17547 \end_inset
17548
17549  file.
17550  I can then send either file to a printer, loading transparencies or plain
17551  paper as appropriate.
17552 \end_layout
17553
17554 \begin_layout Standard
17555 You can also provide other arguments to the 
17556 \begin_inset Quotes eld
17557 \end_inset
17558
17559
17560 \family typewriter
17561
17562 \backslash
17563 onlyslides{}
17564 \family default
17565
17566 \begin_inset Quotes erd
17567 \end_inset
17568
17569  and 
17570 \begin_inset Quotes eld
17571 \end_inset
17572
17573
17574 \family typewriter
17575
17576 \backslash
17577 onlynotes{}
17578 \family default
17579
17580 \begin_inset Quotes erd
17581 \end_inset
17582
17583  commands.
17584  See a good LaTeX book for details.
17585 \end_layout
17586
17587 \begin_layout Subsection
17588 The 
17589 \family sans
17590 slides
17591 \family default
17592  Class Template File
17593 \end_layout
17594
17595 \begin_layout Standard
17596 I have also provided a template file, 
17597 \begin_inset Quotes eld
17598 \end_inset
17599
17600
17601 \family typewriter
17602 slides.lyx
17603 \family default
17604
17605 \begin_inset Quotes erd
17606 \end_inset
17607
17608 , with the 
17609 \family sans
17610 slides
17611 \family default
17612  class.
17613  To use it, begin your new presentation with 
17614 \family sans
17615 \bar under
17616 F
17617 \bar default
17618 ile\SpecialChar \menuseparator
17619 New
17620 \begin_inset space ~
17621 \end_inset
17622
17623 from
17624 \begin_inset space ~
17625 \end_inset
17626
17627
17628 \bar under
17629 T
17630 \bar default
17631 emplate
17632 \family default
17633 .
17634  Your new LyX presentation file will contain an example 
17635 \family sans
17636 Slide
17637 \family default
17638  – 
17639 \family sans
17640 Overlay
17641 \family default
17642  – 
17643 \family sans
17644 Note
17645 \family default
17646  triplet.
17647  The 
17648 \family sans
17649 Slide
17650 \family default
17651  and 
17652 \family sans
17653 Overlay
17654 \family default
17655  additionally contain an example of the use of 
17656 \family sans
17657 InvisibleText
17658 \family default
17659  and 
17660 \family sans
17661 VisibleText
17662 \family default
17663 .
17664  Lastly, the preamble will contain:
17665 \end_layout
17666
17667 \begin_layout LyX-Code
17668 % Uncomment to print out only slides and overlays
17669 \end_layout
17670
17671 \begin_layout LyX-Code
17672 %
17673 \end_layout
17674
17675 \begin_layout LyX-Code
17676 %
17677 \backslash
17678 onlyslides{
17679 \backslash
17680 slides}
17681 \begin_inset Newline newline
17682 \end_inset
17683
17684  
17685 \end_layout
17686
17687 \begin_layout LyX-Code
17688 % Uncomment to print out only notes
17689 \end_layout
17690
17691 \begin_layout LyX-Code
17692 %
17693 \end_layout
17694
17695 \begin_layout LyX-Code
17696 %
17697 \backslash
17698 onlynotes{
17699 \backslash
17700 notes}
17701 \end_layout
17702
17703 \begin_layout Standard
17704 One final thing: I created this class to support the LaTeX2e 
17705 \begin_inset Quotes eld
17706 \end_inset
17707
17708
17709 \noun on
17710 SliTeX
17711 \noun default
17712  emulation
17713 \begin_inset Quotes erd
17714 \end_inset
17715
17716  class, one of the built-in LaTeX2e classes.
17717  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17718  built-in slide class.
17719  It's here if you want it or need it.
17720  There exist other LaTeX2e classes for creating presentations, such as the
17721  
17722 \family sans
17723 Foils
17724 \family default
17725  class [see section
17726 \begin_inset space ~
17727 \end_inset
17728
17729
17730 \begin_inset CommandInset ref
17731 LatexCommand ref
17732 reference "sec:foiltex"
17733
17734 \end_inset
17735
17736 ] or the 
17737 \begin_inset Quotes eld
17738 \end_inset
17739
17740
17741 \family typewriter
17742 seminar
17743 \family default
17744
17745 \begin_inset Quotes erd
17746 \end_inset
17747
17748  package [present on some TeX distributions].
17749  The latter is not yet supported under LyX.
17750 \begin_inset Foot
17751 status collapsed
17752
17753 \begin_layout Plain Layout
17754 Perhaps you can take on the task\SpecialChar \ldots{}
17755
17756 \end_layout
17757
17758 \end_inset
17759
17760  I know nothing about these other classes.
17761  Try them out to see what sort of alternative they provide.
17762 \end_layout
17763
17764 \begin_layout Chapter
17765 LyX Features needing Extra Software
17766 \end_layout
17767
17768 \begin_layout Section
17769 Checking TeX
17770 \end_layout
17771
17772 \begin_layout Standard
17773 by 
17774 \noun on
17775 Asger Alstrup
17776 \end_layout
17777
17778 \begin_layout Subsection
17779 Introduction
17780 \end_layout
17781
17782 \begin_layout Standard
17783 If you have the 
17784 \family typewriter
17785 chktex
17786 \family default
17787  program installed
17788 \begin_inset Foot
17789 status collapsed
17790
17791 \begin_layout Plain Layout
17792
17793 \family typewriter
17794 chktex
17795 \family default
17796  is not yet available when you are using the LaTeX distribution MiKTeX.
17797 \end_layout
17798
17799 \end_inset
17800
17801 , you'll find in the 
17802 \family sans
17803 Tools
17804 \family default
17805  menu the entry: 
17806 \family sans
17807 Check
17808 \begin_inset space ~
17809 \end_inset
17810
17811 TeX
17812 \family default
17813 .
17814  You can get 
17815 \family typewriter
17816 chktex
17817 \family default
17818  from CTAN, 
17819 \begin_inset CommandInset href
17820 LatexCommand href
17821 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17822
17823 \end_inset
17824
17825 .
17826 \end_layout
17827
17828 \begin_layout Standard
17829 The 
17830 \family sans
17831 ChkTeX
17832 \family default
17833  package is a program that was written by 
17834 \begin_inset Flex Noun
17835 status collapsed
17836
17837 \begin_layout Plain Layout
17838 Jens T.
17839 \begin_inset space ~
17840 \end_inset
17841
17842 Berger Thielemann
17843 \end_layout
17844
17845 \end_inset
17846
17847  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17848  and easy to forget.
17849  The program runs over your LaTeX file, checks the integrity of the file,
17850  and flags some common errors.
17851  In other technical words, it is 
17852 \family typewriter
17853 lint
17854 \family default
17855  for LaTeX.
17856 \end_layout
17857
17858 \begin_layout Standard
17859 Well, what is a syntax checker doing in LyX which is supposed to produce
17860  correct LaTeX anyways? The answer is simple: Just as 
17861 \family typewriter
17862 Lint
17863 \family default
17864  not only checks the 
17865 \emph on
17866 syntax
17867 \emph default
17868  of C programs, but also does 
17869 \emph on
17870 semantic
17871 \emph default
17872  checks for type-errors, 
17873 \family sans
17874 ChkTeX
17875 \family default
17876  catches some common 
17877 \emph on
17878 typographic
17879 \emph default
17880  errors, in addition to the syntactical ones.
17881  Specifically, 
17882 \family sans
17883 ChkTeX
17884 \family default
17885  is capable of detecting several common errors, such as
17886 \end_layout
17887
17888 \begin_layout Itemize
17889 Ellipsis detection:
17890 \begin_inset Newline newline
17891 \end_inset
17892
17893 Use \SpecialChar \ldots{}
17894  instead of ...
17895 \end_layout
17896
17897 \begin_layout Itemize
17898 No space in front of/after parenthesis:
17899 \begin_inset Newline newline
17900 \end_inset
17901
17902 ( wrong spacing )
17903 \end_layout
17904
17905 \begin_layout Itemize
17906 Enforcement of normal space after common abbreviations:
17907 \begin_inset Newline newline
17908 \end_inset
17909
17910 e.
17911 \begin_inset space \thinspace{}
17912 \end_inset
17913
17914 g.
17915 \begin_inset space \space{}
17916 \end_inset
17917
17918 is too wide spacing.
17919 \end_layout
17920
17921 \begin_layout Itemize
17922 Enforcement of end-of-sentence space when the last sentence ends with a
17923  capital letter:
17924 \begin_inset Newline newline
17925 \end_inset
17926
17927 This is a TEST.
17928  And this is wrong spacing.
17929 \end_layout
17930
17931 \begin_layout Itemize
17932 Space in front of labels and similar commands:
17933 \begin_inset Newline newline
17934 \end_inset
17935
17936 The label should stick right up to the text to avoid falling to a wrong
17937  page.
17938  
17939 \begin_inset CommandInset label
17940 LatexCommand label
17941 name "sec:chktex"
17942
17943 \end_inset
17944
17945  
17946 \begin_inset Foot
17947 status collapsed
17948
17949 \begin_layout Plain Layout
17950 This footnote is in danger of falling off to a wrong page
17951 \end_layout
17952
17953 \end_inset
17954
17955  The label is separated too much.
17956 \end_layout
17957
17958 \begin_layout Itemize
17959 Space in front of references, instead of hard spaces:
17960 \begin_inset Newline newline
17961 \end_inset
17962
17963 If you have bad luck, the text will break right between the referenced text
17964  and reference number, and that's a pity.
17965  See section 
17966 \begin_inset CommandInset ref
17967 LatexCommand ref
17968 reference "sec:chktex"
17969
17970 \end_inset
17971
17972 .
17973 \end_layout
17974
17975 \begin_layout Itemize
17976 Use of 
17977 \begin_inset Quotes eld
17978 \end_inset
17979
17980 x
17981 \begin_inset Quotes erd
17982 \end_inset
17983
17984  instead of 
17985 \begin_inset Formula $\times$
17986 \end_inset
17987
17988  between numbers:
17989 \begin_inset Newline newline
17990 \end_inset
17991
17992 2x2 looks cheap compared to 
17993 \begin_inset Formula $2\times2$
17994 \end_inset
17995
17996 .
17997 \end_layout
17998
17999 \begin_layout Standard
18000 and more \SpecialChar \ldots{}
18001  It is an invaluable tool when you are 
18002 \begin_inset Quotes eld
18003 \end_inset
18004
18005 finishing up
18006 \begin_inset Quotes erd
18007 \end_inset
18008
18009  your document before printing, and you should run it right after the obligatory
18010  spelling check, and before you go fine tuning the typesetting.
18011 \end_layout
18012
18013 \begin_layout Subsection
18014 How to use it
18015 \end_layout
18016
18017 \begin_layout Standard
18018 If you have the program installed, usage is as simple as choosing 
18019 \family sans
18020 Tools\SpecialChar \menuseparator
18021 Check
18022 \begin_inset space ~
18023 \end_inset
18024
18025 TeX
18026 \family default
18027 .
18028  This will make LyX generate a LaTeX file of your document, start 
18029 \family sans
18030 ChkTeX
18031 \family default
18032  to check it, and then make LyX insert 
18033 \begin_inset Quotes eld
18034 \end_inset
18035
18036 error boxes
18037 \begin_inset Quotes erd
18038 \end_inset
18039
18040  with the warnings from 
18041 \family sans
18042 ChkTeX
18043 \family default
18044 , if there were any.
18045  The warnings will be placed close to the point of the mistake, and you
18046  can quickly find them by using the 
18047 \family sans
18048 Navigate\SpecialChar \menuseparator
18049 Error
18050 \family default
18051  menu item, or the shortcut key 
18052 \family sans
18053 C-g
18054 \family default
18055  from the default 
18056 \family typewriter
18057 cua
18058 \family default
18059  bind file.
18060  Open the error boxes by clicking on them with the mouse, or use the shortcut
18061  key 
18062 \family sans
18063 C-i
18064 \family default
18065  from 
18066 \family typewriter
18067 cua
18068 \family default
18069  bindings, or the corresponding 
18070 \family sans
18071 C-o
18072 \family default
18073  for the alternate 
18074 \family typewriter
18075 emacs
18076 \family default
18077  bind file.
18078  Read the warning and correct the mistake, if it is a mistake.
18079  If you have trouble understanding what the warning is about, you can safely
18080  ignore it.
18081  Remember that there is a hidden layer between the document on screen and
18082  the technical details in invoking 
18083 \family sans
18084 ChkTeX
18085 \family default
18086 , and this gap can make some warnings seem arcane or just plain silly.
18087 \end_layout
18088
18089 \begin_layout Standard
18090 This document is an excellent testing bed for the feature, and it should
18091  provide quite a few warnings for you to fiddle with.
18092  Since computers are only so smart, expect most of the warnings to be false
18093  alarms, though.
18094 \end_layout
18095
18096 \begin_layout Subsection
18097 How to fine tune it
18098 \end_layout
18099
18100 \begin_layout Standard
18101 Sometimes, you'll find that 
18102 \family sans
18103 ChkTeX
18104 \family default
18105  makes more noise than suits your mood.
18106  Then you can choose not to use it, wait until your mood changes, or try
18107  to customize 
18108 \family sans
18109 ChkTeX
18110 \family default
18111  to get better along with you.
18112 \end_layout
18113
18114 \begin_layout Standard
18115 Although 
18116 \family sans
18117 ChkTeX
18118 \family default
18119  
18120 \emph on
18121 is
18122 \emph default
18123  very configurable and extensible, you shouldn't expect to solve all problems
18124  with 
18125 \family sans
18126 ChkTeX
18127 \family default
18128  in LyX this way.
18129  Since LyX has to generate a somewhat special LaTeX file to be able to match
18130  the line numbers from the 
18131 \family sans
18132 ChkTeX
18133 \family default
18134  output
18135 \begin_inset Foot
18136 status collapsed
18137
18138 \begin_layout Plain Layout
18139 You can inspect the specific output from 
18140 \family sans
18141 chktex
18142 \family default
18143  by using 
18144 \family sans
18145 Edit\SpecialChar \menuseparator
18146 View
18147 \begin_inset space ~
18148 \end_inset
18149
18150 LaTeX
18151 \begin_inset space ~
18152 \end_inset
18153
18154 Log
18155 \family default
18156  right after a 
18157 \family sans
18158 chktex
18159 \family default
18160  run.
18161 \end_layout
18162
18163 \end_inset
18164
18165  to the internal document structure, some of the warnings will not appear
18166  correctly.
18167  There are two things you can do about this:
18168 \end_layout
18169
18170 \begin_layout Itemize
18171 Fine tune the 
18172 \family sans
18173 ChkTeX
18174 \family default
18175  invocation command line in 
18176 \begin_inset Flex MenuItem
18177 status collapsed
18178
18179 \begin_layout Plain Layout
18180 Tools\SpecialChar \menuseparator
18181 Preferences\SpecialChar \menuseparator
18182 Output\SpecialChar \menuseparator
18183 LaTeX\SpecialChar \menuseparator
18184 CheckTeX command
18185 \end_layout
18186
18187 \end_inset
18188
18189 , or the global 
18190 \family sans
18191 ChkTeX
18192 \family default
18193  installation configuration file (usually with the file 
18194 \family typewriter
18195 chktexrc
18196 \family default
18197 ).
18198  See below to learn what warnings can be enabled and disabled on the command
18199  line.
18200 \end_layout
18201
18202 \begin_layout Itemize
18203 Export your document as a raw LaTeX file using 
18204 \family sans
18205 File\SpecialChar \menuseparator
18206 Export\SpecialChar \menuseparator
18207 LaTeX
18208 \family default
18209  and run 
18210 \family typewriter
18211 chktex
18212 \family default
18213  manually on that.
18214  Invoked in this way, it can be a hassle to find the corresponding place
18215  in the document inside LyX, but with a little patience, you should be able
18216  to do it.
18217 \end_layout
18218
18219 \begin_layout Standard
18220 Here follows the warning messages that can be enabled and disabled in 
18221 \family sans
18222 Preferences
18223 \family default
18224 .
18225  Use 
18226 \family typewriter
18227 -n#
18228 \family default
18229  to disable a warning, and 
18230 \family typewriter
18231 -w#
18232 \family default
18233  to enable a warning.
18234  The emphasized entries are disabled by default, because the default is
18235  "
18236 \family typewriter
18237 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18238 \family default
18239 ".
18240 \end_layout
18241
18242 \begin_layout Standard
18243 Notice that you should only use the options that enable and disable warnings,
18244  because LyX relies on some of the other command line parameters to be set
18245  in a specific way to have a chance to communicate with 
18246 \family typewriter
18247 chktex
18248 \family default
18249 .
18250 \end_layout
18251
18252 \begin_layout Enumerate
18253
18254 \size small
18255 \emph on
18256 Command terminated with space.
18257 \end_layout
18258
18259 \begin_layout Enumerate
18260
18261 \size small
18262 Non-breaking space (
18263 \begin_inset Quotes eld
18264 \end_inset
18265
18266
18267 \family typewriter
18268 ~
18269 \family default
18270
18271 \begin_inset Quotes erd
18272 \end_inset
18273
18274 ) should have been used.
18275 \end_layout
18276
18277 \begin_layout Enumerate
18278
18279 \size small
18280 \emph on
18281 You should enclose the previous parenthesis with 
18282 \begin_inset Quotes eld
18283 \end_inset
18284
18285
18286 \family typewriter
18287 {}
18288 \family default
18289
18290 \begin_inset Quotes erd
18291 \end_inset
18292
18293 .
18294 \end_layout
18295
18296 \begin_layout Enumerate
18297
18298 \size small
18299 Italic correction (
18300 \begin_inset Quotes eld
18301 \end_inset
18302
18303
18304 \family typewriter
18305
18306 \backslash
18307 /
18308 \family default
18309
18310 \begin_inset Quotes erd
18311 \end_inset
18312
18313 ) found in non-italic buffer.
18314 \end_layout
18315
18316 \begin_layout Enumerate
18317
18318 \size small
18319 Italic correction (
18320 \begin_inset Quotes eld
18321 \end_inset
18322
18323
18324 \family typewriter
18325
18326 \backslash
18327 /
18328 \family default
18329
18330 \begin_inset Quotes erd
18331 \end_inset
18332
18333 ) found more than once.
18334 \end_layout
18335
18336 \begin_layout Enumerate
18337
18338 \size small
18339 \emph on
18340 No italic correction (
18341 \begin_inset Quotes eld
18342 \end_inset
18343
18344
18345 \family typewriter
18346
18347 \backslash
18348 /
18349 \family default
18350
18351 \begin_inset Quotes erd
18352 \end_inset
18353
18354 ) found.
18355 \end_layout
18356
18357 \begin_layout Enumerate
18358
18359 \size small
18360 Accent command 
18361 \begin_inset Quotes eld
18362 \end_inset
18363
18364
18365 \family typewriter
18366 cmd
18367 \family default
18368
18369 \begin_inset Quotes erd
18370 \end_inset
18371
18372  needs use of 
18373 \begin_inset Quotes eld
18374 \end_inset
18375
18376
18377 \family typewriter
18378 cmd
18379 \family default
18380
18381 \begin_inset Quotes erd
18382 \end_inset
18383
18384 .
18385 \end_layout
18386
18387 \begin_layout Enumerate
18388
18389 \size small
18390 Wrong length of dash may have been used.
18391 \end_layout
18392
18393 \begin_layout Enumerate
18394
18395 \size small
18396 \emph on
18397 \begin_inset Quotes eld
18398 \end_inset
18399
18400
18401 \family typewriter
18402 %s
18403 \family default
18404
18405 \begin_inset Quotes erd
18406 \end_inset
18407
18408  expected, found 
18409 \begin_inset Quotes eld
18410 \end_inset
18411
18412
18413 \family typewriter
18414 %s
18415 \family default
18416
18417 \begin_inset Quotes erd
18418 \end_inset
18419
18420 .
18421 \end_layout
18422
18423 \begin_layout Enumerate
18424
18425 \size small
18426 Solo 
18427 \begin_inset Quotes eld
18428 \end_inset
18429
18430
18431 \family typewriter
18432 %s
18433 \family default
18434
18435 \begin_inset Quotes erd
18436 \end_inset
18437
18438  found.
18439 \end_layout
18440
18441 \begin_layout Enumerate
18442
18443 \size small
18444 You should use 
18445 \begin_inset Quotes eld
18446 \end_inset
18447
18448
18449 \family typewriter
18450 %s
18451 \family default
18452
18453 \begin_inset Quotes erd
18454 \end_inset
18455
18456  to achieve an ellipsis.
18457 \end_layout
18458
18459 \begin_layout Enumerate
18460
18461 \size small
18462 Inter-word spacing (
18463 \begin_inset Quotes eld
18464 \end_inset
18465
18466
18467 \family typewriter
18468
18469 \backslash
18470
18471 \family default
18472  
18473 \begin_inset Quotes eld
18474 \end_inset
18475
18476 ) should perhaps be used.
18477 \end_layout
18478
18479 \begin_layout Enumerate
18480
18481 \size small
18482 Inter-sentence spacing (
18483 \begin_inset Quotes eld
18484 \end_inset
18485
18486
18487 \family typewriter
18488
18489 \backslash
18490 @
18491 \family default
18492
18493 \begin_inset Quotes erd
18494 \end_inset
18495
18496 ) should perhaps be used.
18497 \end_layout
18498
18499 \begin_layout Enumerate
18500
18501 \size small
18502 Could not find argument for command.
18503 \end_layout
18504
18505 \begin_layout Enumerate
18506
18507 \size small
18508 No match found for 
18509 \begin_inset Quotes eld
18510 \end_inset
18511
18512
18513 \family typewriter
18514 %s
18515 \family default
18516
18517 \begin_inset Quotes erd
18518 \end_inset
18519
18520 .
18521 \end_layout
18522
18523 \begin_layout Enumerate
18524
18525 \size small
18526 Math mode still on at end of LaTeX file.
18527 \end_layout
18528
18529 \begin_layout Enumerate
18530
18531 \size small
18532 Number of 
18533 \begin_inset Quotes eld
18534 \end_inset
18535
18536
18537 \family typewriter
18538 char
18539 \family default
18540
18541 \begin_inset Quotes erd
18542 \end_inset
18543
18544  doesn't match the number of 
18545 \begin_inset Quotes eld
18546 \end_inset
18547
18548
18549 \family typewriter
18550 char
18551 \family default
18552
18553 \begin_inset Quotes erd
18554 \end_inset
18555
18556 .
18557 \end_layout
18558
18559 \begin_layout Enumerate
18560
18561 \size small
18562 You should use either 
18563 \family typewriter
18564
18565 \begin_inset Quotes eld
18566 \end_inset
18567
18568
18569 \family default
18570  or 
18571 \family typewriter
18572
18573 \begin_inset Quotes erd
18574 \end_inset
18575
18576
18577 \family default
18578  as an alternative to 
18579 \begin_inset Quotes eld
18580 \end_inset
18581
18582
18583 \family typewriter
18584 "
18585 \family default
18586
18587 \begin_inset Quotes erd
18588 \end_inset
18589
18590 .
18591 \end_layout
18592
18593 \begin_layout Enumerate
18594
18595 \size small
18596 You should use "
18597 \family typewriter
18598 '
18599 \family default
18600 " (ASCII 39) instead of "
18601 \family typewriter
18602 ´
18603 \family default
18604 " (ASCII 180).
18605 \end_layout
18606
18607 \begin_layout Enumerate
18608
18609 \size small
18610 User-specified pattern found.
18611 \end_layout
18612
18613 \begin_layout Enumerate
18614
18615 \size small
18616 This command might not be intended.
18617 \end_layout
18618
18619 \begin_layout Enumerate
18620
18621 \size small
18622 \emph on
18623 Comment displayed.
18624 \end_layout
18625
18626 \begin_layout Enumerate
18627
18628 \size small
18629 Either 
18630 \family typewriter
18631 ''
18632 \backslash
18633 ,'
18634 \family default
18635  or 
18636 \family typewriter
18637 '
18638 \backslash
18639 ,''
18640 \family default
18641  will look better.
18642 \end_layout
18643
18644 \begin_layout Enumerate
18645
18646 \size small
18647 Delete this space to maintain correct page references.
18648 \end_layout
18649
18650 \begin_layout Enumerate
18651
18652 \size small
18653 \emph on
18654 You might wish to put this between a pair of 
18655 \begin_inset Quotes eld
18656 \end_inset
18657
18658
18659 \family typewriter
18660 {}
18661 \family default
18662
18663 \begin_inset Quotes erd
18664 \end_inset
18665
18666 .
18667 \end_layout
18668
18669 \begin_layout Enumerate
18670
18671 \size small
18672 You ought to remove spaces in front of punctuation.
18673 \end_layout
18674
18675 \begin_layout Enumerate
18676
18677 \size small
18678 Could not execute LaTeX command.
18679 \end_layout
18680
18681 \begin_layout Enumerate
18682
18683 \size small
18684 Don't use 
18685 \family typewriter
18686
18687 \backslash
18688 /
18689 \family default
18690  in front of small punctuation.
18691 \end_layout
18692
18693 \begin_layout Enumerate
18694
18695 \family typewriter
18696 \size small
18697 $
18698 \backslash
18699 times$
18700 \family default
18701  may look prettier here.
18702 \end_layout
18703
18704 \begin_layout Enumerate
18705
18706 \size small
18707 \emph on
18708 Multiple spaces detected in output.
18709 \end_layout
18710
18711 \begin_layout Enumerate
18712
18713 \size small
18714 This text may be ignored.
18715 \end_layout
18716
18717 \begin_layout Enumerate
18718
18719 \size small
18720 Use 
18721 \family typewriter
18722
18723 \begin_inset Quotes eld
18724 \end_inset
18725
18726
18727 \family default
18728  to begin quotation, not 
18729 \family typewriter
18730 '
18731 \family default
18732 .
18733 \end_layout
18734
18735 \begin_layout Enumerate
18736
18737 \size small
18738 Use 
18739 \family typewriter
18740 '
18741 \family default
18742  to end quotation, not 
18743 \family typewriter
18744
18745 \begin_inset Quotes eld
18746 \end_inset
18747
18748
18749 \family default
18750 .
18751 \end_layout
18752
18753 \begin_layout Enumerate
18754
18755 \size small
18756 Don't mix quotes.
18757 \end_layout
18758
18759 \begin_layout Enumerate
18760
18761 \size small
18762 You should perhaps use 
18763 \begin_inset Quotes eld
18764 \end_inset
18765
18766
18767 \family typewriter
18768 cmd
18769 \family default
18770
18771 \begin_inset Quotes erd
18772 \end_inset
18773
18774  instead.
18775 \end_layout
18776
18777 \begin_layout Enumerate
18778
18779 \size small
18780 You should put a space in front of/after parenthesis.
18781 \end_layout
18782
18783 \begin_layout Enumerate
18784
18785 \size small
18786 You should avoid spaces in front of/after parenthesis.
18787 \end_layout
18788
18789 \begin_layout Enumerate
18790
18791 \size small
18792 \emph on
18793 You should not use punctuation in front of/after quotes.
18794 \end_layout
18795
18796 \begin_layout Enumerate
18797
18798 \size small
18799 Double space found.
18800 \end_layout
18801
18802 \begin_layout Enumerate
18803
18804 \size small
18805 You should put punctuation outside inner/inside display math mode.
18806 \end_layout
18807
18808 \begin_layout Enumerate
18809
18810 \size small
18811 You ought to not use primitive TeX in LaTeX code.
18812 \end_layout
18813
18814 \begin_layout Enumerate
18815
18816 \size small
18817 You should remove spaces in front of 
18818 \begin_inset Quotes eld
18819 \end_inset
18820
18821
18822 \family typewriter
18823 %s
18824 \family default
18825
18826 \begin_inset Quotes erd
18827 \end_inset
18828
18829
18830 \end_layout
18831
18832 \begin_layout Enumerate
18833
18834 \size small
18835 \begin_inset Quotes eld
18836 \end_inset
18837
18838
18839 \family typewriter
18840 %s
18841 \family default
18842
18843 \begin_inset Quotes erd
18844 \end_inset
18845
18846  is normally not followed by 
18847 \begin_inset Quotes eld
18848 \end_inset
18849
18850
18851 \family typewriter
18852 %c
18853 \family default
18854
18855 \begin_inset Quotes erd
18856 \end_inset
18857
18858 .
18859 \end_layout
18860
18861 \begin_layout Standard
18862 In later versions of LyX, we hope to provide a more complete interface to
18863  this tool (and it's smaller cousin 
18864 \family typewriter
18865 lacheck
18866 \family default
18867 ) to exploit the full power of it.
18868  But it's not exactly useless as it is now: go try it on one of your existing
18869  documents of a certain length and be surprised.
18870 \end_layout
18871
18872 \begin_layout Section
18873 Version Control in LyX
18874 \end_layout
18875
18876 \begin_layout Standard
18877 by
18878 \noun on
18879  Lars Gullik Bjønnes 
18880 \noun default
18881 and 
18882 \noun on
18883 Pavel Sanda
18884 \end_layout
18885
18886 \begin_layout Subsection
18887 Introduction
18888 \end_layout
18889
18890 \begin_layout Standard
18891 A friend of mine wanted to try LyX for a group project.
18892  When he didn't find support for version control or file locking, he dropped
18893  it.
18894  This angered me a bit, so I thought that I should at least make support
18895  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18896  This has been done.
18897  LyX now supports some of the most basic RCS/CVS/SVN commands.
18898  If you need something a bit more sophisticated you will have to do that
18899  manually in a terminal.
18900 \end_layout
18901
18902 \begin_layout Standard
18903 Also note that CVS support is not as good as subversion support so we advise
18904  using SVN instead.
18905  A good place to start learning Subversion is SVN Book
18906 \begin_inset Foot
18907 status open
18908
18909 \begin_layout Plain Layout
18910 \begin_inset CommandInset href
18911 LatexCommand href
18912 target "http://svnbook.red-bean.com/"
18913
18914 \end_inset
18915
18916
18917 \end_layout
18918
18919 \end_inset
18920
18921 .
18922  In the case of RCS you should read 
18923 \begin_inset Quotes eld
18924 \end_inset
18925
18926 rcsintro
18927 \begin_inset Quotes erd
18928 \end_inset
18929
18930  (a man file, read it with 
18931 \family typewriter
18932 man rcsintro
18933 \family default
18934 ).
18935  This file describes all the basic features of RCS.
18936  You should especially notice the comment about a RCS directory, and the
18937  notion of a master RCS file (the file ending in 
18938 \family typewriter
18939 ,v
18940 \family default
18941 ).
18942 \end_layout
18943
18944 \begin_layout Standard
18945 Before you begin to use the version control features in LyX, you should
18946  be familiar with RCS/CVS/SVN usage.
18947  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18948  package—no guarantees are made for older versions.
18949  Most of the log messages are not currently displayed after operations —
18950  you can check them in the Messages pane if unsure.
18951 \end_layout
18952
18953 \begin_layout Standard
18954 For introducing your own external commands consult vc-command in the manual
18955  of LyX functions.
18956 \end_layout
18957
18958 \begin_layout Subsection
18959 RCS commands in LyX
18960 \end_layout
18961
18962 \begin_layout Standard
18963 The following sections describe the RCS commands supported by LyX.
18964  You can find them in the 
18965 \family sans
18966 File\SpecialChar \menuseparator
18967 Version
18968 \begin_inset space ~
18969 \end_inset
18970
18971 Control
18972 \family default
18973  submenu.
18974  LyX was tested against RCS 5.7/5.8.
18975 \end_layout
18976
18977 \begin_layout Subsubsection
18978
18979 \family sans
18980 Register
18981 \end_layout
18982
18983 \begin_layout Standard
18984 If your document is not under revision control, this is the only item shown
18985  in the menu.
18986  And if it is under revision control, the 
18987 \family sans
18988 Register
18989 \family default
18990  item is not visible.
18991  
18992 \end_layout
18993
18994 \begin_layout Standard
18995 This command registers your document with RCS (unless you are under the
18996  directory managed by CVS)\SpecialChar \@.
18997  You are asked interactively to supply an initial
18998  description of the document.
18999  The document is now set in Read-Only mode and you have to 
19000 \family sans
19001 Check
19002 \begin_inset space ~
19003 \end_inset
19004
19005 Out
19006 \begin_inset space ~
19007 \end_inset
19008
19009 For
19010 \begin_inset space ~
19011 \end_inset
19012
19013 Edit
19014 \family default
19015 , before making any changes to it.
19016  A document under revision control has a 
19017 \begin_inset Quotes eld
19018 \end_inset
19019
19020 [RCS:<version> <locker>]
19021 \begin_inset Quotes erd
19022 \end_inset
19023
19024  item tagged to the filename in the minibuffer.
19025 \end_layout
19026
19027 \begin_layout Standard
19028 RCS command that is run: 
19029 \family typewriter
19030 ci -q -u -i -t-"<initial description>" <file-name>
19031 \end_layout
19032
19033 \begin_layout Standard
19034 Read 
19035 \family typewriter
19036 man ci
19037 \family default
19038  to understand the switches.
19039  
19040 \end_layout
19041
19042 \begin_layout Subsubsection
19043
19044 \family sans
19045 Check In Changes
19046 \end_layout
19047
19048 \begin_layout Standard
19049 When you are finished editing a file, you check in your changes.
19050  When you do this, you are asked for a description of the changes.
19051  This is stored in the history log.
19052  The version number is bumped, your changes are applied to the master RCS
19053  file, the document is unlocked and set to Read-Only mode.
19054  
19055 \end_layout
19056
19057 \begin_layout Standard
19058 RCS command: 
19059 \family typewriter
19060 ci -q -u -m"<description>" <file-name>
19061 \end_layout
19062
19063 \begin_layout Subsubsection
19064
19065 \family sans
19066 Check Out For Edit
19067 \end_layout
19068
19069 \begin_layout Standard
19070 By doing this you lock the document so that only you can edit it.
19071  This will also make the document Read-Write only for you.
19072  You will usually continue editing for a while and when you are finished
19073  you check in your changes.
19074  The status line is changed to reflect that you have locked the file.
19075  
19076 \end_layout
19077
19078 \begin_layout Standard
19079 RCS command: 
19080 \family typewriter
19081 co -q -l <file-name>
19082 \end_layout
19083
19084 \begin_layout Subsubsection
19085
19086 \family sans
19087 Revert To Repository Version
19088 \end_layout
19089
19090 \begin_layout Standard
19091 This will discard all changes made to the document since the last check
19092  in.
19093  You get a warning before changes are discarded.
19094 \end_layout
19095
19096 \begin_layout Standard
19097 RCS command: 
19098 \family typewriter
19099 co -f -u<version> <file-name>
19100 \end_layout
19101
19102 \begin_layout Subsubsection
19103
19104 \family sans
19105 Undo Last Checkin
19106 \end_layout
19107
19108 \begin_layout Standard
19109 This makes as if the last check in never happened.
19110  No changes are made to the document loaded into LyX, but the last version
19111  is removed from the master RCS file.
19112  
19113 \end_layout
19114
19115 \begin_layout Standard
19116 RCS command: 
19117 \family typewriter
19118 rcs -o<version> <file-name>
19119 \end_layout
19120
19121 \begin_layout Subsubsection
19122
19123 \family sans
19124 Show History
19125 \end_layout
19126
19127 \begin_layout Standard
19128 This shows the complete history of the RCS document.
19129  The output of 
19130 \family typewriter
19131 rlog <file-name>
19132 \family default
19133  is shown in a browser.
19134  See 
19135 \family typewriter
19136 man rlog
19137 \family default
19138  for more info.
19139 \end_layout
19140
19141 \begin_layout Subsubsection
19142 Revision info
19143 \end_layout
19144
19145 \begin_layout Standard
19146 LyX supports RCS version number, author name, date and time of last commit.
19147  All those are extracted from 
19148 \family typewriter
19149 rlog -r <file-name>
19150 \family default
19151 .
19152  For other details see 
19153 \begin_inset CommandInset ref
19154 LatexCommand ref
19155 reference "sub:VCS-Revision-Information"
19156
19157 \end_inset
19158
19159  for details.
19160 \end_layout
19161
19162 \begin_layout Subsection
19163 CVS commands in LyX
19164 \end_layout
19165
19166 \begin_layout Standard
19167 A subset of CVS operations is supported by LyX.
19168  You can find the commands in the 
19169 \family sans
19170 File\SpecialChar \menuseparator
19171 Version
19172 \begin_inset space ~
19173 \end_inset
19174
19175 Control
19176 \family default
19177  submenu.
19178  The version control system SVN is more powerful, so please use it instead
19179  of CVS if possible.
19180 \end_layout
19181
19182 \begin_layout Subsubsection
19183
19184 \family sans
19185 General CVS usage
19186 \end_layout
19187
19188 \begin_layout Standard
19189 If you start from scratch with CVS you have to create your repository and
19190  checkout the working copy with external tools.
19191  If you're using a client-server setup you may need to login before doing
19192  the first repository checkout.
19193 \end_layout
19194
19195 \begin_layout Standard
19196 If your documents are under revision control and others are using the same
19197  repository problems arise when different changes to the same document at
19198  the same location happen.
19199  Standard CVS repositories doesn't operate with a file locking mechanism.
19200  This may be surprising, but conflicts only occur if people disagree on
19201  the proper content of the same part of a document.
19202  So, if co-workers are used to communicate regularly, these conflicts occur
19203  rarely.
19204  If they don't communicate they have a fundamental problem anyway.
19205  Nevertheless some people like to work with so called 
19206 \begin_inset Quotes eld
19207 \end_inset
19208
19209 reserved checkouts
19210 \begin_inset Quotes erd
19211 \end_inset
19212
19213 .
19214  If they do so the working copy of all files is readonly when checked out
19215  first and the user starts editing after using a special command to make
19216  the working copy writable.
19217  When the changes are checked in the working copy returns to readonly state.
19218  With LyX one has to edit the 
19219 \begin_inset Flex Code
19220 status collapsed
19221
19222 \begin_layout Plain Layout
19223 .cvsrc
19224 \end_layout
19225
19226 \end_inset
19227
19228  file and add the line 
19229 \begin_inset Flex Code
19230 status collapsed
19231
19232 \begin_layout Plain Layout
19233 cvs -r
19234 \end_layout
19235
19236 \end_inset
19237
19238  to work with reserved checkouts.
19239  The benefit is the possibility to see who is using a writable copy of some
19240  document.
19241  It's not guaranteed only one user makes a copy writable.
19242 \end_layout
19243
19244 \begin_layout Standard
19245 LyX tries to guess if you're using reserved or non-reserved checkouts.
19246  If your working copy is readonly or it is writable and an additional copy
19247  of your document exists in the CVS/Base sub-directory a reserved otherwise
19248  a non-reserved checkout is assumed.
19249  When a reserved checkout is detected you have to use 
19250 \begin_inset Flex MenuItem
19251 status collapsed
19252
19253 \begin_layout Plain Layout
19254 Check Out
19255 \end_layout
19256
19257 \end_inset
19258
19259  to make your working copy writable if it's readonly.
19260  After doing so the 
19261 \begin_inset Flex MenuItem
19262 status collapsed
19263
19264 \begin_layout Plain Layout
19265 Check In
19266 \end_layout
19267
19268 \end_inset
19269
19270  operation is possible and that makes your working copy readonly again after
19271  transferring your changes to the repository.
19272 \end_layout
19273
19274 \begin_layout Standard
19275 More information about CVS can be found here 
19276 \begin_inset Flex URL
19277 status collapsed
19278
19279 \begin_layout Plain Layout
19280
19281 http://www.nongnu.org/cvs
19282 \end_layout
19283
19284 \end_inset
19285
19286  and here 
19287 \begin_inset Flex URL
19288 status collapsed
19289
19290 \begin_layout Plain Layout
19291
19292 http://ximbiot.com/cvs
19293 \end_layout
19294
19295 \end_inset
19296
19297 .
19298 \end_layout
19299
19300 \begin_layout Standard
19301 Read 
19302 \family typewriter
19303 man cvs
19304 \family default
19305  to understand the sub-commands and the switches mentioned below.
19306 \end_layout
19307
19308 \begin_layout Subsubsection
19309
19310 \family sans
19311 Register
19312 \end_layout
19313
19314 \begin_layout Standard
19315 If your document is not under revision control, this is the only item shown
19316  in the menu.
19317  And if it is under revision control, the 
19318 \family sans
19319 \bar under
19320 R
19321 \bar default
19322 egister
19323 \family default
19324  item is not visible.
19325  
19326 \end_layout
19327
19328 \begin_layout Standard
19329 This command registers in CVS your document 
19330 \begin_inset Flex Strong
19331 status collapsed
19332
19333 \begin_layout Plain Layout
19334
19335 \emph on
19336 only
19337 \end_layout
19338
19339 \end_inset
19340
19341  in the case you have already the documents directory under CVS control
19342  (in particular 
19343 \family typewriter
19344 CVS/Entries
19345 \family default
19346  file exists).
19347  This means you have to create or checkout the archive by yourself using
19348  external tools.
19349  (In case you forget that step LyX registers the document with RCS.)
19350 \end_layout
19351
19352 \begin_layout Standard
19353 Then you are asked interactively to supply an initial description of the
19354  document.
19355  Don't forget that registered file is not yet checked in.
19356 \end_layout
19357
19358 \begin_layout Standard
19359 CVS command that is run: 
19360 \family typewriter
19361 cvs -q add -m"<entered message>" "<file-name>"
19362 \end_layout
19363
19364 \begin_layout Standard
19365 The term 
19366 \family typewriter
19367 "<file-name>"
19368 \family default
19369  above and for all other CVS commands is an abbreviation for 
19370 \begin_inset Quotes eld
19371 \end_inset
19372
19373 change the current working directory to file location and use the file name
19374  without path component as argument
19375 \begin_inset Quotes erd
19376 \end_inset
19377
19378 .
19379 \end_layout
19380
19381 \begin_layout Subsubsection
19382
19383 \family sans
19384 Check In Changes
19385 \end_layout
19386
19387 \begin_layout Standard
19388 When you are finished editing a file, you commit your changes.
19389  When you do this and you had changed the document, you are asked for a
19390  description of the changes.
19391  After that changes are written to the repository.
19392  In case you didn't change the document and a reserved checkout is detected
19393  the reservation made on 
19394 \begin_inset Flex MenuItem
19395 status collapsed
19396
19397 \begin_layout Plain Layout
19398 Check Out
19399 \end_layout
19400
19401 \end_inset
19402
19403  is undone.
19404 \end_layout
19405
19406 \begin_layout Labeling
19407 \labelwidthstring 00.00.0000
19408 CVS
19409 \begin_inset space ~
19410 \end_inset
19411
19412 command: 
19413 \begin_inset space ~
19414 \end_inset
19415
19416
19417 \begin_inset Newline newline
19418 \end_inset
19419
19420
19421 \begin_inset Flex Code
19422 status collapsed
19423
19424 \begin_layout Plain Layout
19425 cvs 
19426 \family typewriter
19427 -q commit -m"<description>" "<file-name>"
19428 \end_layout
19429
19430 \end_inset
19431
19432  or
19433 \begin_inset Newline newline
19434 \end_inset
19435
19436
19437 \begin_inset Flex Code
19438 status collapsed
19439
19440 \begin_layout Plain Layout
19441 cvs -q unedit 
19442 \family typewriter
19443 "<file-name>"
19444 \end_layout
19445
19446 \end_inset
19447
19448
19449 \end_layout
19450
19451 \begin_layout Subsubsection
19452
19453 \family sans
19454 Check Out Changes
19455 \end_layout
19456
19457 \begin_layout Standard
19458 When you are sharing a repository with others, you may have to incorporate
19459  their changes into your working copy.
19460 \end_layout
19461
19462 \begin_layout Standard
19463 CVS command: 
19464 \family typewriter
19465 cvs -q update "<file-name>"
19466 \end_layout
19467
19468 \begin_layout Standard
19469 If a readonly checkout is detected the working copy is made writable and
19470  reserved.
19471 \end_layout
19472
19473 \begin_layout Standard
19474 CVS command: 
19475 \family typewriter
19476 cvs -q edit "<file-name>"
19477 \end_layout
19478
19479 \begin_layout Subsubsection
19480
19481 \family sans
19482 Revert To Repository Version
19483 \end_layout
19484
19485 \begin_layout Standard
19486 This will discard all changes made to the document since the last check
19487  in.
19488  You get a warning before changes are discarded.
19489  Firstly the file is deleted, secondly CVS update command is run.
19490 \end_layout
19491
19492 \begin_layout Standard
19493 CVS command: 
19494 \family typewriter
19495 cvs -q update "<file-name>"
19496 \end_layout
19497
19498 \begin_layout Standard
19499 If a reserved checkout is detected and the working copy has no changes only
19500  the reservation is undone.
19501 \end_layout
19502
19503 \begin_layout Standard
19504 CVS command: 
19505 \family typewriter
19506 cvs -q unedit "<file-name>"
19507 \end_layout
19508
19509 \begin_layout Subsubsection
19510 Update of the local directory checkout from repository
19511 \end_layout
19512
19513 \begin_layout Standard
19514 Once your documents gets more complex, containing sub-documents and pictures,
19515  including external 
19516 \begin_inset Flex Code
19517 status collapsed
19518
19519 \begin_layout Plain Layout
19520 .tex
19521 \end_layout
19522
19523 \end_inset
19524
19525  files and so on using version control becomes more complicated.
19526  LyX supports updating the whole tree in which resides the document.
19527  This become especially useful once you cooperate with people which neither
19528  have detailed knowledge about CVS usage nor they have ambition to commit
19529  additional material to the repository.
19530  You have to organize the files structure so that all external files are
19531  in the same directory or subdirectories of the document.
19532  It's good practice anyway to store multipart documents in an extra directory.
19533 \end_layout
19534
19535 \begin_layout Standard
19536 The 
19537 \begin_inset Flex Code
19538 status collapsed
19539
19540 \begin_layout Plain Layout
19541 Update local directory from repository
19542 \end_layout
19543
19544 \end_inset
19545
19546  command updates the whole directory.
19547  If local changes are detected user is warned before update starts.
19548  In case of merge conflicts both versions of the conflicting document parts
19549  are placed in the final document.
19550  You have to review and correct the result of the merge.
19551  You'll find the conflicts enclosed in pairs of 
19552 \begin_inset Flex Code
19553 status collapsed
19554
19555 \begin_layout Plain Layout
19556 <<<<<<<
19557 \end_layout
19558
19559 \end_inset
19560
19561  and 
19562 \begin_inset Flex Code
19563 status collapsed
19564
19565 \begin_layout Plain Layout
19566 >>>>>>>
19567 \end_layout
19568
19569 \end_inset
19570
19571  separated by 
19572 \begin_inset Flex Code
19573 status collapsed
19574
19575 \begin_layout Plain Layout
19576 =======
19577 \end_layout
19578
19579 \end_inset
19580
19581 .
19582  The first part is your version as before the update operation with the
19583  document name prepended.
19584  The second one is the repository version with the version number after
19585  the sequence of 
19586 \begin_inset Flex Code
19587 status collapsed
19588
19589 \begin_layout Plain Layout
19590 >
19591 \end_layout
19592
19593 \end_inset
19594
19595  signs.
19596 \end_layout
19597
19598 \begin_layout Labeling
19599 \labelwidthstring 00.00.0000
19600 CVS
19601 \begin_inset space ~
19602 \end_inset
19603
19604 commands: 
19605 \begin_inset space ~
19606 \end_inset
19607
19608
19609 \begin_inset Newline newline
19610 \end_inset
19611
19612
19613 \begin_inset Flex Code
19614 status collapsed
19615
19616 \begin_layout Plain Layout
19617 cd $path; cvs diff 
19618 \family typewriter
19619 "."
19620 \end_layout
19621
19622 \end_inset
19623
19624  (Ask if changes are detected.)
19625 \begin_inset Newline newline
19626 \end_inset
19627
19628
19629 \begin_inset Flex Code
19630 status collapsed
19631
19632 \begin_layout Plain Layout
19633 cd $path; cvs -q update 
19634 \family typewriter
19635 "."
19636 \end_layout
19637
19638 \end_inset
19639
19640
19641 \end_layout
19642
19643 \begin_layout Standard
19644 where 
19645 \begin_inset Flex Code
19646 status collapsed
19647
19648 \begin_layout Plain Layout
19649 $path
19650 \end_layout
19651
19652 \end_inset
19653
19654  stands for the path to the document.
19655 \end_layout
19656
19657 \begin_layout Subsubsection
19658
19659 \family sans
19660 Show History
19661 \end_layout
19662
19663 \begin_layout Standard
19664 This shows the complete history of the CVS document.
19665  The output of 
19666 \family typewriter
19667 cvs log "<file-name>"
19668 \family default
19669  is shown in a browser.
19670 \end_layout
19671
19672 \begin_layout Subsection
19673 SVN commands in LyX
19674 \end_layout
19675
19676 \begin_layout Standard
19677 SVN is now partially supported by LyX.
19678  You can find the commands in the 
19679 \family sans
19680 File\SpecialChar \menuseparator
19681 Version
19682 \begin_inset space ~
19683 \end_inset
19684
19685 Control
19686 \family default
19687  submenu.
19688  Please note that if you use password protected access to repository via
19689  ssh, you will be asked in terminal window.
19690  LyX was tested against SVN 1.5 and 1.6
19691 \begin_inset Foot
19692 status open
19693
19694 \begin_layout Plain Layout
19695 Most of the commands will work with 1.4 too, see 
19696 \begin_inset CommandInset ref
19697 LatexCommand ref
19698 reference "sub:SVN-Repo-Update"
19699
19700 \end_inset
19701
19702 .
19703 \end_layout
19704
19705 \end_inset
19706
19707
19708 \end_layout
19709
19710 \begin_layout Subsubsection
19711
19712 \family sans
19713 Register
19714 \end_layout
19715
19716 \begin_layout Standard
19717 If your document is not under revision control, this is the only item shown
19718  in the menu.
19719  And if it is under revision control, the 
19720 \family sans
19721 \bar under
19722 R
19723 \bar default
19724 egister
19725 \family default
19726  item is not visible.
19727  
19728 \end_layout
19729
19730 \begin_layout Standard
19731 This command registers in SVN your document ONLY in case you have already
19732  the documents directory under SVN control (in particular 
19733 \family typewriter
19734 .svn/entries
19735 \family default
19736  file exists).
19737  This means you have to checkout the archive by yourself.
19738  
19739 \end_layout
19740
19741 \begin_layout Standard
19742 Then you are asked interactively to supply an initial description of the
19743  document.
19744  Don't forget that registered file is not yet commited.
19745 \end_layout
19746
19747 \begin_layout Standard
19748 SVN command that is run: 
19749 \family typewriter
19750 svn add -q 
19751 \begin_inset Quotes eld
19752 \end_inset
19753
19754 <file-name>
19755 \begin_inset Quotes erd
19756 \end_inset
19757
19758
19759 \end_layout
19760
19761 \begin_layout Standard
19762 Read 
19763 \family typewriter
19764 man svn
19765 \family default
19766  to understand the switches.
19767  
19768 \end_layout
19769
19770 \begin_layout Subsubsection
19771
19772 \family sans
19773 Check In Changes
19774 \end_layout
19775
19776 \begin_layout Standard
19777 When you are finished editing a file, you commit your changes.
19778  When you do this, you are asked for a description of the changes.
19779  After that changes are commited.
19780 \end_layout
19781
19782 \begin_layout Standard
19783 SVN command:
19784 \begin_inset Foot
19785 status collapsed
19786
19787 \begin_layout Plain Layout
19788 In case locking is not enabled.
19789  See Section 
19790 \begin_inset CommandInset ref
19791 LatexCommand ref
19792 reference "subsec:SVN-File-Locking"
19793
19794 \end_inset
19795
19796 .
19797 \end_layout
19798
19799 \end_inset
19800
19801  
19802 \family typewriter
19803 svn commit -q -m"<description>" <file-name>
19804 \end_layout
19805
19806 \begin_layout Subsubsection
19807
19808 \family sans
19809 Check Out For Edit
19810 \end_layout
19811
19812 \begin_layout Standard
19813 Updates the changes of this file from the repository.
19814  Be sure you understand SVN merging and conflicts resolving before using
19815  this function, because all conflicts has to be resolved manually by you!
19816 \end_layout
19817
19818 \begin_layout Standard
19819 SVN command:
19820 \begin_inset Foot
19821 status collapsed
19822
19823 \begin_layout Plain Layout
19824 Ditto.
19825 \end_layout
19826
19827 \end_inset
19828
19829  
19830 \family typewriter
19831 svn update --non-interactive 
19832 \begin_inset Quotes eld
19833 \end_inset
19834
19835 <file-name>
19836 \begin_inset Quotes erd
19837 \end_inset
19838
19839
19840 \end_layout
19841
19842 \begin_layout Subsubsection
19843
19844 \family sans
19845 Revert To Repository Version
19846 \end_layout
19847
19848 \begin_layout Standard
19849 This will discard all changes made to the document since the last check
19850  in.
19851  You get a warning before changes are discarded.
19852  
19853 \end_layout
19854
19855 \begin_layout Standard
19856 SVN command: 
19857 \family typewriter
19858 svn revert -q 
19859 \begin_inset Quotes eld
19860 \end_inset
19861
19862 <file-name>
19863 \begin_inset Quotes erd
19864 \end_inset
19865
19866
19867 \end_layout
19868
19869 \begin_layout Subsubsection
19870 \begin_inset CommandInset label
19871 LatexCommand label
19872 name "sub:SVN-Repo-Update"
19873
19874 \end_inset
19875
19876 Update of the local directory checkout from repository
19877 \begin_inset Foot
19878 status collapsed
19879
19880 \begin_layout Plain Layout
19881 Note that this command will work only with subversion 
19882 \begin_inset Formula $\geqq1.5$
19883 \end_inset
19884
19885
19886 \end_layout
19887
19888 \end_inset
19889
19890
19891 \end_layout
19892
19893 \begin_layout Standard
19894 All the commands above have one shortcomming - they deal with the current
19895  document only.
19896  Once your document contains pictures, includes external 
19897 \begin_inset Flex Code
19898 status collapsed
19899
19900 \begin_layout Plain Layout
19901 .tex
19902 \end_layout
19903
19904 \end_inset
19905
19906  files and so on administration becomes more complicated.
19907  LyX now supports updating the whole tree in which resides the document
19908 \begin_inset Foot
19909 status collapsed
19910
19911 \begin_layout Plain Layout
19912 One need to organize the files structure so that all external files are
19913  in the same directory or subdirectories of the document.
19914  
19915 \end_layout
19916
19917 \end_inset
19918
19919 .
19920  This become especially useful once you cooperate with people which neither
19921  know about subversion management nor they have ambition to commit additional
19922  material to the repository.
19923  
19924 \end_layout
19925
19926 \begin_layout Standard
19927 \begin_inset Flex Code
19928 status collapsed
19929
19930 \begin_layout Plain Layout
19931 Update local directory from repository
19932 \end_layout
19933
19934 \end_inset
19935
19936  command updates the whole directory and in case of merge conflicts local
19937  version of the files are left, so no unintended data loss occurs.
19938  If local changes are detected user is warned before update starts.
19939 \end_layout
19940
19941 \begin_layout Labeling
19942 \labelwidthstring 00.00.0000
19943 SVN
19944 \begin_inset space ~
19945 \end_inset
19946
19947 commands: 
19948 \begin_inset space ~
19949 \end_inset
19950
19951
19952 \begin_inset Newline newline
19953 \end_inset
19954
19955
19956 \begin_inset Flex Code
19957 status collapsed
19958
19959 \begin_layout Plain Layout
19960 svn diff $path
19961 \end_layout
19962
19963 \end_inset
19964
19965  (Ask if changes are detected.)
19966 \begin_inset Newline newline
19967 \end_inset
19968
19969
19970 \begin_inset Flex Code
19971 status collapsed
19972
19973 \begin_layout Plain Layout
19974 svn update --accept mine-full $path
19975 \end_layout
19976
19977 \end_inset
19978
19979
19980 \end_layout
19981
19982 \begin_layout Standard
19983 where 
19984 \begin_inset Flex Code
19985 status collapsed
19986
19987 \begin_layout Plain Layout
19988 $path
19989 \end_layout
19990
19991 \end_inset
19992
19993  stands for the path to the document.
19994 \end_layout
19995
19996 \begin_layout Subsubsection
19997
19998 \family sans
19999 Show History
20000 \end_layout
20001
20002 \begin_layout Standard
20003 This shows the complete history of the SVN document.
20004  The output of 
20005 \family typewriter
20006 svn log 
20007 \begin_inset Quotes eld
20008 \end_inset
20009
20010 <file-name>
20011 \begin_inset Quotes erd
20012 \end_inset
20013
20014
20015 \family default
20016  is shown in a browser.
20017 \end_layout
20018
20019 \begin_layout Subsubsection
20020 File Locking
20021 \begin_inset CommandInset label
20022 LatexCommand label
20023 name "subsec:SVN-File-Locking"
20024
20025 \end_inset
20026
20027
20028 \end_layout
20029
20030 \begin_layout Standard
20031 The file exchange through various revision control systems brings the problem
20032  of merge conflicts in case two different users try to edit the same (parts
20033  of) document.
20034  When such a conflict happens it needs manual resolving and one reasonable
20035  alternative is to provide some kind of locking mechanism, which guarantees
20036  that only one user is allowed to edit file at the given time.
20037 \end_layout
20038
20039 \begin_layout Standard
20040 SVN has two such mechanisms to provide mutual exclusivity for file access
20041  - locks and automatic setting of write permissions (see sec.
20042  
20043 \begin_inset CommandInset ref
20044 LatexCommand ref
20045 reference "subsec:Automatical-Locking-Property"
20046
20047 \end_inset
20048
20049 ) based on 
20050 \begin_inset Flex Code
20051 status collapsed
20052
20053 \begin_layout Plain Layout
20054 svn:needs-lock
20055 \end_layout
20056
20057 \end_inset
20058
20059  file svn property
20060 \begin_inset Foot
20061 status open
20062
20063 \begin_layout Plain Layout
20064 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20065 \end_layout
20066
20067 \end_inset
20068
20069 .
20070  If this property is detected for a given document LyX starts to use SVN
20071  locks for document editing automatically and the whole check-in/out mechanism
20072  switches to the same regimen as for RCS.
20073  This in particular means there are two different modes of file use in LyX:
20074 \end_layout
20075
20076 \begin_layout Itemize
20077 Unlocked state.
20078  The loaded file is in the read-only mode.
20079  For editing on needs to check-out.
20080  
20081 \emph on
20082 Check-out
20083 \emph default
20084  consists of updating from the repository and gaining write lock.
20085  If the lock is not possible to obtain, we remain in unlocked state.
20086 \end_layout
20087
20088 \begin_layout Itemize
20089 Locked state.
20090  The loaded file is in the 'normal' edit mode.
20091  No other user is allowed to edit the file.
20092  
20093 \emph on
20094 Check-in
20095 \emph default
20096  consists of commiting changes and releasing write-lock.
20097  If no changes have been made to the document, no commit will be produced
20098 \begin_inset Foot
20099 status collapsed
20100
20101 \begin_layout Plain Layout
20102 Don't be puzzled by the fact that you will be asked for commit message anyway.
20103 \end_layout
20104
20105 \end_inset
20106
20107  and only the write-lock will be released.
20108 \end_layout
20109
20110 \begin_layout Standard
20111 SVN commands:
20112 \end_layout
20113
20114 \begin_layout Labeling
20115 \labelwidthstring 00.00.0000
20116 Check-in:
20117 \family typewriter
20118  svn commit -q -m"<description>" "<file-name>"
20119 \begin_inset Newline newline
20120 \end_inset
20121
20122 svn unlock "<file-name>"
20123 \end_layout
20124
20125 \begin_layout Labeling
20126 \labelwidthstring 00.00.0000
20127 Check-out: 
20128 \family typewriter
20129 svn update "<file-name>"
20130 \begin_inset Newline newline
20131 \end_inset
20132
20133 svn lock "<file-name>"
20134 \end_layout
20135
20136 \begin_layout Subsubsection
20137
20138 \family typewriter
20139 \begin_inset CommandInset label
20140 LatexCommand label
20141 name "subsec:Automatical-Locking-Property"
20142
20143 \end_inset
20144
20145
20146 \family default
20147 Automatic Locking Property
20148 \end_layout
20149
20150 \begin_layout Standard
20151 The above mentioned automatic setting of write permissions of the .lyx file
20152  can be set through
20153 \family sans
20154 \bar under
20155  F
20156 \bar default
20157 ile\SpecialChar \menuseparator
20158
20159 \bar under
20160 V
20161 \bar default
20162 ersion
20163 \begin_inset space ~
20164 \end_inset
20165
20166 Control\SpecialChar \menuseparator
20167
20168 \bar under
20169 T
20170 \bar default
20171 oggle locking property
20172 \family default
20173 .
20174  This command is active only when the file is not locked on the svn server
20175  (i.e.
20176  you need to check-out before proceeding).
20177 \end_layout
20178
20179 \begin_layout Labeling
20180 \labelwidthstring 00.00.0000
20181 SVN
20182 \begin_inset space ~
20183 \end_inset
20184
20185 commands:
20186 \end_layout
20187
20188 \begin_layout Labeling
20189 \labelwidthstring 00.00.0000
20190 Set:
20191 \family typewriter
20192  svn propset svn:needs-lock ON "<file-name>"
20193 \end_layout
20194
20195 \begin_layout Labeling
20196 \labelwidthstring 00.00.0000
20197 Unset: 
20198 \family typewriter
20199 svn propdel svn:needs-lock "<file-name>"
20200 \end_layout
20201
20202 \begin_layout Subsubsection
20203 \begin_inset CommandInset label
20204 LatexCommand label
20205 name "sub:VCS-Revision-Information"
20206
20207 \end_inset
20208
20209 Revision Information in Documents
20210 \end_layout
20211
20212 \begin_layout Standard
20213 There are more possibilities how to activate revision information in our
20214  document.
20215 \end_layout
20216
20217 \begin_layout Itemize
20218 LyX supports directly:
20219 \end_layout
20220
20221 \begin_deeper
20222 \begin_layout Itemize
20223 tree revision information (
20224 \begin_inset Flex Code
20225 status collapsed
20226
20227 \begin_layout Plain Layout
20228 vcs-tree-revision
20229 \end_layout
20230
20231 \end_inset
20232
20233 ).
20234  The result is the output of the 
20235 \begin_inset Flex Code
20236 status collapsed
20237
20238 \begin_layout Plain Layout
20239 svnversion
20240 \end_layout
20241
20242 \end_inset
20243
20244  command, the following table gives you an idea, how to read the results.
20245 \end_layout
20246
20247 \begin_layout Standard
20248 \align center
20249 \begin_inset Tabular
20250 <lyxtabular version="3" rows="6" columns="2">
20251 <features tabularvalignment="middle">
20252 <column alignment="center" valignment="top" width="0">
20253 <column alignment="center" valignment="top" width="0">
20254 <row>
20255 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20256 \begin_inset Text
20257
20258 \begin_layout Plain Layout
20259 Output
20260 \end_layout
20261
20262 \end_inset
20263 </cell>
20264 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20265 \begin_inset Text
20266
20267 \begin_layout Plain Layout
20268 Meaning
20269 \end_layout
20270
20271 \end_inset
20272 </cell>
20273 </row>
20274 <row>
20275 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20276 \begin_inset Text
20277
20278 \begin_layout Plain Layout
20279 4123:4168
20280 \end_layout
20281
20282 \end_inset
20283 </cell>
20284 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20285 \begin_inset Text
20286
20287 \begin_layout Plain Layout
20288 mixed revision working copy
20289 \end_layout
20290
20291 \end_inset
20292 </cell>
20293 </row>
20294 <row>
20295 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20296 \begin_inset Text
20297
20298 \begin_layout Plain Layout
20299 4168M
20300 \end_layout
20301
20302 \end_inset
20303 </cell>
20304 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20305 \begin_inset Text
20306
20307 \begin_layout Plain Layout
20308 modified working copy
20309 \end_layout
20310
20311 \end_inset
20312 </cell>
20313 </row>
20314 <row>
20315 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20316 \begin_inset Text
20317
20318 \begin_layout Plain Layout
20319 4123S
20320 \end_layout
20321
20322 \end_inset
20323 </cell>
20324 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20325 \begin_inset Text
20326
20327 \begin_layout Plain Layout
20328 switched working copy
20329 \end_layout
20330
20331 \end_inset
20332 </cell>
20333 </row>
20334 <row>
20335 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20336 \begin_inset Text
20337
20338 \begin_layout Plain Layout
20339 4123P
20340 \end_layout
20341
20342 \end_inset
20343 </cell>
20344 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20345 \begin_inset Text
20346
20347 \begin_layout Plain Layout
20348 partial working copy, from a sparse checkout
20349 \end_layout
20350
20351 \end_inset
20352 </cell>
20353 </row>
20354 <row>
20355 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20356 \begin_inset Text
20357
20358 \begin_layout Plain Layout
20359 4123:4168MS
20360 \end_layout
20361
20362 \end_inset
20363 </cell>
20364 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20365 \begin_inset Text
20366
20367 \begin_layout Plain Layout
20368 mixed revision, modified, switched working copy
20369 \end_layout
20370
20371 \end_inset
20372 </cell>
20373 </row>
20374 </lyxtabular>
20375
20376 \end_inset
20377
20378
20379 \end_layout
20380
20381 \begin_layout Itemize
20382 file revision information.
20383  The result comes from parsing the output of 
20384 \begin_inset Flex Code
20385 status collapsed
20386
20387 \begin_layout Plain Layout
20388 svn
20389 \begin_inset space ~
20390 \end_inset
20391
20392 info
20393 \begin_inset space ~
20394 \end_inset
20395
20396 --xml
20397 \begin_inset space ~
20398 \end_inset
20399
20400 file.lyx
20401 \end_layout
20402
20403 \end_inset
20404
20405 .
20406  Supported flags are:
20407 \end_layout
20408
20409 \begin_deeper
20410 \begin_layout Itemize
20411 version number of the last commit (
20412 \begin_inset Flex Code
20413 status collapsed
20414
20415 \begin_layout Plain Layout
20416 vcs-revision
20417 \end_layout
20418
20419 \end_inset
20420
20421 )
20422 \end_layout
20423
20424 \begin_layout Itemize
20425 author of the last commit (
20426 \begin_inset Flex Code
20427 status collapsed
20428
20429 \begin_layout Plain Layout
20430 vcs-author
20431 \end_layout
20432
20433 \end_inset
20434
20435 )
20436 \end_layout
20437
20438 \begin_layout Itemize
20439 date of the last commit (
20440 \begin_inset Flex Code
20441 status collapsed
20442
20443 \begin_layout Plain Layout
20444 vcs-date
20445 \end_layout
20446
20447 \end_inset
20448
20449 )
20450 \end_layout
20451
20452 \begin_layout Itemize
20453 time of the last commit (
20454 \begin_inset Flex Code
20455 status collapsed
20456
20457 \begin_layout Plain Layout
20458 vcs-time
20459 \end_layout
20460
20461 \end_inset
20462
20463 )
20464 \end_layout
20465
20466 \end_deeper
20467 \begin_layout Standard
20468 You can obtain this info via InsetInfo (e.g.
20469  
20470 \begin_inset Flex Code
20471 status collapsed
20472
20473 \begin_layout Plain Layout
20474 info-insert buffer vcs-date
20475 \end_layout
20476
20477 \end_inset
20478
20479 ).
20480  The information will be available only when you have the file stored under
20481  svn managment (i.e.
20482  the 
20483 \begin_inset Flex Code
20484 status collapsed
20485
20486 \begin_layout Plain Layout
20487 .svn
20488 \end_layout
20489
20490 \end_inset
20491
20492  directory is available with your document).
20493 \end_layout
20494
20495 \end_deeper
20496 \begin_layout Itemize
20497 Another---a hacking one---possibility is to use svn keywords
20498 \begin_inset Foot
20499 status collapsed
20500
20501 \begin_layout Plain Layout
20502 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20503 \end_layout
20504
20505 \end_inset
20506
20507 .
20508  In short -- you set file keywords property (e.g.
20509  
20510 \family sans
20511 svn propset svn:keywords 'Rev' file.lyx
20512 \family default
20513 ) and then paste keyword TeX code
20514 \begin_inset Foot
20515 status collapsed
20516
20517 \begin_layout Plain Layout
20518 This is an easy way how to ensure that LyX won't break the line in the middle
20519  of keyword tag.
20520 \end_layout
20521
20522 \end_inset
20523
20524  tag in your document (e.g.
20525  
20526 \begin_inset ERT
20527 status open
20528
20529 \begin_layout Plain Layout
20530
20531 $Rev$
20532 \end_layout
20533
20534 \end_inset
20535
20536 ).
20537  This way svn client will automatically substitute revision number (e.g.
20538  
20539 \begin_inset ERT
20540 status open
20541
20542 \begin_layout Plain Layout
20543
20544 $Rev: 59 $
20545 \end_layout
20546
20547 \end_inset
20548
20549 ) after each update and commit.
20550  There are more problems with this approach.
20551  Firstly, the '$' character is used in TeX world for math equations, so
20552  any occurence of math formula 
20553 \begin_inset Formula $Rev$
20554 \end_inset
20555
20556  become 
20557 \begin_inset Formula $Rev:59$
20558 \end_inset
20559
20560  in your LyX document.
20561  Similarly for other keywords like Id, Date, Author, etc.
20562  Secondly svn output is dependent on your locales, so its very easy that
20563  svn would produce some problematic strings once Date is used.
20564  Thirdly you get the whole 'Rev: 59' string in your document instead of
20565  the plain number.
20566  Until subversion implements user's custom keywords it will be hard to use
20567  this approach reliably or let LyX to support it directly.
20568 \end_layout
20569
20570 \begin_layout Subsection
20571 SVN and Windows Environment
20572 \end_layout
20573
20574 \begin_layout Quote
20575 My inclination is to say that if the user cannot figure out the command
20576  line operations on their own fairly quickly, they would be well advised
20577  to use TortoiseSVN.
20578  ---P.
20579  A.
20580  Rubin
20581 \end_layout
20582
20583 \begin_layout Subsubsection
20584 Preparation
20585 \end_layout
20586
20587 \begin_layout Standard
20588 In addition to installing LyX, and having access to a Subversion repository,
20589  the user will need to install the Subversion client program.
20590  A Windows installer for the client program is available from 
20591 \begin_inset CommandInset href
20592 LatexCommand href
20593 name "CollabNet"
20594 target "http://www.collab.net/nonav/downloads/subversion/"
20595
20596 \end_inset
20597
20598 .
20599  The user may also want to install 
20600 \begin_inset CommandInset href
20601 LatexCommand href
20602 name "TortoiseSVN"
20603 target "http://tortoisesvn.tigris.org/"
20604
20605 \end_inset
20606
20607 , which integrates Subversion operations into the context (rightclick) menu
20608  of Windows Explorer.
20609  Operations done outside LyX will typically be more convenient using the
20610  Explorer context menu.
20611  Note that TortoiseSVN is not a replacement for the client program, which
20612  is what LyX itself will use.
20613 \end_layout
20614
20615 \begin_layout Subsubsection
20616 Bringing a document under Subversion control
20617 \end_layout
20618
20619 \begin_layout Standard
20620 Before a LyX document can be brought under version control in Subversion,
20621  its parent directory needs to be under version control.
20622  If the document is being added to a project already in the repository,
20623  this is accomplished by checking the project out to the directory where
20624  the new document will be placed.
20625  If the project itself is not yet under version control (for instance, if
20626  this document starts a new project), the directory must be imported into
20627  the repository.
20628  This is done outside LyX.
20629  Both import and checkout are easily accomplished from the Explorer context
20630  menu using TortoiseSVN, or alternatively can be done using the command
20631  line client at a DOS prompt.
20632  The procedure for importing the project using TortoiseSVN is described
20633  below, assuming an existing repository and a new project being started
20634  in 
20635 \family typewriter
20636 C:
20637 \backslash
20638 new project
20639 \family default
20640 .
20641  For information on using the Subversion client program, run 
20642 \family typewriter
20643 svn --help 
20644 \family default
20645 in a DOS shell.
20646 \end_layout
20647
20648 \begin_layout Enumerate
20649 Locate 
20650 \family typewriter
20651 C:
20652 \backslash
20653 new project 
20654 \family default
20655 in Windows Explorer, right click it, and select 
20656 \family typewriter
20657 TortoiseSVN > Repo-browser
20658 \family default
20659 .
20660  If necessary, adjust the URL for the repository, then click OK.
20661 \end_layout
20662
20663 \begin_layout Enumerate
20664 Right click the level of the repository under which you want to place the
20665  new project folder (typically the top level) and click 
20666 \family typewriter
20667 Create folder\SpecialChar \ldots{}
20668
20669 \family default
20670  Supply a name for the project folder and click OK.
20671  Add a message for the log file if desired, then click OK again.
20672  The new project folder should appear in the repository.
20673  Finally, click OK again to exit the repository browser.
20674 \end_layout
20675
20676 \begin_layout Enumerate
20677 Once again right click 
20678 \family typewriter
20679 C:
20680 \backslash
20681 new project
20682 \family default
20683 , this time selecting SVN Checkout\SpecialChar \ldots{}
20684  Select the URL of the project folder
20685  you just created in the repository, and set the checkout directory to 
20686 \family typewriter
20687 C:
20688 \backslash
20689 new project.
20690
20691 \family default
20692  Click OK.
20693  You will be warned about a non-empty folder; click OK to proceed.
20694  You should now have a 
20695 \family typewriter
20696 .svn
20697 \family default
20698  directory under 
20699 \family typewriter
20700 C:
20701 \backslash
20702 new project.
20703 \end_layout
20704
20705 \begin_layout Enumerate
20706 Create or open your document in LyX and click 
20707 \family sans
20708 \bar under
20709 F
20710 \bar default
20711 ile\SpecialChar \menuseparator
20712
20713 \bar under
20714 V
20715 \bar default
20716 ersion
20717 \begin_inset space ~
20718 \end_inset
20719
20720 Control\SpecialChar \menuseparator
20721
20722 \bar under
20723 R
20724 \bar default
20725 egister.
20726  
20727 \family default
20728 Add a log message and click OK to commit the document to version control.
20729 \end_layout
20730
20731 \begin_layout Standard
20732 From this point onward, you should have full functionality in the 
20733 \family sans
20734 \bar under
20735 F
20736 \bar default
20737 ile\SpecialChar \menuseparator
20738
20739 \bar under
20740 V
20741 \bar default
20742 ersion
20743 \begin_inset space ~
20744 \end_inset
20745
20746 Control
20747 \family default
20748  menu.
20749  You also have the option of checking the document in and out, viewing its
20750  history, etc.
20751  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20752  client program from a command prompt.
20753 \end_layout
20754
20755 \begin_layout Subsubsection
20756 SSH tunnel used with SVN under Windows
20757 \end_layout
20758
20759 \begin_layout Standard
20760 Compared with Linux setting up an svn client to communicate over ssh under
20761  Windows is a rather troublesome task.
20762  We will at least offer some hints how to setup the client side but prior
20763  knowledge about ssh and the Windows command line is needed, also be prepared
20764  for a great deal of frustration\SpecialChar \ldots{}
20765
20766 \end_layout
20767
20768 \begin_layout Enumerate
20769 Get an svn client for windows, as described in the previous sections.
20770  When it is a fresh install run some svn command (e.g.
20771  
20772 \begin_inset Flex Code
20773 status collapsed
20774
20775 \begin_layout Plain Layout
20776 svn --version
20777 \end_layout
20778
20779 \end_inset
20780
20781 ) to create config files, which you will need to change later on.
20782 \end_layout
20783
20784 \begin_layout Enumerate
20785 Choose an ssh client for Windows.
20786  There are several possibilities, we will use the one from Putty tools
20787 \begin_inset Foot
20788 status open
20789
20790 \begin_layout Plain Layout
20791 \begin_inset Flex URL
20792 status collapsed
20793
20794 \begin_layout Plain Layout
20795
20796 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20797 \end_layout
20798
20799 \end_inset
20800
20801
20802 \end_layout
20803
20804 \end_inset
20805
20806 .
20807  You will need to set the connection up so that the client doesn't ask for
20808  any password from you.
20809  To keep things easy we will use only keys without any additional password
20810  protection etc.
20811 \end_layout
20812
20813 \begin_deeper
20814 \begin_layout Enumerate
20815 Generate keys by 
20816 \begin_inset Flex Code
20817 status collapsed
20818
20819 \begin_layout Plain Layout
20820 puttygen
20821 \end_layout
20822
20823 \end_inset
20824
20825 .
20826  Save your private .ppk key file and put the public one on the server side.
20827  If the SVN server runs on Linux, note that the format of the public key
20828  is not compatible with Linux openssh and you will need to direcly copy-paste
20829  the key from the “
20830 \emph on
20831 Public key for pasting into OpenSSH authorized_keys file
20832 \emph default
20833 :” edit field into the server's 
20834 \begin_inset Flex Code
20835 status collapsed
20836
20837 \begin_layout Plain Layout
20838 ~/.ssh/authorized_keys
20839 \end_layout
20840
20841 \end_inset
20842
20843
20844 \begin_inset Flex Code
20845 status collapsed
20846
20847 \begin_layout Plain Layout
20848 authorized_keys2
20849 \end_layout
20850
20851 \end_inset
20852
20853  file.
20854 \end_layout
20855
20856 \begin_layout Enumerate
20857 Get the Putty's 
20858 \begin_inset Flex Code
20859 status collapsed
20860
20861 \begin_layout Plain Layout
20862 plink
20863 \end_layout
20864
20865 \end_inset
20866
20867 .
20868  In the SVN config file
20869 \begin_inset Foot
20870 status collapsed
20871
20872 \begin_layout Plain Layout
20873 Exact path depends on Windows version, usually somewhere around 
20874 \begin_inset Flex Code
20875 status collapsed
20876
20877 \begin_layout Plain Layout
20878 c:
20879 \backslash
20880 Documents and Settings
20881 \backslash
20882 user
20883 \backslash
20884 Application Data
20885 \backslash
20886 Subversion
20887 \backslash
20888 config
20889 \end_layout
20890
20891 \end_inset
20892
20893  / 
20894 \begin_inset Flex Code
20895 status collapsed
20896
20897 \begin_layout Plain Layout
20898 AppData
20899 \backslash
20900 Roaming
20901 \backslash
20902 Subversion
20903 \end_layout
20904
20905 \end_inset
20906
20907 .
20908 \end_layout
20909
20910 \end_inset
20911
20912 , section [tunnels], setup ssh command, e.g.
20913  
20914 \begin_inset Flex Code
20915 status collapsed
20916
20917 \begin_layout Plain Layout
20918 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20919 \end_layout
20920
20921 \end_inset
20922
20923 .
20924 \begin_inset Foot
20925 status collapsed
20926
20927 \begin_layout Plain Layout
20928 It will usually take a lot of time to get exact command right and it depends
20929  on many things.
20930  For example do not have some remote server saved as a default session in
20931  Putty etc.
20932  If things fail, try to connect via plink without SVN first.
20933 \end_layout
20934
20935 \end_inset
20936
20937
20938 \end_layout
20939
20940 \end_deeper
20941 \begin_layout Enumerate
20942 Checkout the SVN archive, e.g.
20943  
20944 \begin_inset Flex Code
20945 status collapsed
20946
20947 \begin_layout Plain Layout
20948 svn co svn+ssh://user@server/repository_path
20949 \end_layout
20950
20951 \end_inset
20952
20953 .
20954 \end_layout
20955
20956 \begin_layout Subsubsection
20957 End-of-Line Conversions
20958 \end_layout
20959
20960 \begin_layout Standard
20961 When the collaborators are mixing Linux and Windows environments, LyX will
20962  use different line endings inside the .lyx files.
20963  This is not a problem as far as LyX functionality is concerned, but the
20964  commit diffs will be huge and merge-conflicts prone.
20965  Fortunately SVN itself knows
20966 \begin_inset Foot
20967 status collapsed
20968
20969 \begin_layout Plain Layout
20970 \begin_inset Flex URL
20971 status collapsed
20972
20973 \begin_layout Plain Layout
20974
20975 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20976 \end_layout
20977
20978 \end_inset
20979
20980
20981 \end_layout
20982
20983 \end_inset
20984
20985  how to deal with CR/LF problems when switching .lyx files to the 
20986 \begin_inset Flex Code
20987 status collapsed
20988
20989 \begin_layout Plain Layout
20990 native
20991 \end_layout
20992
20993 \end_inset
20994
20995  mode.
20996 \begin_inset Foot
20997 status collapsed
20998
20999 \begin_layout Plain Layout
21000 For the lazy guys: 
21001 \begin_inset Flex Code
21002 status collapsed
21003
21004 \begin_layout Plain Layout
21005 svn propset svn:eol-style native FILE_NAME
21006 \end_layout
21007
21008 \end_inset
21009
21010
21011 \end_layout
21012
21013 \end_inset
21014
21015
21016 \end_layout
21017
21018 \begin_layout Subsection
21019 Further tuning
21020 \end_layout
21021
21022 \begin_layout Standard
21023 With the recent addition of the vc-command function LyX power users are
21024  allowed to create their own commands for revision control.
21025 \end_layout
21026
21027 \begin_layout Standard
21028 As an example you can see how two TortoiseSVN commands could be integrated
21029  directly:
21030 \end_layout
21031
21032 \begin_layout Description
21033 Commit: 
21034 \begin_inset Flex Code
21035 status collapsed
21036
21037 \begin_layout Plain Layout
21038 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21039 \end_layout
21040
21041 \end_inset
21042
21043
21044 \end_layout
21045
21046 \begin_layout Description
21047 Revert: 
21048 \begin_inset Flex Code
21049 status collapsed
21050
21051 \begin_layout Plain Layout
21052 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21053 \end_layout
21054
21055 \end_inset
21056
21057
21058 \end_layout
21059
21060 \begin_layout Subsection
21061 Version control and Document comparison
21062 \end_layout
21063
21064 \begin_layout Standard
21065 One of the typical uses of version control is to inspect the changes between
21066  revisions, usually by creating 
21067 \begin_inset Flex Code
21068 status collapsed
21069
21070 \begin_layout Plain Layout
21071 diff
21072 \end_layout
21073
21074 \end_inset
21075
21076  dumps.
21077  While this is useful for plain text files, it is much less useful in the
21078  case of LyX files, which have more a complicated structure.
21079  Hence we provide binding to the Document comparison feature.
21080  There are two ways of calling this feature - either by direct call of 
21081 \begin_inset Flex Code
21082 status collapsed
21083
21084 \begin_layout Plain Layout
21085 VC_COMPARE
21086 \end_layout
21087
21088 \end_inset
21089
21090  LyX function (for details see LyX functions manual) or by icon/menu item
21091  
21092 \begin_inset Flex MenuItem
21093 status collapsed
21094
21095 \begin_layout Plain Layout
21096 Compare with older revision...
21097 \end_layout
21098
21099 \end_inset
21100
21101 .
21102  One can either compare two chosen revisions of the document or he can simply
21103  compare the current version of edited text with older revisions (where
21104  '
21105 \begin_inset Flex MenuItem
21106 status collapsed
21107
21108 \begin_layout Plain Layout
21109 0
21110 \end_layout
21111
21112 \end_inset
21113
21114 ' revisions back means comparison of the edited file with last commited
21115  revision).
21116  
21117 \end_layout
21118
21119 \begin_layout Standard
21120 This feature is supported for SVN and RCS though due to the more complicated
21121  versioning scheme of RCS there is a constraint -- when addressing the revisions
21122  in dialog, numbers always point to the last number in RCS revision number,
21123  i.e.
21124  '35' in '1.2.35'.
21125 \end_layout
21126
21127 \begin_layout Section
21128 Literate Programming
21129 \end_layout
21130
21131 \begin_layout Standard
21132 Updated by 
21133 \noun on
21134 Kayvan Sylvan 
21135 \noun default
21136 (kayvan@sylvan.com)
21137 \noun on
21138
21139 \noun default
21140 original documentation written by 
21141 \noun on
21142 Edmar Wienskoski Jr.
21143
21144 \noun default
21145  (edmar-w-jr@technologist.com)
21146 \end_layout
21147
21148 \begin_layout Subsection
21149 Introduction
21150 \end_layout
21151
21152 \begin_layout Standard
21153 The main purpose of this documentation is to show you how to use LyX for
21154  literate programming, where it is assumed that you are familiar with this
21155  programming technique, and know what 
21156 \begin_inset Quotes eld
21157 \end_inset
21158
21159 tangling
21160 \begin_inset Quotes erd
21161 \end_inset
21162
21163  and 
21164 \begin_inset Quotes eld
21165 \end_inset
21166
21167 weaving
21168 \begin_inset Quotes erd
21169 \end_inset
21170
21171  means.
21172  If that is not the case, please follow the web links provided in the following
21173  sections.
21174  There is a lot of good documentation out there covering old development
21175  history to the latest tools tips.
21176 \end_layout
21177
21178 \begin_layout Standard
21179 It is also assumed that you are familiar with LyX itself to a point that
21180  you are comfortable changing your LyX preferences, and X resources file.
21181  If that is not the case please refer to other LyX documentation to cover
21182  your specific needs.
21183 \end_layout
21184
21185 \begin_layout Subsection
21186 Literate Programming
21187 \end_layout
21188
21189 \begin_layout Standard
21190 From the Literate Programming FAQ: 
21191 \end_layout
21192
21193 \begin_layout Quotation
21194 Literate programming is the combination of documentation and source together
21195  in a fashion suited for reading by human beings.
21196  In fact, literate programs should be enjoyable reading, even inviting!
21197  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21198  and documentation in a single file.
21199  Literate programming tools then parse the file to produce either readable
21200  documentation or compilable source.
21201  The WEB style of literate programming was created by D.
21202 \begin_inset space \thinspace{}
21203 \end_inset
21204
21205 E.
21206  Knuth during the development of his TeX typesetting software.
21207  
21208 \end_layout
21209
21210 \begin_layout Standard
21211 Another excerpt says:
21212 \end_layout
21213
21214 \begin_layout Quotation
21215
21216 \emph on
21217 How is literate programming different from verbose commenting?
21218 \end_layout
21219
21220 \begin_layout Quotation
21221 There are three distinguishing characteristics.
21222  In order of importance, they are: 
21223 \end_layout
21224
21225 \begin_deeper
21226 \begin_layout Itemize
21227 flexible order of elaboration 
21228 \end_layout
21229
21230 \begin_layout Itemize
21231 automatic support for browsing 
21232 \end_layout
21233
21234 \begin_layout Itemize
21235 typeset documentation, especially diagrams and mathematics 
21236 \end_layout
21237
21238 \end_deeper
21239 \begin_layout Standard
21240 Now that I sparked your curiosity, take a look in the references.
21241 \end_layout
21242
21243 \begin_layout Subsubsection
21244 References
21245 \end_layout
21246
21247 \begin_layout Standard
21248 The complete Literate Programming FAQ can be found at:
21249 \end_layout
21250
21251 \begin_layout Quote
21252 Literate Programming FAQ 
21253 \begin_inset Flex URL
21254 status collapsed
21255
21256 \begin_layout Plain Layout
21257
21258 http://www.literateprogramming.com/lpfaq.pdf
21259 \end_layout
21260
21261 \end_inset
21262
21263
21264 \end_layout
21265
21266 \begin_layout Standard
21267 The FAQ lists 23 (twenty three!) different literate programming tools.
21268  Where some are specialized or 
21269 \begin_inset Quotes eld
21270 \end_inset
21271
21272 tailored
21273 \begin_inset Quotes erd
21274 \end_inset
21275
21276  for particular programming languages, while other have general scope.
21277  I selected 
21278 \noun on
21279 Noweb
21280 \noun default
21281  for my own use for several reasons:
21282 \end_layout
21283
21284 \begin_layout Itemize
21285 It can generate the documentation either in LaTeX or HTML.
21286 \end_layout
21287
21288 \begin_layout Itemize
21289 It has a open architecture, i.
21290 \begin_inset space \thinspace{}
21291 \end_inset
21292
21293 e.
21294 \begin_inset space \space{}
21295 \end_inset
21296
21297 it is easy to plug in new filters and to perform special processing that
21298  you may need.
21299  
21300 \end_layout
21301
21302 \begin_layout Itemize
21303 There is a good selection of filters available already (the HTML is one
21304  of them).
21305 \end_layout
21306
21307 \begin_layout Itemize
21308 It is free.
21309 \end_layout
21310
21311 \begin_layout Standard
21312 The Noweb web page can be found at: 
21313 \end_layout
21314
21315 \begin_layout Quote
21316 Noweb home page 
21317 \begin_inset Flex URL
21318 status collapsed
21319
21320 \begin_layout Plain Layout
21321
21322 http://www.cs.virginia.edu/~nr/noweb/
21323 \end_layout
21324
21325 \end_inset
21326
21327
21328 \end_layout
21329
21330 \begin_layout Standard
21331 Starting from there you can reach many other interesting links and even
21332  some literate program examples.
21333 \end_layout
21334
21335 \begin_layout Subsection
21336 LyX and Literate Programming
21337 \end_layout
21338
21339 \begin_layout Standard
21340 The LyX support for Literate Programming is provided by using the generic
21341  LyX converters mechanism.
21342  This support is provided in a 
21343 \begin_inset Quotes eld
21344 \end_inset
21345
21346 Noweb independent
21347 \begin_inset Quotes erd
21348 \end_inset
21349
21350  way, i.
21351 \begin_inset space \thinspace{}
21352 \end_inset
21353
21354 e.
21355 \begin_inset space \space{}
21356 \end_inset
21357
21358 you will be able to use this new LyX feature with some other literate programmin
21359 g tool of your choice by just changing your LyX preferences.
21360 \end_layout
21361
21362 \begin_layout Subsubsection
21363 Generating documents and code (weaving and tangling)
21364 \end_layout
21365
21366 \begin_layout Paragraph
21367 Selecting the document class
21368 \end_layout
21369
21370 \begin_layout Standard
21371 If you have installed Noweb and LyX successfully, whenever you open a new
21372  document or try to change the document class of an existing one, you will
21373  find that there are three new document classes available:
21374 \end_layout
21375
21376 \begin_layout Itemize
21377 Article (Noweb)
21378 \end_layout
21379
21380 \begin_layout Itemize
21381 Book (Noweb)
21382 \end_layout
21383
21384 \begin_layout Itemize
21385 Report (Noweb)
21386 \end_layout
21387
21388 \begin_layout Standard
21389 You must select one of them to create your literate documents from.
21390  
21391 \end_layout
21392
21393 \begin_layout Standard
21394 Note that literate documents are not limited to these three classes.
21395  New classes can be generated from other styles like letter or in combination
21396  with other class variations like Article (AMS).
21397  If you have special needs that cannot be covered by one of the existing
21398  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21399  will arrange to insert a new entry, or teach you how to do it.
21400 \begin_inset Foot
21401 status collapsed
21402
21403 \begin_layout Plain Layout
21404 It is very simple, it involves the creation of a file with four lines, and
21405  re-running of the auto configuration.
21406 \end_layout
21407
21408 \end_inset
21409
21410  Moreover, if you use a literate tool other than Noweb you may need to create
21411  a new set of document classes for it.
21412 \end_layout
21413
21414 \begin_layout Paragraph
21415 Typing code in
21416 \end_layout
21417
21418 \begin_layout Standard
21419 LyX enables you to write code with a layout named 
21420 \noun on
21421 Scrap
21422 \noun default
21423 .
21424 \begin_inset Foot
21425 status collapsed
21426
21427 \begin_layout Plain Layout
21428 The equivalent Noweb term is 
21429 \begin_inset Quotes eld
21430 \end_inset
21431
21432 Chunk
21433 \begin_inset Quotes erd
21434 \end_inset
21435
21436 .
21437  For historical reasons, I got used to the term 
21438 \begin_inset Quotes eld
21439 \end_inset
21440
21441 scrap
21442 \begin_inset Quotes erd
21443 \end_inset
21444
21445  introduced by other literate tool named Nuweb, which I used for many years
21446  before rendering myself to Noweb.
21447 \end_layout
21448
21449 \end_inset
21450
21451  Noweb delimits scraps like this:
21452 \end_layout
21453
21454 \begin_layout LyX-Code
21455 <<My scrap>>=
21456 \end_layout
21457
21458 \begin_layout LyX-Code
21459   code
21460 \end_layout
21461
21462 \begin_layout LyX-Code
21463   more code
21464 \end_layout
21465
21466 \begin_layout LyX-Code
21467   even more code
21468 \end_layout
21469
21470 \begin_layout LyX-Code
21471   @
21472 \end_layout
21473
21474 \begin_layout Standard
21475 The problem is that whatever is written in between the << and the 
21476 \family typewriter
21477 @
21478 \family default
21479  must be taken literally, i.
21480 \begin_inset space \thinspace{}
21481 \end_inset
21482
21483 e.
21484 \begin_inset space \space{}
21485 \end_inset
21486
21487 LyX should be prevented from making any special interpretation of what has
21488  been written.
21489  This is handled by a special layout named Scrap, that works like a normal
21490  paragraph but has a free spacing capability.
21491 \end_layout
21492
21493 \begin_layout Standard
21494 The down side of the Scrap paragraph layout is that consecutive paragraphs
21495  of code will be spaced with one empty line in the source code and also
21496  in the printed documentation.
21497  The work around is to enter each line of code within a single Scrap, with
21498  a newline (ctrl-return).
21499  The example above will look like this:
21500 \begin_inset Foot
21501 status collapsed
21502
21503 \begin_layout Plain Layout
21504 If you have a printed version of this document you will not see any difference
21505  between the previous example and this one.
21506 \end_layout
21507
21508 \end_inset
21509
21510
21511 \end_layout
21512
21513 \begin_layout LyX-Code
21514 <<My scrap>>=
21515 \begin_inset Newline newline
21516 \end_inset
21517
21518   code
21519 \begin_inset Newline newline
21520 \end_inset
21521
21522   more code
21523 \begin_inset Newline newline
21524 \end_inset
21525
21526   even more code
21527 \begin_inset Newline newline
21528 \end_inset
21529
21530   @
21531 \end_layout
21532
21533 \begin_layout Standard
21534 This layout works fine.
21535  The only real inconvenience is that you have to type ctrl-return instead
21536  of a plain return.
21537 \begin_inset Foot
21538 status collapsed
21539
21540 \begin_layout Plain Layout
21541 It is in my list of 
21542 \begin_inset Quotes eld
21543 \end_inset
21544
21545 improvements
21546 \begin_inset Quotes erd
21547 \end_inset
21548
21549  to fix that.
21550 \end_layout
21551
21552 \end_inset
21553
21554
21555 \end_layout
21556
21557 \begin_layout Standard
21558 As a special note, you can also use the 
21559 \begin_inset Quotes eld
21560 \end_inset
21561
21562 %def
21563 \begin_inset Quotes erd
21564 \end_inset
21565
21566  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21567 rence:
21568 \end_layout
21569
21570 \begin_layout LyX-Code
21571 <<My scrap>>=
21572 \begin_inset Newline newline
21573 \end_inset
21574
21575   def some_function(args):
21576 \begin_inset Newline newline
21577 \end_inset
21578
21579     "This is the doc string for this function."
21580 \begin_inset Newline newline
21581 \end_inset
21582
21583     print "My args: ", args
21584 \end_layout
21585
21586 \begin_layout LyX-Code
21587 @ %def some_function
21588 \end_layout
21589
21590 \begin_layout Standard
21591 For an example of this usage and the resulting cross-reference output, look
21592  at the Literate python program in 
21593 \emph on
21594 LIBDIR/examples/listerrors.lyx
21595 \emph default
21596  which should make this all clear.
21597 \end_layout
21598
21599 \begin_layout Paragraph
21600 Generating the documentation
21601 \end_layout
21602
21603 \begin_layout Standard
21604 At this point you already have a new document file with a proper document
21605  class, and with some code and text on it.
21606  How do I print it? The answer is simple, you select 
21607 \family sans
21608 View\SpecialChar \menuseparator
21609 DVI,
21610 \family default
21611  etc.
21612  Just like you would do for a plain document.
21613  No special procedure is required.
21614 \end_layout
21615
21616 \begin_layout Standard
21617 To help orientate you, I will now explain what happens inside LyX:
21618 \end_layout
21619
21620 \begin_layout Enumerate
21621 When the 
21622 \family sans
21623 Update\SpecialChar \menuseparator
21624 DVI
21625 \family default
21626  menu option is chosen, a LaTeX file is generated.
21627  
21628 \end_layout
21629
21630 \begin_deeper
21631 \begin_layout Standard
21632 If the document is of any literate class the generated file will be named
21633  with an extension name defined by the 
21634 \begin_inset Quotes eld
21635 \end_inset
21636
21637 literate
21638 \begin_inset Quotes erd
21639 \end_inset
21640
21641  format (defined in the Preferences panel), otherwise the file will have
21642  the usual 
21643 \family typewriter
21644 .tex
21645 \family default
21646  extension.
21647 \end_layout
21648
21649 \end_deeper
21650 \begin_layout Enumerate
21651 Note that the only difference so far is in the name of the file, no special
21652  processing is required by LyX.
21653  Given that you formatted the code using the Scrap layout that, by itself,
21654  takes care of the business.
21655 \end_layout
21656
21657 \begin_layout Enumerate
21658 If the document is of any literate class LyX will then use the internal
21659  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21660 \begin_inset Foot
21661 status collapsed
21662
21663 \begin_layout Plain Layout
21664 The converters are defined in the 
21665 \family sans
21666 Tools\SpecialChar \menuseparator
21667 Preferences
21668 \family default
21669  panel, under the 
21670 \begin_inset Quotes eld
21671 \end_inset
21672
21673 Conversion
21674 \begin_inset Quotes erd
21675 \end_inset
21676
21677  tab.
21678  See section 
21679 \emph on
21680 Converters
21681 \emph default
21682  of the 
21683 \emph on
21684 Customization
21685 \emph default
21686  manual for general information about converters.
21687 \end_layout
21688
21689 \end_inset
21690
21691  to generate the LaTeX file.
21692 \end_layout
21693
21694 \begin_deeper
21695 \begin_layout Standard
21696 Otherwise it will just skip this step.
21697 \end_layout
21698
21699 \end_deeper
21700 \begin_layout Enumerate
21701 Finally, LaTeX is invoked and the regular post processing continues as in
21702  a plain document.
21703 \end_layout
21704
21705 \begin_layout Standard
21706 Independence from a particular 
21707 \begin_inset Quotes eld
21708 \end_inset
21709
21710 literate tool
21711 \begin_inset Quotes erd
21712 \end_inset
21713
21714  is easily achieved by changing the commands that are run by the various
21715  converters.
21716 \end_layout
21717
21718 \begin_layout Paragraph
21719 Generating the code
21720 \end_layout
21721
21722 \begin_layout Standard
21723 When the build menu option is chosen or the corresponding button in the
21724  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21725  Next, LyX invokes the 
21726 \family typewriter
21727 Noweb->Program
21728 \family default
21729  converter.
21730  This converter needs to be defined by the user and is not installed by
21731  default, though the Program format is.
21732  This converter (like any other converter) will have two parts:
21733 \end_layout
21734
21735 \begin_layout Enumerate
21736 The converter program itself.
21737  This program performs the conversion from the one format to the other (in
21738  this case, from the Noweb format to the Program pseudo-format).
21739 \end_layout
21740
21741 \begin_layout Enumerate
21742 The error log parser.
21743  This is a program whose sole purpose is to rewrite error messages in a
21744  format that LyX understands.
21745  This makes it possible for LyX to place error boxes in the right places
21746  in the file buffer.
21747 \end_layout
21748
21749 \begin_layout Standard
21750 The first part, the 
21751 \begin_inset Quotes eld
21752 \end_inset
21753
21754 Converter
21755 \begin_inset Quotes erd
21756 \end_inset
21757
21758  setting, should be set to 
21759 \begin_inset Quotes eld
21760 \end_inset
21761
21762
21763 \family typewriter
21764 build-script $$i
21765 \family default
21766
21767 \begin_inset Quotes erd
21768 \end_inset
21769
21770 .
21771  This basically means that LyX will call 
21772 \begin_inset Quotes eld
21773 \end_inset
21774
21775 build-script
21776 \begin_inset Quotes erd
21777 \end_inset
21778
21779  (a program or script) with the name of the Noweb file (normally a file
21780  in the LyX temp directory).
21781  
21782 \end_layout
21783
21784 \begin_layout Standard
21785 This is an implementation of 
21786 \begin_inset Quotes eld
21787 \end_inset
21788
21789 build-script
21790 \begin_inset Quotes erd
21791 \end_inset
21792
21793  that you can place in a directory on your path:
21794 \end_layout
21795
21796 \begin_layout LyX-Code
21797 #!/bin/sh
21798 \end_layout
21799
21800 \begin_layout LyX-Code
21801 #
21802 \end_layout
21803
21804 \begin_layout LyX-Code
21805 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21806 \end_layout
21807
21808 \begin_layout Standard
21809 The next part of the converter setting is the 
21810 \begin_inset Quotes eld
21811 \end_inset
21812
21813 Flags
21814 \begin_inset Quotes erd
21815 \end_inset
21816
21817  which is to be set to 
21818 \begin_inset Quotes eld
21819 \end_inset
21820
21821
21822 \family typewriter
21823 parselog=listerrors
21824 \family default
21825
21826 \begin_inset Quotes erd
21827 \end_inset
21828
21829 .
21830  This will run any errors that are generated by the 
21831 \begin_inset Quotes eld
21832 \end_inset
21833
21834 build-script
21835 \begin_inset Quotes erd
21836 \end_inset
21837
21838  process through the 
21839 \begin_inset Quotes eld
21840 \end_inset
21841
21842 listerrors
21843 \begin_inset Quotes erd
21844 \end_inset
21845
21846  program.
21847 \end_layout
21848
21849 \begin_layout Standard
21850 The converter code looks in 
21851 \emph on
21852 MYLYXDIR/scripts
21853 \emph default
21854  first, then in 
21855 \emph on
21856 LIBDIR/scripts
21857 \emph default
21858  then on the path for the 
21859 \begin_inset Quotes eld
21860 \end_inset
21861
21862 listerrors
21863 \begin_inset Quotes erd
21864 \end_inset
21865
21866  program.
21867 \end_layout
21868
21869 \begin_layout Standard
21870 The build will normally take place in LyX's temporary directory, so the
21871  files produced by the conversion will be in that directory.
21872  LyX will copy out what it regards as the `main' file, but the 
21873 \family typewriter
21874 Noweb->Program
21875 \family default
21876  conversion may produce several files, and so most of these would then be
21877  deleted when LyX was closed.
21878  The present solution is to use a `copier',
21879 \begin_inset Foot
21880 status collapsed
21881
21882 \begin_layout Plain Layout
21883 See section 
21884 \emph on
21885 Copiers
21886 \emph default
21887  of the 
21888 \emph on
21889 Customization
21890 \emph default
21891  manual for information on these.
21892 \end_layout
21893
21894 \end_inset
21895
21896  in this case, the 
21897 \family typewriter
21898 ext_copy.py
21899 \family default
21900  script in its default mode, so that the entire contents of the temporary
21901  directory is copied.
21902  More will get copied than is needed, to be sure, but nothing will be lost.
21903  If, however, you know what extensions the generated files will have, this
21904  can be improved by using the 
21905 \family typewriter
21906 -e
21907 \family default
21908  option to 
21909 \family typewriter
21910 ext_copy
21911 \family default
21912 .
21913  This option takes a comma-separated list of extensions to copy.
21914  So, for example, if the conversion will generate only files with the extensions
21915  
21916 \family typewriter
21917 .c
21918 \family default
21919  and 
21920 \family typewriter
21921 .h
21922 \family default
21923 , then the correct definition would be:
21924 \end_layout
21925
21926 \begin_layout LyX-Code
21927 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21928 \end_layout
21929
21930 \begin_layout Standard
21931 The result will be that only files with these two extensions will be copied
21932  out.
21933 \end_layout
21934
21935 \begin_layout Paragraph
21936 Build instructions in the document
21937 \end_layout
21938
21939 \begin_layout Standard
21940 The last piece of the integration between LyX and noweb is the 
21941 \begin_inset Quotes eld
21942 \end_inset
21943
21944 build-script
21945 \begin_inset Quotes erd
21946 \end_inset
21947
21948  scrap.
21949  Generally, the instructions for building your program should be embedded
21950  in a scrap of its own.
21951  The noweb-specific 
21952 \begin_inset Quotes eld
21953 \end_inset
21954
21955 build-script
21956 \begin_inset Quotes erd
21957 \end_inset
21958
21959  above uses the notangle command to look for this scrap (called 
21960 \begin_inset Quotes eld
21961 \end_inset
21962
21963 build-script
21964 \begin_inset Quotes erd
21965 \end_inset
21966
21967 ) and runs its contents through 
21968 \begin_inset Quotes eld
21969 \end_inset
21970
21971 sh
21972 \begin_inset Quotes erd
21973 \end_inset
21974
21975 .
21976 \end_layout
21977
21978 \begin_layout Standard
21979 Typically, such a scrap would look something like this:
21980 \end_layout
21981
21982 \begin_layout LyX-Code
21983 <<build-script>>=
21984 \begin_inset Newline newline
21985 \end_inset
21986
21987 #!/bin/sh
21988 \begin_inset Newline newline
21989 \end_inset
21990
21991
21992 \begin_inset Newline newline
21993 \end_inset
21994
21995 if [ -z "${NOWEB_SOURCE}" ]
21996 \begin_inset Newline newline
21997 \end_inset
21998
21999 then
22000 \begin_inset Newline newline
22001 \end_inset
22002
22003   NOWEB_SOURCE=myfile.nw
22004 \begin_inset Newline newline
22005 \end_inset
22006
22007 fi
22008 \begin_inset Newline newline
22009 \end_inset
22010
22011 [...
22012  code to extract files ...]
22013 \begin_inset Newline newline
22014 \end_inset
22015
22016 [...
22017  code to compile files ...]
22018 \begin_inset Newline newline
22019 \end_inset
22020
22021 @
22022 \end_layout
22023
22024 \begin_layout Standard
22025 Look in 
22026 \emph on
22027 LIBDIR/examples/listerrors.lyx
22028 \emph default
22029  or in 
22030 \emph on
22031 LIBDIR/examples/Literate.lyx
22032 \emph default
22033  which implement two versions of the 
22034 \begin_inset Quotes eld
22035 \end_inset
22036
22037 listerrors
22038 \begin_inset Quotes erd
22039 \end_inset
22040
22041  program for some illustrations of how all of these pieces go together or
22042  in 
22043 \emph on
22044 LIBDIR/examples/noweb2lyx.lyx.
22045
22046 \emph default
22047  Interestingly, these three files show off the language-indepence of the
22048  LyX literate programming support since they are written in Python, C and
22049  Perl respectively.
22050 \end_layout
22051
22052 \begin_layout Subsubsection
22053 Configuring LyX
22054 \end_layout
22055
22056 \begin_layout Standard
22057 All the Literate Programming support is configured by the 
22058 \family sans
22059 Tools\SpecialChar \menuseparator
22060 Preferences
22061 \family default
22062  panel in the 
22063 \begin_inset Quotes eld
22064 \end_inset
22065
22066 Conversion
22067 \begin_inset Quotes erd
22068 \end_inset
22069
22070  tab.
22071  The important parts are:
22072 \end_layout
22073
22074 \begin_layout Description
22075 the
22076 \begin_inset space ~
22077 \end_inset
22078
22079
22080 \begin_inset Quotes eld
22081 \end_inset
22082
22083 literate
22084 \begin_inset Quotes erd
22085 \end_inset
22086
22087
22088 \begin_inset space ~
22089 \end_inset
22090
22091 format Set up via the Formats tab, this is where the Noweb-specific pieces
22092  are set up.
22093  The 
22094 \family sans
22095 GUI Name
22096 \family default
22097  is set to 
22098 \family typewriter
22099 NoWeb
22100 \family default
22101 , the file extension is set to 
22102 \family typewriter
22103 .nw
22104 \family default
22105 .
22106  This tells LyX to create a file with a 
22107 \family typewriter
22108 .nw
22109 \family default
22110  extension in the first step of the conversion process.
22111 \end_layout
22112
22113 \begin_layout Description
22114 the
22115 \begin_inset space ~
22116 \end_inset
22117
22118
22119 \family sans
22120 Program
22121 \family default
22122
22123 \begin_inset space ~
22124 \end_inset
22125
22126 format This is an empty format whose sole purpose is to be the endpoint
22127  of a conversion (which then allows us to set up a converter for it).
22128 \end_layout
22129
22130 \begin_layout Description
22131
22132 \family sans
22133 NoWeb
22134 \family default
22135 ->
22136 \family sans
22137 LaTeX
22138 \family default
22139  This converter performs the 
22140 \begin_inset Quotes eld
22141 \end_inset
22142
22143 weaving
22144 \begin_inset Quotes erd
22145 \end_inset
22146
22147  of the literate document.
22148  For Noweb, it is set to 
22149 \begin_inset Quotes eld
22150 \end_inset
22151
22152
22153 \family typewriter
22154 noweave -delay -index $$i > $$o
22155 \family default
22156
22157 \begin_inset Quotes erd
22158 \end_inset
22159
22160
22161 \end_layout
22162
22163 \begin_layout Description
22164
22165 \family sans
22166 NoWeb
22167 \family default
22168 ->
22169 \family sans
22170 Program
22171 \family default
22172  This performs the 
22173 \begin_inset Quotes eld
22174 \end_inset
22175
22176 tangling step
22177 \begin_inset Quotes erd
22178 \end_inset
22179
22180 .
22181  As stated above, the Converter is set to 
22182 \begin_inset Quotes eld
22183 \end_inset
22184
22185
22186 \family typewriter
22187 build-script $$i
22188 \family default
22189
22190 \begin_inset Quotes erd
22191 \end_inset
22192
22193 , with Flags set to 
22194 \begin_inset Quotes eld
22195 \end_inset
22196
22197
22198 \family typewriter
22199 originaldir,parselog=listerrors
22200 \family default
22201
22202 \begin_inset Quotes erd
22203 \end_inset
22204
22205 .
22206 \end_layout
22207
22208 \begin_layout Subsubsection
22209 Debug extensions
22210 \end_layout
22211
22212 \begin_layout Standard
22213 There is also a new function implemented in the LyX server, the 
22214 \begin_inset Quotes eld
22215 \end_inset
22216
22217 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22218  
22219 \end_layout
22220
22221 \begin_layout Standard
22222 When debugging code with ddd/gdb, it is possible to invoke a text editor
22223  at the current execution position with a single key stroke.
22224  The default ddd configuration for that is shift-ctrl-V.
22225  It happens that you can define the editor command line invocation in ddd
22226  by accessing the 
22227 \family sans
22228 Edit\SpecialChar \menuseparator
22229 Preferences\SpecialChar \menuseparator
22230 Helpers
22231 \family default
22232  dialog and changing the "Edit Sources" entry.
22233 \end_layout
22234
22235 \begin_layout Standard
22236 I take advantage of the new created LyX server function and this ddd feature,
22237  and set 
22238 \begin_inset Quotes eld
22239 \end_inset
22240
22241 Edit Sources
22242 \begin_inset Quotes erd
22243 \end_inset
22244
22245  to:
22246 \end_layout
22247
22248 \begin_layout LyX-Code
22249 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22250 \end_layout
22251
22252 \begin_layout Standard
22253 With this, whenever you are using ddd and find a point in the program that
22254  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22255  ddd you forward this information to LyX through the LyX server and then
22256  the LyX window will show the same file with the cursor at the same position
22257  ddd was pointing to.
22258  No more guessing or long scrolling to locate a point in the program back
22259  from debugging !
22260 \end_layout
22261
22262 \begin_layout Standard
22263 Note however that you must enable the LyX server to get this feature working
22264  (it is disabled by default).
22265  You can enable it in 
22266 \family sans
22267 Preferences
22268 \family default
22269  (tabs 
22270 \family sans
22271 Inputs
22272 \family default
22273
22274 \family sans
22275 Paths
22276 \family default
22277 ) by entering in the 
22278 \family sans
22279 LyXserver pipe
22280 \family default
22281  a path like 
22282 \begin_inset Quotes eld
22283 \end_inset
22284
22285
22286 \family typewriter
22287 /home/<your-home-directory>/.lyx/lyxpipe
22288 \family default
22289
22290 \begin_inset Quotes erd
22291 \end_inset
22292
22293
22294 \end_layout
22295
22296 \begin_layout Standard
22297 Read the LyX server documentation in the 
22298 \emph on
22299 Customization Manual
22300 \emph default
22301  for further information.
22302 \end_layout
22303
22304 \begin_layout Subsubsection
22305 Toolbar extensions
22306 \end_layout
22307
22308 \begin_layout Standard
22309 There are six new buttons that can be added to your LyX toolbar.
22310  Five of these buttons are short cuts to layout styles: 
22311 \family sans
22312 Standard
22313 \family default
22314
22315 \family sans
22316 Section
22317 \family default
22318
22319 \family sans
22320 LaTeX
22321 \family default
22322
22323 \family sans
22324 LyX-Code
22325 \family default
22326 , and 
22327 \family sans
22328 Scrap
22329 \family default
22330 .
22331  The last one is a short cut to the 
22332 \begin_inset Quotes eld
22333 \end_inset
22334
22335 Build Program
22336 \begin_inset Quotes erd
22337 \end_inset
22338
22339  File menu entry.
22340  
22341 \end_layout
22342
22343 \begin_layout Standard
22344 LyX has a range of buttons that are available for tool bar customization.
22345  In my toolbar I like to combine the six short cuts above with two more:
22346  One for 
22347 \family sans
22348 View
22349 \family default
22350 \SpecialChar \menuseparator
22351
22352 \family sans
22353 Update
22354 \family default
22355 \SpecialChar \menuseparator
22356
22357 \family sans
22358 DVI
22359 \family default
22360  and the other for 
22361 \family sans
22362 View\SpecialChar \menuseparator
22363 DVI
22364 \family default
22365  File menu entries.
22366  Here is how it looks like:
22367 \end_layout
22368
22369 \begin_layout LyX-Code
22370 Toolbar
22371 \end_layout
22372
22373 \begin_layout LyX-Code
22374   Layouts
22375 \end_layout
22376
22377 \begin_layout LyX-Code
22378   Icon "layout Standard"
22379 \end_layout
22380
22381 \begin_layout LyX-Code
22382   Icon "layout Section"
22383 \end_layout
22384
22385 \begin_layout LyX-Code
22386   Icon "layout LaTeX"
22387 \end_layout
22388
22389 \begin_layout LyX-Code
22390   Icon "layout LyX-Code"
22391 \end_layout
22392
22393 \begin_layout LyX-Code
22394   Icon "layout Scrap"
22395 \end_layout
22396
22397 \begin_layout LyX-Code
22398   Separator
22399 \end_layout
22400
22401 \begin_layout LyX-Code
22402   Icon "buffer-view"
22403 \end_layout
22404
22405 \begin_layout LyX-Code
22406   Icon "buffer-typeset"
22407 \end_layout
22408
22409 \begin_layout LyX-Code
22410   Icon "build-program"
22411 \end_layout
22412
22413 \begin_layout LyX-Code
22414   Separator
22415 \end_layout
22416
22417 \begin_layout LyX-Code
22418 .
22419 \end_layout
22420
22421 \begin_layout LyX-Code
22422 .
22423 \end_layout
22424
22425 \begin_layout LyX-Code
22426 .
22427 \end_layout
22428
22429 \begin_layout LyX-Code
22430 End
22431 \end_layout
22432
22433 \begin_layout Subsubsection
22434 Colors customization
22435 \end_layout
22436
22437 \begin_layout Standard
22438 There are a number of colors in LyX that can be customized in 
22439 \family sans
22440 Preferences
22441 \family default
22442 .
22443  One of the things that bothers people is the LaTeX font color.
22444  The default color is red, since the scraps uses LaTeX font, and there is
22445  a lot of scraps in literate documents, you may get tired of seeing everything
22446  in red.
22447  You can change it by going to the tabs 
22448 \family sans
22449 Look&Feel
22450 \family default
22451
22452 \family sans
22453 Colors.
22454 \end_layout
22455
22456 \begin_layout Standard
22457 The next thing is the visible presence of the newline character in the screen.
22458  You can choose the color of this particular character and make it blend
22459  in the background.
22460  I recommend you choosing a color that is close to the background but not
22461  equal, that way you still can see it is there, but it is not bothering
22462  you anymore.
22463  
22464 \end_layout
22465
22466 \begin_layout Chapter
22467 Special features
22468 \end_layout
22469
22470 \begin_layout Standard
22471 You can do everything with LyX that you can do with LaTeX.
22472  However, LyX cannot support every LaTeX feature directly.
22473  But you can always use TeX Code.
22474  This chapter shows you some more special things you might want to use.
22475  For other special things you can do with figures, tables, floats, boxes
22476  and notes, have a look at the 
22477 \emph on
22478 Embedded
22479 \begin_inset space ~
22480 \end_inset
22481
22482 Objects
22483 \emph default
22484  manual.
22485 \end_layout
22486
22487 \begin_layout Section
22488 Multiple Text Columns
22489 \end_layout
22490
22491 \begin_layout Standard
22492 This feature is independent of the option 
22493 \family sans
22494 Two-column document
22495 \family default
22496  in the document settings under 
22497 \family sans
22498 Text Layout
22499 \family default
22500 .
22501  If you want to have 2
22502 \begin_inset space ~
22503 \end_inset
22504
22505 columns for the whole document, it is recommended to use the 
22506 \family sans
22507 Two-column document
22508 \family default
22509  option.
22510  For all other cases use this feature.
22511 \end_layout
22512
22513 \begin_layout Standard
22514 To use multiple text columns in your document, you have to load the module
22515  
22516 \family sans
22517 Multiple Columns
22518 \family default
22519  (menu 
22520 \family sans
22521 Document\SpecialChar \menuseparator
22522 Settings\SpecialChar \menuseparator
22523 Modules
22524 \family default
22525 ) and must have the LaTeX-package 
22526 \series bold
22527 multicol
22528 \series default
22529
22530 \begin_inset Index idx
22531 status collapsed
22532
22533 \begin_layout Plain Layout
22534 LaTeX-packages ! multicol
22535 \end_layout
22536
22537 \end_inset
22538
22539  installed.
22540 \end_layout
22541
22542 \begin_layout Standard
22543 Footnotes within multiple columns will be placed at the bottom of the page
22544  and not under each column.
22545  Within the different columns you can use everything, with the limitation
22546  that for floats you need to use the float option 
22547 \family sans
22548 Span columns
22549 \family default
22550 .
22551 \end_layout
22552
22553 \begin_layout Subsection
22554 Basics
22555 \end_layout
22556
22557 \begin_layout Standard
22558 If you want to have 2
22559 \begin_inset space ~
22560 \end_inset
22561
22562 columns in your text, use the style 
22563 \family sans
22564 Begin Multiple Columns
22565 \family default
22566  where the columns should start.
22567  The content of the style is the number of the columns, so in this case
22568  use a 
22569 \begin_inset Quotes eld
22570 \end_inset
22571
22572 2
22573 \begin_inset Quotes erd
22574 \end_inset
22575
22576 .
22577  At the point where the columns should end use the style 
22578 \family sans
22579 End Multiple Columns
22580 \family default
22581  and keep it empty.
22582 \end_layout
22583
22584 \begin_layout Standard
22585 Here is an example:
22586 \end_layout
22587
22588 \begin_layout Begin Multiple Columns
22589 2
22590 \end_layout
22591
22592 \begin_layout Standard
22593 \noindent
22594
22595 \series bold
22596 \size small
22597 The Adventure of the Empty House
22598 \series default
22599
22600 \begin_inset Newline newline
22601 \end_inset
22602
22603 by 
22604 \noun on
22605 Sir Arthur Conan Doyle
22606 \end_layout
22607
22608 \begin_layout Standard
22609
22610 \size small
22611 It was in the spring of the year 1894 that all London was interested, and
22612  the fashionable world dismayed, by the murder of the Honourable Ronald
22613  Adair under most unusual and inexplicable circumstances.
22614  The public has already learned those particulars of the crime which came
22615  out in the police investigation, but a good deal was suppressed upon that
22616  occasion, since the case for the prosecution was so overwhelmingly strong
22617  that it was not necessary to bring forward all the facts.
22618  Only now, at the end of nearly ten years, am I allowed to supply those
22619  missing links which make up the whole of that remarkable chain.
22620  The crime was of interest in itself, but that interest was as nothing to
22621  me compared to the inconceivable sequel, which afforded me the greatest
22622  shock and surprise of any event in my adventurous life.
22623  Even now, after this long interval, I find myself thrilling as I think
22624  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22625 ty which utterly submerged my mind.
22626  Let me say to that public, which has shown some interest in those glimpses
22627  which I have occasionally given them of the thoughts and actions of a very
22628  remarkable man, that they are not to blame me if I have not shared my knowledge
22629  with them, for I should have considered it my first duty to do so, had
22630  I not been barred by a positive prohibition from his own lips, which was
22631  only withdrawn upon the third of last month.
22632 \end_layout
22633
22634 \begin_layout End Multiple Columns
22635
22636 \end_layout
22637
22638 \begin_layout Standard
22639 Here is an example with 3
22640 \begin_inset space ~
22641 \end_inset
22642
22643 columns:
22644 \end_layout
22645
22646 \begin_layout Begin Multiple Columns
22647 3
22648 \end_layout
22649
22650 \begin_layout Standard
22651
22652 \size footnotesize
22653 It can be imagined that my close intimacy with Sherlock Holmes had interested
22654  me deeply in crime, and that after his disappearance I never failed to
22655  read with care the various problems which came before the public.
22656  And I even attempted, more than once, for my own private satisfaction,
22657  to employ his methods in their solution, though with indifferent success.
22658  There was none, however, which appealed to me like this tragedy of Ronald
22659  Adair.
22660  As I read the evidence at the inquest, which led up to a verdict of willful
22661  murder against some person or persons unknown, I realized more clearly
22662  than I had ever done the loss which the community had sustained by the
22663  death of Sherlock Holmes.
22664  There were points about this strange business which would, I was sure,
22665  have specially appealed to him, and the efforts of the police would have
22666  been supplemented, or more probably anticipated, by the trained observation
22667  and the alert mind of the first criminal agent in Europe.
22668  All day, as I drove upon my round, I turned over the case in my mind and
22669  found no explanation which appeared to me to be adequate.
22670  At the risk of telling a twice-told tale, I will recapitulate the facts
22671  as they were known to the public at the conclusion of the inquest.
22672 \end_layout
22673
22674 \begin_layout End Multiple Columns
22675
22676 \end_layout
22677
22678 \begin_layout Standard
22679 You can have up to 10
22680 \begin_inset space ~
22681 \end_inset
22682
22683 columns if you want to, but that might not be very pleasant for the readers
22684  of your document.
22685 \end_layout
22686
22687 \begin_layout Standard
22688 \begin_inset Newpage newpage
22689 \end_inset
22690
22691
22692 \end_layout
22693
22694 \begin_layout Subsection
22695 Columns inside Columns
22696 \end_layout
22697
22698 \begin_layout Standard
22699 You can also have columns inside columns:
22700 \end_layout
22701
22702 \begin_layout Begin Multiple Columns
22703 2
22704 \end_layout
22705
22706 \begin_layout Standard
22707
22708 \size footnotesize
22709 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22710  at that time governor of one of the Australian colonies.
22711  Adair's mother had returned from Australia to undergo the operation for
22712  cataract, and she, her son Ronald, and her daughter Hilda were living together
22713  at 427 Park Lane.
22714 \end_layout
22715
22716 \begin_layout Begin Multiple Columns
22717 2
22718 \end_layout
22719
22720 \begin_layout Standard
22721
22722 \size footnotesize
22723 The youth moved in the best society–had, so far as was known, no enemies
22724  and no particular vices.
22725  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22726  had been broken off by mutual consent some months before, and there was
22727  no sign that it had left any very profound feeling behind it.
22728  For the rest {sic} the man's life moved in a narrow and conventional circle,
22729  for his habits were quiet and his nature unemotional.
22730  Yet it was upon this easy-going young aristocrat that death came, in most
22731  strange and unexpected form, between the hours of ten and eleven-twenty
22732  on the night of March 30, 1894.
22733 \end_layout
22734
22735 \begin_layout End Multiple Columns
22736
22737 \end_layout
22738
22739 \begin_layout Standard
22740
22741 \size footnotesize
22742 Ronald Adair was fond of cards–playing continually, but never for such stakes
22743  as would hurt him.
22744  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22745  It was shown that, after dinner on the day of his death, he had played
22746  a rubber of whist at the latter club.
22747  He had also played there in the afternoon.
22748
22749 \size default
22750  
22751 \size footnotesize
22752 The evidence of those who had played with him– Mr.
22753  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22754  and that there was a fairly equal fall of the cards.
22755  Adair might have lost five pounds, but not more.
22756  His fortune was a considerable one, and such a loss could not in any way
22757  affect him.
22758  He had played nearly every day at one club or other, but he was a cautious
22759  player, and usually rose a winner.
22760  It came out in evidence that, in partnership with Colonel Moran, he had
22761  actually won as much as four hundred and twenty pounds in a sitting, some
22762  weeks before, from Godfrey Milner and Lord Balmoral.
22763  So much for his recent history as it came out at the inquest.
22764 \end_layout
22765
22766 \begin_layout End Multiple Columns
22767
22768 \end_layout
22769
22770 \begin_layout Subsection
22771 Advanced Examples
22772 \end_layout
22773
22774 \begin_layout Standard
22775 The examples in this section show some more special features of multiple
22776  columns.
22777 \end_layout
22778
22779 \begin_layout Standard
22780 For more features of multiple columns, have a look at the documentation
22781  of the LaTeX-package 
22782 \series bold
22783 multicol
22784 \series default
22785
22786 \begin_inset Index idx
22787 status collapsed
22788
22789 \begin_layout Plain Layout
22790 LaTeX-packages ! multicol
22791 \end_layout
22792
22793 \end_inset
22794
22795
22796 \begin_inset CommandInset citation
22797 LatexCommand cite
22798 key "multicol"
22799
22800 \end_inset
22801
22802 .
22803 \end_layout
22804
22805 \begin_layout Subsubsection
22806 Preface
22807 \end_layout
22808
22809 \begin_layout Standard
22810 To add a preface text for multiple columns, add the command
22811 \end_layout
22812
22813 \begin_layout Standard
22814
22815 \series bold
22816 }[
22817 \end_layout
22818
22819 \begin_layout Standard
22820 as TeX Code behind the number of columns in the
22821 \family sans
22822  Begin Multiple Columns
22823 \family default
22824  style.
22825  Behind the command follows the preface text.
22826  At the end of the style use the command
22827 \end_layout
22828
22829 \begin_layout Standard
22830
22831 \series bold
22832 ]{
22833 \end_layout
22834
22835 \begin_layout Standard
22836 as TeX Code.
22837  An example with some preface text:
22838 \end_layout
22839
22840 \begin_layout Standard
22841 \begin_inset VSpace bigskip
22842 \end_inset
22843
22844
22845 \end_layout
22846
22847 \begin_layout Begin Multiple Columns
22848 2
22849 \begin_inset ERT
22850 status collapsed
22851
22852 \begin_layout Plain Layout
22853
22854 }[
22855 \end_layout
22856
22857 \end_inset
22858
22859 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22860
22861 \begin_inset ERT
22862 status collapsed
22863
22864 \begin_layout Plain Layout
22865
22866 ]{
22867 \end_layout
22868
22869 \end_inset
22870
22871
22872 \end_layout
22873
22874 \begin_layout Standard
22875
22876 \size small
22877 On the evening of the crime, he returned from the club exactly at ten.
22878  His mother and sister were out spending the evening with a relation.
22879  The servant deposed that she heard him enter the front room on the second
22880  floor, generally used as his sitting-room.
22881  She had lit a fire there, and as it smoked she had opened the window.
22882  No sound was heard from the room until eleven-twenty, the hour of the return
22883  of Lady Maynooth and her daughter.
22884  Desiring to say good-night, she attempted to enter her son's room.
22885  The door was locked on the inside, and no answer could be got to their
22886  cries and knocking.
22887  Help was obtained, and the door forced.
22888  The unfortunate young man was found lying near the table.
22889  His head had been horribly mutilated by an expanding revolver bullet, but
22890  no weapon of any sort was to be found in the room.
22891 \end_layout
22892
22893 \begin_layout End Multiple Columns
22894
22895 \end_layout
22896
22897 \begin_layout Standard
22898 You can also use a section heading as the preface if you use a section command
22899  as TeX Code behind the first TeX Code.
22900  For example the command
22901 \end_layout
22902
22903 \begin_layout Standard
22904
22905 \series bold
22906
22907 \backslash
22908 subsection{subsection title}
22909 \end_layout
22910
22911 \begin_layout Standard
22912 creates a subsection.
22913  In this example the preface is a subsubsection:
22914 \end_layout
22915
22916 \begin_layout Begin Multiple Columns
22917 2
22918 \begin_inset ERT
22919 status collapsed
22920
22921 \begin_layout Plain Layout
22922
22923 }[
22924 \end_layout
22925
22926 \end_inset
22927
22928
22929 \begin_inset ERT
22930 status collapsed
22931
22932 \begin_layout Plain Layout
22933
22934
22935 \backslash
22936 subsubsection{
22937 \end_layout
22938
22939 \end_inset
22940
22941 This is a subsubsection heading as a preface
22942 \begin_inset ERT
22943 status collapsed
22944
22945 \begin_layout Plain Layout
22946
22947 }
22948 \end_layout
22949
22950 \end_inset
22951
22952
22953 \begin_inset ERT
22954 status collapsed
22955
22956 \begin_layout Plain Layout
22957
22958 ]{
22959 \end_layout
22960
22961 \end_inset
22962
22963
22964 \end_layout
22965
22966 \begin_layout Standard
22967
22968 \size small
22969 A minute examination of the circumstances served only to make the case more
22970  complex.
22971  In the first place, no reason could be given why the young man should have
22972  fastened the door upon the inside.
22973  There was the possibility that the murderer had done this, and had afterwards
22974  escaped by the window.
22975  The drop was at least twenty feet, however, and a bed of crocuses in full
22976  bloom lay beneath.
22977  Neither the flowers nor the earth showed any sign of having been disturbed,
22978  nor were there any marks upon the narrow strip of grass which separated
22979  the house from the road.
22980  Apparently, therefore, it was the young man himself who had fastened the
22981  door.
22982  But how did he come by his death? No one could have climbed up to the window
22983  without leaving traces.
22984  Suppose a man had fired through the window, he would indeed be a remarkable
22985  shot who could with a revolver inflict so deadly a wound.
22986  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22987  a hundred yards of the house.
22988  No one had heard a shot.
22989 \end_layout
22990
22991 \begin_layout End Multiple Columns
22992
22993 \end_layout
22994
22995 \begin_layout Standard
22996 If there is less vertical space left on the page at the beginning of the
22997  multiple columns than needed for 6
22998 \begin_inset space ~
22999 \end_inset
23000
23001 text lines, a page break will be inserted before the multiple columns.
23002  Depending on the number of lines of the preface text, you might want to
23003  change this value.
23004  It is determined by inserting the command
23005 \end_layout
23006
23007 \begin_layout Standard
23008
23009 \series bold
23010 ][number
23011 \backslash
23012 baselineskip
23013 \end_layout
23014
23015 \begin_layout Standard
23016 as TeX Code behind the preface definition but before the final 
23017 \series bold
23018 ]{
23019 \series default
23020  command.
23021  
23022 \emph on
23023 number
23024 \emph default
23025  is hereby the number of text lines.
23026  In this example the space is set to 7
23027 \begin_inset space ~
23028 \end_inset
23029
23030 text lines:
23031 \end_layout
23032
23033 \begin_layout Begin Multiple Columns
23034 2
23035 \begin_inset ERT
23036 status collapsed
23037
23038 \begin_layout Plain Layout
23039
23040 }[
23041 \end_layout
23042
23043 \end_inset
23044
23045
23046 \begin_inset ERT
23047 status collapsed
23048
23049 \begin_layout Plain Layout
23050
23051
23052 \backslash
23053 subsubsection{
23054 \end_layout
23055
23056 \end_inset
23057
23058 This is the sectioning command
23059 \begin_inset Newline newline
23060 \end_inset
23061
23062 as a preface and
23063 \begin_inset Newline newline
23064 \end_inset
23065
23066 with multiple text lines
23067 \begin_inset ERT
23068 status collapsed
23069
23070 \begin_layout Plain Layout
23071
23072 }
23073 \end_layout
23074
23075 \end_inset
23076
23077
23078 \begin_inset ERT
23079 status collapsed
23080
23081 \begin_layout Plain Layout
23082
23083 ][7
23084 \backslash
23085 baselineskip
23086 \end_layout
23087
23088 \end_inset
23089
23090
23091 \begin_inset ERT
23092 status collapsed
23093
23094 \begin_layout Plain Layout
23095
23096 ]{
23097 \end_layout
23098
23099 \end_inset
23100
23101
23102 \end_layout
23103
23104 \begin_layout Standard
23105
23106 \size small
23107 On the evening of the crime, he returned from the club exactly at ten.
23108  His mother and sister were out spending the evening with a relation.
23109  The servant deposed that she heard him enter the front room on the second
23110  floor, generally used as his sitting-room.
23111  She had lit a fire there, and as it smoked she had opened the window.
23112  No sound was heard from the room until eleven-twenty, the hour of the return
23113  of Lady Maynooth and her daughter.
23114  Desiring to say good-night, she attempted to enter her son's room.
23115  The door was locked on the inside, and no answer could be got to their
23116  cries and knocking.
23117  Help was obtained, and the door forced.
23118  The unfortunate young man was found lying near the table.
23119  His head had been horribly mutilated by an expanding revolver bullet, but
23120  no weapon of any sort was to be found in the room.
23121 \end_layout
23122
23123 \begin_layout End Multiple Columns
23124
23125 \end_layout
23126
23127 \begin_layout Subsubsection
23128 Surrounding Space
23129 \end_layout
23130
23131 \begin_layout Standard
23132 The amount of space before and after multiple columns can be changed by
23133  changing the length 
23134 \series bold
23135
23136 \backslash
23137 multicolsep
23138 \series default
23139 .
23140  For example the command
23141 \end_layout
23142
23143 \begin_layout Standard
23144
23145 \series bold
23146
23147 \backslash
23148 setlength{
23149 \backslash
23150 multicolsep}{3cm}
23151 \end_layout
23152
23153 \begin_layout Standard
23154 in TeX Code changes its value to 3
23155 \begin_inset space \thinspace{}
23156 \end_inset
23157
23158 cm.
23159  The change must be made before the multiple columns' start.
23160  The predefined value is 13
23161 \begin_inset space \thinspace{}
23162 \end_inset
23163
23164 pt.
23165 \end_layout
23166
23167 \begin_layout Standard
23168 For this example 
23169 \series bold
23170
23171 \backslash
23172 multicolsep
23173 \series default
23174  was set to 2.5
23175 \begin_inset space \thinspace{}
23176 \end_inset
23177
23178 cm:
23179 \end_layout
23180
23181 \begin_layout Standard
23182 \begin_inset ERT
23183 status open
23184
23185 \begin_layout Plain Layout
23186
23187
23188 \backslash
23189 setlength{
23190 \backslash
23191 multicolsep}{2.5cm}
23192 \end_layout
23193
23194 \end_inset
23195
23196
23197 \end_layout
23198
23199 \begin_layout Begin Multiple Columns
23200 2
23201 \end_layout
23202
23203 \begin_layout Standard
23204
23205 \size small
23206 All day I turned these facts over in my mind, endeavouring to hit upon some
23207  theory which could reconcile them all, and to find that line of least resistanc
23208 e which my poor friend had declared to be the starting-point of every investigat
23209 ion.
23210  I confess that I made little progress.
23211  In the evening I strolled across the Park, and found myself about six o'clock
23212  at the Oxford Street end of Park Lane.
23213  A group of loafers upon the pavements, all staring up at a particular window,
23214  directed me to the house which I had come to see.
23215  A tall, thin man with coloured glasses, whom I strongly suspected of being
23216  a plain-clothes detective, was pointing out some theory of his own, while
23217  the others crowded round to listen to what he said.
23218  I got as near him as I could, but his observations seemed to me to be absurd,
23219  so I withdrew again in some disgust.
23220  As I did so I struck against an elderly, deformed man, who had been behind
23221  me, and I knocked down several books which he was carrying.
23222 \end_layout
23223
23224 \begin_layout End Multiple Columns
23225
23226 \end_layout
23227
23228 \begin_layout Standard
23229 \begin_inset Note Greyedout
23230 status open
23231
23232 \begin_layout Plain Layout
23233
23234 \series bold
23235 Note:
23236 \series default
23237  The values you set with 
23238 \series bold
23239
23240 \backslash
23241 setlength
23242 \series default
23243  will be used for all following multiple columns until you change them again.
23244 \end_layout
23245
23246 \end_inset
23247
23248
23249 \end_layout
23250
23251 \begin_layout Standard
23252 \begin_inset ERT
23253 status collapsed
23254
23255 \begin_layout Plain Layout
23256
23257
23258 \backslash
23259 setlength{
23260 \backslash
23261 multicolsep}{13pt}
23262 \end_layout
23263
23264 \end_inset
23265
23266
23267 \begin_inset Note Note
23268 status collapsed
23269
23270 \begin_layout Plain Layout
23271 go back to the default
23272 \end_layout
23273
23274 \end_inset
23275
23276
23277 \end_layout
23278
23279 \begin_layout Standard
23280 \begin_inset Newpage newpage
23281 \end_inset
23282
23283
23284 \end_layout
23285
23286 \begin_layout Subsubsection
23287 Column Separation
23288 \end_layout
23289
23290 \begin_layout Standard
23291 The width of the columns is automatically calculated, but you can modify
23292  the space between the columns.
23293  This is done by changing the length 
23294 \series bold
23295
23296 \backslash
23297 columnsep
23298 \series default
23299 .
23300  Its predefined value is 10
23301 \begin_inset space \thinspace{}
23302 \end_inset
23303
23304 pt.
23305  Here is an example where 
23306 \series bold
23307
23308 \backslash
23309 columnsep
23310 \series default
23311  is set to 3
23312 \begin_inset space \thinspace{}
23313 \end_inset
23314
23315 cm:
23316 \end_layout
23317
23318 \begin_layout Standard
23319 \begin_inset ERT
23320 status open
23321
23322 \begin_layout Plain Layout
23323
23324
23325 \backslash
23326 setlength{
23327 \backslash
23328 columnsep}{3cm}
23329 \end_layout
23330
23331 \end_inset
23332
23333
23334 \end_layout
23335
23336 \begin_layout Begin Multiple Columns
23337 2
23338 \end_layout
23339
23340 \begin_layout Standard
23341
23342 \size small
23343 My observations of No.
23344 \begin_inset space \space{}
23345 \end_inset
23346
23347 427 Park Lane did little to clear up the problem in which I was interested.
23348  The house was separated from the street by a low wall and railing, the
23349  whole not more than five feet high.
23350  It was perfectly easy, therefore, for anyone to get into the garden, but
23351  the window was entirely inaccessible, since there was no water pipe or
23352  anything which could help the most active man to climb it.
23353  More puzzled than ever, I retraced my steps to Kensington.
23354  I had not been in my study five minutes when the maid entered to say that
23355  a person desired to see me.
23356  To my astonishment it was none other than my strange old book collector,
23357  his sharp, wizened face peering out from a frame of white hair, and his
23358  precious volumes, a dozen of them at least, wedged under his right arm.
23359 \end_layout
23360
23361 \begin_layout End Multiple Columns
23362
23363 \end_layout
23364
23365 \begin_layout Standard
23366 \begin_inset ERT
23367 status collapsed
23368
23369 \begin_layout Plain Layout
23370
23371
23372 \backslash
23373 setlength{
23374 \backslash
23375 columnsep}{10pt}
23376 \end_layout
23377
23378 \end_inset
23379
23380
23381 \begin_inset Note Note
23382 status collapsed
23383
23384 \begin_layout Plain Layout
23385 go back to the default
23386 \end_layout
23387
23388 \end_inset
23389
23390
23391 \end_layout
23392
23393 \begin_layout Subsubsection
23394 Vertical Lines
23395 \end_layout
23396
23397 \begin_layout Standard
23398 Between the columns a rule with a width of the length 
23399 \series bold
23400
23401 \backslash
23402 columnseprule
23403 \series default
23404  is placed.
23405  If this rule width is set to 0
23406 \begin_inset space \thinspace{}
23407 \end_inset
23408
23409 pt (this is the default), the rule is suppressed.
23410  In the following example the line is 2
23411 \begin_inset space \thinspace{}
23412 \end_inset
23413
23414 pt wide:
23415 \end_layout
23416
23417 \begin_layout Standard
23418 \begin_inset ERT
23419 status open
23420
23421 \begin_layout Plain Layout
23422
23423
23424 \backslash
23425 setlength{
23426 \backslash
23427 columnseprule}{2pt}
23428 \end_layout
23429
23430 \end_inset
23431
23432
23433 \end_layout
23434
23435 \begin_layout Begin Multiple Columns
23436 2
23437 \end_layout
23438
23439 \begin_layout Standard
23440
23441 \size small
23442 \begin_inset Quotes eld
23443 \end_inset
23444
23445 You're surprised to see me, sir,
23446 \begin_inset Quotes erd
23447 \end_inset
23448
23449  said he, in a strange, croaking voice.
23450 \end_layout
23451
23452 \begin_layout Standard
23453
23454 \size small
23455 I acknowledged that I was.
23456 \end_layout
23457
23458 \begin_layout Standard
23459
23460 \size small
23461 \begin_inset Quotes eld
23462 \end_inset
23463
23464 Well, I've a conscience, sir, and when I chanced to see you go into this
23465  house, as I came hobbling after you, I thought to myself, I'll just step
23466  in and see that kind gentleman, and tell him that if I was a bit gruff
23467  in my manner there was not any harm meant, and that I am much obliged to
23468  him for picking up my books.
23469 \begin_inset Quotes erd
23470 \end_inset
23471
23472
23473 \end_layout
23474
23475 \begin_layout Standard
23476
23477 \size small
23478 \begin_inset Quotes eld
23479 \end_inset
23480
23481 You make too much of a trifle,
23482 \begin_inset Quotes erd
23483 \end_inset
23484
23485  said I.
23486  
23487 \begin_inset Quotes eld
23488 \end_inset
23489
23490 May I ask how you knew who I was?
23491 \begin_inset Quotes erd
23492 \end_inset
23493
23494
23495 \end_layout
23496
23497 \begin_layout Standard
23498
23499 \size small
23500 \begin_inset Quotes eld
23501 \end_inset
23502
23503 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23504  you'll find my little bookshop at the corner of Church Street, and very
23505  happy to see you, I am sure.
23506  Maybe you collect yourself, sir.
23507  Here's 
23508 \noun on
23509 British
23510 \begin_inset space ~
23511 \end_inset
23512
23513 Birds
23514 \noun default
23515 , and 
23516 \noun on
23517 Catullus
23518 \noun default
23519 , and 
23520 \noun on
23521 The Holy War
23522 \noun default
23523 --a bargain, every one of them.
23524  With five volumes you could just fill that gap on that second shelf.
23525  It looks untidy, does it not, sir?
23526 \begin_inset Quotes erd
23527 \end_inset
23528
23529
23530 \end_layout
23531
23532 \begin_layout End Multiple Columns
23533
23534 \end_layout
23535
23536 \begin_layout Standard
23537 \begin_inset ERT
23538 status collapsed
23539
23540 \begin_layout Plain Layout
23541
23542
23543 \backslash
23544 setlength{
23545 \backslash
23546 columnseprule}{0pt}
23547 \end_layout
23548
23549 \end_inset
23550
23551
23552 \begin_inset Note Note
23553 status collapsed
23554
23555 \begin_layout Plain Layout
23556 go back to the default
23557 \end_layout
23558
23559 \end_inset
23560
23561
23562 \end_layout
23563
23564 \begin_layout Standard
23565 \begin_inset Newpage newpage
23566 \end_inset
23567
23568
23569 \end_layout
23570
23571 \begin_layout Section
23572 Non-standard Paragraph Shapes
23573 \end_layout
23574
23575 \begin_layout Standard
23576 \begin_inset ERT
23577 status collapsed
23578
23579 \begin_layout Plain Layout
23580
23581
23582 \backslash
23583 begin{sloppypar}
23584 \end_layout
23585
23586 \end_inset
23587
23588
23589 \end_layout
23590
23591 \begin_layout Standard
23592 \begin_inset ERT
23593 status collapsed
23594
23595 \begin_layout Plain Layout
23596
23597
23598 \backslash
23599 newdimen
23600 \backslash
23601 varunit 
23602 \end_layout
23603
23604 \begin_layout Plain Layout
23605
23606
23607 \backslash
23608 setlength{
23609 \backslash
23610 varunit}{4.5in}
23611 \end_layout
23612
23613 \end_inset
23614
23615
23616 \end_layout
23617
23618 \begin_layout Standard
23619 \noindent
23620 \begin_inset ERT
23621 status collapsed
23622
23623 \begin_layout Plain Layout
23624
23625
23626 \backslash
23627 parshape 19 0.45
23628 \backslash
23629 varunit 0.332
23630 \backslash
23631 varunit
23632 \end_layout
23633
23634 \begin_layout Plain Layout
23635
23636 0.40
23637 \backslash
23638 varunit 0.300
23639 \backslash
23640 varunit
23641 \end_layout
23642
23643 \begin_layout Plain Layout
23644
23645 0.35
23646 \backslash
23647 varunit 0.293
23648 \backslash
23649 varunit
23650 \end_layout
23651
23652 \begin_layout Plain Layout
23653
23654 0.30
23655 \backslash
23656 varunit 0.300
23657 \backslash
23658 varunit
23659 \end_layout
23660
23661 \begin_layout Plain Layout
23662
23663 0.25
23664 \backslash
23665 varunit 0.317
23666 \backslash
23667 varunit
23668 \end_layout
23669
23670 \begin_layout Plain Layout
23671
23672 0.20
23673 \backslash
23674 varunit 0.342
23675 \backslash
23676 varunit
23677 \end_layout
23678
23679 \begin_layout Plain Layout
23680
23681 0.15
23682 \backslash
23683 varunit 0.373
23684 \backslash
23685 varunit
23686 \end_layout
23687
23688 \begin_layout Plain Layout
23689
23690 0.10
23691 \backslash
23692 varunit 0.410
23693 \backslash
23694 varunit
23695 \end_layout
23696
23697 \begin_layout Plain Layout
23698
23699 0.05
23700 \backslash
23701 varunit 0.453
23702 \backslash
23703 varunit
23704 \end_layout
23705
23706 \begin_layout Plain Layout
23707
23708 0.00
23709 \backslash
23710 varunit 0.500
23711 \backslash
23712 varunit
23713 \end_layout
23714
23715 \begin_layout Plain Layout
23716
23717 0.05
23718 \backslash
23719 varunit 0.453
23720 \backslash
23721 varunit
23722 \end_layout
23723
23724 \begin_layout Plain Layout
23725
23726 0.10
23727 \backslash
23728 varunit 0.410
23729 \backslash
23730 varunit
23731 \end_layout
23732
23733 \begin_layout Plain Layout
23734
23735 0.15
23736 \backslash
23737 varunit 0.373
23738 \backslash
23739 varunit
23740 \end_layout
23741
23742 \begin_layout Plain Layout
23743
23744 0.20
23745 \backslash
23746 varunit 0.342
23747 \backslash
23748 varunit
23749 \end_layout
23750
23751 \begin_layout Plain Layout
23752
23753 0.25
23754 \backslash
23755 varunit 0.317
23756 \backslash
23757 varunit
23758 \end_layout
23759
23760 \begin_layout Plain Layout
23761
23762 0.30
23763 \backslash
23764 varunit 0.300
23765 \backslash
23766 varunit
23767 \end_layout
23768
23769 \begin_layout Plain Layout
23770
23771 0.35
23772 \backslash
23773 varunit 0.293
23774 \backslash
23775 varunit
23776 \end_layout
23777
23778 \begin_layout Plain Layout
23779
23780 0.40
23781 \backslash
23782 varunit 0.300
23783 \backslash
23784 varunit
23785 \end_layout
23786
23787 \begin_layout Plain Layout
23788
23789 0.45
23790 \backslash
23791 varunit 0.332
23792 \backslash
23793 varunit
23794 \end_layout
23795
23796 \begin_layout Plain Layout
23797
23798 \end_layout
23799
23800 \end_inset
23801
23802 There are times when the tyranny of rectangular paragraphs must be overthrown.
23803  In such situations, a call to the delightful plain TeX command 
23804 \family typewriter
23805
23806 \backslash
23807 parshape
23808 \family default
23809  is called for.
23810  As you can see, completely arbitrary shapes can be laid out with a suitable
23811  set of line length definitions.
23812  While this parshape may look a bit silly and useless, one could conceive
23813  of situations such as finely tuned dropped capitals, word wrapping around
23814  non-rectangular graphics, etc.
23815  which will benefit from such handcrafting.
23816 \end_layout
23817
23818 \begin_layout Standard
23819 \begin_inset VSpace bigskip
23820 \end_inset
23821
23822
23823 \end_layout
23824
23825 \begin_layout Standard
23826 The syntax is 
23827 \family typewriter
23828
23829 \backslash
23830 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23831  #nindent #nlength
23832 \family default
23833 , where 
23834 \family typewriter
23835 numlines
23836 \family default
23837  is the number of lines of text which define the paragraph.
23838  If there turn out to be fewer lines, the shape is truncated; if there are
23839  more, the excess lines have the same dimensions as the last line of the
23840  definition.
23841  The 
23842 \family typewriter
23843 #nindent
23844 \family default
23845  and 
23846 \family typewriter
23847 #nlength
23848 \family default
23849  entries specify the indentation of the line from the left margin, and the
23850  length of the line as measured from that point.
23851  The shape applies only to the current paragraph; everything is reset to
23852  normal for the next paragraph.
23853 \end_layout
23854
23855 \begin_layout Standard
23856 \begin_inset ERT
23857 status collapsed
23858
23859 \begin_layout Plain Layout
23860
23861
23862 \backslash
23863 end{sloppypar}
23864 \end_layout
23865
23866 \end_inset
23867
23868
23869 \end_layout
23870
23871 \begin_layout Bibliography
23872 \begin_inset CommandInset bibitem
23873 LatexCommand bibitem
23874 key "multicol"
23875
23876 \end_inset
23877
23878 Documentation of the LaTeX-package 
23879 \begin_inset CommandInset href
23880 LatexCommand href
23881 name "multicol"
23882 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23883
23884 \end_inset
23885
23886
23887 \begin_inset Index idx
23888 status collapsed
23889
23890 \begin_layout Plain Layout
23891 LaTeX-packages ! multicol
23892 \end_layout
23893
23894 \end_inset
23895
23896
23897 \end_layout
23898
23899 \end_body
23900 \end_document