]> git.lyx.org Git - features.git/blob - lib/doc/Additional.lyx
Typos and the like in the Additional Features manual, fixed thanks
[features.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 true
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 g.
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, e.
2916 \begin_inset space \thinspace{}
2917 \end_inset
2918
2919 g.
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 g.
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 g.
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 g.
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 , i.
14788 \begin_inset space \thinspace{}
14789 \end_inset
14790
14791 g.
14792 \begin_inset space \space{}
14793 \end_inset
14794
14795 without pagina).
14796  If you want an empty title page, type 
14797 \family typewriter
14798
14799 \backslash
14800 aliaspagestyle{title}{empty}
14801 \family default
14802  in the preamble.
14803 \end_layout
14804
14805 \begin_layout Description
14806 Article: With the class option 
14807 \emph on
14808 article
14809 \emph default
14810  (to be inserted in 
14811 \family sans
14812 Layout\SpecialChar \menuseparator
14813 Document\SpecialChar \menuseparator
14814 Extra
14815 \begin_inset space ~
14816 \end_inset
14817
14818 Options
14819 \family default
14820 ), you can emulate article style.
14821  That is, counters (footnotes, figures, tables etc.) will not be reset on
14822  new chapters, chapters don't start a new page (but are—in contrary to 
14823 \begin_inset Quotes eld
14824 \end_inset
14825
14826 real
14827 \begin_inset Quotes erd
14828 \end_inset
14829
14830  article classes—still allowed), parts, though, use their own page, as in
14831  book.
14832 \end_layout
14833
14834 \begin_layout Description
14835 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14836  font commands, which have been used in the old LaTeX version 2.09 (e.
14837 \begin_inset space \thinspace{}
14838 \end_inset
14839
14840 g.
14841 \begin_inset space \space{}
14842 \end_inset
14843
14844
14845 \family typewriter
14846
14847 \backslash
14848 rm
14849 \family default
14850
14851 \family typewriter
14852
14853 \backslash
14854 it
14855 \family default
14856 ).
14857  It produces an error and stops LaTeX whenever such a command appears.
14858  The class option 
14859 \emph on
14860 oldfontcommands
14861 \emph default
14862  reallows the commands and spits out warnings instead (which does at least
14863  not stop LaTeX).
14864  Since a lot of packages and particularly BibTeX style files are still using
14865  those commands, we have decided to use this option by default.
14866 \end_layout
14867
14868 \begin_layout Subsection
14869 Extra features
14870 \end_layout
14871
14872 \begin_layout Standard
14873 We will only describe the features supported by LyX (which is not much currently
14874 ).
14875  Please consult the Memoir manual
14876 \begin_inset Foot
14877 status collapsed
14878
14879 \begin_layout Plain Layout
14880 Cf.
14881 \begin_inset ERT
14882 status collapsed
14883
14884 \begin_layout Plain Layout
14885
14886
14887 \backslash
14888  
14889 \end_layout
14890
14891 \end_inset
14892
14893
14894 \begin_inset Flex URL
14895 status collapsed
14896
14897 \begin_layout Plain Layout
14898
14899 CTAN:/macros/latex/memoir/memman.pdf
14900 \end_layout
14901
14902 \end_inset
14903
14904 .
14905 \end_layout
14906
14907 \end_inset
14908
14909  for details.
14910 \end_layout
14911
14912 \begin_layout Description
14913 Abstract: You may wonder why an abstract is an extra feature.
14914  Well, it is in book class.
14915  Usually books don't have abstracts.
14916  Memoir, however, has.
14917  You can use it wherever and how often you like.
14918 \end_layout
14919
14920 \begin_layout Description
14921 Chapterprecis: You may know this older typesetting style: The contents of
14922  a chapter are summarized below the title and also in the table of contents
14923  (e.
14924 \begin_inset space \thinspace{}
14925 \end_inset
14926
14927 g.
14928 \begin_inset space \space{}
14929 \end_inset
14930
14931
14932 \emph on
14933 Our hero arrives in Troia; he loses some friends; he finds others
14934 \emph default
14935 ).
14936  Chapterprecis does exactly this.
14937  It is therefore only sensible below a chapter.
14938 \end_layout
14939
14940 \begin_layout Description
14941 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14942  The epigraph environment provides an elegant way of typesetting such a
14943  motto.
14944  The motto itself (text) and its author (source) are divided by a short
14945  line.
14946  Unfortunately, we have to fool LyX a bit here again, since the environment
14947  needs two arguments (text and source).
14948  In this case, we have to use curly brackets (in TeX mode) between the two
14949  arguments: 
14950 \emph on
14951 <smart slogan>
14952 \emph default
14953  
14954 \family typewriter
14955 }{
14956 \family default
14957  
14958 \emph on
14959 <author of the slogan>.
14960 \end_layout
14961
14962 \begin_layout Description
14963 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14964  complex figurative poems).
14965  LyX can only support a few of them.
14966  One is poemtitle, which is a centered title for poems, which will also
14967  be added to the table of contents (verse is the standard environment for
14968  poems.
14969  Memoir has some enhanced versions of verse, but you need to use TeX code,
14970  because they have to be nested inside regular verse environments, which
14971  is not possible with LyX).
14972 \end_layout
14973
14974 \begin_layout Description
14975 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14976 \end_layout
14977
14978 \begin_layout Section
14979 Article (mwart), book (mwbk) and report (mwrep)
14980 \begin_inset Argument
14981 status collapsed
14982
14983 \begin_layout Plain Layout
14984 The 
14985 \family typewriter
14986 mw
14987 \family default
14988  Classes
14989 \end_layout
14990
14991 \end_inset
14992
14993
14994 \end_layout
14995
14996 \begin_layout Standard
14997 by 
14998 \noun on
14999 Tomasz Luczak
15000 \end_layout
15001
15002 \begin_layout Standard
15003 The LyX document classes 
15004 \emph on
15005 article (mwart)
15006 \emph default
15007
15008 \emph on
15009 report (mwrep)
15010 \emph default
15011  and 
15012 \emph on
15013 book
15014 \emph default
15015  
15016 \emph on
15017 (mwbk)
15018 \emph default
15019  correspond to the LaTeX document classes 
15020 \family typewriter
15021 mwart.cls
15022 \family default
15023
15024 \family typewriter
15025 mwrep.cls
15026 \family default
15027  and 
15028 \family typewriter
15029 mwbk.cls
15030 \family default
15031 , resp.
15032  They are replacements for the standard document classes 
15033 \family typewriter
15034 article.cls
15035 \family default
15036
15037 \family typewriter
15038 report.cls
15039 \family default
15040  and 
15041 \family typewriter
15042 book.cls
15043 \family default
15044 , resp., and fit better to Polish typography conventions in a number of points.
15045  
15046 \end_layout
15047
15048 \begin_layout Standard
15049 Basic differences:
15050 \end_layout
15051
15052 \begin_layout Itemize
15053 Unnumbered titles (with star, e.
15054 \begin_inset space \thinspace{}
15055 \end_inset
15056
15057 g.
15058 \begin_inset space \space{}
15059 \end_inset
15060
15061
15062 \family sans
15063 Section*
15064 \family default
15065 ) are added into table of contents,
15066 \end_layout
15067
15068 \begin_layout Itemize
15069 Additional page styles:
15070 \end_layout
15071
15072 \begin_deeper
15073 \begin_layout Description
15074 uheadings header with separated lines,
15075 \end_layout
15076
15077 \begin_layout Description
15078 myheadings custom header, contents headers via commands: 
15079 \family typewriter
15080
15081 \backslash
15082 markright
15083 \family default
15084  and 
15085 \family typewriter
15086
15087 \backslash
15088 markboth
15089 \family default
15090 ,
15091 \end_layout
15092
15093 \begin_layout Description
15094 myuheadings custom header with separated lines,
15095 \end_layout
15096
15097 \begin_layout Description
15098 outer page number is placed on outer side of page
15099 \end_layout
15100
15101 \end_deeper
15102 \begin_layout Itemize
15103 Options 
15104 \end_layout
15105
15106 \begin_deeper
15107 \begin_layout Description
15108 rmheadings serif titles — default,
15109 \end_layout
15110
15111 \begin_layout Description
15112 sfheadings sansserif titles,
15113 \end_layout
15114
15115 \begin_layout Description
15116 authortitle on title page first placed is author next title — default,
15117 \end_layout
15118
15119 \begin_layout Description
15120 titleauthor on title page first placed is title next author,
15121 \end_layout
15122
15123 \begin_layout Description
15124 withmarginpar reserve place on page for margins.
15125 \end_layout
15126
15127 \end_deeper
15128 \begin_layout Section
15129 Paper
15130 \end_layout
15131
15132 \begin_layout Standard
15133 The document class 
15134 \family sans
15135 paper
15136 \family default
15137  provides an alternative to the standard 
15138 \family sans
15139 article
15140 \family default
15141  class.
15142  It provides similar functionality, but you might prefer this layout with
15143  sans serif sections, headings, and more.
15144 \end_layout
15145
15146 \begin_layout Section
15147 RevTeX4
15148 \end_layout
15149
15150 \begin_layout Standard
15151 by 
15152 \noun on
15153 Amir Karger
15154 \end_layout
15155
15156 \begin_layout Standard
15157 \begin_inset VSpace bigskip
15158 \end_inset
15159
15160
15161 \end_layout
15162
15163 \begin_layout Standard
15164 \noindent
15165 The 
15166 \family sans
15167 Revtex
15168 \begin_inset space ~
15169 \end_inset
15170
15171 4
15172 \family default
15173  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15174 \begin_inset Formula $\beta$
15175 \end_inset
15176
15177  release of May, 1999) class.
15178 \end_layout
15179
15180 \begin_layout Standard
15181 LyX has a 
15182 \family sans
15183 Revtex
15184 \family default
15185  textclass, which works with RevTeX 3.1.
15186  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15187  That means that it doesn't interact very well with LyX, which requires
15188  LaTeX2e, although it has been kludged to work.
15189  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15190  LyX with the 
15191 \family sans
15192 RevTeX
15193 \begin_inset space ~
15194 \end_inset
15195
15196 4
15197 \family default
15198  textclass should also be pretty easy to use.
15199 \end_layout
15200
15201 \begin_layout Standard
15202 These documents are supposed to be used in 
15203 \emph on
15204 addition
15205 \emph default
15206  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15207  macros, and assume you'll know what to put in the preamble if necessary.
15208 \end_layout
15209
15210 \begin_layout Subsection
15211 Installation
15212 \end_layout
15213
15214 \begin_layout Standard
15215 All you need to do is install RevTeX 4, as described in the package's README
15216  file.
15217  The package can be found at The RevTeX 4 Web Site 
15218 \begin_inset Flex URL
15219 status collapsed
15220
15221 \begin_layout Plain Layout
15222
15223 http://publish.aps.org/revtex4/
15224 \end_layout
15225
15226 \end_inset
15227
15228 .
15229  Install it somewhere that LaTeX can see it.
15230  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15231  (i.
15232 \begin_inset space \thinspace{}
15233 \end_inset
15234
15235 g.
15236 \begin_inset space \space{}
15237 \end_inset
15238
15239 not the directory where you installed the class file.) Then, if you reconfigure
15240  LyX, it will find the class file and let you use the RevTeX4 textclass.
15241 \end_layout
15242
15243 \begin_layout Standard
15244 Probably the easiest way to get started is either to import a RevTeX 4 document
15245  using 
15246 \family typewriter
15247 tex2lyx
15248 \family default
15249 , or to use the 
15250 \family sans
15251 Revtex
15252 \begin_inset space ~
15253 \end_inset
15254
15255 4
15256 \family default
15257  template, found in the templates directory.
15258 \end_layout
15259
15260 \begin_layout Subsection
15261 Preamble Matter
15262 \end_layout
15263
15264 \begin_layout Standard
15265 Optional arguments to 
15266 \family typewriter
15267
15268 \backslash
15269 documentclass
15270 \family default
15271 , like 
15272 \begin_inset Quotes eld
15273 \end_inset
15274
15275 preprint
15276 \begin_inset Quotes erd
15277 \end_inset
15278
15279  and 
15280 \begin_inset Quotes eld
15281 \end_inset
15282
15283 aps
15284 \begin_inset Quotes erd
15285 \end_inset
15286
15287 , go in the 
15288 \family sans
15289 E
15290 \bar under
15291 x
15292 \bar default
15293 tra
15294 \begin_inset space ~
15295 \end_inset
15296
15297 Options
15298 \family default
15299  field in the 
15300 \family sans
15301 Document
15302 \begin_inset space ~
15303 \end_inset
15304
15305 Layout
15306 \family default
15307  dialog, as usual.
15308  Remember that in RevTeX, at least one optional argument is required! 
15309 \end_layout
15310
15311 \begin_layout Standard
15312 Other preamble matter, like 
15313 \family typewriter
15314
15315 \backslash
15316 draft
15317 \family default
15318  etc.
15319 \begin_inset space ~
15320 \end_inset
15321
15322 goes in the 
15323 \family sans
15324 LaTeX
15325 \begin_inset space ~
15326 \end_inset
15327
15328 Preamble
15329 \family default
15330  dialog, also as usual.
15331 \end_layout
15332
15333 \begin_layout Subsection
15334 Layouts
15335 \end_layout
15336
15337 \begin_layout Standard
15338 The layouts basically correspond to the commands in RevTeX4.0.
15339  For example, the Email layout corresponds to 
15340 \family typewriter
15341
15342 \backslash
15343 email{}
15344 \family default
15345 .
15346  Note that (at least as of RevTeX 4.0 Beta), the 
15347 \family sans
15348 Address
15349 \family default
15350  and 
15351 \family sans
15352 Affiliation
15353 \family default
15354  layouts are exactly equivalent, so you shouldn't need to use both.
15355 \begin_inset Foot
15356 status collapsed
15357
15358 \begin_layout Plain Layout
15359 In case you're curious, both were included so that 
15360 \family typewriter
15361 tex2lyx
15362 \family default
15363  would be able to translate both 
15364 \family typewriter
15365
15366 \backslash
15367 address
15368 \family default
15369  and 
15370 \family typewriter
15371
15372 \backslash
15373 affiliation
15374 \family default
15375 .
15376 \end_layout
15377
15378 \end_inset
15379
15380
15381 \end_layout
15382
15383 \begin_layout Subsection
15384 Important Notes
15385 \end_layout
15386
15387 \begin_layout Standard
15388 There are a couple of important unique aspects of RevTeX 4 which might cause
15389  bugs that will be even more confusing in LyX.
15390 \end_layout
15391
15392 \begin_layout Standard
15393 In RevTeX, the 
15394 \family typewriter
15395
15396 \backslash
15397 thanks
15398 \family default
15399  command goes 
15400 \emph on
15401 outside
15402 \emph default
15403  the 
15404 \family typewriter
15405
15406 \backslash
15407 author
15408 \family default
15409  command.
15410  The LyX equivalent is that there is a separate Thanks layout.
15411  Do 
15412 \emph on
15413 not
15414 \emph default
15415  write footnotes in the 
15416 \family sans
15417 Author
15418 \family default
15419  layout, or weird things may happen.
15420  See the RevTeX 4 documentation for more details.
15421 \end_layout
15422
15423 \begin_layout Standard
15424 Also, the 
15425 \family sans
15426 Author
15427 \begin_inset space ~
15428 \end_inset
15429
15430 Email
15431 \family default
15432
15433 \family sans
15434 Author
15435 \begin_inset space ~
15436 \end_inset
15437
15438 URL
15439 \family default
15440 , and 
15441 \family sans
15442 Thanks
15443 \family default
15444  layouts must be placed 
15445 \emph on
15446 in between
15447 \emph default
15448  the 
15449 \family sans
15450 Author
15451 \family default
15452  layout and the corresponding 
15453 \family sans
15454 Address
15455 \family default
15456  (or equivalent 
15457 \family sans
15458 Affiliation
15459 \family default
15460 ) layout.
15461  If you put the 
15462 \family sans
15463 Thanks
15464 \family default
15465  after the 
15466 \family sans
15467 Address
15468 \family default
15469 , the LaTeX won't compile.
15470 \end_layout
15471
15472 \begin_layout Subsection
15473 Drawbacks
15474 \end_layout
15475
15476 \begin_layout Standard
15477 The main problem with this layout is that you can't use the optional arguments
15478  to layouts like Email and Title.
15479  (The problem is not unique to this layout; you can't use optional arguments
15480  to the Section layouts either.) This means that after you export that file
15481  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15482  need to edit the LaTeX file with a text editor to add the optional arguments
15483  to set, e.
15484 \begin_inset space \thinspace{}
15485 \end_inset
15486
15487 g.
15488 \begin_inset space \space{}
15489 \end_inset
15490
15491 the running title for the page headers.
15492  Lacking these layouts makes the 
15493 \family typewriter
15494
15495 \backslash
15496 altaffiliation
15497 \family default
15498  (and the equivalent 
15499 \family typewriter
15500
15501 \backslash
15502 altaddress
15503 \family default
15504 ) useless, so the corresponding layouts don't exist, and will have to be
15505  added by hand.
15506 \begin_inset Foot
15507 status collapsed
15508
15509 \begin_layout Plain Layout
15510
15511 \emph on
15512 Note from JMarc:
15513 \emph default
15514  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15515  has not been updated yet to take advantage of it.
15516 \end_layout
15517
15518 \end_inset
15519
15520  
15521 \end_layout
15522
15523 \begin_layout Section
15524 Springer Journals (
15525 \family sans
15526 svjour
15527 \family default
15528 )
15529 \end_layout
15530
15531 \begin_layout Standard
15532 by 
15533 \noun on
15534 Martin Vermeer
15535 \end_layout
15536
15537 \begin_layout Subsection
15538 Description
15539 \end_layout
15540
15541 \begin_layout Standard
15542 These are the layout files for some of the journal formats used by Springer
15543  Verlag and listed on 
15544 \begin_inset Flex URL
15545 status collapsed
15546
15547 \begin_layout Plain Layout
15548
15549 http://www.springer.de/author/tex/help-journals.html
15550 \end_layout
15551
15552 \end_inset
15553
15554 , where you should also go to fetch the class files (yes, these are LaTeX2e
15555  now!).
15556  It is a modular system: the things common to all journals are implemented
15557  in 
15558 \family typewriter
15559 svjour.inc
15560 \family default
15561 , which journal-specific layout files (such as, e.
15562 \begin_inset space \thinspace{}
15563 \end_inset
15564
15565 g.
15566 \begin_inset space \space{}
15567 \end_inset
15568
15569
15570 \family typewriter
15571 svjog.layout
15572 \family default
15573  for Journal of Geodesy) can include.
15574 \end_layout
15575
15576 \begin_layout Standard
15577 This means that implementing support for any other Springer journal on this
15578  list is as simple as writing your own 
15579 \family typewriter
15580 sv
15581 \family default
15582 <myjournal>
15583 \family typewriter
15584 .layout
15585 \family default
15586  file following the outline given in 
15587 \family typewriter
15588 svjog.layout
15589 \family default
15590 .
15591  
15592 \end_layout
15593
15594 \begin_layout Standard
15595 It is reasonably well tested only for the Journal of Geodesy.
15596  
15597 \family typewriter
15598 svjour
15599 \family default
15600  and 
15601 \family typewriter
15602 svjog
15603 \family default
15604  come with the standard LyX distribution.
15605  Install the relevant class file (downloaded from Springer) in a proper
15606  directory, reconfigure LaTeX (in the teTeX case by running 
15607 \family typewriter
15608 texhash
15609 \family default
15610 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15611  and it should work.
15612 \end_layout
15613
15614 \begin_layout Subsection
15615 New styles
15616 \end_layout
15617
15618 \begin_layout Standard
15619 A large number of theorem-like styles — 
15620 \family sans
15621 Claim, Conjecture,
15622 \family default
15623  
15624 \family sans
15625 \SpecialChar \ldots{}
15626 Theorem
15627 \family default
15628 .
15629 \end_layout
15630
15631 \begin_layout Standard
15632
15633 \family sans
15634 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15635  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15636 \family default
15637 .
15638  See the Springer class file documentation for details.
15639 \end_layout
15640
15641 \begin_layout Subsection
15642 Supported journals
15643 \end_layout
15644
15645 \begin_layout Itemize
15646
15647 \emph on
15648 Journal of Geodesy
15649 \emph default
15650
15651 \family typewriter
15652 svjog.layout
15653 \family default
15654  — Martin Vermeer
15655 \end_layout
15656
15657 \begin_layout Itemize
15658
15659 \emph on
15660 Probability Theory and Related Fields
15661 \emph default
15662
15663 \family typewriter
15664 svprobth.layout
15665 \family default
15666  — Jean-Marc Lasgouttes
15667 \end_layout
15668
15669 \begin_layout Standard
15670 Add your own, it isn't so hard!
15671 \end_layout
15672
15673 \begin_layout Subsection
15674 Credits
15675 \end_layout
15676
15677 \begin_layout Standard
15678 These files are partly based on the older 
15679 \family typewriter
15680 ejour2.layout
15681 \family default
15682 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15683  file from Springer.
15684  All this, and the 
15685 \family typewriter
15686 ejour2
15687 \family default
15688  layout, are now defunct.
15689  Jean-Marc Lasgouttes helped out big in making me find my way around the
15690  LyX layout file mechanism.
15691 \end_layout
15692
15693 \begin_layout Subsection
15694 Bugs
15695 \end_layout
15696
15697 \begin_layout Standard
15698 Probably.
15699  But probably less than in the old hacked-LaTeX 
15700 \family typewriter
15701 ejour2
15702 \family default
15703 .
15704 \end_layout
15705
15706 \begin_layout Standard
15707 Limitations e.
15708 \begin_inset space \thinspace{}
15709 \end_inset
15710
15711 g.: does not display the number for theorem-like layouts, just #.
15712 \end_layout
15713
15714 \begin_layout Section
15715 Slides [aka 
15716 \noun on
15717 SliTeX
15718 \noun default
15719 ]
15720 \begin_inset CommandInset label
15721 LatexCommand label
15722 name "sec:slitex"
15723
15724 \end_inset
15725
15726
15727 \end_layout
15728
15729 \begin_layout Standard
15730 by 
15731 \noun on
15732 John Weiss
15733 \noun default
15734  
15735 \end_layout
15736
15737 \begin_layout Subsection
15738 Introduction
15739 \end_layout
15740
15741 \begin_layout Standard
15742 This section describes how to use LyX to make slides for overhead projectors.
15743  There are two document classes that can do this: the default slides class
15744  and the 
15745 \family sans
15746 FoilTeX
15747 \family default
15748  slides class.
15749  This section documents the former.
15750 \end_layout
15751
15752 \begin_layout Standard
15753 I'm going to say this again, nice and clear, so that there's no misunderstanding
15754 :
15755 \end_layout
15756
15757 \begin_layout Standard
15758 \begin_inset VSpace bigskip
15759 \end_inset
15760
15761
15762 \end_layout
15763
15764 \begin_layout Standard
15765 \align center
15766
15767 \size large
15768 This section documents the class 
15769 \begin_inset Quotes eld
15770 \end_inset
15771
15772
15773 \family sans
15774 slides (default)
15775 \family default
15776
15777 \begin_inset Quotes erd
15778 \end_inset
15779
15780  
15781 \emph on
15782 only.
15783 \end_layout
15784
15785 \begin_layout Standard
15786 \begin_inset VSpace bigskip
15787 \end_inset
15788
15789
15790 \end_layout
15791
15792 \begin_layout Standard
15793 If you're looking for the documentation for 
15794 \begin_inset Quotes eld
15795 \end_inset
15796
15797
15798 \family sans
15799 slides (FoilTeX)
15800 \family default
15801
15802 \begin_inset Quotes erd
15803 \end_inset
15804
15805 , check out section
15806 \begin_inset space ~
15807 \end_inset
15808
15809
15810 \begin_inset CommandInset ref
15811 LatexCommand ref
15812 reference "sec:foiltex"
15813
15814 \end_inset
15815
15816 .
15817  The 
15818 \family sans
15819 foils
15820 \family default
15821  class [
15822 \begin_inset Quotes eld
15823 \end_inset
15824
15825
15826 \family sans
15827 slides (FoilTeX)
15828 \family default
15829
15830 \begin_inset Quotes erd
15831 \end_inset
15832
15833 ] is actually somewhat better than the default 
15834 \family sans
15835 slides
15836 \family default
15837  class,
15838 \begin_inset Foot
15839 status collapsed
15840
15841 \begin_layout Plain Layout
15842 \SpecialChar \ldots{}
15843 or so I've been told repeatedly by its advocates.
15844  Having never used it, I have no idea if this claim is true or not.
15845 \end_layout
15846
15847 \end_inset
15848
15849  which this section documents.
15850 \end_layout
15851
15852 \begin_layout Standard
15853 This class is the LaTeX2e improvement of the old 
15854 \noun on
15855 SliTeX
15856 \noun default
15857  package.
15858  Every LaTeX2e distribution includes this class [which I'll just refer to
15859  as 
15860 \begin_inset Quotes eld
15861 \end_inset
15862
15863
15864 \family sans
15865 slides
15866 \family default
15867
15868 \begin_inset Quotes erd
15869 \end_inset
15870
15871  from now on], so you're bound to have it.
15872  As I noted earlier, there are other classes, such as 
15873 \family sans
15874 foils
15875 \family default
15876 , which also produce slides for overhead projectors and do a better job
15877  at it.
15878  However, there are some things which 
15879 \family sans
15880 slides
15881 \family default
15882  can do which the others can't, such as generate overlays.
15883  Read on to learn more!
15884 \end_layout
15885
15886 \begin_layout Subsection
15887 Getting Started
15888 \begin_inset CommandInset label
15889 LatexCommand label
15890 name "sec:slidesetup"
15891
15892 \end_inset
15893
15894
15895 \end_layout
15896
15897 \begin_layout Standard
15898 Obviously, to use this document class, you need to select 
15899 \begin_inset Quotes eld
15900 \end_inset
15901
15902
15903 \family sans
15904 slides (default)
15905 \family default
15906
15907 \begin_inset Quotes erd
15908 \end_inset
15909
15910  from the class list in the 
15911 \family sans
15912 Document\SpecialChar \menuseparator
15913 Settings
15914 \family default
15915  dialog.
15916  There are some other special things you should know about this class:
15917 \end_layout
15918
15919 \begin_layout Itemize
15920 Don't bother changing the options 
15921 \family sans
15922 Sides and Columns
15923 \family default
15924 .
15925  They're not supported by the 
15926 \family sans
15927 slides
15928 \family default
15929  class, anyways.
15930 \end_layout
15931
15932 \begin_layout Itemize
15933 The option 
15934 \family sans
15935 Page
15936 \begin_inset space ~
15937 \end_inset
15938
15939 style
15940 \family default
15941  behaves a bit differently for this class.
15942  The possible choices and what they do are as follows:
15943 \end_layout
15944
15945 \begin_deeper
15946 \begin_layout Description
15947
15948 \family sans
15949 plain
15950 \family default
15951  The final output contains page numbers in the lower right corner.
15952 \end_layout
15953
15954 \begin_layout Description
15955
15956 \family sans
15957 headings
15958 \family default
15959  Like 
15960 \family sans
15961 plain
15962 \family default
15963 , but also prints out any time markers you've put in.
15964  This is the default.
15965 \end_layout
15966
15967 \begin_layout Description
15968
15969 \family sans
15970 empty
15971 \family default
15972  The final output contains no page numbers, time markers, or alignment markers.
15973 \end_layout
15974
15975 \end_deeper
15976 \begin_layout Itemize
15977 The 
15978 \family sans
15979 slides
15980 \family default
15981  class has an extra option: 
15982 \family typewriter
15983 clock
15984 \family default
15985 .
15986  To use it, put 
15987 \begin_inset Quotes eld
15988 \end_inset
15989
15990
15991 \family typewriter
15992 clock
15993 \family default
15994
15995 \begin_inset Quotes erd
15996 \end_inset
15997
15998  in the extra class options.
15999 \end_layout
16000
16001 \begin_deeper
16002 \begin_layout Standard
16003 Using this options allows you to add time markers to 
16004 \family sans
16005 Note
16006 \family default
16007 s.
16008  See section
16009 \begin_inset space ~
16010 \end_inset
16011
16012
16013 \begin_inset CommandInset ref
16014 LatexCommand ref
16015 reference "sec:slideNote"
16016
16017 \end_inset
16018
16019  for more details.
16020 \end_layout
16021
16022 \end_deeper
16023 \begin_layout Standard
16024 You can also use the template file 
16025 \begin_inset Quotes eld
16026 \end_inset
16027
16028
16029 \family typewriter
16030 slides.lyx
16031 \family default
16032
16033 \begin_inset Quotes erd
16034 \end_inset
16035
16036  to automatically set up a document to use the 
16037 \family sans
16038 slides
16039 \family default
16040  class [using 
16041 \family sans
16042 File\SpecialChar \menuseparator
16043 New
16044 \begin_inset space ~
16045 \end_inset
16046
16047 from
16048 \begin_inset space ~
16049 \end_inset
16050
16051 Template
16052 \family default
16053  to open your new document].
16054  The template file also contains some examples of the special paragraph
16055  environments used by this class.
16056  I'll describe those next.
16057 \end_layout
16058
16059 \begin_layout Subsection
16060 Paragraph Environments
16061 \end_layout
16062
16063 \begin_layout Subsubsection
16064 Supported Environments
16065 \end_layout
16066
16067 \begin_layout Standard
16068 The first thing you'll notice when you start up a new 
16069 \family sans
16070 slides
16071 \family default
16072  document is the font size and type: it's the equivalent of the size 
16073 \begin_inset Quotes eld
16074 \end_inset
16075
16076
16077 \family sans
16078 Largest
16079 \family default
16080
16081 \begin_inset Quotes erd
16082 \end_inset
16083
16084  in the 
16085 \family sans
16086 Sans
16087 \begin_inset space ~
16088 \end_inset
16089
16090 Serif
16091 \family default
16092  font.
16093  This is also what's used in the output.
16094  Think of this as a 
16095 \begin_inset Quotes eld
16096 \end_inset
16097
16098 visual cue
16099 \begin_inset Quotes erd
16100 \end_inset
16101
16102  to remind you that this is a slide.
16103  Your final slides will use a larger font; ergo, you'll have less space.
16104  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16105 \end_layout
16106
16107 \begin_layout Standard
16108 The next thing that becomes obvious is the changes to the paragraph environment
16109  pull-down box [at the far-left end of the toolbar].
16110  Most of the paragraph environments you're used to seeing are missing.
16111  There are also five new ones.
16112  That's because the 
16113 \family sans
16114 slides
16115 \family default
16116  class itself only supports certain paragraph environments:
16117 \end_layout
16118
16119 \begin_layout Itemize
16120
16121 \family sans
16122 Standard
16123 \end_layout
16124
16125 \begin_layout Itemize
16126
16127 \family sans
16128 Itemize
16129 \end_layout
16130
16131 \begin_layout Itemize
16132
16133 \family sans
16134 Enumerate
16135 \end_layout
16136
16137 \begin_layout Itemize
16138
16139 \family sans
16140 Description
16141 \end_layout
16142
16143 \begin_layout Itemize
16144
16145 \family sans
16146 List
16147 \end_layout
16148
16149 \begin_layout Itemize
16150
16151 \family sans
16152 Quotation
16153 \end_layout
16154
16155 \begin_layout Itemize
16156
16157 \family sans
16158 Quote
16159 \end_layout
16160
16161 \begin_layout Itemize
16162
16163 \family sans
16164 Verse
16165 \end_layout
16166
16167 \begin_layout Itemize
16168
16169 \family sans
16170 Caption
16171 \end_layout
16172
16173 \begin_layout Itemize
16174
16175 \family sans
16176 LyX-Code
16177 \end_layout
16178
16179 \begin_layout Itemize
16180
16181 \family sans
16182 Comment
16183 \end_layout
16184
16185 \begin_layout Standard
16186 All of the other standard environments, including the section-heading environmen
16187 ts, aren't used in the 
16188 \family sans
16189 slides
16190 \family default
16191  class.
16192 \end_layout
16193
16194 \begin_layout Standard
16195 On the other hand, you'll notice the following new environments:
16196 \end_layout
16197
16198 \begin_layout Itemize
16199
16200 \family sans
16201 Slide
16202 \end_layout
16203
16204 \begin_layout Itemize
16205
16206 \family sans
16207 Overlay
16208 \end_layout
16209
16210 \begin_layout Itemize
16211
16212 \family sans
16213 Note
16214 \end_layout
16215
16216 \begin_layout Itemize
16217
16218 \family sans
16219 InvisibleText
16220 \end_layout
16221
16222 \begin_layout Itemize
16223
16224 \family sans
16225 VisibleText
16226 \end_layout
16227
16228 \begin_layout Standard
16229 These five are kind of quirky, due to a 
16230 \begin_inset Quotes eld
16231 \end_inset
16232
16233 feature
16234 \begin_inset Quotes erd
16235 \end_inset
16236
16237  in LyX.
16238  You see, LyX doesn't permit you to nest any other paragraph environment
16239  into an empty environment.
16240  Now, that's fine and dandy, but it means that you wouldn't be able to start
16241  a slide with anything except plain text.
16242  To deal with this, I've performed a little 
16243 \begin_inset Quotes eld
16244 \end_inset
16245
16246 LaTeX magic.
16247 \begin_inset Quotes erd
16248 \end_inset
16249
16250  
16251 \end_layout
16252
16253 \begin_layout Subsubsection
16254 Quirks of the New Environments
16255 \begin_inset CommandInset label
16256 LatexCommand label
16257 name "sec:slideQuirk"
16258
16259 \end_inset
16260
16261
16262 \end_layout
16263
16264 \begin_layout Standard
16265 All five of the new paragraph environments are somewhat quirky due to inherent
16266  limitiations in the current version of LyX.
16267  As I just mentioned, LyX forbids environments that begin with another environme
16268 nt.
16269  To get around this, the 
16270 \family sans
16271 Slide
16272 \family default
16273  environment isn't a paragraph environment as described in the 
16274 \emph on
16275 User's Guide
16276 \emph default
16277 .
16278  
16279 \end_layout
16280
16281 \begin_layout Standard
16282 You should consider 
16283 \family sans
16284 Slide
16285 \family default
16286
16287 \family sans
16288 Overlay
16289 \family default
16290 , and 
16291 \family sans
16292 Note
16293 \family default
16294  to be 
16295 \begin_inset Quotes eld
16296 \end_inset
16297
16298 pseudo-environments.
16299 \begin_inset Quotes erd
16300 \end_inset
16301
16302  They look like a section heading or a 
16303 \begin_inset Quotes eld
16304 \end_inset
16305
16306
16307 \family sans
16308 Caption
16309 \family default
16310 ,
16311 \begin_inset Quotes erd
16312 \end_inset
16313
16314  but really begin a [and, if necessary, end the previous] paragraph environment.
16315  Likewise, treat 
16316 \family sans
16317 InvisibleText
16318 \family default
16319  and 
16320 \family sans
16321 VisibleText
16322 \family default
16323  as 
16324 \begin_inset Quotes eld
16325 \end_inset
16326
16327 pseudo-commands.
16328 \begin_inset Quotes erd
16329 \end_inset
16330
16331  These two perform some action.
16332 \end_layout
16333
16334 \begin_layout Standard
16335 A common feature of all five environments, 
16336 \family sans
16337 Slide
16338 \family default
16339
16340 \family sans
16341 Overlay
16342 \family default
16343
16344 \family sans
16345 Note
16346 \family default
16347
16348 \family sans
16349 InvisibleText
16350 \family default
16351  and 
16352 \family sans
16353 VisibleText
16354 \family default
16355 , is a rather long-ish label.
16356  The text following this label — ordinarily the contents of the paragraph
16357  environment — is utterly irrelevant for 
16358 \family sans
16359 Slide
16360 \family default
16361
16362 \family sans
16363 Overlay
16364 \family default
16365
16366 \family sans
16367 Note
16368 \family default
16369
16370 \family sans
16371 InvisibleText
16372 \family default
16373  and 
16374 \family sans
16375 VisibleText
16376 \family default
16377 .
16378  LyX completely ignores it.
16379  In fact, you can leave these five environments completely empty.
16380  
16381 \end_layout
16382
16383 \begin_layout Standard
16384 While you don't 
16385 \emph on
16386 have
16387 \emph default
16388  to put any text after the rather long-ish label, you might want to.
16389  This could be a short description of the contents of the 
16390 \family sans
16391 Slide
16392 \family default
16393 , for example.
16394  In that case, enter your descriptive comment and hit 
16395 \family sans
16396 Return
16397 \family default
16398  as you normally would.
16399 \end_layout
16400
16401 \begin_layout Standard
16402 If, on the other hand, you don't want to enter any descriptive text, you'll
16403  hit another LyX quirk.
16404  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16405  environment until you put something in the old one.
16406  So, do this:
16407 \end_layout
16408
16409 \begin_layout Itemize
16410 Start entering the text that will 
16411 \emph on
16412 follow
16413 \emph default
16414  the new 
16415 \family sans
16416 Slide
16417 \family default
16418
16419 \family sans
16420 Overlay
16421 \family default
16422
16423 \family sans
16424 Note
16425 \family default
16426
16427 \family sans
16428 InvisibleText
16429 \family default
16430  or 
16431 \family sans
16432 VisibleText
16433 \family default
16434 .
16435  
16436 \end_layout
16437
16438 \begin_layout Itemize
16439 Now move to the beginning of that paragraph.
16440  
16441 \end_layout
16442
16443 \begin_layout Itemize
16444 Next, hit 
16445 \family sans
16446 Return
16447 \family default
16448 .
16449  
16450 \end_layout
16451
16452 \begin_layout Itemize
16453 Finally, change this new, empty paragraph to a 
16454 \family sans
16455 Slide
16456 \family default
16457
16458 \family sans
16459 Overlay
16460 \family default
16461
16462 \family sans
16463 Note
16464 \family default
16465
16466 \family sans
16467 InvisibleText
16468 \family default
16469  or 
16470 \family sans
16471 VisibleText
16472 \family default
16473 .
16474  
16475 \end_layout
16476
16477 \begin_layout Standard
16478 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16479
16480 \end_layout
16481
16482 \begin_layout Subsection
16483 Making a Presentation with 
16484 \family sans
16485 Slide
16486 \family default
16487
16488 \family sans
16489 Overlay
16490 \family default
16491  and 
16492 \family sans
16493 Note
16494 \end_layout
16495
16496 \begin_layout Subsubsection
16497 Using the 
16498 \family sans
16499 Slide
16500 \family default
16501  Environment
16502 \end_layout
16503
16504 \begin_layout Standard
16505 If you're expecting this section to teach you how to actually make a presentatio
16506 n, you'll be sorely disappointed.
16507  Naturally, I'll describe all of the ways the 
16508 \family sans
16509 slides
16510 \family default
16511  class can assist you in preparing the materials for a presentation.
16512  Filling in the contents, however, is up to you.
16513  [Then again, that 
16514 \emph on
16515 is
16516 \emph default
16517  the LyX philosophy.]
16518 \end_layout
16519
16520 \begin_layout Standard
16521 Choosing the 
16522 \family sans
16523 Slide
16524 \family default
16525  environment [in the manner described in section
16526 \begin_inset space ~
16527 \end_inset
16528
16529
16530 \begin_inset CommandInset ref
16531 LatexCommand ref
16532 reference "sec:slideQuirk"
16533
16534 \end_inset
16535
16536 ] tells LyX to begin a new slide [duh].
16537  The label for this environment/
16538 \begin_inset Quotes erd
16539 \end_inset
16540
16541 pseudo-command
16542 \begin_inset Quotes erd
16543 \end_inset
16544
16545  is an 
16546 \begin_inset Quotes eld
16547 \end_inset
16548
16549 ASCII line,
16550 \begin_inset Quotes erd
16551 \end_inset
16552
16553  in cool blue, followed by the label, 
16554 \begin_inset Quotes eld
16555 \end_inset
16556
16557 NewSlide:
16558 \begin_inset Quotes erd
16559 \end_inset
16560
16561 .
16562  Any text or paragraph environments that follow this one go on the new slide.
16563  It's that simple.
16564 \end_layout
16565
16566 \begin_layout Standard
16567 Slides are probably the only time you'll need to forcibly end pages in LyX
16568  (this can be specified in the 
16569 \family sans
16570 Paragraph Layout
16571 \family default
16572  dialog).
16573  In fact, you'll want to, once you finish entering the contents of one slide.
16574  If you've entered more text than can physically fit on a slide, the extra
16575  overflows onto a new slide.
16576  I don't recommend doing this, however, since the overflow slide won't have
16577  any page number on it.
16578  Furthermore, it may interfere with any 
16579 \family sans
16580 Overlay
16581 \family default
16582  you've made to accompany the oversized 
16583 \family sans
16584 Slide
16585 \family default
16586 .
16587 \end_layout
16588
16589 \begin_layout Standard
16590 The 
16591 \family sans
16592 Overlay
16593 \family default
16594  and 
16595 \family sans
16596 Note
16597 \family default
16598  environments work the same way as the 
16599 \family sans
16600 Slide
16601 \family default
16602  environment.
16603  They both create an 
16604 \begin_inset Quotes eld
16605 \end_inset
16606
16607 ASCII line
16608 \begin_inset Quotes erd
16609 \end_inset
16610
16611  followed by a label [
16612 \begin_inset Quotes eld
16613 \end_inset
16614
16615 NewOverlay:
16616 \begin_inset Quotes erd
16617 \end_inset
16618
16619  and 
16620 \begin_inset Quotes eld
16621 \end_inset
16622
16623 NewNote:
16624 \begin_inset Quotes erd
16625 \end_inset
16626
16627 , respectively].
16628  The color is a stunning magenta instead of blue, and the 
16629 \begin_inset Quotes eld
16630 \end_inset
16631
16632 ASCII line
16633 \begin_inset Quotes erd
16634 \end_inset
16635
16636  will look different, in style and in length.
16637  The label fonts of all three also differ from one another.
16638 \end_layout
16639
16640 \begin_layout Standard
16641 As with a 
16642 \family sans
16643 Slide
16644 \family default
16645 , if the contents of a 
16646 \family sans
16647 Note
16648 \family default
16649  or 
16650 \family sans
16651 Overlay
16652 \family default
16653  exceed the physical size of a slide or sheet of paper, the extra will overflow
16654  onto a new sheet.
16655  Again, you should avoid this.
16656  It defeats the whole purpose of 
16657 \family sans
16658 Note
16659 \family default
16660 s and 
16661 \family sans
16662 Overlay
16663 \family default
16664 s.
16665 \end_layout
16666
16667 \begin_layout Subsubsection
16668 Using 
16669 \family sans
16670 Overlay
16671 \family default
16672  with 
16673 \family sans
16674 Slide
16675 \end_layout
16676
16677 \begin_layout Standard
16678 The idea behind an 
16679 \family sans
16680 Overlay
16681 \family default
16682  is a slide that sits atop another slide.
16683  Perhaps you wish to discuss a figure on the main 
16684 \family sans
16685 Slide
16686 \family default
16687  before displaying the text associated with it.
16688  One way to accomplish this is tape a flap of dark paper over the part of
16689  the 
16690 \family sans
16691 Slide
16692 \family default
16693  you want to display later.
16694  This method fails, however, if you wish to overlap one graph with another,
16695  for example.
16696  You would then have to fumble while speaking to align the two separate,
16697  overlapping 
16698 \family sans
16699 Slide
16700 \family default
16701 s to align the two graphs.
16702  The use of an 
16703 \family sans
16704 Overlay
16705 \family default
16706  environment in both cases makes life much easier.
16707 \end_layout
16708
16709 \begin_layout Standard
16710 Each 
16711 \family sans
16712 Overlay
16713 \family default
16714  receives the page number of its 
16715 \begin_inset Quotes eld
16716 \end_inset
16717
16718 parent
16719 \begin_inset Quotes erd
16720 \end_inset
16721
16722  
16723 \family sans
16724 Slide
16725 \family default
16726 , appended by 
16727 \begin_inset Quotes eld
16728 \end_inset
16729
16730
16731 \family typewriter
16732 -a
16733 \family default
16734
16735 \begin_inset Quotes erd
16736 \end_inset
16737
16738 .
16739 \begin_inset Foot
16740 status collapsed
16741
16742 \begin_layout Plain Layout
16743 Presumably, mutliple 
16744 \family sans
16745 Overlay
16746 \family default
16747 s would have 
16748 \begin_inset Quotes eld
16749 \end_inset
16750
16751
16752 \family typewriter
16753 -a
16754 \family default
16755
16756 \begin_inset Quotes erd
16757 \end_inset
16758
16759
16760 \begin_inset Quotes eld
16761 \end_inset
16762
16763
16764 \family typewriter
16765 -b
16766 \family default
16767
16768 \begin_inset Quotes erd
16769 \end_inset
16770
16771
16772 \begin_inset Quotes eld
16773 \end_inset
16774
16775
16776 \family typewriter
16777 -c
16778 \family default
16779
16780 \begin_inset Quotes erd
16781 \end_inset
16782
16783 , etc.
16784 \begin_inset space ~
16785 \end_inset
16786
16787 appended to the page number of the parent 
16788 \family sans
16789 Slide
16790 \family default
16791 .
16792  
16793 \end_layout
16794
16795 \end_inset
16796
16797  Clearly, you want the contents of both the 
16798 \family sans
16799 Slide
16800 \family default
16801  and the 
16802 \family sans
16803 Overlay
16804 \family default
16805  to each fit on a single physical slide! You should probably consider an
16806  
16807 \family sans
16808 Overlay
16809 \family default
16810  as 
16811 \begin_inset Quotes eld
16812 \end_inset
16813
16814 part of
16815 \begin_inset Quotes erd
16816 \end_inset
16817
16818  a 
16819 \family sans
16820 Slide
16821 \family default
16822 .
16823  Indeed, the LyX 
16824 \family sans
16825 slides
16826 \family default
16827  class provides a visual cue for this: the label at the start of an 
16828 \family sans
16829 Overlay
16830 \family default
16831  is shorter than that at the start of a 
16832 \family sans
16833 Slide
16834 \family default
16835 .
16836  Lastly, when you generate printable output, you'll find alignment markers
16837  in all four corners of both the 
16838 \family sans
16839 Overlay
16840 \family default
16841  page and its parent 
16842 \family sans
16843 Slide
16844 \family default
16845 .
16846  These will assist you in lining up the two physical slides.
16847 \end_layout
16848
16849 \begin_layout Standard
16850 The major problem in overlaying two slides is aligning the contents of the
16851  two transparencies.
16852  How much space should you leave for that graph on the second slide? Worse
16853  still, what if you want a graph and a sentence on second slide, but there
16854  is text on the main transparency that goes in between them? You could try
16855  and insert vertical space of the right size.
16856  The better way is to use 
16857 \family sans
16858 InvisibleText
16859 \family default
16860  and 
16861 \family sans
16862 VisibleText
16863 \family default
16864 .
16865 \end_layout
16866
16867 \begin_layout Standard
16868 As their names imply, 
16869 \family sans
16870 InvisibleText
16871 \family default
16872  and 
16873 \family sans
16874 VisibleText
16875 \family default
16876  are two command-like paragraph environments that make all subsequent text
16877  invisible and visible, respectively.
16878  Note from section
16879 \begin_inset space ~
16880 \end_inset
16881
16882
16883 \begin_inset CommandInset ref
16884 LatexCommand ref
16885 reference "sec:slideQuirk"
16886
16887 \end_inset
16888
16889  that you don't place anything 
16890 \emph on
16891 into
16892 \emph default
16893  these two environments, however.
16894  When you create an 
16895 \family sans
16896 InvisibleText
16897 \family default
16898 , it inserts a centered, sky-blue label into the page reading 
16899 \begin_inset Quotes eld
16900 \end_inset
16901
16902 <Invisible Text Follows>
16903 \begin_inset Quotes erd
16904 \end_inset
16905
16906 .
16907  For paragraphs following this label, the parts of the 
16908 \family sans
16909 Slide
16910 \family default
16911  [or 
16912 \family sans
16913 Overlay
16914 \family default
16915 ; it doesn't matter which] where they would be contain instead blank space.
16916  
16917 \end_layout
16918
16919 \begin_layout Standard
16920 For 
16921 \family sans
16922 VisibleText
16923 \family default
16924 , the corresponding centered label is 
16925 \begin_inset Quotes eld
16926 \end_inset
16927
16928 <Visible Text Follows>
16929 \begin_inset Quotes erd
16930 \end_inset
16931
16932  in blazing green.
16933  Paragraphs following this label behave normally.
16934  Note that the beginning of a new 
16935 \family sans
16936 Slide
16937 \family default
16938
16939 \family sans
16940 Overlay
16941 \family default
16942 , or 
16943 \family sans
16944 Note
16945 \family default
16946  automatically shuts off an 
16947 \family sans
16948 InvisibleText
16949 \family default
16950 .
16951  It's therefore not necessary to use 
16952 \family sans
16953 VisibleText
16954 \family default
16955  at the end of a 
16956 \family sans
16957 Slide
16958 \family default
16959 .
16960 \end_layout
16961
16962 \begin_layout Standard
16963 By now, it should be obvious how to create overlay transparencies using
16964  the proper combination of 
16965 \family sans
16966 InvisibleText
16967 \family default
16968  and 
16969 \family sans
16970 VisibleText
16971 \family default
16972  on a 
16973 \family sans
16974 Slide
16975 \family default
16976  and 
16977 \family sans
16978 Overlay
16979 \family default
16980 :
16981 \end_layout
16982
16983 \begin_layout Enumerate
16984 Create a 
16985 \family sans
16986 Slide
16987 \family default
16988 , including everything that will appear on it, whether on the main slide
16989  or on the 
16990 \family sans
16991 Overlay
16992 \family default
16993 .
16994 \end_layout
16995
16996 \begin_layout Enumerate
16997 Before each figure or paragraph that will appear only on the 
16998 \family sans
16999 Overlay
17000 \family default
17001 , insert an 
17002 \family sans
17003 InvisibleText
17004 \family default
17005  environment.
17006  If necessary, insert a 
17007 \family sans
17008 VisibleText
17009 \family default
17010  environment after the 
17011 \family sans
17012 Overlay
17013 \family default
17014 -only text.
17015 \end_layout
17016
17017 \begin_layout Enumerate
17018 Start an 
17019 \family sans
17020 Overlay
17021 \family default
17022  immediately following the 
17023 \family sans
17024 Slide
17025 \family default
17026 .
17027 \end_layout
17028
17029 \begin_layout Enumerate
17030 Copy the contents of this 
17031 \family sans
17032 Slide
17033 \family default
17034  into the 
17035 \family sans
17036 Overlay
17037 \family default
17038 .
17039 \end_layout
17040
17041 \begin_layout Enumerate
17042 Within the 
17043 \family sans
17044 Overlay
17045 \family default
17046 , change all of the 
17047 \family sans
17048 InvisibleText
17049 \family default
17050  lines to 
17051 \family sans
17052 VisibleText
17053 \family default
17054  and vice-versa.
17055 \end_layout
17056
17057 \begin_layout Standard
17058 That's it.
17059  You've just made an 
17060 \family sans
17061 Overlay
17062 \family default
17063 .
17064 \end_layout
17065
17066 \begin_layout Standard
17067 There's one problem with the way I've designed the LyX 
17068 \family sans
17069 slides
17070 \family default
17071  class: you can't make text in the middle of a paragraph invisible, nor
17072  make text in the middle of an invisible paragraph visible again.
17073  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17074 \begin_inset Foot
17075 status collapsed
17076
17077 \begin_layout Plain Layout
17078 The commands of interest are: 
17079 \end_layout
17080
17081 \begin_layout Itemize
17082
17083 \family typewriter
17084 {
17085 \backslash
17086 invisible \SpecialChar \ldots{}
17087  }
17088 \end_layout
17089
17090 \begin_layout Itemize
17091
17092 \family typewriter
17093 {
17094 \backslash
17095 visible \SpecialChar \ldots{}
17096  }
17097 \end_layout
17098
17099 \begin_layout Plain Layout
17100 \SpecialChar \ldots{}
17101 and need to be marked as TeX.
17102  The text whose 
17103 \begin_inset Quotes eld
17104 \end_inset
17105
17106 visibility
17107 \begin_inset Quotes erd
17108 \end_inset
17109
17110  you wish to change goes in between the brackets [and after the 
17111 \family typewriter
17112
17113 \backslash
17114 invisible
17115 \family default
17116  or 
17117 \family typewriter
17118
17119 \backslash
17120 visible
17121 \family default
17122  command].
17123  If you don't know how to mark text as TeX, see the appropriate section
17124  of the 
17125 \emph on
17126 User's Guide
17127 \emph default
17128 .
17129 \end_layout
17130
17131 \end_inset
17132
17133
17134 \end_layout
17135
17136 \begin_layout Subsubsection
17137 Using 
17138 \family sans
17139 Note
17140 \family default
17141  with 
17142 \family sans
17143 Slide
17144 \family default
17145
17146 \begin_inset CommandInset label
17147 LatexCommand label
17148 name "sec:slideNote"
17149
17150 \end_inset
17151
17152
17153 \end_layout
17154
17155 \begin_layout Standard
17156 Like an 
17157 \family sans
17158 Overlay
17159 \family default
17160 , a 
17161 \family sans
17162 Note
17163 \family default
17164  is associated with a 
17165 \begin_inset Quotes eld
17166 \end_inset
17167
17168 parent
17169 \begin_inset Quotes erd
17170 \end_inset
17171
17172  
17173 \family sans
17174 Slide
17175 \family default
17176 .
17177  Here, too, the LyX 
17178 \family sans
17179 slides
17180 \family default
17181  class provides visual cues.
17182  The label for a 
17183 \family sans
17184 Note
17185 \family default
17186  is shorter than that of a 
17187 \family sans
17188 Slide
17189 \family default
17190  [yet longer than that of an 
17191 \family sans
17192 Overlay
17193 \family default
17194 ] and, like the label of an 
17195 \family sans
17196 Overlay
17197 \family default
17198  is shockingly magenta.
17199  Additionally, the printed 
17200 \family sans
17201 Note
17202 \family default
17203  has the page number of its 
17204 \begin_inset Quotes eld
17205 \end_inset
17206
17207 parent
17208 \begin_inset Quotes erd
17209 \end_inset
17210
17211  
17212 \family sans
17213 Slide
17214 \family default
17215 , appended by 
17216 \begin_inset Quotes eld
17217 \end_inset
17218
17219
17220 \family typewriter
17221 -
17222 \family default
17223 1
17224 \begin_inset Quotes erd
17225 \end_inset
17226
17227
17228 \begin_inset Quotes eld
17229 \end_inset
17230
17231
17232 \family typewriter
17233 -
17234 \family default
17235 2
17236 \begin_inset Quotes erd
17237 \end_inset
17238
17239
17240 \begin_inset Quotes eld
17241 \end_inset
17242
17243
17244 \family typewriter
17245 -
17246 \family default
17247 3
17248 \begin_inset Quotes erd
17249 \end_inset
17250
17251 , etc.
17252  You can have multiple 
17253 \family sans
17254 Note
17255 \family default
17256 s associated with a single 
17257 \family sans
17258 Slide
17259 \family default
17260 , and, as with 
17261 \family sans
17262 Slide
17263 \family default
17264  and 
17265 \family sans
17266 Overlay
17267 \family default
17268 , you'll probably want to break up long 
17269 \family sans
17270 Note
17271 \family default
17272 s so that they fit on a single sheet of paper.
17273 \end_layout
17274
17275 \begin_layout Standard
17276 The purpose of a 
17277 \family sans
17278 Note
17279 \family default
17280  is obvious: it contains anything additional you might want to say about
17281  a 
17282 \family sans
17283 Slide
17284 \family default
17285 .
17286  It could also be used as a sheet of reminders for a particular 
17287 \family sans
17288 Slide
17289 \family default
17290 .
17291  In the case of the latter, you might want to make use of time markers.
17292  Currently, the LyX 
17293 \family sans
17294 slides
17295 \family default
17296  class has no 
17297 \begin_inset Quotes eld
17298 \end_inset
17299
17300 native
17301 \begin_inset Quotes erd
17302 \end_inset
17303
17304  support for time markers, a 
17305 \noun on
17306 SliTeX
17307 \noun default
17308  feature.
17309  So, you'll have to resort to using the LaTeX codes.
17310 \end_layout
17311
17312 \begin_layout Standard
17313 To use time markers, you'll need to specify the extra class option 
17314 \begin_inset Quotes eld
17315 \end_inset
17316
17317
17318 \family typewriter
17319 clock
17320 \family default
17321
17322 \begin_inset Quotes erd
17323 \end_inset
17324
17325  [see section
17326 \begin_inset space ~
17327 \end_inset
17328
17329
17330 \begin_inset CommandInset ref
17331 LatexCommand ref
17332 reference "sec:slidesetup"
17333
17334 \end_inset
17335
17336 ].
17337  This option turns on timing marks, which will appear in the lower-left-hand
17338  corner of every 
17339 \family sans
17340 Note
17341 \family default
17342  you generate.
17343  To set what appears in the time marker, you use the LaTeX commands 
17344 \begin_inset Quotes eld
17345 \end_inset
17346
17347
17348 \family typewriter
17349
17350 \backslash
17351 settime{}
17352 \family default
17353
17354 \begin_inset Quotes erd
17355 \end_inset
17356
17357  and 
17358 \begin_inset Quotes eld
17359 \end_inset
17360
17361
17362 \family typewriter
17363
17364 \backslash
17365 addtime{}
17366 \family default
17367
17368 \begin_inset Quotes erd
17369 \end_inset
17370
17371 .
17372  The arguments of both commands are time measured in seconds.
17373  
17374 \begin_inset Quotes eld
17375 \end_inset
17376
17377
17378 \family typewriter
17379
17380 \backslash
17381 settime{}
17382 \family default
17383
17384 \begin_inset Quotes erd
17385 \end_inset
17386
17387  sets the time marker to a given time.
17388  
17389 \begin_inset Quotes eld
17390 \end_inset
17391
17392
17393 \family typewriter
17394
17395 \backslash
17396 addtime{}
17397 \family default
17398
17399 \begin_inset Quotes erd
17400 \end_inset
17401
17402  increments the time marker by the specified amount.
17403  Using time markers and 
17404 \family sans
17405 Note
17406 \family default
17407 s in this fashion, you can remind yourself how much time to spend on a particula
17408
17409 \family sans
17410 Slide
17411 \family default
17412 .
17413 \end_layout
17414
17415 \begin_layout Standard
17416 There's one last feature to describe.
17417  Clearly, you'd like to print out all of your 
17418 \family sans
17419 Slide
17420 \family default
17421 s and 
17422 \family sans
17423 Overlay
17424 \family default
17425 s on transparencies while printing all of your 
17426 \family sans
17427 Note
17428 \family default
17429 s on plain paper.
17430  However, a 
17431 \family sans
17432 Note
17433 \family default
17434  
17435 \emph on
17436 must
17437 \emph default
17438  follow the 
17439 \family sans
17440 Slide
17441 \family default
17442  with which it is associated.
17443  What's a person to do?
17444 \end_layout
17445
17446 \begin_layout Standard
17447 Luckily, there are two LaTeX commands that allow you to select what to print
17448  out.
17449  Both must be placed into the preamble of your document.
17450  The command 
17451 \begin_inset Quotes eld
17452 \end_inset
17453
17454
17455 \family typewriter
17456
17457 \backslash
17458 onlyslides{
17459 \backslash
17460 slides}
17461 \family default
17462
17463 \begin_inset Quotes erd
17464 \end_inset
17465
17466  will cause the output to contain only the 
17467 \family sans
17468 Slide
17469 \family default
17470 s and 
17471 \family sans
17472 Overlay
17473 \family default
17474 s.
17475  Correspondingly, the command 
17476 \begin_inset Quotes eld
17477 \end_inset
17478
17479
17480 \family typewriter
17481
17482 \backslash
17483 onlynotes{
17484 \backslash
17485 notes}
17486 \family default
17487
17488 \begin_inset Quotes erd
17489 \end_inset
17490
17491  prevents the output of anything but 
17492 \family sans
17493 Note
17494 \family default
17495 s.
17496  I'd advise placing both commands in the preamble and initially comment
17497  both out.
17498  You can then preview your entire presentation as you write.
17499  When you're done writing, you can then uncomment one of the two to select
17500  what you want to print.
17501  I like to uncomment 
17502 \begin_inset Quotes eld
17503 \end_inset
17504
17505
17506 \family typewriter
17507
17508 \backslash
17509 onlyslides{
17510 \backslash
17511 slides}
17512 \family default
17513
17514 \begin_inset Quotes erd
17515 \end_inset
17516
17517  , print to a file with 
17518 \begin_inset Quotes eld
17519 \end_inset
17520
17521
17522 \family typewriter
17523 -slides
17524 \family default
17525
17526 \begin_inset Quotes erd
17527 \end_inset
17528
17529  in its name, comment it back out, then uncomment 
17530 \begin_inset Quotes eld
17531 \end_inset
17532
17533
17534 \family typewriter
17535
17536 \backslash
17537 onlynotes{
17538 \backslash
17539 notes}
17540 \family default
17541
17542 \begin_inset Quotes erd
17543 \end_inset
17544
17545  and print to a 
17546 \begin_inset Quotes eld
17547 \end_inset
17548
17549
17550 \family typewriter
17551 *-notes.ps
17552 \family default
17553
17554 \begin_inset Quotes erd
17555 \end_inset
17556
17557  file.
17558  I can then send either file to a printer, loading transparencies or plain
17559  paper as appropriate.
17560 \end_layout
17561
17562 \begin_layout Standard
17563 You can also provide other arguments to the 
17564 \begin_inset Quotes eld
17565 \end_inset
17566
17567
17568 \family typewriter
17569
17570 \backslash
17571 onlyslides{}
17572 \family default
17573
17574 \begin_inset Quotes erd
17575 \end_inset
17576
17577  and 
17578 \begin_inset Quotes eld
17579 \end_inset
17580
17581
17582 \family typewriter
17583
17584 \backslash
17585 onlynotes{}
17586 \family default
17587
17588 \begin_inset Quotes erd
17589 \end_inset
17590
17591  commands.
17592  See a good LaTeX book for details.
17593 \end_layout
17594
17595 \begin_layout Subsection
17596 The 
17597 \family sans
17598 slides
17599 \family default
17600  Class Template File
17601 \end_layout
17602
17603 \begin_layout Standard
17604 I have also provided a template file, 
17605 \begin_inset Quotes eld
17606 \end_inset
17607
17608
17609 \family typewriter
17610 slides.lyx
17611 \family default
17612
17613 \begin_inset Quotes erd
17614 \end_inset
17615
17616 , with the 
17617 \family sans
17618 slides
17619 \family default
17620  class.
17621  To use it, begin your new presentation with 
17622 \family sans
17623 \bar under
17624 F
17625 \bar default
17626 ile\SpecialChar \menuseparator
17627 New
17628 \begin_inset space ~
17629 \end_inset
17630
17631 from
17632 \begin_inset space ~
17633 \end_inset
17634
17635
17636 \bar under
17637 T
17638 \bar default
17639 emplate
17640 \family default
17641 .
17642  Your new LyX presentation file will contain an example 
17643 \family sans
17644 Slide
17645 \family default
17646  – 
17647 \family sans
17648 Overlay
17649 \family default
17650  – 
17651 \family sans
17652 Note
17653 \family default
17654  triplet.
17655  The 
17656 \family sans
17657 Slide
17658 \family default
17659  and 
17660 \family sans
17661 Overlay
17662 \family default
17663  additionally contain an example of the use of 
17664 \family sans
17665 InvisibleText
17666 \family default
17667  and 
17668 \family sans
17669 VisibleText
17670 \family default
17671 .
17672  Lastly, the preamble will contain:
17673 \end_layout
17674
17675 \begin_layout LyX-Code
17676 % Uncomment to print out only slides and overlays
17677 \end_layout
17678
17679 \begin_layout LyX-Code
17680 %
17681 \end_layout
17682
17683 \begin_layout LyX-Code
17684 %
17685 \backslash
17686 onlyslides{
17687 \backslash
17688 slides}
17689 \begin_inset Newline newline
17690 \end_inset
17691
17692  
17693 \end_layout
17694
17695 \begin_layout LyX-Code
17696 % Uncomment to print out only notes
17697 \end_layout
17698
17699 \begin_layout LyX-Code
17700 %
17701 \end_layout
17702
17703 \begin_layout LyX-Code
17704 %
17705 \backslash
17706 onlynotes{
17707 \backslash
17708 notes}
17709 \end_layout
17710
17711 \begin_layout Standard
17712 One final thing: I created this class to support the LaTeX2e 
17713 \begin_inset Quotes eld
17714 \end_inset
17715
17716
17717 \noun on
17718 SliTeX
17719 \noun default
17720  emulation
17721 \begin_inset Quotes erd
17722 \end_inset
17723
17724  class, one of the built-in LaTeX2e classes.
17725  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17726  built-in slide class.
17727  It's here if you want it or need it.
17728  There exist other LaTeX2e classes for creating presentations, such as the
17729  
17730 \family sans
17731 Foils
17732 \family default
17733  class [see section
17734 \begin_inset space ~
17735 \end_inset
17736
17737
17738 \begin_inset CommandInset ref
17739 LatexCommand ref
17740 reference "sec:foiltex"
17741
17742 \end_inset
17743
17744 ] or the 
17745 \begin_inset Quotes eld
17746 \end_inset
17747
17748
17749 \family typewriter
17750 seminar
17751 \family default
17752
17753 \begin_inset Quotes erd
17754 \end_inset
17755
17756  package [present on some TeX distributions].
17757  The latter is not yet supported under LyX.
17758 \begin_inset Foot
17759 status collapsed
17760
17761 \begin_layout Plain Layout
17762 Perhaps you can take on the task\SpecialChar \ldots{}
17763
17764 \end_layout
17765
17766 \end_inset
17767
17768  I know nothing about these other classes.
17769  Try them out to see what sort of alternative they provide.
17770 \end_layout
17771
17772 \begin_layout Chapter
17773 LyX Features needing Extra Software
17774 \end_layout
17775
17776 \begin_layout Section
17777 Checking TeX
17778 \end_layout
17779
17780 \begin_layout Standard
17781 by 
17782 \noun on
17783 Asger Alstrup
17784 \end_layout
17785
17786 \begin_layout Subsection
17787 Introduction
17788 \end_layout
17789
17790 \begin_layout Standard
17791 If you have the 
17792 \family typewriter
17793 chktex
17794 \family default
17795  program installed
17796 \begin_inset Foot
17797 status collapsed
17798
17799 \begin_layout Plain Layout
17800
17801 \family typewriter
17802 chktex
17803 \family default
17804  is not yet available when you are using the LaTeX distribution MiKTeX.
17805 \end_layout
17806
17807 \end_inset
17808
17809 , you'll find in the 
17810 \family sans
17811 Tools
17812 \family default
17813  menu the entry: 
17814 \family sans
17815 Check
17816 \begin_inset space ~
17817 \end_inset
17818
17819 TeX
17820 \family default
17821 .
17822  You can get 
17823 \family typewriter
17824 chktex
17825 \family default
17826  from CTAN, 
17827 \begin_inset CommandInset href
17828 LatexCommand href
17829 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17830
17831 \end_inset
17832
17833 .
17834 \end_layout
17835
17836 \begin_layout Standard
17837 The 
17838 \family sans
17839 ChkTeX
17840 \family default
17841  package is a program that was written by 
17842 \begin_inset Flex Noun
17843 status collapsed
17844
17845 \begin_layout Plain Layout
17846 Jens T.
17847 \begin_inset space ~
17848 \end_inset
17849
17850 Berger Thielemann
17851 \end_layout
17852
17853 \end_inset
17854
17855  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17856  and easy to forget.
17857  The program runs over your LaTeX file, checks the integrity of the file,
17858  and flags some common errors.
17859  In other technical words, it is 
17860 \family typewriter
17861 lint
17862 \family default
17863  for LaTeX.
17864 \end_layout
17865
17866 \begin_layout Standard
17867 Well, what is a syntax checker doing in LyX which is supposed to produce
17868  correct LaTeX anyways? The answer is simple: Just as 
17869 \family typewriter
17870 Lint
17871 \family default
17872  not only checks the 
17873 \emph on
17874 syntax
17875 \emph default
17876  of C programs, but also does 
17877 \emph on
17878 semantic
17879 \emph default
17880  checks for type-errors, 
17881 \family sans
17882 ChkTeX
17883 \family default
17884  catches some common 
17885 \emph on
17886 typographic
17887 \emph default
17888  errors, in addition to the syntactical ones.
17889  Specifically, 
17890 \family sans
17891 ChkTeX
17892 \family default
17893  is capable of detecting several common errors, such as
17894 \end_layout
17895
17896 \begin_layout Itemize
17897 Ellipsis detection:
17898 \begin_inset Newline newline
17899 \end_inset
17900
17901 Use \SpecialChar \ldots{}
17902  instead of ...
17903 \end_layout
17904
17905 \begin_layout Itemize
17906 No space in front of/after parenthesis:
17907 \begin_inset Newline newline
17908 \end_inset
17909
17910 ( wrong spacing )
17911 \end_layout
17912
17913 \begin_layout Itemize
17914 Enforcement of normal space after common abbreviations:
17915 \begin_inset Newline newline
17916 \end_inset
17917
17918 e.
17919 \begin_inset space \thinspace{}
17920 \end_inset
17921
17922 g.
17923 \begin_inset space \space{}
17924 \end_inset
17925
17926 is too wide spacing.
17927 \end_layout
17928
17929 \begin_layout Itemize
17930 Enforcement of end-of-sentence space when the last sentence ends with a
17931  capital letter:
17932 \begin_inset Newline newline
17933 \end_inset
17934
17935 This is a TEST.
17936  And this is wrong spacing.
17937 \end_layout
17938
17939 \begin_layout Itemize
17940 Space in front of labels and similar commands:
17941 \begin_inset Newline newline
17942 \end_inset
17943
17944 The label should stick right up to the text to avoid falling to a wrong
17945  page.
17946  
17947 \begin_inset CommandInset label
17948 LatexCommand label
17949 name "sec:chktex"
17950
17951 \end_inset
17952
17953  
17954 \begin_inset Foot
17955 status collapsed
17956
17957 \begin_layout Plain Layout
17958 This footnote is in danger of falling off to a wrong page
17959 \end_layout
17960
17961 \end_inset
17962
17963  The label is separated too much.
17964 \end_layout
17965
17966 \begin_layout Itemize
17967 Space in front of references, instead of hard spaces:
17968 \begin_inset Newline newline
17969 \end_inset
17970
17971 If you have bad luck, the text will break right between the referenced text
17972  and reference number, and that's a pity.
17973  See section 
17974 \begin_inset CommandInset ref
17975 LatexCommand ref
17976 reference "sec:chktex"
17977
17978 \end_inset
17979
17980 .
17981 \end_layout
17982
17983 \begin_layout Itemize
17984 Use of 
17985 \begin_inset Quotes eld
17986 \end_inset
17987
17988 x
17989 \begin_inset Quotes erd
17990 \end_inset
17991
17992  instead of 
17993 \begin_inset Formula $\times$
17994 \end_inset
17995
17996  between numbers:
17997 \begin_inset Newline newline
17998 \end_inset
17999
18000 2x2 looks cheap compared to 
18001 \begin_inset Formula $2\times2$
18002 \end_inset
18003
18004 .
18005 \end_layout
18006
18007 \begin_layout Standard
18008 and more \SpecialChar \ldots{}
18009  It is an invaluable tool when you are 
18010 \begin_inset Quotes eld
18011 \end_inset
18012
18013 finishing up
18014 \begin_inset Quotes erd
18015 \end_inset
18016
18017  your document before printing, and you should run it right after the obligatory
18018  spelling check, and before you go fine tuning the typesetting.
18019 \end_layout
18020
18021 \begin_layout Subsection
18022 How to use it
18023 \end_layout
18024
18025 \begin_layout Standard
18026 If you have the program installed, usage is as simple as choosing 
18027 \family sans
18028 Tools\SpecialChar \menuseparator
18029 Check
18030 \begin_inset space ~
18031 \end_inset
18032
18033 TeX
18034 \family default
18035 .
18036  This will make LyX generate a LaTeX file of your document, start 
18037 \family sans
18038 ChkTeX
18039 \family default
18040  to check it, and then make LyX insert 
18041 \begin_inset Quotes eld
18042 \end_inset
18043
18044 error boxes
18045 \begin_inset Quotes erd
18046 \end_inset
18047
18048  with the warnings from 
18049 \family sans
18050 ChkTeX
18051 \family default
18052 , if there were any.
18053  The warnings will be placed close to the point of the mistake, and you
18054  can quickly find them by using the 
18055 \family sans
18056 Navigate\SpecialChar \menuseparator
18057 Error
18058 \family default
18059  menu item, or the shortcut key 
18060 \family sans
18061 C-g
18062 \family default
18063  from the default 
18064 \family typewriter
18065 cua
18066 \family default
18067  bind file.
18068  Open the error boxes by clicking on them with the mouse, or use the shortcut
18069  key 
18070 \family sans
18071 C-i
18072 \family default
18073  from 
18074 \family typewriter
18075 cua
18076 \family default
18077  bindings, or the corresponding 
18078 \family sans
18079 C-o
18080 \family default
18081  for the alternate 
18082 \family typewriter
18083 emacs
18084 \family default
18085  bind file.
18086  Read the warning and correct the mistake, if it is a mistake.
18087  If you have trouble understanding what the warning is about, you can safely
18088  ignore it.
18089  Remember that there is a hidden layer between the document on screen and
18090  the technical details in invoking 
18091 \family sans
18092 ChkTeX
18093 \family default
18094 , and this gap can make some warnings seem arcane or just plain silly.
18095 \end_layout
18096
18097 \begin_layout Standard
18098 This document is an excellent testing bed for the feature, and it should
18099  provide quite a few warnings for you to fiddle with.
18100  Since computers are only so smart, expect most of the warnings to be false
18101  alarms, though.
18102 \end_layout
18103
18104 \begin_layout Subsection
18105 How to fine tune it
18106 \end_layout
18107
18108 \begin_layout Standard
18109 Sometimes, you'll find that 
18110 \family sans
18111 ChkTeX
18112 \family default
18113  makes more noise than suits your mood.
18114  Then you can choose not to use it, wait until your mood changes, or try
18115  to customize 
18116 \family sans
18117 ChkTeX
18118 \family default
18119  to get better along with you.
18120 \end_layout
18121
18122 \begin_layout Standard
18123 Although 
18124 \family sans
18125 ChkTeX
18126 \family default
18127  
18128 \emph on
18129 is
18130 \emph default
18131  very configurable and extensible, you shouldn't expect to solve all problems
18132  with 
18133 \family sans
18134 ChkTeX
18135 \family default
18136  in LyX this way.
18137  Since LyX has to generate a somewhat special LaTeX file to be able to match
18138  the line numbers from the 
18139 \family sans
18140 ChkTeX
18141 \family default
18142  output
18143 \begin_inset Foot
18144 status collapsed
18145
18146 \begin_layout Plain Layout
18147 You can inspect the specific output from 
18148 \family sans
18149 chktex
18150 \family default
18151  by using 
18152 \family sans
18153 Edit\SpecialChar \menuseparator
18154 View
18155 \begin_inset space ~
18156 \end_inset
18157
18158 LaTeX
18159 \begin_inset space ~
18160 \end_inset
18161
18162 Log
18163 \family default
18164  right after a 
18165 \family sans
18166 chktex
18167 \family default
18168  run.
18169 \end_layout
18170
18171 \end_inset
18172
18173  to the internal document structure, some of the warnings will not appear
18174  correctly.
18175  There are two things you can do about this:
18176 \end_layout
18177
18178 \begin_layout Itemize
18179 Fine tune the 
18180 \family sans
18181 ChkTeX
18182 \family default
18183  invocation command line in 
18184 \begin_inset Flex MenuItem
18185 status collapsed
18186
18187 \begin_layout Plain Layout
18188 Tools\SpecialChar \menuseparator
18189 Preferences\SpecialChar \menuseparator
18190 Output\SpecialChar \menuseparator
18191 LaTeX\SpecialChar \menuseparator
18192 CheckTeX command
18193 \end_layout
18194
18195 \end_inset
18196
18197 , or the global 
18198 \family sans
18199 ChkTeX
18200 \family default
18201  installation configuration file (usually with the file 
18202 \family typewriter
18203 chktexrc
18204 \family default
18205 ).
18206  See below to learn what warnings can be enabled and disabled on the command
18207  line.
18208 \end_layout
18209
18210 \begin_layout Itemize
18211 Export your document as a raw LaTeX file using 
18212 \family sans
18213 File\SpecialChar \menuseparator
18214 Export\SpecialChar \menuseparator
18215 LaTeX
18216 \family default
18217  and run 
18218 \family typewriter
18219 chktex
18220 \family default
18221  manually on that.
18222  Invoked in this way, it can be a hassle to find the corresponding place
18223  in the document inside LyX, but with a little patience, you should be able
18224  to do it.
18225 \end_layout
18226
18227 \begin_layout Standard
18228 Here follows the warning messages that can be enabled and disabled in 
18229 \family sans
18230 Preferences
18231 \family default
18232 .
18233  Use 
18234 \family typewriter
18235 -n#
18236 \family default
18237  to disable a warning, and 
18238 \family typewriter
18239 -w#
18240 \family default
18241  to enable a warning.
18242  The emphasized entries are disabled by default, because the default is
18243  "
18244 \family typewriter
18245 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18246 \family default
18247 ".
18248 \end_layout
18249
18250 \begin_layout Standard
18251 Notice that you should only use the options that enable and disable warnings,
18252  because LyX relies on some of the other command line parameters to be set
18253  in a specific way to have a chance to communicate with 
18254 \family typewriter
18255 chktex
18256 \family default
18257 .
18258 \end_layout
18259
18260 \begin_layout Enumerate
18261
18262 \size small
18263 \emph on
18264 Command terminated with space.
18265 \end_layout
18266
18267 \begin_layout Enumerate
18268
18269 \size small
18270 Non-breaking space (
18271 \begin_inset Quotes eld
18272 \end_inset
18273
18274
18275 \family typewriter
18276 ~
18277 \family default
18278
18279 \begin_inset Quotes erd
18280 \end_inset
18281
18282 ) should have been used.
18283 \end_layout
18284
18285 \begin_layout Enumerate
18286
18287 \size small
18288 \emph on
18289 You should enclose the previous parenthesis with 
18290 \begin_inset Quotes eld
18291 \end_inset
18292
18293
18294 \family typewriter
18295 {}
18296 \family default
18297
18298 \begin_inset Quotes erd
18299 \end_inset
18300
18301 .
18302 \end_layout
18303
18304 \begin_layout Enumerate
18305
18306 \size small
18307 Italic correction (
18308 \begin_inset Quotes eld
18309 \end_inset
18310
18311
18312 \family typewriter
18313
18314 \backslash
18315 /
18316 \family default
18317
18318 \begin_inset Quotes erd
18319 \end_inset
18320
18321 ) found in non-italic buffer.
18322 \end_layout
18323
18324 \begin_layout Enumerate
18325
18326 \size small
18327 Italic correction (
18328 \begin_inset Quotes eld
18329 \end_inset
18330
18331
18332 \family typewriter
18333
18334 \backslash
18335 /
18336 \family default
18337
18338 \begin_inset Quotes erd
18339 \end_inset
18340
18341 ) found more than once.
18342 \end_layout
18343
18344 \begin_layout Enumerate
18345
18346 \size small
18347 \emph on
18348 No italic correction (
18349 \begin_inset Quotes eld
18350 \end_inset
18351
18352
18353 \family typewriter
18354
18355 \backslash
18356 /
18357 \family default
18358
18359 \begin_inset Quotes erd
18360 \end_inset
18361
18362 ) found.
18363 \end_layout
18364
18365 \begin_layout Enumerate
18366
18367 \size small
18368 Accent command 
18369 \begin_inset Quotes eld
18370 \end_inset
18371
18372
18373 \family typewriter
18374 cmd
18375 \family default
18376
18377 \begin_inset Quotes erd
18378 \end_inset
18379
18380  needs use of 
18381 \begin_inset Quotes eld
18382 \end_inset
18383
18384
18385 \family typewriter
18386 cmd
18387 \family default
18388
18389 \begin_inset Quotes erd
18390 \end_inset
18391
18392 .
18393 \end_layout
18394
18395 \begin_layout Enumerate
18396
18397 \size small
18398 Wrong length of dash may have been used.
18399 \end_layout
18400
18401 \begin_layout Enumerate
18402
18403 \size small
18404 \emph on
18405 \begin_inset Quotes eld
18406 \end_inset
18407
18408
18409 \family typewriter
18410 %s
18411 \family default
18412
18413 \begin_inset Quotes erd
18414 \end_inset
18415
18416  expected, found 
18417 \begin_inset Quotes eld
18418 \end_inset
18419
18420
18421 \family typewriter
18422 %s
18423 \family default
18424
18425 \begin_inset Quotes erd
18426 \end_inset
18427
18428 .
18429 \end_layout
18430
18431 \begin_layout Enumerate
18432
18433 \size small
18434 Solo 
18435 \begin_inset Quotes eld
18436 \end_inset
18437
18438
18439 \family typewriter
18440 %s
18441 \family default
18442
18443 \begin_inset Quotes erd
18444 \end_inset
18445
18446  found.
18447 \end_layout
18448
18449 \begin_layout Enumerate
18450
18451 \size small
18452 You should use 
18453 \begin_inset Quotes eld
18454 \end_inset
18455
18456
18457 \family typewriter
18458 %s
18459 \family default
18460
18461 \begin_inset Quotes erd
18462 \end_inset
18463
18464  to achieve an ellipsis.
18465 \end_layout
18466
18467 \begin_layout Enumerate
18468
18469 \size small
18470 Inter-word spacing (
18471 \begin_inset Quotes eld
18472 \end_inset
18473
18474
18475 \family typewriter
18476
18477 \backslash
18478
18479 \family default
18480  
18481 \begin_inset Quotes eld
18482 \end_inset
18483
18484 ) should perhaps be used.
18485 \end_layout
18486
18487 \begin_layout Enumerate
18488
18489 \size small
18490 Inter-sentence spacing (
18491 \begin_inset Quotes eld
18492 \end_inset
18493
18494
18495 \family typewriter
18496
18497 \backslash
18498 @
18499 \family default
18500
18501 \begin_inset Quotes erd
18502 \end_inset
18503
18504 ) should perhaps be used.
18505 \end_layout
18506
18507 \begin_layout Enumerate
18508
18509 \size small
18510 Could not find argument for command.
18511 \end_layout
18512
18513 \begin_layout Enumerate
18514
18515 \size small
18516 No match found for 
18517 \begin_inset Quotes eld
18518 \end_inset
18519
18520
18521 \family typewriter
18522 %s
18523 \family default
18524
18525 \begin_inset Quotes erd
18526 \end_inset
18527
18528 .
18529 \end_layout
18530
18531 \begin_layout Enumerate
18532
18533 \size small
18534 Math mode still on at end of LaTeX file.
18535 \end_layout
18536
18537 \begin_layout Enumerate
18538
18539 \size small
18540 Number of 
18541 \begin_inset Quotes eld
18542 \end_inset
18543
18544
18545 \family typewriter
18546 char
18547 \family default
18548
18549 \begin_inset Quotes erd
18550 \end_inset
18551
18552  doesn't match the number of 
18553 \begin_inset Quotes eld
18554 \end_inset
18555
18556
18557 \family typewriter
18558 char
18559 \family default
18560
18561 \begin_inset Quotes erd
18562 \end_inset
18563
18564 .
18565 \end_layout
18566
18567 \begin_layout Enumerate
18568
18569 \size small
18570 You should use either 
18571 \family typewriter
18572
18573 \begin_inset Quotes eld
18574 \end_inset
18575
18576
18577 \family default
18578  or 
18579 \family typewriter
18580
18581 \begin_inset Quotes erd
18582 \end_inset
18583
18584
18585 \family default
18586  as an alternative to 
18587 \begin_inset Quotes eld
18588 \end_inset
18589
18590
18591 \family typewriter
18592 "
18593 \family default
18594
18595 \begin_inset Quotes erd
18596 \end_inset
18597
18598 .
18599 \end_layout
18600
18601 \begin_layout Enumerate
18602
18603 \size small
18604 You should use "
18605 \family typewriter
18606 '
18607 \family default
18608 " (ASCII 39) instead of "
18609 \family typewriter
18610 ´
18611 \family default
18612 " (ASCII 180).
18613 \end_layout
18614
18615 \begin_layout Enumerate
18616
18617 \size small
18618 User-specified pattern found.
18619 \end_layout
18620
18621 \begin_layout Enumerate
18622
18623 \size small
18624 This command might not be intended.
18625 \end_layout
18626
18627 \begin_layout Enumerate
18628
18629 \size small
18630 \emph on
18631 Comment displayed.
18632 \end_layout
18633
18634 \begin_layout Enumerate
18635
18636 \size small
18637 Either 
18638 \family typewriter
18639 ''
18640 \backslash
18641 ,'
18642 \family default
18643  or 
18644 \family typewriter
18645 '
18646 \backslash
18647 ,''
18648 \family default
18649  will look better.
18650 \end_layout
18651
18652 \begin_layout Enumerate
18653
18654 \size small
18655 Delete this space to maintain correct page references.
18656 \end_layout
18657
18658 \begin_layout Enumerate
18659
18660 \size small
18661 \emph on
18662 You might wish to put this between a pair of 
18663 \begin_inset Quotes eld
18664 \end_inset
18665
18666
18667 \family typewriter
18668 {}
18669 \family default
18670
18671 \begin_inset Quotes erd
18672 \end_inset
18673
18674 .
18675 \end_layout
18676
18677 \begin_layout Enumerate
18678
18679 \size small
18680 You ought to remove spaces in front of punctuation.
18681 \end_layout
18682
18683 \begin_layout Enumerate
18684
18685 \size small
18686 Could not execute LaTeX command.
18687 \end_layout
18688
18689 \begin_layout Enumerate
18690
18691 \size small
18692 Don't use 
18693 \family typewriter
18694
18695 \backslash
18696 /
18697 \family default
18698  in front of small punctuation.
18699 \end_layout
18700
18701 \begin_layout Enumerate
18702
18703 \family typewriter
18704 \size small
18705 $
18706 \backslash
18707 times$
18708 \family default
18709  may look prettier here.
18710 \end_layout
18711
18712 \begin_layout Enumerate
18713
18714 \size small
18715 \emph on
18716 Multiple spaces detected in output.
18717 \end_layout
18718
18719 \begin_layout Enumerate
18720
18721 \size small
18722 This text may be ignored.
18723 \end_layout
18724
18725 \begin_layout Enumerate
18726
18727 \size small
18728 Use 
18729 \family typewriter
18730
18731 \begin_inset Quotes eld
18732 \end_inset
18733
18734
18735 \family default
18736  to begin quotation, not 
18737 \family typewriter
18738 '
18739 \family default
18740 .
18741 \end_layout
18742
18743 \begin_layout Enumerate
18744
18745 \size small
18746 Use 
18747 \family typewriter
18748 '
18749 \family default
18750  to end quotation, not 
18751 \family typewriter
18752
18753 \begin_inset Quotes eld
18754 \end_inset
18755
18756
18757 \family default
18758 .
18759 \end_layout
18760
18761 \begin_layout Enumerate
18762
18763 \size small
18764 Don't mix quotes.
18765 \end_layout
18766
18767 \begin_layout Enumerate
18768
18769 \size small
18770 You should perhaps use 
18771 \begin_inset Quotes eld
18772 \end_inset
18773
18774
18775 \family typewriter
18776 cmd
18777 \family default
18778
18779 \begin_inset Quotes erd
18780 \end_inset
18781
18782  instead.
18783 \end_layout
18784
18785 \begin_layout Enumerate
18786
18787 \size small
18788 You should put a space in front of/after parenthesis.
18789 \end_layout
18790
18791 \begin_layout Enumerate
18792
18793 \size small
18794 You should avoid spaces in front of/after parenthesis.
18795 \end_layout
18796
18797 \begin_layout Enumerate
18798
18799 \size small
18800 \emph on
18801 You should not use punctuation in front of/after quotes.
18802 \end_layout
18803
18804 \begin_layout Enumerate
18805
18806 \size small
18807 Double space found.
18808 \end_layout
18809
18810 \begin_layout Enumerate
18811
18812 \size small
18813 You should put punctuation outside inner/inside display math mode.
18814 \end_layout
18815
18816 \begin_layout Enumerate
18817
18818 \size small
18819 You ought to not use primitive TeX in LaTeX code.
18820 \end_layout
18821
18822 \begin_layout Enumerate
18823
18824 \size small
18825 You should remove spaces in front of 
18826 \begin_inset Quotes eld
18827 \end_inset
18828
18829
18830 \family typewriter
18831 %s
18832 \family default
18833
18834 \begin_inset Quotes erd
18835 \end_inset
18836
18837
18838 \end_layout
18839
18840 \begin_layout Enumerate
18841
18842 \size small
18843 \begin_inset Quotes eld
18844 \end_inset
18845
18846
18847 \family typewriter
18848 %s
18849 \family default
18850
18851 \begin_inset Quotes erd
18852 \end_inset
18853
18854  is normally not followed by 
18855 \begin_inset Quotes eld
18856 \end_inset
18857
18858
18859 \family typewriter
18860 %c
18861 \family default
18862
18863 \begin_inset Quotes erd
18864 \end_inset
18865
18866 .
18867 \end_layout
18868
18869 \begin_layout Standard
18870 In later versions of LyX, we hope to provide a more complete interface to
18871  this tool (and it's smaller cousin 
18872 \family typewriter
18873 lacheck
18874 \family default
18875 ) to exploit the full power of it.
18876  But it's not exactly useless as it is now: go try it on one of your existing
18877  documents of a certain length and be surprised.
18878 \end_layout
18879
18880 \begin_layout Section
18881 Version Control in LyX
18882 \end_layout
18883
18884 \begin_layout Standard
18885 by
18886 \noun on
18887  Lars Gullik Bjønnes 
18888 \noun default
18889 and 
18890 \noun on
18891 Pavel Sanda
18892 \end_layout
18893
18894 \begin_layout Subsection
18895 Introduction
18896 \end_layout
18897
18898 \begin_layout Standard
18899 A friend of mine wanted to try LyX for a group project.
18900  When he didn't find support for version control or file locking, he dropped
18901  it.
18902  This angered me a bit, so I thought that I should at least make support
18903  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18904  This has been done.
18905  LyX now supports some of the most basic RCS/CVS/SVN commands.
18906  If you need something a bit more sophisticated you will have to do that
18907  manually in a terminal.
18908 \end_layout
18909
18910 \begin_layout Standard
18911 Also note that CVS support is not as good as subversion support so we advise
18912  using SVN instead.
18913  A good place to start learning Subversion is SVN Book
18914 \begin_inset Foot
18915 status open
18916
18917 \begin_layout Plain Layout
18918 \begin_inset CommandInset href
18919 LatexCommand href
18920 target "http://svnbook.red-bean.com/"
18921
18922 \end_inset
18923
18924
18925 \end_layout
18926
18927 \end_inset
18928
18929 .
18930  In the case of RCS you should read 
18931 \begin_inset Quotes eld
18932 \end_inset
18933
18934 rcsintro
18935 \begin_inset Quotes erd
18936 \end_inset
18937
18938  (a man file, read it with 
18939 \family typewriter
18940 man rcsintro
18941 \family default
18942 ).
18943  This file describes all the basic features of RCS.
18944  You should especially notice the comment about a RCS directory, and the
18945  notion of a master RCS file (the file ending in 
18946 \family typewriter
18947 ,v
18948 \family default
18949 ).
18950 \end_layout
18951
18952 \begin_layout Standard
18953 Before you begin to use the version control features in LyX, you should
18954  be familiar with RCS/CVS/SVN usage.
18955  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18956  package—no guarantees are made for older versions.
18957  Most of the log messages are not currently displayed after operations —
18958  you can check them in the Messages pane if unsure.
18959 \end_layout
18960
18961 \begin_layout Standard
18962 For introducing your own external commands consult vc-command in the manual
18963  of LyX functions.
18964 \end_layout
18965
18966 \begin_layout Subsection
18967 RCS commands in LyX
18968 \end_layout
18969
18970 \begin_layout Standard
18971 The following sections describe the RCS commands supported by LyX.
18972  You can find them in the 
18973 \family sans
18974 File\SpecialChar \menuseparator
18975 Version
18976 \begin_inset space ~
18977 \end_inset
18978
18979 Control
18980 \family default
18981  submenu.
18982  LyX was tested against RCS 5.7/5.8.
18983 \end_layout
18984
18985 \begin_layout Subsubsection
18986
18987 \family sans
18988 Register
18989 \end_layout
18990
18991 \begin_layout Standard
18992 If your document is not under revision control, this is the only item shown
18993  in the menu.
18994  And if it is under revision control, the 
18995 \family sans
18996 Register
18997 \family default
18998  item is not visible.
18999  
19000 \end_layout
19001
19002 \begin_layout Standard
19003 This command registers your document with RCS (unless you are under the
19004  directory managed by CVS)\SpecialChar \@.
19005  You are asked interactively to supply an initial
19006  description of the document.
19007  The document is now set in Read-Only mode and you have to 
19008 \family sans
19009 Check
19010 \begin_inset space ~
19011 \end_inset
19012
19013 Out
19014 \begin_inset space ~
19015 \end_inset
19016
19017 For
19018 \begin_inset space ~
19019 \end_inset
19020
19021 Edit
19022 \family default
19023 , before making any changes to it.
19024  A document under revision control has a 
19025 \begin_inset Quotes eld
19026 \end_inset
19027
19028 [RCS:<version> <locker>]
19029 \begin_inset Quotes erd
19030 \end_inset
19031
19032  item tagged to the filename in the minibuffer.
19033 \end_layout
19034
19035 \begin_layout Standard
19036 RCS command that is run: 
19037 \family typewriter
19038 ci -q -u -i -t-"<initial description>" <file-name>
19039 \end_layout
19040
19041 \begin_layout Standard
19042 Read 
19043 \family typewriter
19044 man ci
19045 \family default
19046  to understand the switches.
19047  
19048 \end_layout
19049
19050 \begin_layout Subsubsection
19051
19052 \family sans
19053 Check In Changes
19054 \end_layout
19055
19056 \begin_layout Standard
19057 When you are finished editing a file, you check in your changes.
19058  When you do this, you are asked for a description of the changes.
19059  This is stored in the history log.
19060  The version number is bumped, your changes are applied to the master RCS
19061  file, the document is unlocked and set to Read-Only mode.
19062  
19063 \end_layout
19064
19065 \begin_layout Standard
19066 RCS command: 
19067 \family typewriter
19068 ci -q -u -m"<description>" <file-name>
19069 \end_layout
19070
19071 \begin_layout Subsubsection
19072
19073 \family sans
19074 Check Out For Edit
19075 \end_layout
19076
19077 \begin_layout Standard
19078 By doing this you lock the document so that only you can edit it.
19079  This will also make the document Read-Write only for you.
19080  You will usually continue editing for a while and when you are finished
19081  you check in your changes.
19082  The status line is changed to reflect that you have locked the file.
19083  
19084 \end_layout
19085
19086 \begin_layout Standard
19087 RCS command: 
19088 \family typewriter
19089 co -q -l <file-name>
19090 \end_layout
19091
19092 \begin_layout Subsubsection
19093
19094 \family sans
19095 Revert To Repository Version
19096 \end_layout
19097
19098 \begin_layout Standard
19099 This will discard all changes made to the document since the last check
19100  in.
19101  You get a warning before changes are discarded.
19102 \end_layout
19103
19104 \begin_layout Standard
19105 RCS command: 
19106 \family typewriter
19107 co -f -u<version> <file-name>
19108 \end_layout
19109
19110 \begin_layout Subsubsection
19111
19112 \family sans
19113 Undo Last Checkin
19114 \end_layout
19115
19116 \begin_layout Standard
19117 This makes as if the last check in never happened.
19118  No changes are made to the document loaded into LyX, but the last version
19119  is removed from the master RCS file.
19120  
19121 \end_layout
19122
19123 \begin_layout Standard
19124 RCS command: 
19125 \family typewriter
19126 rcs -o<version> <file-name>
19127 \end_layout
19128
19129 \begin_layout Subsubsection
19130
19131 \family sans
19132 Show History
19133 \end_layout
19134
19135 \begin_layout Standard
19136 This shows the complete history of the RCS document.
19137  The output of 
19138 \family typewriter
19139 rlog <file-name>
19140 \family default
19141  is shown in a browser.
19142  See 
19143 \family typewriter
19144 man rlog
19145 \family default
19146  for more info.
19147 \end_layout
19148
19149 \begin_layout Subsubsection
19150 Revision info
19151 \end_layout
19152
19153 \begin_layout Standard
19154 LyX supports RCS version number, author name, date and time of last commit.
19155  All those are extracted from 
19156 \family typewriter
19157 rlog -r <file-name>
19158 \family default
19159 .
19160  For other details see 
19161 \begin_inset CommandInset ref
19162 LatexCommand ref
19163 reference "sub:VCS-Revision-Information"
19164
19165 \end_inset
19166
19167  for details.
19168 \end_layout
19169
19170 \begin_layout Subsection
19171 CVS commands in LyX
19172 \end_layout
19173
19174 \begin_layout Standard
19175 A subset of CVS operations is supported by LyX.
19176  You can find the commands in the 
19177 \family sans
19178 File\SpecialChar \menuseparator
19179 Version
19180 \begin_inset space ~
19181 \end_inset
19182
19183 Control
19184 \family default
19185  submenu.
19186  The version control system SVN is more powerful, so please use it instead
19187  of CVS if possible.
19188 \end_layout
19189
19190 \begin_layout Subsubsection
19191
19192 \family sans
19193 General CVS usage
19194 \end_layout
19195
19196 \begin_layout Standard
19197 If you start from scratch with CVS you have to create your repository and
19198  checkout the working copy with external tools.
19199  If you're using a client-server setup you may need to login before doing
19200  the first repository checkout.
19201 \end_layout
19202
19203 \begin_layout Standard
19204 If your documents are under revision control and others are using the same
19205  repository problems arise when different changes to the same document at
19206  the same location happen.
19207  Standard CVS repositories doesn't operate with a file locking mechanism.
19208  This may be surprising, but conflicts only occur if people disagree on
19209  the proper content of the same part of a document.
19210  So, if co-workers are used to communicate regularly, these conflicts occur
19211  rarely.
19212  If they don't communicate they have a fundamental problem anyway.
19213  Nevertheless some people like to work with so called 
19214 \begin_inset Quotes eld
19215 \end_inset
19216
19217 reserved checkouts
19218 \begin_inset Quotes erd
19219 \end_inset
19220
19221 .
19222  If they do so the working copy of all files is readonly when checked out
19223  first and the user starts editing after using a special command to make
19224  the working copy writable.
19225  When the changes are checked in the working copy returns to readonly state.
19226  With LyX one has to edit the 
19227 \begin_inset Flex Code
19228 status collapsed
19229
19230 \begin_layout Plain Layout
19231 .cvsrc
19232 \end_layout
19233
19234 \end_inset
19235
19236  file and add the line 
19237 \begin_inset Flex Code
19238 status collapsed
19239
19240 \begin_layout Plain Layout
19241 cvs -r
19242 \end_layout
19243
19244 \end_inset
19245
19246  to work with reserved checkouts.
19247  The benefit is the possibility to see who is using a writable copy of some
19248  document.
19249  It's not guaranteed only one user makes a copy writable.
19250 \end_layout
19251
19252 \begin_layout Standard
19253 LyX tries to guess if you're using reserved or non-reserved checkouts.
19254  If your working copy is readonly or it is writable and an additional copy
19255  of your document exists in the CVS/Base sub-directory a reserved otherwise
19256  a non-reserved checkout is assumed.
19257  When a reserved checkout is detected you have to use 
19258 \begin_inset Flex MenuItem
19259 status collapsed
19260
19261 \begin_layout Plain Layout
19262 Check Out
19263 \end_layout
19264
19265 \end_inset
19266
19267  to make your working copy writable if it's readonly.
19268  After doing so the 
19269 \begin_inset Flex MenuItem
19270 status collapsed
19271
19272 \begin_layout Plain Layout
19273 Check In
19274 \end_layout
19275
19276 \end_inset
19277
19278  operation is possible and that makes your working copy readonly again after
19279  transferring your changes to the repository.
19280 \end_layout
19281
19282 \begin_layout Standard
19283 More information about CVS can be found here 
19284 \begin_inset Flex URL
19285 status collapsed
19286
19287 \begin_layout Plain Layout
19288
19289 http://www.nongnu.org/cvs
19290 \end_layout
19291
19292 \end_inset
19293
19294  and here 
19295 \begin_inset Flex URL
19296 status collapsed
19297
19298 \begin_layout Plain Layout
19299
19300 http://ximbiot.com/cvs
19301 \end_layout
19302
19303 \end_inset
19304
19305 .
19306 \end_layout
19307
19308 \begin_layout Standard
19309 Read 
19310 \family typewriter
19311 man cvs
19312 \family default
19313  to understand the sub-commands and the switches mentioned below.
19314 \end_layout
19315
19316 \begin_layout Subsubsection
19317
19318 \family sans
19319 Register
19320 \end_layout
19321
19322 \begin_layout Standard
19323 If your document is not under revision control, this is the only item shown
19324  in the menu.
19325  And if it is under revision control, the 
19326 \family sans
19327 \bar under
19328 R
19329 \bar default
19330 egister
19331 \family default
19332  item is not visible.
19333  
19334 \end_layout
19335
19336 \begin_layout Standard
19337 This command registers in CVS your document 
19338 \begin_inset Flex Strong
19339 status collapsed
19340
19341 \begin_layout Plain Layout
19342
19343 \emph on
19344 only
19345 \end_layout
19346
19347 \end_inset
19348
19349  in the case you have already the documents directory under CVS control
19350  (in particular 
19351 \family typewriter
19352 CVS/Entries
19353 \family default
19354  file exists).
19355  This means you have to create or checkout the archive by yourself using
19356  external tools.
19357  (In case you forget that step LyX registers the document with RCS.)
19358 \end_layout
19359
19360 \begin_layout Standard
19361 Then you are asked interactively to supply an initial description of the
19362  document.
19363  Don't forget that registered file is not yet checked in.
19364 \end_layout
19365
19366 \begin_layout Standard
19367 CVS command that is run: 
19368 \family typewriter
19369 cvs -q add -m"<entered message>" "<file-name>"
19370 \end_layout
19371
19372 \begin_layout Standard
19373 The term 
19374 \family typewriter
19375 "<file-name>"
19376 \family default
19377  above and for all other CVS commands is an abbreviation for 
19378 \begin_inset Quotes eld
19379 \end_inset
19380
19381 change the current working directory to file location and use the file name
19382  without path component as argument
19383 \begin_inset Quotes erd
19384 \end_inset
19385
19386 .
19387 \end_layout
19388
19389 \begin_layout Subsubsection
19390
19391 \family sans
19392 Check In Changes
19393 \end_layout
19394
19395 \begin_layout Standard
19396 When you are finished editing a file, you commit your changes.
19397  When you do this and you had changed the document, you are asked for a
19398  description of the changes.
19399  After that changes are written to the repository.
19400  In case you didn't change the document and a reserved checkout is detected
19401  the reservation made on 
19402 \begin_inset Flex MenuItem
19403 status collapsed
19404
19405 \begin_layout Plain Layout
19406 Check Out
19407 \end_layout
19408
19409 \end_inset
19410
19411  is undone.
19412 \end_layout
19413
19414 \begin_layout Labeling
19415 \labelwidthstring 00.00.0000
19416 CVS
19417 \begin_inset space ~
19418 \end_inset
19419
19420 command: 
19421 \begin_inset space ~
19422 \end_inset
19423
19424
19425 \begin_inset Newline newline
19426 \end_inset
19427
19428
19429 \begin_inset Flex Code
19430 status collapsed
19431
19432 \begin_layout Plain Layout
19433 cvs 
19434 \family typewriter
19435 -q commit -m"<description>" "<file-name>"
19436 \end_layout
19437
19438 \end_inset
19439
19440  or
19441 \begin_inset Newline newline
19442 \end_inset
19443
19444
19445 \begin_inset Flex Code
19446 status collapsed
19447
19448 \begin_layout Plain Layout
19449 cvs -q unedit 
19450 \family typewriter
19451 "<file-name>"
19452 \end_layout
19453
19454 \end_inset
19455
19456
19457 \end_layout
19458
19459 \begin_layout Subsubsection
19460
19461 \family sans
19462 Check Out Changes
19463 \end_layout
19464
19465 \begin_layout Standard
19466 When you are sharing a repository with others, you may have to incorporate
19467  their changes into your working copy.
19468 \end_layout
19469
19470 \begin_layout Standard
19471 CVS command: 
19472 \family typewriter
19473 cvs -q update "<file-name>"
19474 \end_layout
19475
19476 \begin_layout Standard
19477 If a readonly checkout is detected the working copy is made writable and
19478  reserved.
19479 \end_layout
19480
19481 \begin_layout Standard
19482 CVS command: 
19483 \family typewriter
19484 cvs -q edit "<file-name>"
19485 \end_layout
19486
19487 \begin_layout Subsubsection
19488
19489 \family sans
19490 Revert To Repository Version
19491 \end_layout
19492
19493 \begin_layout Standard
19494 This will discard all changes made to the document since the last check
19495  in.
19496  You get a warning before changes are discarded.
19497  Firstly the file is deleted, secondly CVS update command is run.
19498 \end_layout
19499
19500 \begin_layout Standard
19501 CVS command: 
19502 \family typewriter
19503 cvs -q update "<file-name>"
19504 \end_layout
19505
19506 \begin_layout Standard
19507 If a reserved checkout is detected and the working copy has no changes only
19508  the reservation is undone.
19509 \end_layout
19510
19511 \begin_layout Standard
19512 CVS command: 
19513 \family typewriter
19514 cvs -q unedit "<file-name>"
19515 \end_layout
19516
19517 \begin_layout Subsubsection
19518 Update of the local directory checkout from repository
19519 \end_layout
19520
19521 \begin_layout Standard
19522 Once your documents gets more complex, containing sub-documents and pictures,
19523  including external 
19524 \begin_inset Flex Code
19525 status collapsed
19526
19527 \begin_layout Plain Layout
19528 .tex
19529 \end_layout
19530
19531 \end_inset
19532
19533  files and so on using version control becomes more complicated.
19534  LyX supports updating the whole tree in which resides the document.
19535  This become especially useful once you cooperate with people which neither
19536  have detailed knowledge about CVS usage nor they have ambition to commit
19537  additional material to the repository.
19538  You have to organize the files structure so that all external files are
19539  in the same directory or subdirectories of the document.
19540  It's good practice anyway to store multipart documents in an extra directory.
19541 \end_layout
19542
19543 \begin_layout Standard
19544 The 
19545 \begin_inset Flex Code
19546 status collapsed
19547
19548 \begin_layout Plain Layout
19549 Update local directory from repository
19550 \end_layout
19551
19552 \end_inset
19553
19554  command updates the whole directory.
19555  If local changes are detected user is warned before update starts.
19556  In case of merge conflicts both versions of the conflicting document parts
19557  are placed in the final document.
19558  You have to review and correct the result of the merge.
19559  You'll find the conflicts enclosed in pairs of 
19560 \begin_inset Flex Code
19561 status collapsed
19562
19563 \begin_layout Plain Layout
19564 <<<<<<<
19565 \end_layout
19566
19567 \end_inset
19568
19569  and 
19570 \begin_inset Flex Code
19571 status collapsed
19572
19573 \begin_layout Plain Layout
19574 >>>>>>>
19575 \end_layout
19576
19577 \end_inset
19578
19579  separated by 
19580 \begin_inset Flex Code
19581 status collapsed
19582
19583 \begin_layout Plain Layout
19584 =======
19585 \end_layout
19586
19587 \end_inset
19588
19589 .
19590  The first part is your version as before the update operation with the
19591  document name prepended.
19592  The second one is the repository version with the version number after
19593  the sequence of 
19594 \begin_inset Flex Code
19595 status collapsed
19596
19597 \begin_layout Plain Layout
19598 >
19599 \end_layout
19600
19601 \end_inset
19602
19603  signs.
19604 \end_layout
19605
19606 \begin_layout Labeling
19607 \labelwidthstring 00.00.0000
19608 CVS
19609 \begin_inset space ~
19610 \end_inset
19611
19612 commands: 
19613 \begin_inset space ~
19614 \end_inset
19615
19616
19617 \begin_inset Newline newline
19618 \end_inset
19619
19620
19621 \begin_inset Flex Code
19622 status collapsed
19623
19624 \begin_layout Plain Layout
19625 cd $path; cvs diff 
19626 \family typewriter
19627 "."
19628 \end_layout
19629
19630 \end_inset
19631
19632  (Ask if changes are detected.)
19633 \begin_inset Newline newline
19634 \end_inset
19635
19636
19637 \begin_inset Flex Code
19638 status collapsed
19639
19640 \begin_layout Plain Layout
19641 cd $path; cvs -q update 
19642 \family typewriter
19643 "."
19644 \end_layout
19645
19646 \end_inset
19647
19648
19649 \end_layout
19650
19651 \begin_layout Standard
19652 where 
19653 \begin_inset Flex Code
19654 status collapsed
19655
19656 \begin_layout Plain Layout
19657 $path
19658 \end_layout
19659
19660 \end_inset
19661
19662  stands for the path to the document.
19663 \end_layout
19664
19665 \begin_layout Subsubsection
19666
19667 \family sans
19668 Show History
19669 \end_layout
19670
19671 \begin_layout Standard
19672 This shows the complete history of the CVS document.
19673  The output of 
19674 \family typewriter
19675 cvs log "<file-name>"
19676 \family default
19677  is shown in a browser.
19678 \end_layout
19679
19680 \begin_layout Subsection
19681 SVN commands in LyX
19682 \end_layout
19683
19684 \begin_layout Standard
19685 SVN is now partially supported by LyX.
19686  You can find the commands in the 
19687 \family sans
19688 File\SpecialChar \menuseparator
19689 Version
19690 \begin_inset space ~
19691 \end_inset
19692
19693 Control
19694 \family default
19695  submenu.
19696  Please note that if you use password protected access to repository via
19697  ssh, you will be asked in terminal window.
19698  LyX was tested against SVN 1.5 and 1.6
19699 \begin_inset Foot
19700 status open
19701
19702 \begin_layout Plain Layout
19703 Most of the commands will work with 1.4 too, see 
19704 \begin_inset CommandInset ref
19705 LatexCommand ref
19706 reference "sub:SVN-Repo-Update"
19707
19708 \end_inset
19709
19710 .
19711 \end_layout
19712
19713 \end_inset
19714
19715
19716 \end_layout
19717
19718 \begin_layout Subsubsection
19719
19720 \family sans
19721 Register
19722 \end_layout
19723
19724 \begin_layout Standard
19725 If your document is not under revision control, this is the only item shown
19726  in the menu.
19727  And if it is under revision control, the 
19728 \family sans
19729 \bar under
19730 R
19731 \bar default
19732 egister
19733 \family default
19734  item is not visible.
19735  
19736 \end_layout
19737
19738 \begin_layout Standard
19739 This command registers in SVN your document ONLY in case you have already
19740  the documents directory under SVN control (in particular 
19741 \family typewriter
19742 .svn/entries
19743 \family default
19744  file exists).
19745  This means you have to checkout the archive by yourself.
19746  
19747 \end_layout
19748
19749 \begin_layout Standard
19750 Then you are asked interactively to supply an initial description of the
19751  document.
19752  Don't forget that registered file is not yet commited.
19753 \end_layout
19754
19755 \begin_layout Standard
19756 SVN command that is run: 
19757 \family typewriter
19758 svn add -q 
19759 \begin_inset Quotes eld
19760 \end_inset
19761
19762 <file-name>
19763 \begin_inset Quotes erd
19764 \end_inset
19765
19766
19767 \end_layout
19768
19769 \begin_layout Standard
19770 Read 
19771 \family typewriter
19772 man svn
19773 \family default
19774  to understand the switches.
19775  
19776 \end_layout
19777
19778 \begin_layout Subsubsection
19779
19780 \family sans
19781 Check In Changes
19782 \end_layout
19783
19784 \begin_layout Standard
19785 When you are finished editing a file, you commit your changes.
19786  When you do this, you are asked for a description of the changes.
19787  After that changes are commited.
19788 \end_layout
19789
19790 \begin_layout Standard
19791 SVN command:
19792 \begin_inset Foot
19793 status collapsed
19794
19795 \begin_layout Plain Layout
19796 In case locking is not enabled.
19797  See Section 
19798 \begin_inset CommandInset ref
19799 LatexCommand ref
19800 reference "subsec:SVN-File-Locking"
19801
19802 \end_inset
19803
19804 .
19805 \end_layout
19806
19807 \end_inset
19808
19809  
19810 \family typewriter
19811 svn commit -q -m"<description>" <file-name>
19812 \end_layout
19813
19814 \begin_layout Subsubsection
19815
19816 \family sans
19817 Check Out For Edit
19818 \end_layout
19819
19820 \begin_layout Standard
19821 Updates the changes of this file from the repository.
19822  Be sure you understand SVN merging and conflicts resolving before using
19823  this function, because all conflicts has to be resolved manually by you!
19824 \end_layout
19825
19826 \begin_layout Standard
19827 SVN command:
19828 \begin_inset Foot
19829 status collapsed
19830
19831 \begin_layout Plain Layout
19832 Ditto.
19833 \end_layout
19834
19835 \end_inset
19836
19837  
19838 \family typewriter
19839 svn update --non-interactive 
19840 \begin_inset Quotes eld
19841 \end_inset
19842
19843 <file-name>
19844 \begin_inset Quotes erd
19845 \end_inset
19846
19847
19848 \end_layout
19849
19850 \begin_layout Subsubsection
19851
19852 \family sans
19853 Revert To Repository Version
19854 \end_layout
19855
19856 \begin_layout Standard
19857 This will discard all changes made to the document since the last check
19858  in.
19859  You get a warning before changes are discarded.
19860  
19861 \end_layout
19862
19863 \begin_layout Standard
19864 SVN command: 
19865 \family typewriter
19866 svn revert -q 
19867 \begin_inset Quotes eld
19868 \end_inset
19869
19870 <file-name>
19871 \begin_inset Quotes erd
19872 \end_inset
19873
19874
19875 \end_layout
19876
19877 \begin_layout Subsubsection
19878 \begin_inset CommandInset label
19879 LatexCommand label
19880 name "sub:SVN-Repo-Update"
19881
19882 \end_inset
19883
19884 Update of the local directory checkout from repository
19885 \begin_inset Foot
19886 status collapsed
19887
19888 \begin_layout Plain Layout
19889 Note that this command will work only with subversion 
19890 \begin_inset Formula $\geqq1.5$
19891 \end_inset
19892
19893
19894 \end_layout
19895
19896 \end_inset
19897
19898
19899 \end_layout
19900
19901 \begin_layout Standard
19902 All the commands above have one shortcomming - they deal with the current
19903  document only.
19904  Once your document contains pictures, includes external 
19905 \begin_inset Flex Code
19906 status collapsed
19907
19908 \begin_layout Plain Layout
19909 .tex
19910 \end_layout
19911
19912 \end_inset
19913
19914  files and so on administration becomes more complicated.
19915  LyX now supports updating the whole tree in which resides the document
19916 \begin_inset Foot
19917 status collapsed
19918
19919 \begin_layout Plain Layout
19920 One need to organize the files structure so that all external files are
19921  in the same directory or subdirectories of the document.
19922  
19923 \end_layout
19924
19925 \end_inset
19926
19927 .
19928  This become especially useful once you cooperate with people which neither
19929  know about subversion management nor they have ambition to commit additional
19930  material to the repository.
19931  
19932 \end_layout
19933
19934 \begin_layout Standard
19935 \begin_inset Flex Code
19936 status collapsed
19937
19938 \begin_layout Plain Layout
19939 Update local directory from repository
19940 \end_layout
19941
19942 \end_inset
19943
19944  command updates the whole directory and in case of merge conflicts local
19945  version of the files are left, so no unintended data loss occurs.
19946  If local changes are detected user is warned before update starts.
19947 \end_layout
19948
19949 \begin_layout Labeling
19950 \labelwidthstring 00.00.0000
19951 SVN
19952 \begin_inset space ~
19953 \end_inset
19954
19955 commands: 
19956 \begin_inset space ~
19957 \end_inset
19958
19959
19960 \begin_inset Newline newline
19961 \end_inset
19962
19963
19964 \begin_inset Flex Code
19965 status collapsed
19966
19967 \begin_layout Plain Layout
19968 svn diff $path
19969 \end_layout
19970
19971 \end_inset
19972
19973  (Ask if changes are detected.)
19974 \begin_inset Newline newline
19975 \end_inset
19976
19977
19978 \begin_inset Flex Code
19979 status collapsed
19980
19981 \begin_layout Plain Layout
19982 svn update --accept mine-full $path
19983 \end_layout
19984
19985 \end_inset
19986
19987
19988 \end_layout
19989
19990 \begin_layout Standard
19991 where 
19992 \begin_inset Flex Code
19993 status collapsed
19994
19995 \begin_layout Plain Layout
19996 $path
19997 \end_layout
19998
19999 \end_inset
20000
20001  stands for the path to the document.
20002 \end_layout
20003
20004 \begin_layout Subsubsection
20005
20006 \family sans
20007 Show History
20008 \end_layout
20009
20010 \begin_layout Standard
20011 This shows the complete history of the SVN document.
20012  The output of 
20013 \family typewriter
20014 svn log 
20015 \begin_inset Quotes eld
20016 \end_inset
20017
20018 <file-name>
20019 \begin_inset Quotes erd
20020 \end_inset
20021
20022
20023 \family default
20024  is shown in a browser.
20025 \end_layout
20026
20027 \begin_layout Subsubsection
20028 File Locking
20029 \begin_inset CommandInset label
20030 LatexCommand label
20031 name "subsec:SVN-File-Locking"
20032
20033 \end_inset
20034
20035
20036 \end_layout
20037
20038 \begin_layout Standard
20039 The file exchange through various revision control systems brings the problem
20040  of merge conflicts in case two different users try to edit the same (parts
20041  of) document.
20042  When such a conflict happens it needs manual resolving and one reasonable
20043  alternative is to provide some kind of locking mechanism, which guarantees
20044  that only one user is allowed to edit file at the given time.
20045 \end_layout
20046
20047 \begin_layout Standard
20048 SVN has two such mechanisms to provide mutual exclusivity for file access
20049  - locks and automatic setting of write permissions (see sec.
20050  
20051 \begin_inset CommandInset ref
20052 LatexCommand ref
20053 reference "subsec:Automatical-Locking-Property"
20054
20055 \end_inset
20056
20057 ) based on 
20058 \begin_inset Flex Code
20059 status collapsed
20060
20061 \begin_layout Plain Layout
20062 svn:needs-lock
20063 \end_layout
20064
20065 \end_inset
20066
20067  file svn property
20068 \begin_inset Foot
20069 status open
20070
20071 \begin_layout Plain Layout
20072 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20073 \end_layout
20074
20075 \end_inset
20076
20077 .
20078  If this property is detected for a given document LyX starts to use SVN
20079  locks for document editing automatically and the whole check-in/out mechanism
20080  switches to the same regimen as for RCS.
20081  This in particular means there are two different modes of file use in LyX:
20082 \end_layout
20083
20084 \begin_layout Itemize
20085 Unlocked state.
20086  The loaded file is in the read-only mode.
20087  For editing on needs to check-out.
20088  
20089 \emph on
20090 Check-out
20091 \emph default
20092  consists of updating from the repository and gaining write lock.
20093  If the lock is not possible to obtain, we remain in unlocked state.
20094 \end_layout
20095
20096 \begin_layout Itemize
20097 Locked state.
20098  The loaded file is in the 'normal' edit mode.
20099  No other user is allowed to edit the file.
20100  
20101 \emph on
20102 Check-in
20103 \emph default
20104  consists of commiting changes and releasing write-lock.
20105  If no changes have been made to the document, no commit will be produced
20106 \begin_inset Foot
20107 status collapsed
20108
20109 \begin_layout Plain Layout
20110 Don't be puzzled by the fact that you will be asked for commit message anyway.
20111 \end_layout
20112
20113 \end_inset
20114
20115  and only the write-lock will be released.
20116 \end_layout
20117
20118 \begin_layout Standard
20119 SVN commands:
20120 \end_layout
20121
20122 \begin_layout Labeling
20123 \labelwidthstring 00.00.0000
20124 Check-in:
20125 \family typewriter
20126  svn commit -q -m"<description>" "<file-name>"
20127 \begin_inset Newline newline
20128 \end_inset
20129
20130 svn unlock "<file-name>"
20131 \end_layout
20132
20133 \begin_layout Labeling
20134 \labelwidthstring 00.00.0000
20135 Check-out: 
20136 \family typewriter
20137 svn update "<file-name>"
20138 \begin_inset Newline newline
20139 \end_inset
20140
20141 svn lock "<file-name>"
20142 \end_layout
20143
20144 \begin_layout Subsubsection
20145
20146 \family typewriter
20147 \begin_inset CommandInset label
20148 LatexCommand label
20149 name "subsec:Automatical-Locking-Property"
20150
20151 \end_inset
20152
20153
20154 \family default
20155 Automatic Locking Property
20156 \end_layout
20157
20158 \begin_layout Standard
20159 The above mentioned automatic setting of write permissions of the .lyx file
20160  can be set through
20161 \family sans
20162 \bar under
20163  F
20164 \bar default
20165 ile\SpecialChar \menuseparator
20166
20167 \bar under
20168 V
20169 \bar default
20170 ersion
20171 \begin_inset space ~
20172 \end_inset
20173
20174 Control\SpecialChar \menuseparator
20175
20176 \bar under
20177 T
20178 \bar default
20179 oggle locking property
20180 \family default
20181 .
20182  This command is active only when the file is not locked on the svn server
20183  (i.e.
20184  you need to check-out before proceeding).
20185 \end_layout
20186
20187 \begin_layout Labeling
20188 \labelwidthstring 00.00.0000
20189 SVN
20190 \begin_inset space ~
20191 \end_inset
20192
20193 commands:
20194 \end_layout
20195
20196 \begin_layout Labeling
20197 \labelwidthstring 00.00.0000
20198 Set:
20199 \family typewriter
20200  svn propset svn:needs-lock ON "<file-name>"
20201 \end_layout
20202
20203 \begin_layout Labeling
20204 \labelwidthstring 00.00.0000
20205 Unset: 
20206 \family typewriter
20207 svn propdel svn:needs-lock "<file-name>"
20208 \end_layout
20209
20210 \begin_layout Subsubsection
20211 \begin_inset CommandInset label
20212 LatexCommand label
20213 name "sub:VCS-Revision-Information"
20214
20215 \end_inset
20216
20217 Revision Information in Documents
20218 \end_layout
20219
20220 \begin_layout Standard
20221 There are more possibilities how to activate revision information in our
20222  document.
20223 \end_layout
20224
20225 \begin_layout Itemize
20226 LyX supports directly:
20227 \end_layout
20228
20229 \begin_deeper
20230 \begin_layout Itemize
20231 tree revision information (
20232 \begin_inset Flex Code
20233 status collapsed
20234
20235 \begin_layout Plain Layout
20236 vcs-tree-revision
20237 \end_layout
20238
20239 \end_inset
20240
20241 ).
20242  The result is the output of the 
20243 \begin_inset Flex Code
20244 status collapsed
20245
20246 \begin_layout Plain Layout
20247 svnversion
20248 \end_layout
20249
20250 \end_inset
20251
20252  command, the following table gives you an idea, how to read the results.
20253 \end_layout
20254
20255 \begin_layout Standard
20256 \align center
20257 \begin_inset Tabular
20258 <lyxtabular version="3" rows="6" columns="2">
20259 <features tabularvalignment="middle">
20260 <column alignment="center" valignment="top" width="0">
20261 <column alignment="center" valignment="top" width="0">
20262 <row>
20263 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20264 \begin_inset Text
20265
20266 \begin_layout Plain Layout
20267 Output
20268 \end_layout
20269
20270 \end_inset
20271 </cell>
20272 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20273 \begin_inset Text
20274
20275 \begin_layout Plain Layout
20276 Meaning
20277 \end_layout
20278
20279 \end_inset
20280 </cell>
20281 </row>
20282 <row>
20283 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20284 \begin_inset Text
20285
20286 \begin_layout Plain Layout
20287 4123:4168
20288 \end_layout
20289
20290 \end_inset
20291 </cell>
20292 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20293 \begin_inset Text
20294
20295 \begin_layout Plain Layout
20296 mixed revision working copy
20297 \end_layout
20298
20299 \end_inset
20300 </cell>
20301 </row>
20302 <row>
20303 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20304 \begin_inset Text
20305
20306 \begin_layout Plain Layout
20307 4168M
20308 \end_layout
20309
20310 \end_inset
20311 </cell>
20312 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20313 \begin_inset Text
20314
20315 \begin_layout Plain Layout
20316 modified working copy
20317 \end_layout
20318
20319 \end_inset
20320 </cell>
20321 </row>
20322 <row>
20323 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20324 \begin_inset Text
20325
20326 \begin_layout Plain Layout
20327 4123S
20328 \end_layout
20329
20330 \end_inset
20331 </cell>
20332 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20333 \begin_inset Text
20334
20335 \begin_layout Plain Layout
20336 switched working copy
20337 \end_layout
20338
20339 \end_inset
20340 </cell>
20341 </row>
20342 <row>
20343 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20344 \begin_inset Text
20345
20346 \begin_layout Plain Layout
20347 4123P
20348 \end_layout
20349
20350 \end_inset
20351 </cell>
20352 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20353 \begin_inset Text
20354
20355 \begin_layout Plain Layout
20356 partial working copy, from a sparse checkout
20357 \end_layout
20358
20359 \end_inset
20360 </cell>
20361 </row>
20362 <row>
20363 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20364 \begin_inset Text
20365
20366 \begin_layout Plain Layout
20367 4123:4168MS
20368 \end_layout
20369
20370 \end_inset
20371 </cell>
20372 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20373 \begin_inset Text
20374
20375 \begin_layout Plain Layout
20376 mixed revision, modified, switched working copy
20377 \end_layout
20378
20379 \end_inset
20380 </cell>
20381 </row>
20382 </lyxtabular>
20383
20384 \end_inset
20385
20386
20387 \end_layout
20388
20389 \begin_layout Itemize
20390 file revision information.
20391  The result comes from parsing the output of 
20392 \begin_inset Flex Code
20393 status collapsed
20394
20395 \begin_layout Plain Layout
20396 svn
20397 \begin_inset space ~
20398 \end_inset
20399
20400 info
20401 \begin_inset space ~
20402 \end_inset
20403
20404 --xml
20405 \begin_inset space ~
20406 \end_inset
20407
20408 file.lyx
20409 \end_layout
20410
20411 \end_inset
20412
20413 .
20414  Supported flags are:
20415 \end_layout
20416
20417 \begin_deeper
20418 \begin_layout Itemize
20419 version number of the last commit (
20420 \begin_inset Flex Code
20421 status collapsed
20422
20423 \begin_layout Plain Layout
20424 vcs-revision
20425 \end_layout
20426
20427 \end_inset
20428
20429 )
20430 \end_layout
20431
20432 \begin_layout Itemize
20433 author of the last commit (
20434 \begin_inset Flex Code
20435 status collapsed
20436
20437 \begin_layout Plain Layout
20438 vcs-author
20439 \end_layout
20440
20441 \end_inset
20442
20443 )
20444 \end_layout
20445
20446 \begin_layout Itemize
20447 date of the last commit (
20448 \begin_inset Flex Code
20449 status collapsed
20450
20451 \begin_layout Plain Layout
20452 vcs-date
20453 \end_layout
20454
20455 \end_inset
20456
20457 )
20458 \end_layout
20459
20460 \begin_layout Itemize
20461 time of the last commit (
20462 \begin_inset Flex Code
20463 status collapsed
20464
20465 \begin_layout Plain Layout
20466 vcs-time
20467 \end_layout
20468
20469 \end_inset
20470
20471 )
20472 \end_layout
20473
20474 \end_deeper
20475 \begin_layout Standard
20476 You can obtain this info via InsetInfo (e.g.
20477  
20478 \begin_inset Flex Code
20479 status collapsed
20480
20481 \begin_layout Plain Layout
20482 info-insert buffer vcs-date
20483 \end_layout
20484
20485 \end_inset
20486
20487 ).
20488  The information will be available only when you have the file stored under
20489  svn managment (i.e.
20490  the 
20491 \begin_inset Flex Code
20492 status collapsed
20493
20494 \begin_layout Plain Layout
20495 .svn
20496 \end_layout
20497
20498 \end_inset
20499
20500  directory is available with your document).
20501 \end_layout
20502
20503 \end_deeper
20504 \begin_layout Itemize
20505 Another---a hacking one---possibility is to use svn keywords
20506 \begin_inset Foot
20507 status collapsed
20508
20509 \begin_layout Plain Layout
20510 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20511 \end_layout
20512
20513 \end_inset
20514
20515 .
20516  In short -- you set file keywords property (e.g.
20517  
20518 \family sans
20519 svn propset svn:keywords 'Rev' file.lyx
20520 \family default
20521 ) and then paste keyword TeX code
20522 \begin_inset Foot
20523 status collapsed
20524
20525 \begin_layout Plain Layout
20526 This is an easy way how to ensure that LyX won't break the line in the middle
20527  of keyword tag.
20528 \end_layout
20529
20530 \end_inset
20531
20532  tag in your document (e.g.
20533  
20534 \begin_inset ERT
20535 status open
20536
20537 \begin_layout Plain Layout
20538
20539 $Rev$
20540 \end_layout
20541
20542 \end_inset
20543
20544 ).
20545  This way svn client will automatically substitute revision number (e.g.
20546  
20547 \begin_inset ERT
20548 status open
20549
20550 \begin_layout Plain Layout
20551
20552 $Rev: 59 $
20553 \end_layout
20554
20555 \end_inset
20556
20557 ) after each update and commit.
20558  There are more problems with this approach.
20559  Firstly, the '$' character is used in TeX world for math equations, so
20560  any occurence of math formula 
20561 \begin_inset Formula $Rev$
20562 \end_inset
20563
20564  become 
20565 \begin_inset Formula $Rev:59$
20566 \end_inset
20567
20568  in your LyX document.
20569  Similarly for other keywords like Id, Date, Author, etc.
20570  Secondly svn output is dependent on your locales, so its very easy that
20571  svn would produce some problematic strings once Date is used.
20572  Thirdly you get the whole 'Rev: 59' string in your document instead of
20573  the plain number.
20574  Until subversion implements user's custom keywords it will be hard to use
20575  this approach reliably or let LyX to support it directly.
20576 \end_layout
20577
20578 \begin_layout Subsection
20579 SVN and Windows Environment
20580 \end_layout
20581
20582 \begin_layout Quote
20583 My inclination is to say that if the user cannot figure out the command
20584  line operations on their own fairly quickly, they would be well advised
20585  to use TortoiseSVN.
20586  ---P.
20587  A.
20588  Rubin
20589 \end_layout
20590
20591 \begin_layout Subsubsection
20592 Preparation
20593 \end_layout
20594
20595 \begin_layout Standard
20596 In addition to installing LyX, and having access to a Subversion repository,
20597  the user will need to install the Subversion client program.
20598  A Windows installer for the client program is available from 
20599 \begin_inset CommandInset href
20600 LatexCommand href
20601 name "CollabNet"
20602 target "http://www.collab.net/nonav/downloads/subversion/"
20603
20604 \end_inset
20605
20606 .
20607  The user may also want to install 
20608 \begin_inset CommandInset href
20609 LatexCommand href
20610 name "TortoiseSVN"
20611 target "http://tortoisesvn.tigris.org/"
20612
20613 \end_inset
20614
20615 , which integrates Subversion operations into the context (rightclick) menu
20616  of Windows Explorer.
20617  Operations done outside LyX will typically be more convenient using the
20618  Explorer context menu.
20619  Note that TortoiseSVN is not a replacement for the client program, which
20620  is what LyX itself will use.
20621 \end_layout
20622
20623 \begin_layout Subsubsection
20624 Bringing a document under Subversion control
20625 \end_layout
20626
20627 \begin_layout Standard
20628 Before a LyX document can be brought under version control in Subversion,
20629  its parent directory needs to be under version control.
20630  If the document is being added to a project already in the repository,
20631  this is accomplished by checking the project out to the directory where
20632  the new document will be placed.
20633  If the project itself is not yet under version control (for instance, if
20634  this document starts a new project), the directory must be imported into
20635  the repository.
20636  This is done outside LyX.
20637  Both import and checkout are easily accomplished from the Explorer context
20638  menu using TortoiseSVN, or alternatively can be done using the command
20639  line client at a DOS prompt.
20640  The procedure for importing the project using TortoiseSVN is described
20641  below, assuming an existing repository and a new project being started
20642  in 
20643 \family typewriter
20644 C:
20645 \backslash
20646 new project
20647 \family default
20648 .
20649  For information on using the Subversion client program, run 
20650 \family typewriter
20651 svn --help 
20652 \family default
20653 in a DOS shell.
20654 \end_layout
20655
20656 \begin_layout Enumerate
20657 Locate 
20658 \family typewriter
20659 C:
20660 \backslash
20661 new project 
20662 \family default
20663 in Windows Explorer, right click it, and select 
20664 \family typewriter
20665 TortoiseSVN > Repo-browser
20666 \family default
20667 .
20668  If necessary, adjust the URL for the repository, then click OK.
20669 \end_layout
20670
20671 \begin_layout Enumerate
20672 Right click the level of the repository under which you want to place the
20673  new project folder (typically the top level) and click 
20674 \family typewriter
20675 Create folder\SpecialChar \ldots{}
20676
20677 \family default
20678  Supply a name for the project folder and click OK.
20679  Add a message for the log file if desired, then click OK again.
20680  The new project folder should appear in the repository.
20681  Finally, click OK again to exit the repository browser.
20682 \end_layout
20683
20684 \begin_layout Enumerate
20685 Once again right click 
20686 \family typewriter
20687 C:
20688 \backslash
20689 new project
20690 \family default
20691 , this time selecting SVN Checkout\SpecialChar \ldots{}
20692  Select the URL of the project folder
20693  you just created in the repository, and set the checkout directory to 
20694 \family typewriter
20695 C:
20696 \backslash
20697 new project.
20698
20699 \family default
20700  Click OK.
20701  You will be warned about a non-empty folder; click OK to proceed.
20702  You should now have a 
20703 \family typewriter
20704 .svn
20705 \family default
20706  directory under 
20707 \family typewriter
20708 C:
20709 \backslash
20710 new project.
20711 \end_layout
20712
20713 \begin_layout Enumerate
20714 Create or open your document in LyX and click 
20715 \family sans
20716 \bar under
20717 F
20718 \bar default
20719 ile\SpecialChar \menuseparator
20720
20721 \bar under
20722 V
20723 \bar default
20724 ersion
20725 \begin_inset space ~
20726 \end_inset
20727
20728 Control\SpecialChar \menuseparator
20729
20730 \bar under
20731 R
20732 \bar default
20733 egister.
20734  
20735 \family default
20736 Add a log message and click OK to commit the document to version control.
20737 \end_layout
20738
20739 \begin_layout Standard
20740 From this point onward, you should have full functionality in the 
20741 \family sans
20742 \bar under
20743 F
20744 \bar default
20745 ile\SpecialChar \menuseparator
20746
20747 \bar under
20748 V
20749 \bar default
20750 ersion
20751 \begin_inset space ~
20752 \end_inset
20753
20754 Control
20755 \family default
20756  menu.
20757  You also have the option of checking the document in and out, viewing its
20758  history, etc.
20759  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20760  client program from a command prompt.
20761 \end_layout
20762
20763 \begin_layout Subsubsection
20764 SSH tunnel used with SVN under Windows
20765 \end_layout
20766
20767 \begin_layout Standard
20768 Compared with Linux setting up an svn client to communicate over ssh under
20769  Windows is a rather troublesome task.
20770  We will at least offer some hints how to setup the client side but prior
20771  knowledge about ssh and the Windows command line is needed, also be prepared
20772  for a great deal of frustration\SpecialChar \ldots{}
20773
20774 \end_layout
20775
20776 \begin_layout Enumerate
20777 Get an svn client for windows, as described in the previous sections.
20778  When it is a fresh install run some svn command (e.g.
20779  
20780 \begin_inset Flex Code
20781 status collapsed
20782
20783 \begin_layout Plain Layout
20784 svn --version
20785 \end_layout
20786
20787 \end_inset
20788
20789 ) to create config files, which you will need to change later on.
20790 \end_layout
20791
20792 \begin_layout Enumerate
20793 Choose an ssh client for Windows.
20794  There are several possibilities, we will use the one from Putty tools
20795 \begin_inset Foot
20796 status open
20797
20798 \begin_layout Plain Layout
20799 \begin_inset Flex URL
20800 status collapsed
20801
20802 \begin_layout Plain Layout
20803
20804 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20805 \end_layout
20806
20807 \end_inset
20808
20809
20810 \end_layout
20811
20812 \end_inset
20813
20814 .
20815  You will need to set the connection up so that the client doesn't ask for
20816  any password from you.
20817  To keep things easy we will use only keys without any additional password
20818  protection etc.
20819 \end_layout
20820
20821 \begin_deeper
20822 \begin_layout Enumerate
20823 Generate keys by 
20824 \begin_inset Flex Code
20825 status collapsed
20826
20827 \begin_layout Plain Layout
20828 puttygen
20829 \end_layout
20830
20831 \end_inset
20832
20833 .
20834  Save your private .ppk key file and put the public one on the server side.
20835  If the SVN server runs on Linux, note that the format of the public key
20836  is not compatible with Linux openssh and you will need to direcly copy-paste
20837  the key from the “
20838 \emph on
20839 Public key for pasting into OpenSSH authorized_keys file
20840 \emph default
20841 :” edit field into the server's 
20842 \begin_inset Flex Code
20843 status collapsed
20844
20845 \begin_layout Plain Layout
20846 ~/.ssh/authorized_keys
20847 \end_layout
20848
20849 \end_inset
20850
20851
20852 \begin_inset Flex Code
20853 status collapsed
20854
20855 \begin_layout Plain Layout
20856 authorized_keys2
20857 \end_layout
20858
20859 \end_inset
20860
20861  file.
20862 \end_layout
20863
20864 \begin_layout Enumerate
20865 Get the Putty's 
20866 \begin_inset Flex Code
20867 status collapsed
20868
20869 \begin_layout Plain Layout
20870 plink
20871 \end_layout
20872
20873 \end_inset
20874
20875 .
20876  In the SVN config file
20877 \begin_inset Foot
20878 status collapsed
20879
20880 \begin_layout Plain Layout
20881 Exact path depends on Windows version, usually somewhere around 
20882 \begin_inset Flex Code
20883 status collapsed
20884
20885 \begin_layout Plain Layout
20886 c:
20887 \backslash
20888 Documents and Settings
20889 \backslash
20890 user
20891 \backslash
20892 Application Data
20893 \backslash
20894 Subversion
20895 \backslash
20896 config
20897 \end_layout
20898
20899 \end_inset
20900
20901  / 
20902 \begin_inset Flex Code
20903 status collapsed
20904
20905 \begin_layout Plain Layout
20906 AppData
20907 \backslash
20908 Roaming
20909 \backslash
20910 Subversion
20911 \end_layout
20912
20913 \end_inset
20914
20915 .
20916 \end_layout
20917
20918 \end_inset
20919
20920 , section [tunnels], setup ssh command, e.g.
20921  
20922 \begin_inset Flex Code
20923 status collapsed
20924
20925 \begin_layout Plain Layout
20926 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20927 \end_layout
20928
20929 \end_inset
20930
20931 .
20932 \begin_inset Foot
20933 status collapsed
20934
20935 \begin_layout Plain Layout
20936 It will usually take a lot of time to get exact command right and it depends
20937  on many things.
20938  For example do not have some remote server saved as a default session in
20939  Putty etc.
20940  If things fail, try to connect via plink without SVN first.
20941 \end_layout
20942
20943 \end_inset
20944
20945
20946 \end_layout
20947
20948 \end_deeper
20949 \begin_layout Enumerate
20950 Checkout the SVN archive, e.g.
20951  
20952 \begin_inset Flex Code
20953 status collapsed
20954
20955 \begin_layout Plain Layout
20956 svn co svn+ssh://user@server/repository_path
20957 \end_layout
20958
20959 \end_inset
20960
20961 .
20962 \end_layout
20963
20964 \begin_layout Subsubsection
20965 End-of-Line Conversions
20966 \end_layout
20967
20968 \begin_layout Standard
20969 When the collaborators are mixing Linux and Windows environments, LyX will
20970  use different line endings inside the .lyx files.
20971  This is not a problem as far as LyX functionality is concerned, but the
20972  commit diffs will be huge and merge-conflicts prone.
20973  Fortunately SVN itself knows
20974 \begin_inset Foot
20975 status collapsed
20976
20977 \begin_layout Plain Layout
20978 \begin_inset Flex URL
20979 status collapsed
20980
20981 \begin_layout Plain Layout
20982
20983 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20984 \end_layout
20985
20986 \end_inset
20987
20988
20989 \end_layout
20990
20991 \end_inset
20992
20993  how to deal with CR/LF problems when switching .lyx files to the 
20994 \begin_inset Flex Code
20995 status collapsed
20996
20997 \begin_layout Plain Layout
20998 native
20999 \end_layout
21000
21001 \end_inset
21002
21003  mode.
21004 \begin_inset Foot
21005 status collapsed
21006
21007 \begin_layout Plain Layout
21008 For the lazy guys: 
21009 \begin_inset Flex Code
21010 status collapsed
21011
21012 \begin_layout Plain Layout
21013 svn propset svn:eol-style native FILE_NAME
21014 \end_layout
21015
21016 \end_inset
21017
21018
21019 \end_layout
21020
21021 \end_inset
21022
21023
21024 \end_layout
21025
21026 \begin_layout Subsection
21027 Further tuning
21028 \end_layout
21029
21030 \begin_layout Standard
21031 With the recent addition of the vc-command function LyX power users are
21032  allowed to create their own commands for revision control.
21033 \end_layout
21034
21035 \begin_layout Standard
21036 As an example you can see how two TortoiseSVN commands could be integrated
21037  directly:
21038 \end_layout
21039
21040 \begin_layout Description
21041 Commit: 
21042 \begin_inset Flex Code
21043 status collapsed
21044
21045 \begin_layout Plain Layout
21046 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21047 \end_layout
21048
21049 \end_inset
21050
21051
21052 \end_layout
21053
21054 \begin_layout Description
21055 Revert: 
21056 \begin_inset Flex Code
21057 status collapsed
21058
21059 \begin_layout Plain Layout
21060 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21061 \end_layout
21062
21063 \end_inset
21064
21065
21066 \end_layout
21067
21068 \begin_layout Subsection
21069 Version control and Document comparison
21070 \end_layout
21071
21072 \begin_layout Standard
21073 One of the typical uses of version control is to inspect the changes between
21074  revisions, usually by creating 
21075 \begin_inset Flex Code
21076 status collapsed
21077
21078 \begin_layout Plain Layout
21079 diff
21080 \end_layout
21081
21082 \end_inset
21083
21084  dumps.
21085  While this is useful for plain text files, it is much less useful in the
21086  case of LyX files, which have more a complicated structure.
21087  Hence we provide binding to the Document comparison feature.
21088  There are two ways of calling this feature - either by direct call of 
21089 \begin_inset Flex Code
21090 status collapsed
21091
21092 \begin_layout Plain Layout
21093 VC_COMPARE
21094 \end_layout
21095
21096 \end_inset
21097
21098  LyX function (for details see LyX functions manual) or by icon/menu item
21099  
21100 \begin_inset Flex MenuItem
21101 status collapsed
21102
21103 \begin_layout Plain Layout
21104 Compare with older revision...
21105 \end_layout
21106
21107 \end_inset
21108
21109 .
21110  One can either compare two chosen revisions of the document or he can simply
21111  compare the current version of edited text with older revisions (where
21112  '
21113 \begin_inset Flex MenuItem
21114 status collapsed
21115
21116 \begin_layout Plain Layout
21117 0
21118 \end_layout
21119
21120 \end_inset
21121
21122 ' revisions back means comparison of the edited file with last commited
21123  revision).
21124  
21125 \end_layout
21126
21127 \begin_layout Standard
21128 This feature is supported for SVN and RCS though due to the more complicated
21129  versioning scheme of RCS there is a constraint -- when addressing the revisions
21130  in dialog, numbers always point to the last number in RCS revision number,
21131  i.e.
21132  '35' in '1.2.35'.
21133 \end_layout
21134
21135 \begin_layout Section
21136 Literate Programming
21137 \end_layout
21138
21139 \begin_layout Standard
21140 Updated by 
21141 \noun on
21142 Kayvan Sylvan 
21143 \noun default
21144 (kayvan@sylvan.com)
21145 \noun on
21146
21147 \noun default
21148 original documentation written by 
21149 \noun on
21150 Edmar Wienskoski Jr.
21151
21152 \noun default
21153  (edmar-w-jr@technologist.com)
21154 \end_layout
21155
21156 \begin_layout Subsection
21157 Introduction
21158 \end_layout
21159
21160 \begin_layout Standard
21161 The main purpose of this documentation is to show you how to use LyX for
21162  literate programming, where it is assumed that you are familiar with this
21163  programming technique, and know what 
21164 \begin_inset Quotes eld
21165 \end_inset
21166
21167 tangling
21168 \begin_inset Quotes erd
21169 \end_inset
21170
21171  and 
21172 \begin_inset Quotes eld
21173 \end_inset
21174
21175 weaving
21176 \begin_inset Quotes erd
21177 \end_inset
21178
21179  means.
21180  If that is not the case, please follow the web links provided in the following
21181  sections.
21182  There is a lot of good documentation out there covering old development
21183  history to the latest tools tips.
21184 \end_layout
21185
21186 \begin_layout Standard
21187 It is also assumed that you are familiar with LyX itself to a point that
21188  you are comfortable changing your LyX preferences, and X resources file.
21189  If that is not the case please refer to other LyX documentation to cover
21190  your specific needs.
21191 \end_layout
21192
21193 \begin_layout Subsection
21194 Literate Programming
21195 \end_layout
21196
21197 \begin_layout Standard
21198 From the Literate Programming FAQ: 
21199 \end_layout
21200
21201 \begin_layout Quotation
21202 Literate programming is the combination of documentation and source together
21203  in a fashion suited for reading by human beings.
21204  In fact, literate programs should be enjoyable reading, even inviting!
21205  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21206  and documentation in a single file.
21207  Literate programming tools then parse the file to produce either readable
21208  documentation or compilable source.
21209  The WEB style of literate programming was created by D.
21210 \begin_inset space \thinspace{}
21211 \end_inset
21212
21213 E.
21214  Knuth during the development of his TeX typesetting software.
21215  
21216 \end_layout
21217
21218 \begin_layout Standard
21219 Another excerpt says:
21220 \end_layout
21221
21222 \begin_layout Quotation
21223
21224 \emph on
21225 How is literate programming different from verbose commenting?
21226 \end_layout
21227
21228 \begin_layout Quotation
21229 There are three distinguishing characteristics.
21230  In order of importance, they are: 
21231 \end_layout
21232
21233 \begin_deeper
21234 \begin_layout Itemize
21235 flexible order of elaboration 
21236 \end_layout
21237
21238 \begin_layout Itemize
21239 automatic support for browsing 
21240 \end_layout
21241
21242 \begin_layout Itemize
21243 typeset documentation, especially diagrams and mathematics 
21244 \end_layout
21245
21246 \end_deeper
21247 \begin_layout Standard
21248 Now that I sparked your curiosity, take a look in the references.
21249 \end_layout
21250
21251 \begin_layout Subsubsection
21252 References
21253 \end_layout
21254
21255 \begin_layout Standard
21256 The complete Literate Programming FAQ can be found at:
21257 \end_layout
21258
21259 \begin_layout Quote
21260 Literate Programming FAQ 
21261 \begin_inset Flex URL
21262 status collapsed
21263
21264 \begin_layout Plain Layout
21265
21266 http://www.literateprogramming.com/lpfaq.pdf
21267 \end_layout
21268
21269 \end_inset
21270
21271
21272 \end_layout
21273
21274 \begin_layout Standard
21275 The FAQ lists 23 (twenty three!) different literate programming tools.
21276  Where some are specialized or 
21277 \begin_inset Quotes eld
21278 \end_inset
21279
21280 tailored
21281 \begin_inset Quotes erd
21282 \end_inset
21283
21284  for particular programming languages, while other have general scope.
21285  I selected 
21286 \noun on
21287 Noweb
21288 \noun default
21289  for my own use for several reasons:
21290 \end_layout
21291
21292 \begin_layout Itemize
21293 It can generate the documentation either in LaTeX or HTML.
21294 \end_layout
21295
21296 \begin_layout Itemize
21297 It has a open architecture, i.
21298 \begin_inset space \thinspace{}
21299 \end_inset
21300
21301 g.
21302 \begin_inset space \space{}
21303 \end_inset
21304
21305 it is easy to plug in new filters and to perform special processing that
21306  you may need.
21307  
21308 \end_layout
21309
21310 \begin_layout Itemize
21311 There is a good selection of filters available already (the HTML is one
21312  of them).
21313 \end_layout
21314
21315 \begin_layout Itemize
21316 It is free.
21317 \end_layout
21318
21319 \begin_layout Standard
21320 The Noweb web page can be found at: 
21321 \end_layout
21322
21323 \begin_layout Quote
21324 Noweb home page 
21325 \begin_inset Flex URL
21326 status collapsed
21327
21328 \begin_layout Plain Layout
21329
21330 http://www.cs.virginia.edu/~nr/noweb/
21331 \end_layout
21332
21333 \end_inset
21334
21335
21336 \end_layout
21337
21338 \begin_layout Standard
21339 Starting from there you can reach many other interesting links and even
21340  some literate program examples.
21341 \end_layout
21342
21343 \begin_layout Subsection
21344 LyX and Literate Programming
21345 \end_layout
21346
21347 \begin_layout Standard
21348 The LyX support for Literate Programming is provided by using the generic
21349  LyX converters mechanism.
21350  This support is provided in a 
21351 \begin_inset Quotes eld
21352 \end_inset
21353
21354 Noweb independent
21355 \begin_inset Quotes erd
21356 \end_inset
21357
21358  way, i.
21359 \begin_inset space \thinspace{}
21360 \end_inset
21361
21362 g.
21363 \begin_inset space \space{}
21364 \end_inset
21365
21366 you will be able to use this new LyX feature with some other literate programmin
21367 g tool of your choice by just changing your LyX preferences.
21368 \end_layout
21369
21370 \begin_layout Subsubsection
21371 Generating documents and code (weaving and tangling)
21372 \end_layout
21373
21374 \begin_layout Paragraph
21375 Selecting the document class
21376 \end_layout
21377
21378 \begin_layout Standard
21379 If you have installed Noweb and LyX successfully, whenever you open a new
21380  document or try to change the document class of an existing one, you will
21381  find that there are three new document classes available:
21382 \end_layout
21383
21384 \begin_layout Itemize
21385 Article (Noweb)
21386 \end_layout
21387
21388 \begin_layout Itemize
21389 Book (Noweb)
21390 \end_layout
21391
21392 \begin_layout Itemize
21393 Report (Noweb)
21394 \end_layout
21395
21396 \begin_layout Standard
21397 You must select one of them to create your literate documents from.
21398  
21399 \end_layout
21400
21401 \begin_layout Standard
21402 Note that literate documents are not limited to these three classes.
21403  New classes can be generated from other styles like letter or in combination
21404  with other class variations like Article (AMS).
21405  If you have special needs that cannot be covered by one of the existing
21406  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21407  will arrange to insert a new entry, or teach you how to do it.
21408 \begin_inset Foot
21409 status collapsed
21410
21411 \begin_layout Plain Layout
21412 It is very simple, it involves the creation of a file with four lines, and
21413  re-running of the auto configuration.
21414 \end_layout
21415
21416 \end_inset
21417
21418  Moreover, if you use a literate tool other than Noweb you may need to create
21419  a new set of document classes for it.
21420 \end_layout
21421
21422 \begin_layout Paragraph
21423 Typing code in
21424 \end_layout
21425
21426 \begin_layout Standard
21427 LyX enables you to write code with a layout named 
21428 \noun on
21429 Scrap
21430 \noun default
21431 .
21432 \begin_inset Foot
21433 status collapsed
21434
21435 \begin_layout Plain Layout
21436 The equivalent Noweb term is 
21437 \begin_inset Quotes eld
21438 \end_inset
21439
21440 Chunk
21441 \begin_inset Quotes erd
21442 \end_inset
21443
21444 .
21445  For historical reasons, I got used to the term 
21446 \begin_inset Quotes eld
21447 \end_inset
21448
21449 scrap
21450 \begin_inset Quotes erd
21451 \end_inset
21452
21453  introduced by other literate tool named Nuweb, which I used for many years
21454  before rendering myself to Noweb.
21455 \end_layout
21456
21457 \end_inset
21458
21459  Noweb delimits scraps like this:
21460 \end_layout
21461
21462 \begin_layout LyX-Code
21463 <<My scrap>>=
21464 \end_layout
21465
21466 \begin_layout LyX-Code
21467   code
21468 \end_layout
21469
21470 \begin_layout LyX-Code
21471   more code
21472 \end_layout
21473
21474 \begin_layout LyX-Code
21475   even more code
21476 \end_layout
21477
21478 \begin_layout LyX-Code
21479   @
21480 \end_layout
21481
21482 \begin_layout Standard
21483 The problem is that whatever is written in between the << and the 
21484 \family typewriter
21485 @
21486 \family default
21487  must be taken literally, i.
21488 \begin_inset space \thinspace{}
21489 \end_inset
21490
21491 g.
21492 \begin_inset space \space{}
21493 \end_inset
21494
21495 LyX should be prevented from making any special interpretation of what has
21496  been written.
21497  This is handled by a special layout named Scrap, that works like a normal
21498  paragraph but has a free spacing capability.
21499 \end_layout
21500
21501 \begin_layout Standard
21502 The down side of the Scrap paragraph layout is that consecutive paragraphs
21503  of code will be spaced with one empty line in the source code and also
21504  in the printed documentation.
21505  The work around is to enter each line of code within a single Scrap, with
21506  a newline (ctrl-return).
21507  The example above will look like this:
21508 \begin_inset Foot
21509 status collapsed
21510
21511 \begin_layout Plain Layout
21512 If you have a printed version of this document you will not see any difference
21513  between the previous example and this one.
21514 \end_layout
21515
21516 \end_inset
21517
21518
21519 \end_layout
21520
21521 \begin_layout LyX-Code
21522 <<My scrap>>=
21523 \begin_inset Newline newline
21524 \end_inset
21525
21526   code
21527 \begin_inset Newline newline
21528 \end_inset
21529
21530   more code
21531 \begin_inset Newline newline
21532 \end_inset
21533
21534   even more code
21535 \begin_inset Newline newline
21536 \end_inset
21537
21538   @
21539 \end_layout
21540
21541 \begin_layout Standard
21542 This layout works fine.
21543  The only real inconvenience is that you have to type ctrl-return instead
21544  of a plain return.
21545 \begin_inset Foot
21546 status collapsed
21547
21548 \begin_layout Plain Layout
21549 It is in my list of 
21550 \begin_inset Quotes eld
21551 \end_inset
21552
21553 improvements
21554 \begin_inset Quotes erd
21555 \end_inset
21556
21557  to fix that.
21558 \end_layout
21559
21560 \end_inset
21561
21562
21563 \end_layout
21564
21565 \begin_layout Standard
21566 As a special note, you can also use the 
21567 \begin_inset Quotes eld
21568 \end_inset
21569
21570 %def
21571 \begin_inset Quotes erd
21572 \end_inset
21573
21574  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21575 rence:
21576 \end_layout
21577
21578 \begin_layout LyX-Code
21579 <<My scrap>>=
21580 \begin_inset Newline newline
21581 \end_inset
21582
21583   def some_function(args):
21584 \begin_inset Newline newline
21585 \end_inset
21586
21587     "This is the doc string for this function."
21588 \begin_inset Newline newline
21589 \end_inset
21590
21591     print "My args: ", args
21592 \end_layout
21593
21594 \begin_layout LyX-Code
21595 @ %def some_function
21596 \end_layout
21597
21598 \begin_layout Standard
21599 For an example of this usage and the resulting cross-reference output, look
21600  at the Literate python program in 
21601 \emph on
21602 LIBDIR/examples/listerrors.lyx
21603 \emph default
21604  which should make this all clear.
21605 \end_layout
21606
21607 \begin_layout Paragraph
21608 Generating the documentation
21609 \end_layout
21610
21611 \begin_layout Standard
21612 At this point you already have a new document file with a proper document
21613  class, and with some code and text on it.
21614  How do I print it? The answer is simple, you select 
21615 \family sans
21616 View\SpecialChar \menuseparator
21617 DVI,
21618 \family default
21619  etc.
21620  Just like you would do for a plain document.
21621  No special procedure is required.
21622 \end_layout
21623
21624 \begin_layout Standard
21625 To help orientate you, I will now explain what happens inside LyX:
21626 \end_layout
21627
21628 \begin_layout Enumerate
21629 When the 
21630 \family sans
21631 Update\SpecialChar \menuseparator
21632 DVI
21633 \family default
21634  menu option is chosen, a LaTeX file is generated.
21635  
21636 \end_layout
21637
21638 \begin_deeper
21639 \begin_layout Standard
21640 If the document is of any literate class the generated file will be named
21641  with an extension name defined by the 
21642 \begin_inset Quotes eld
21643 \end_inset
21644
21645 literate
21646 \begin_inset Quotes erd
21647 \end_inset
21648
21649  format (defined in the Preferences panel), otherwise the file will have
21650  the usual 
21651 \family typewriter
21652 .tex
21653 \family default
21654  extension.
21655 \end_layout
21656
21657 \end_deeper
21658 \begin_layout Enumerate
21659 Note that the only difference so far is in the name of the file, no special
21660  processing is required by LyX.
21661  Given that you formatted the code using the Scrap layout that, by itself,
21662  takes care of the business.
21663 \end_layout
21664
21665 \begin_layout Enumerate
21666 If the document is of any literate class LyX will then use the internal
21667  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21668 \begin_inset Foot
21669 status collapsed
21670
21671 \begin_layout Plain Layout
21672 The converters are defined in the 
21673 \family sans
21674 Tools\SpecialChar \menuseparator
21675 Preferences
21676 \family default
21677  panel, under the 
21678 \begin_inset Quotes eld
21679 \end_inset
21680
21681 Conversion
21682 \begin_inset Quotes erd
21683 \end_inset
21684
21685  tab.
21686  See section 
21687 \emph on
21688 Converters
21689 \emph default
21690  of the 
21691 \emph on
21692 Customization
21693 \emph default
21694  manual for general information about converters.
21695 \end_layout
21696
21697 \end_inset
21698
21699  to generate the LaTeX file.
21700 \end_layout
21701
21702 \begin_deeper
21703 \begin_layout Standard
21704 Otherwise it will just skip this step.
21705 \end_layout
21706
21707 \end_deeper
21708 \begin_layout Enumerate
21709 Finally, LaTeX is invoked and the regular post processing continues as in
21710  a plain document.
21711 \end_layout
21712
21713 \begin_layout Standard
21714 Independence from a particular 
21715 \begin_inset Quotes eld
21716 \end_inset
21717
21718 literate tool
21719 \begin_inset Quotes erd
21720 \end_inset
21721
21722  is easily achieved by changing the commands that are run by the various
21723  converters.
21724 \end_layout
21725
21726 \begin_layout Paragraph
21727 Generating the code
21728 \end_layout
21729
21730 \begin_layout Standard
21731 When the build menu option is chosen or the corresponding button in the
21732  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21733  Next, LyX invokes the 
21734 \family typewriter
21735 Noweb->Program
21736 \family default
21737  converter.
21738  This converter needs to be defined by the user and is not installed by
21739  default, though the Program format is.
21740  This converter (like any other converter) will have two parts:
21741 \end_layout
21742
21743 \begin_layout Enumerate
21744 The converter program itself.
21745  This program performs the conversion from the one format to the other (in
21746  this case, from the Noweb format to the Program pseudo-format).
21747 \end_layout
21748
21749 \begin_layout Enumerate
21750 The error log parser.
21751  This is a program whose sole purpose is to rewrite error messages in a
21752  format that LyX understands.
21753  This makes it possible for LyX to place error boxes in the right places
21754  in the file buffer.
21755 \end_layout
21756
21757 \begin_layout Standard
21758 The first part, the 
21759 \begin_inset Quotes eld
21760 \end_inset
21761
21762 Converter
21763 \begin_inset Quotes erd
21764 \end_inset
21765
21766  setting, should be set to 
21767 \begin_inset Quotes eld
21768 \end_inset
21769
21770
21771 \family typewriter
21772 build-script $$i
21773 \family default
21774
21775 \begin_inset Quotes erd
21776 \end_inset
21777
21778 .
21779  This basically means that LyX will call 
21780 \begin_inset Quotes eld
21781 \end_inset
21782
21783 build-script
21784 \begin_inset Quotes erd
21785 \end_inset
21786
21787  (a program or script) with the name of the Noweb file (normally a file
21788  in the LyX temp directory).
21789  
21790 \end_layout
21791
21792 \begin_layout Standard
21793 This is an implementation of 
21794 \begin_inset Quotes eld
21795 \end_inset
21796
21797 build-script
21798 \begin_inset Quotes erd
21799 \end_inset
21800
21801  that you can place in a directory on your path:
21802 \end_layout
21803
21804 \begin_layout LyX-Code
21805 #!/bin/sh
21806 \end_layout
21807
21808 \begin_layout LyX-Code
21809 #
21810 \end_layout
21811
21812 \begin_layout LyX-Code
21813 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21814 \end_layout
21815
21816 \begin_layout Standard
21817 The next part of the converter setting is the 
21818 \begin_inset Quotes eld
21819 \end_inset
21820
21821 Flags
21822 \begin_inset Quotes erd
21823 \end_inset
21824
21825  which is to be set to 
21826 \begin_inset Quotes eld
21827 \end_inset
21828
21829
21830 \family typewriter
21831 parselog=listerrors
21832 \family default
21833
21834 \begin_inset Quotes erd
21835 \end_inset
21836
21837 .
21838  This will run any errors that are generated by the 
21839 \begin_inset Quotes eld
21840 \end_inset
21841
21842 build-script
21843 \begin_inset Quotes erd
21844 \end_inset
21845
21846  process through the 
21847 \begin_inset Quotes eld
21848 \end_inset
21849
21850 listerrors
21851 \begin_inset Quotes erd
21852 \end_inset
21853
21854  program.
21855 \end_layout
21856
21857 \begin_layout Standard
21858 The converter code looks in 
21859 \emph on
21860 MYLYXDIR/scripts
21861 \emph default
21862  first, then in 
21863 \emph on
21864 LIBDIR/scripts
21865 \emph default
21866  then on the path for the 
21867 \begin_inset Quotes eld
21868 \end_inset
21869
21870 listerrors
21871 \begin_inset Quotes erd
21872 \end_inset
21873
21874  program.
21875 \end_layout
21876
21877 \begin_layout Standard
21878 The build will normally take place in LyX's temporary directory, so the
21879  files produced by the conversion will be in that directory.
21880  LyX will copy out what it regards as the `main' file, but the 
21881 \family typewriter
21882 Noweb->Program
21883 \family default
21884  conversion may produce several files, and so most of these would then be
21885  deleted when LyX was closed.
21886  The present solution is to use a `copier',
21887 \begin_inset Foot
21888 status collapsed
21889
21890 \begin_layout Plain Layout
21891 See section 
21892 \emph on
21893 Copiers
21894 \emph default
21895  of the 
21896 \emph on
21897 Customization
21898 \emph default
21899  manual for information on these.
21900 \end_layout
21901
21902 \end_inset
21903
21904  in this case, the 
21905 \family typewriter
21906 ext_copy.py
21907 \family default
21908  script in its default mode, so that the entire contents of the temporary
21909  directory is copied.
21910  More will get copied than is needed, to be sure, but nothing will be lost.
21911  If, however, you know what extensions the generated files will have, this
21912  can be improved by using the 
21913 \family typewriter
21914 -e
21915 \family default
21916  option to 
21917 \family typewriter
21918 ext_copy
21919 \family default
21920 .
21921  This option takes a comma-separated list of extensions to copy.
21922  So, for example, if the conversion will generate only files with the extensions
21923  
21924 \family typewriter
21925 .c
21926 \family default
21927  and 
21928 \family typewriter
21929 .h
21930 \family default
21931 , then the correct definition would be:
21932 \end_layout
21933
21934 \begin_layout LyX-Code
21935 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21936 \end_layout
21937
21938 \begin_layout Standard
21939 The result will be that only files with these two extensions will be copied
21940  out.
21941 \end_layout
21942
21943 \begin_layout Paragraph
21944 Build instructions in the document
21945 \end_layout
21946
21947 \begin_layout Standard
21948 The last piece of the integration between LyX and noweb is the 
21949 \begin_inset Quotes eld
21950 \end_inset
21951
21952 build-script
21953 \begin_inset Quotes erd
21954 \end_inset
21955
21956  scrap.
21957  Generally, the instructions for building your program should be embedded
21958  in a scrap of its own.
21959  The noweb-specific 
21960 \begin_inset Quotes eld
21961 \end_inset
21962
21963 build-script
21964 \begin_inset Quotes erd
21965 \end_inset
21966
21967  above uses the notangle command to look for this scrap (called 
21968 \begin_inset Quotes eld
21969 \end_inset
21970
21971 build-script
21972 \begin_inset Quotes erd
21973 \end_inset
21974
21975 ) and runs its contents through 
21976 \begin_inset Quotes eld
21977 \end_inset
21978
21979 sh
21980 \begin_inset Quotes erd
21981 \end_inset
21982
21983 .
21984 \end_layout
21985
21986 \begin_layout Standard
21987 Typically, such a scrap would look something like this:
21988 \end_layout
21989
21990 \begin_layout LyX-Code
21991 <<build-script>>=
21992 \begin_inset Newline newline
21993 \end_inset
21994
21995 #!/bin/sh
21996 \begin_inset Newline newline
21997 \end_inset
21998
21999
22000 \begin_inset Newline newline
22001 \end_inset
22002
22003 if [ -z "${NOWEB_SOURCE}" ]
22004 \begin_inset Newline newline
22005 \end_inset
22006
22007 then
22008 \begin_inset Newline newline
22009 \end_inset
22010
22011   NOWEB_SOURCE=myfile.nw
22012 \begin_inset Newline newline
22013 \end_inset
22014
22015 fi
22016 \begin_inset Newline newline
22017 \end_inset
22018
22019 [...
22020  code to extract files ...]
22021 \begin_inset Newline newline
22022 \end_inset
22023
22024 [...
22025  code to compile files ...]
22026 \begin_inset Newline newline
22027 \end_inset
22028
22029 @
22030 \end_layout
22031
22032 \begin_layout Standard
22033 Look in 
22034 \emph on
22035 LIBDIR/examples/listerrors.lyx
22036 \emph default
22037  or in 
22038 \emph on
22039 LIBDIR/examples/Literate.lyx
22040 \emph default
22041  which implement two versions of the 
22042 \begin_inset Quotes eld
22043 \end_inset
22044
22045 listerrors
22046 \begin_inset Quotes erd
22047 \end_inset
22048
22049  program for some illustrations of how all of these pieces go together or
22050  in 
22051 \emph on
22052 LIBDIR/examples/noweb2lyx.lyx.
22053
22054 \emph default
22055  Interestingly, these three files show off the language-indepence of the
22056  LyX literate programming support since they are written in Python, C and
22057  Perl respectively.
22058 \end_layout
22059
22060 \begin_layout Subsubsection
22061 Configuring LyX
22062 \end_layout
22063
22064 \begin_layout Standard
22065 All the Literate Programming support is configured by the 
22066 \family sans
22067 Tools\SpecialChar \menuseparator
22068 Preferences
22069 \family default
22070  panel in the 
22071 \begin_inset Quotes eld
22072 \end_inset
22073
22074 Conversion
22075 \begin_inset Quotes erd
22076 \end_inset
22077
22078  tab.
22079  The important parts are:
22080 \end_layout
22081
22082 \begin_layout Description
22083 the
22084 \begin_inset space ~
22085 \end_inset
22086
22087
22088 \begin_inset Quotes eld
22089 \end_inset
22090
22091 literate
22092 \begin_inset Quotes erd
22093 \end_inset
22094
22095
22096 \begin_inset space ~
22097 \end_inset
22098
22099 format Set up via the Formats tab, this is where the Noweb-specific pieces
22100  are set up.
22101  The 
22102 \family sans
22103 GUI Name
22104 \family default
22105  is set to 
22106 \family typewriter
22107 NoWeb
22108 \family default
22109 , the file extension is set to 
22110 \family typewriter
22111 .nw
22112 \family default
22113 .
22114  This tells LyX to create a file with a 
22115 \family typewriter
22116 .nw
22117 \family default
22118  extension in the first step of the conversion process.
22119 \end_layout
22120
22121 \begin_layout Description
22122 the
22123 \begin_inset space ~
22124 \end_inset
22125
22126
22127 \family sans
22128 Program
22129 \family default
22130
22131 \begin_inset space ~
22132 \end_inset
22133
22134 format This is an empty format whose sole purpose is to be the endpoint
22135  of a conversion (which then allows us to set up a converter for it).
22136 \end_layout
22137
22138 \begin_layout Description
22139
22140 \family sans
22141 NoWeb
22142 \family default
22143 ->
22144 \family sans
22145 LaTeX
22146 \family default
22147  This converter performs the 
22148 \begin_inset Quotes eld
22149 \end_inset
22150
22151 weaving
22152 \begin_inset Quotes erd
22153 \end_inset
22154
22155  of the literate document.
22156  For Noweb, it is set to 
22157 \begin_inset Quotes eld
22158 \end_inset
22159
22160
22161 \family typewriter
22162 noweave -delay -index $$i > $$o
22163 \family default
22164
22165 \begin_inset Quotes erd
22166 \end_inset
22167
22168
22169 \end_layout
22170
22171 \begin_layout Description
22172
22173 \family sans
22174 NoWeb
22175 \family default
22176 ->
22177 \family sans
22178 Program
22179 \family default
22180  This performs the 
22181 \begin_inset Quotes eld
22182 \end_inset
22183
22184 tangling step
22185 \begin_inset Quotes erd
22186 \end_inset
22187
22188 .
22189  As stated above, the Converter is set to 
22190 \begin_inset Quotes eld
22191 \end_inset
22192
22193
22194 \family typewriter
22195 build-script $$i
22196 \family default
22197
22198 \begin_inset Quotes erd
22199 \end_inset
22200
22201 , with Flags set to 
22202 \begin_inset Quotes eld
22203 \end_inset
22204
22205
22206 \family typewriter
22207 originaldir,parselog=listerrors
22208 \family default
22209
22210 \begin_inset Quotes erd
22211 \end_inset
22212
22213 .
22214 \end_layout
22215
22216 \begin_layout Subsubsection
22217 Debug extensions
22218 \end_layout
22219
22220 \begin_layout Standard
22221 There is also a new function implemented in the LyX server, the 
22222 \begin_inset Quotes eld
22223 \end_inset
22224
22225 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22226  
22227 \end_layout
22228
22229 \begin_layout Standard
22230 When debugging code with ddd/gdb, it is possible to invoke a text editor
22231  at the current execution position with a single key stroke.
22232  The default ddd configuration for that is shift-ctrl-V.
22233  It happens that you can define the editor command line invocation in ddd
22234  by accessing the 
22235 \family sans
22236 Edit\SpecialChar \menuseparator
22237 Preferences\SpecialChar \menuseparator
22238 Helpers
22239 \family default
22240  dialog and changing the "Edit Sources" entry.
22241 \end_layout
22242
22243 \begin_layout Standard
22244 I take advantage of the new created LyX server function and this ddd feature,
22245  and set 
22246 \begin_inset Quotes eld
22247 \end_inset
22248
22249 Edit Sources
22250 \begin_inset Quotes erd
22251 \end_inset
22252
22253  to:
22254 \end_layout
22255
22256 \begin_layout LyX-Code
22257 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22258 \end_layout
22259
22260 \begin_layout Standard
22261 With this, whenever you are using ddd and find a point in the program that
22262  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22263  ddd you forward this information to LyX through the LyX server and then
22264  the LyX window will show the same file with the cursor at the same position
22265  ddd was pointing to.
22266  No more guessing or long scrolling to locate a point in the program back
22267  from debugging !
22268 \end_layout
22269
22270 \begin_layout Standard
22271 Note however that you must enable the LyX server to get this feature working
22272  (it is disabled by default).
22273  You can enable it in 
22274 \family sans
22275 Preferences
22276 \family default
22277  (tabs 
22278 \family sans
22279 Inputs
22280 \family default
22281
22282 \family sans
22283 Paths
22284 \family default
22285 ) by entering in the 
22286 \family sans
22287 LyXserver pipe
22288 \family default
22289  a path like 
22290 \begin_inset Quotes eld
22291 \end_inset
22292
22293
22294 \family typewriter
22295 /home/<your-home-directory>/.lyx/lyxpipe
22296 \family default
22297
22298 \begin_inset Quotes erd
22299 \end_inset
22300
22301
22302 \end_layout
22303
22304 \begin_layout Standard
22305 Read the LyX server documentation in the 
22306 \emph on
22307 Customization Manual
22308 \emph default
22309  for further information.
22310 \end_layout
22311
22312 \begin_layout Subsubsection
22313 Toolbar extensions
22314 \end_layout
22315
22316 \begin_layout Standard
22317 There are six new buttons that can be added to your LyX toolbar.
22318  Five of these buttons are short cuts to layout styles: 
22319 \family sans
22320 Standard
22321 \family default
22322
22323 \family sans
22324 Section
22325 \family default
22326
22327 \family sans
22328 LaTeX
22329 \family default
22330
22331 \family sans
22332 LyX-Code
22333 \family default
22334 , and 
22335 \family sans
22336 Scrap
22337 \family default
22338 .
22339  The last one is a short cut to the 
22340 \begin_inset Quotes eld
22341 \end_inset
22342
22343 Build Program
22344 \begin_inset Quotes erd
22345 \end_inset
22346
22347  File menu entry.
22348  
22349 \end_layout
22350
22351 \begin_layout Standard
22352 LyX has a range of buttons that are available for tool bar customization.
22353  In my toolbar I like to combine the six short cuts above with two more:
22354  One for 
22355 \family sans
22356 View
22357 \family default
22358 \SpecialChar \menuseparator
22359
22360 \family sans
22361 Update
22362 \family default
22363 \SpecialChar \menuseparator
22364
22365 \family sans
22366 DVI
22367 \family default
22368  and the other for 
22369 \family sans
22370 View\SpecialChar \menuseparator
22371 DVI
22372 \family default
22373  File menu entries.
22374  Here is how it looks like:
22375 \end_layout
22376
22377 \begin_layout LyX-Code
22378 Toolbar
22379 \end_layout
22380
22381 \begin_layout LyX-Code
22382   Layouts
22383 \end_layout
22384
22385 \begin_layout LyX-Code
22386   Icon "layout Standard"
22387 \end_layout
22388
22389 \begin_layout LyX-Code
22390   Icon "layout Section"
22391 \end_layout
22392
22393 \begin_layout LyX-Code
22394   Icon "layout LaTeX"
22395 \end_layout
22396
22397 \begin_layout LyX-Code
22398   Icon "layout LyX-Code"
22399 \end_layout
22400
22401 \begin_layout LyX-Code
22402   Icon "layout Scrap"
22403 \end_layout
22404
22405 \begin_layout LyX-Code
22406   Separator
22407 \end_layout
22408
22409 \begin_layout LyX-Code
22410   Icon "buffer-view"
22411 \end_layout
22412
22413 \begin_layout LyX-Code
22414   Icon "buffer-typeset"
22415 \end_layout
22416
22417 \begin_layout LyX-Code
22418   Icon "build-program"
22419 \end_layout
22420
22421 \begin_layout LyX-Code
22422   Separator
22423 \end_layout
22424
22425 \begin_layout LyX-Code
22426 .
22427 \end_layout
22428
22429 \begin_layout LyX-Code
22430 .
22431 \end_layout
22432
22433 \begin_layout LyX-Code
22434 .
22435 \end_layout
22436
22437 \begin_layout LyX-Code
22438 End
22439 \end_layout
22440
22441 \begin_layout Subsubsection
22442 Colors customization
22443 \end_layout
22444
22445 \begin_layout Standard
22446 There are a number of colors in LyX that can be customized in 
22447 \family sans
22448 Preferences
22449 \family default
22450 .
22451  One of the things that bothers people is the LaTeX font color.
22452  The default color is red, since the scraps uses LaTeX font, and there is
22453  a lot of scraps in literate documents, you may get tired of seeing everything
22454  in red.
22455  You can change it by going to the tabs 
22456 \family sans
22457 Look&Feel
22458 \family default
22459
22460 \family sans
22461 Colors.
22462 \end_layout
22463
22464 \begin_layout Standard
22465 The next thing is the visible presence of the newline character in the screen.
22466  You can choose the color of this particular character and make it blend
22467  in the background.
22468  I recommend you choosing a color that is close to the background but not
22469  equal, that way you still can see it is there, but it is not bothering
22470  you anymore.
22471  
22472 \end_layout
22473
22474 \begin_layout Chapter
22475 Special features
22476 \end_layout
22477
22478 \begin_layout Standard
22479 You can do everything with LyX that you can do with LaTeX.
22480  However, LyX cannot support every LaTeX feature directly.
22481  But you can always use TeX Code.
22482  This chapter shows you some more special things you might want to use.
22483  For other special things you can do with figures, tables, floats, boxes
22484  and notes, have a look at the 
22485 \emph on
22486 Embedded
22487 \begin_inset space ~
22488 \end_inset
22489
22490 Objects
22491 \emph default
22492  manual.
22493 \end_layout
22494
22495 \begin_layout Section
22496 Multiple Text Columns
22497 \end_layout
22498
22499 \begin_layout Standard
22500 This feature is independent of the option 
22501 \family sans
22502 Two-column document
22503 \family default
22504  in the document settings under 
22505 \family sans
22506 Text Layout
22507 \family default
22508 .
22509  If you want to have 2
22510 \begin_inset space ~
22511 \end_inset
22512
22513 columns for the whole document, it is recommended to use the 
22514 \family sans
22515 Two-column document
22516 \family default
22517  option.
22518  For all other cases use this feature.
22519 \end_layout
22520
22521 \begin_layout Standard
22522 To use multiple text columns in your document, you have to load the module
22523  
22524 \family sans
22525 Multiple Columns
22526 \family default
22527  (menu 
22528 \family sans
22529 Document\SpecialChar \menuseparator
22530 Settings\SpecialChar \menuseparator
22531 Modules
22532 \family default
22533 ) and must have the LaTeX-package 
22534 \series bold
22535 multicol
22536 \series default
22537
22538 \begin_inset Index idx
22539 status collapsed
22540
22541 \begin_layout Plain Layout
22542 LaTeX-packages ! multicol
22543 \end_layout
22544
22545 \end_inset
22546
22547  installed.
22548 \end_layout
22549
22550 \begin_layout Standard
22551 Footnotes within multiple columns will be placed at the bottom of the page
22552  and not under each column.
22553  Within the different columns you can use everything, with the limitation
22554  that for floats you need to use the float option 
22555 \family sans
22556 Span columns
22557 \family default
22558 .
22559 \end_layout
22560
22561 \begin_layout Subsection
22562 Basics
22563 \end_layout
22564
22565 \begin_layout Standard
22566 If you want to have 2
22567 \begin_inset space ~
22568 \end_inset
22569
22570 columns in your text, use the style 
22571 \family sans
22572 Begin Multiple Columns
22573 \family default
22574  where the columns should start.
22575  The content of the style is the number of the columns, so in this case
22576  use a 
22577 \begin_inset Quotes eld
22578 \end_inset
22579
22580 2
22581 \begin_inset Quotes erd
22582 \end_inset
22583
22584 .
22585  At the point where the columns should end use the style 
22586 \family sans
22587 End Multiple Columns
22588 \family default
22589  and keep it empty.
22590 \end_layout
22591
22592 \begin_layout Standard
22593 Here is an example:
22594 \end_layout
22595
22596 \begin_layout Begin Multiple Columns
22597 2
22598 \end_layout
22599
22600 \begin_layout Standard
22601 \noindent
22602
22603 \series bold
22604 \size small
22605 The Adventure of the Empty House
22606 \series default
22607
22608 \begin_inset Newline newline
22609 \end_inset
22610
22611 by 
22612 \noun on
22613 Sir Arthur Conan Doyle
22614 \end_layout
22615
22616 \begin_layout Standard
22617
22618 \size small
22619 It was in the spring of the year 1894 that all London was interested, and
22620  the fashionable world dismayed, by the murder of the Honourable Ronald
22621  Adair under most unusual and inexplicable circumstances.
22622  The public has already learned those particulars of the crime which came
22623  out in the police investigation, but a good deal was suppressed upon that
22624  occasion, since the case for the prosecution was so overwhelmingly strong
22625  that it was not necessary to bring forward all the facts.
22626  Only now, at the end of nearly ten years, am I allowed to supply those
22627  missing links which make up the whole of that remarkable chain.
22628  The crime was of interest in itself, but that interest was as nothing to
22629  me compared to the inconceivable sequel, which afforded me the greatest
22630  shock and surprise of any event in my adventurous life.
22631  Even now, after this long interval, I find myself thrilling as I think
22632  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22633 ty which utterly submerged my mind.
22634  Let me say to that public, which has shown some interest in those glimpses
22635  which I have occasionally given them of the thoughts and actions of a very
22636  remarkable man, that they are not to blame me if I have not shared my knowledge
22637  with them, for I should have considered it my first duty to do so, had
22638  I not been barred by a positive prohibition from his own lips, which was
22639  only withdrawn upon the third of last month.
22640 \end_layout
22641
22642 \begin_layout End Multiple Columns
22643
22644 \end_layout
22645
22646 \begin_layout Standard
22647 Here is an example with 3
22648 \begin_inset space ~
22649 \end_inset
22650
22651 columns:
22652 \end_layout
22653
22654 \begin_layout Begin Multiple Columns
22655 3
22656 \end_layout
22657
22658 \begin_layout Standard
22659
22660 \size footnotesize
22661 It can be imagined that my close intimacy with Sherlock Holmes had interested
22662  me deeply in crime, and that after his disappearance I never failed to
22663  read with care the various problems which came before the public.
22664  And I even attempted, more than once, for my own private satisfaction,
22665  to employ his methods in their solution, though with indifferent success.
22666  There was none, however, which appealed to me like this tragedy of Ronald
22667  Adair.
22668  As I read the evidence at the inquest, which led up to a verdict of willful
22669  murder against some person or persons unknown, I realized more clearly
22670  than I had ever done the loss which the community had sustained by the
22671  death of Sherlock Holmes.
22672  There were points about this strange business which would, I was sure,
22673  have specially appealed to him, and the efforts of the police would have
22674  been supplemented, or more probably anticipated, by the trained observation
22675  and the alert mind of the first criminal agent in Europe.
22676  All day, as I drove upon my round, I turned over the case in my mind and
22677  found no explanation which appeared to me to be adequate.
22678  At the risk of telling a twice-told tale, I will recapitulate the facts
22679  as they were known to the public at the conclusion of the inquest.
22680 \end_layout
22681
22682 \begin_layout End Multiple Columns
22683
22684 \end_layout
22685
22686 \begin_layout Standard
22687 You can have up to 10
22688 \begin_inset space ~
22689 \end_inset
22690
22691 columns if you want to, but that might not be very pleasant for the readers
22692  of your document.
22693 \end_layout
22694
22695 \begin_layout Standard
22696 \begin_inset Newpage newpage
22697 \end_inset
22698
22699
22700 \end_layout
22701
22702 \begin_layout Subsection
22703 Columns inside Columns
22704 \end_layout
22705
22706 \begin_layout Standard
22707 You can also have columns inside columns:
22708 \end_layout
22709
22710 \begin_layout Begin Multiple Columns
22711 2
22712 \end_layout
22713
22714 \begin_layout Standard
22715
22716 \size footnotesize
22717 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22718  at that time governor of one of the Australian colonies.
22719  Adair's mother had returned from Australia to undergo the operation for
22720  cataract, and she, her son Ronald, and her daughter Hilda were living together
22721  at 427 Park Lane.
22722 \end_layout
22723
22724 \begin_layout Begin Multiple Columns
22725 2
22726 \end_layout
22727
22728 \begin_layout Standard
22729
22730 \size footnotesize
22731 The youth moved in the best society–had, so far as was known, no enemies
22732  and no particular vices.
22733  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22734  had been broken off by mutual consent some months before, and there was
22735  no sign that it had left any very profound feeling behind it.
22736  For the rest {sic} the man's life moved in a narrow and conventional circle,
22737  for his habits were quiet and his nature unemotional.
22738  Yet it was upon this easy-going young aristocrat that death came, in most
22739  strange and unexpected form, between the hours of ten and eleven-twenty
22740  on the night of March 30, 1894.
22741 \end_layout
22742
22743 \begin_layout End Multiple Columns
22744
22745 \end_layout
22746
22747 \begin_layout Standard
22748
22749 \size footnotesize
22750 Ronald Adair was fond of cards–playing continually, but never for such stakes
22751  as would hurt him.
22752  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22753  It was shown that, after dinner on the day of his death, he had played
22754  a rubber of whist at the latter club.
22755  He had also played there in the afternoon.
22756
22757 \size default
22758  
22759 \size footnotesize
22760 The evidence of those who had played with him– Mr.
22761  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22762  and that there was a fairly equal fall of the cards.
22763  Adair might have lost five pounds, but not more.
22764  His fortune was a considerable one, and such a loss could not in any way
22765  affect him.
22766  He had played nearly every day at one club or other, but he was a cautious
22767  player, and usually rose a winner.
22768  It came out in evidence that, in partnership with Colonel Moran, he had
22769  actually won as much as four hundred and twenty pounds in a sitting, some
22770  weeks before, from Godfrey Milner and Lord Balmoral.
22771  So much for his recent history as it came out at the inquest.
22772 \end_layout
22773
22774 \begin_layout End Multiple Columns
22775
22776 \end_layout
22777
22778 \begin_layout Subsection
22779 Advanced Examples
22780 \end_layout
22781
22782 \begin_layout Standard
22783 The examples in this section show some more special features of multiple
22784  columns.
22785 \end_layout
22786
22787 \begin_layout Standard
22788 For more features of multiple columns, have a look at the documentation
22789  of the LaTeX-package 
22790 \series bold
22791 multicol
22792 \series default
22793
22794 \begin_inset Index idx
22795 status collapsed
22796
22797 \begin_layout Plain Layout
22798 LaTeX-packages ! multicol
22799 \end_layout
22800
22801 \end_inset
22802
22803
22804 \begin_inset CommandInset citation
22805 LatexCommand cite
22806 key "multicol"
22807
22808 \end_inset
22809
22810 .
22811 \end_layout
22812
22813 \begin_layout Subsubsection
22814 Preface
22815 \end_layout
22816
22817 \begin_layout Standard
22818 To add a preface text for multiple columns, add the command
22819 \end_layout
22820
22821 \begin_layout Standard
22822
22823 \series bold
22824 }[
22825 \end_layout
22826
22827 \begin_layout Standard
22828 as TeX Code behind the number of columns in the
22829 \family sans
22830  Begin Multiple Columns
22831 \family default
22832  style.
22833  Behind the command follows the preface text.
22834  At the end of the style use the command
22835 \end_layout
22836
22837 \begin_layout Standard
22838
22839 \series bold
22840 ]{
22841 \end_layout
22842
22843 \begin_layout Standard
22844 as TeX Code.
22845  An example with some preface text:
22846 \end_layout
22847
22848 \begin_layout Standard
22849 \begin_inset VSpace bigskip
22850 \end_inset
22851
22852
22853 \end_layout
22854
22855 \begin_layout Begin Multiple Columns
22856 2
22857 \begin_inset ERT
22858 status collapsed
22859
22860 \begin_layout Plain Layout
22861
22862 }[
22863 \end_layout
22864
22865 \end_inset
22866
22867 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22868
22869 \begin_inset ERT
22870 status collapsed
22871
22872 \begin_layout Plain Layout
22873
22874 ]{
22875 \end_layout
22876
22877 \end_inset
22878
22879
22880 \end_layout
22881
22882 \begin_layout Standard
22883
22884 \size small
22885 On the evening of the crime, he returned from the club exactly at ten.
22886  His mother and sister were out spending the evening with a relation.
22887  The servant deposed that she heard him enter the front room on the second
22888  floor, generally used as his sitting-room.
22889  She had lit a fire there, and as it smoked she had opened the window.
22890  No sound was heard from the room until eleven-twenty, the hour of the return
22891  of Lady Maynooth and her daughter.
22892  Desiring to say good-night, she attempted to enter her son's room.
22893  The door was locked on the inside, and no answer could be got to their
22894  cries and knocking.
22895  Help was obtained, and the door forced.
22896  The unfortunate young man was found lying near the table.
22897  His head had been horribly mutilated by an expanding revolver bullet, but
22898  no weapon of any sort was to be found in the room.
22899 \end_layout
22900
22901 \begin_layout End Multiple Columns
22902
22903 \end_layout
22904
22905 \begin_layout Standard
22906 You can also use a section heading as the preface if you use a section command
22907  as TeX Code behind the first TeX Code.
22908  For example the command
22909 \end_layout
22910
22911 \begin_layout Standard
22912
22913 \series bold
22914
22915 \backslash
22916 subsection{subsection title}
22917 \end_layout
22918
22919 \begin_layout Standard
22920 creates a subsection.
22921  In this example the preface is a subsubsection:
22922 \end_layout
22923
22924 \begin_layout Begin Multiple Columns
22925 2
22926 \begin_inset ERT
22927 status collapsed
22928
22929 \begin_layout Plain Layout
22930
22931 }[
22932 \end_layout
22933
22934 \end_inset
22935
22936
22937 \begin_inset ERT
22938 status collapsed
22939
22940 \begin_layout Plain Layout
22941
22942
22943 \backslash
22944 subsubsection{
22945 \end_layout
22946
22947 \end_inset
22948
22949 This is a subsubsection heading as a preface
22950 \begin_inset ERT
22951 status collapsed
22952
22953 \begin_layout Plain Layout
22954
22955 }
22956 \end_layout
22957
22958 \end_inset
22959
22960
22961 \begin_inset ERT
22962 status collapsed
22963
22964 \begin_layout Plain Layout
22965
22966 ]{
22967 \end_layout
22968
22969 \end_inset
22970
22971
22972 \end_layout
22973
22974 \begin_layout Standard
22975
22976 \size small
22977 A minute examination of the circumstances served only to make the case more
22978  complex.
22979  In the first place, no reason could be given why the young man should have
22980  fastened the door upon the inside.
22981  There was the possibility that the murderer had done this, and had afterwards
22982  escaped by the window.
22983  The drop was at least twenty feet, however, and a bed of crocuses in full
22984  bloom lay beneath.
22985  Neither the flowers nor the earth showed any sign of having been disturbed,
22986  nor were there any marks upon the narrow strip of grass which separated
22987  the house from the road.
22988  Apparently, therefore, it was the young man himself who had fastened the
22989  door.
22990  But how did he come by his death? No one could have climbed up to the window
22991  without leaving traces.
22992  Suppose a man had fired through the window, he would indeed be a remarkable
22993  shot who could with a revolver inflict so deadly a wound.
22994  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22995  a hundred yards of the house.
22996  No one had heard a shot.
22997 \end_layout
22998
22999 \begin_layout End Multiple Columns
23000
23001 \end_layout
23002
23003 \begin_layout Standard
23004 If there is less vertical space left on the page at the beginning of the
23005  multiple columns than needed for 6
23006 \begin_inset space ~
23007 \end_inset
23008
23009 text lines, a page break will be inserted before the multiple columns.
23010  Depending on the number of lines of the preface text, you might want to
23011  change this value.
23012  It is determined by inserting the command
23013 \end_layout
23014
23015 \begin_layout Standard
23016
23017 \series bold
23018 ][number
23019 \backslash
23020 baselineskip
23021 \end_layout
23022
23023 \begin_layout Standard
23024 as TeX Code behind the preface definition but before the final 
23025 \series bold
23026 ]{
23027 \series default
23028  command.
23029  
23030 \emph on
23031 number
23032 \emph default
23033  is hereby the number of text lines.
23034  In this example the space is set to 7
23035 \begin_inset space ~
23036 \end_inset
23037
23038 text lines:
23039 \end_layout
23040
23041 \begin_layout Begin Multiple Columns
23042 2
23043 \begin_inset ERT
23044 status collapsed
23045
23046 \begin_layout Plain Layout
23047
23048 }[
23049 \end_layout
23050
23051 \end_inset
23052
23053
23054 \begin_inset ERT
23055 status collapsed
23056
23057 \begin_layout Plain Layout
23058
23059
23060 \backslash
23061 subsubsection{
23062 \end_layout
23063
23064 \end_inset
23065
23066 This is the sectioning command
23067 \begin_inset Newline newline
23068 \end_inset
23069
23070 as a preface and
23071 \begin_inset Newline newline
23072 \end_inset
23073
23074 with multiple text lines
23075 \begin_inset ERT
23076 status collapsed
23077
23078 \begin_layout Plain Layout
23079
23080 }
23081 \end_layout
23082
23083 \end_inset
23084
23085
23086 \begin_inset ERT
23087 status collapsed
23088
23089 \begin_layout Plain Layout
23090
23091 ][7
23092 \backslash
23093 baselineskip
23094 \end_layout
23095
23096 \end_inset
23097
23098
23099 \begin_inset ERT
23100 status collapsed
23101
23102 \begin_layout Plain Layout
23103
23104 ]{
23105 \end_layout
23106
23107 \end_inset
23108
23109
23110 \end_layout
23111
23112 \begin_layout Standard
23113
23114 \size small
23115 On the evening of the crime, he returned from the club exactly at ten.
23116  His mother and sister were out spending the evening with a relation.
23117  The servant deposed that she heard him enter the front room on the second
23118  floor, generally used as his sitting-room.
23119  She had lit a fire there, and as it smoked she had opened the window.
23120  No sound was heard from the room until eleven-twenty, the hour of the return
23121  of Lady Maynooth and her daughter.
23122  Desiring to say good-night, she attempted to enter her son's room.
23123  The door was locked on the inside, and no answer could be got to their
23124  cries and knocking.
23125  Help was obtained, and the door forced.
23126  The unfortunate young man was found lying near the table.
23127  His head had been horribly mutilated by an expanding revolver bullet, but
23128  no weapon of any sort was to be found in the room.
23129 \end_layout
23130
23131 \begin_layout End Multiple Columns
23132
23133 \end_layout
23134
23135 \begin_layout Subsubsection
23136 Surrounding Space
23137 \end_layout
23138
23139 \begin_layout Standard
23140 The amount of space before and after multiple columns can be changed by
23141  changing the length 
23142 \series bold
23143
23144 \backslash
23145 multicolsep
23146 \series default
23147 .
23148  For example the command
23149 \end_layout
23150
23151 \begin_layout Standard
23152
23153 \series bold
23154
23155 \backslash
23156 setlength{
23157 \backslash
23158 multicolsep}{3cm}
23159 \end_layout
23160
23161 \begin_layout Standard
23162 in TeX Code changes its value to 3
23163 \begin_inset space \thinspace{}
23164 \end_inset
23165
23166 cm.
23167  The change must be made before the multiple columns' start.
23168  The predefined value is 13
23169 \begin_inset space \thinspace{}
23170 \end_inset
23171
23172 pt.
23173 \end_layout
23174
23175 \begin_layout Standard
23176 For this example 
23177 \series bold
23178
23179 \backslash
23180 multicolsep
23181 \series default
23182  was set to 2.5
23183 \begin_inset space \thinspace{}
23184 \end_inset
23185
23186 cm:
23187 \end_layout
23188
23189 \begin_layout Standard
23190 \begin_inset ERT
23191 status open
23192
23193 \begin_layout Plain Layout
23194
23195
23196 \backslash
23197 setlength{
23198 \backslash
23199 multicolsep}{2.5cm}
23200 \end_layout
23201
23202 \end_inset
23203
23204
23205 \end_layout
23206
23207 \begin_layout Begin Multiple Columns
23208 2
23209 \end_layout
23210
23211 \begin_layout Standard
23212
23213 \size small
23214 All day I turned these facts over in my mind, endeavouring to hit upon some
23215  theory which could reconcile them all, and to find that line of least resistanc
23216 e which my poor friend had declared to be the starting-point of every investigat
23217 ion.
23218  I confess that I made little progress.
23219  In the evening I strolled across the Park, and found myself about six o'clock
23220  at the Oxford Street end of Park Lane.
23221  A group of loafers upon the pavements, all staring up at a particular window,
23222  directed me to the house which I had come to see.
23223  A tall, thin man with coloured glasses, whom I strongly suspected of being
23224  a plain-clothes detective, was pointing out some theory of his own, while
23225  the others crowded round to listen to what he said.
23226  I got as near him as I could, but his observations seemed to me to be absurd,
23227  so I withdrew again in some disgust.
23228  As I did so I struck against an elderly, deformed man, who had been behind
23229  me, and I knocked down several books which he was carrying.
23230 \end_layout
23231
23232 \begin_layout End Multiple Columns
23233
23234 \end_layout
23235
23236 \begin_layout Standard
23237 \begin_inset Note Greyedout
23238 status open
23239
23240 \begin_layout Plain Layout
23241
23242 \series bold
23243 Note:
23244 \series default
23245  The values you set with 
23246 \series bold
23247
23248 \backslash
23249 setlength
23250 \series default
23251  will be used for all following multiple columns until you change them again.
23252 \end_layout
23253
23254 \end_inset
23255
23256
23257 \end_layout
23258
23259 \begin_layout Standard
23260 \begin_inset ERT
23261 status collapsed
23262
23263 \begin_layout Plain Layout
23264
23265
23266 \backslash
23267 setlength{
23268 \backslash
23269 multicolsep}{13pt}
23270 \end_layout
23271
23272 \end_inset
23273
23274
23275 \begin_inset Note Note
23276 status collapsed
23277
23278 \begin_layout Plain Layout
23279 go back to the default
23280 \end_layout
23281
23282 \end_inset
23283
23284
23285 \end_layout
23286
23287 \begin_layout Standard
23288 \begin_inset Newpage newpage
23289 \end_inset
23290
23291
23292 \end_layout
23293
23294 \begin_layout Subsubsection
23295 Column Separation
23296 \end_layout
23297
23298 \begin_layout Standard
23299 The width of the columns is automatically calculated, but you can modify
23300  the space between the columns.
23301  This is done by changing the length 
23302 \series bold
23303
23304 \backslash
23305 columnsep
23306 \series default
23307 .
23308  Its predefined value is 10
23309 \begin_inset space \thinspace{}
23310 \end_inset
23311
23312 pt.
23313  Here is an example where 
23314 \series bold
23315
23316 \backslash
23317 columnsep
23318 \series default
23319  is set to 3
23320 \begin_inset space \thinspace{}
23321 \end_inset
23322
23323 cm:
23324 \end_layout
23325
23326 \begin_layout Standard
23327 \begin_inset ERT
23328 status open
23329
23330 \begin_layout Plain Layout
23331
23332
23333 \backslash
23334 setlength{
23335 \backslash
23336 columnsep}{3cm}
23337 \end_layout
23338
23339 \end_inset
23340
23341
23342 \end_layout
23343
23344 \begin_layout Begin Multiple Columns
23345 2
23346 \end_layout
23347
23348 \begin_layout Standard
23349
23350 \size small
23351 My observations of No.
23352 \begin_inset space \space{}
23353 \end_inset
23354
23355 427 Park Lane did little to clear up the problem in which I was interested.
23356  The house was separated from the street by a low wall and railing, the
23357  whole not more than five feet high.
23358  It was perfectly easy, therefore, for anyone to get into the garden, but
23359  the window was entirely inaccessible, since there was no water pipe or
23360  anything which could help the most active man to climb it.
23361  More puzzled than ever, I retraced my steps to Kensington.
23362  I had not been in my study five minutes when the maid entered to say that
23363  a person desired to see me.
23364  To my astonishment it was none other than my strange old book collector,
23365  his sharp, wizened face peering out from a frame of white hair, and his
23366  precious volumes, a dozen of them at least, wedged under his right arm.
23367 \end_layout
23368
23369 \begin_layout End Multiple Columns
23370
23371 \end_layout
23372
23373 \begin_layout Standard
23374 \begin_inset ERT
23375 status collapsed
23376
23377 \begin_layout Plain Layout
23378
23379
23380 \backslash
23381 setlength{
23382 \backslash
23383 columnsep}{10pt}
23384 \end_layout
23385
23386 \end_inset
23387
23388
23389 \begin_inset Note Note
23390 status collapsed
23391
23392 \begin_layout Plain Layout
23393 go back to the default
23394 \end_layout
23395
23396 \end_inset
23397
23398
23399 \end_layout
23400
23401 \begin_layout Subsubsection
23402 Vertical Lines
23403 \end_layout
23404
23405 \begin_layout Standard
23406 Between the columns a rule with a width of the length 
23407 \series bold
23408
23409 \backslash
23410 columnseprule
23411 \series default
23412  is placed.
23413  If this rule width is set to 0
23414 \begin_inset space \thinspace{}
23415 \end_inset
23416
23417 pt (this is the default), the rule is suppressed.
23418  In the following example the line is 2
23419 \begin_inset space \thinspace{}
23420 \end_inset
23421
23422 pt wide:
23423 \end_layout
23424
23425 \begin_layout Standard
23426 \begin_inset ERT
23427 status open
23428
23429 \begin_layout Plain Layout
23430
23431
23432 \backslash
23433 setlength{
23434 \backslash
23435 columnseprule}{2pt}
23436 \end_layout
23437
23438 \end_inset
23439
23440
23441 \end_layout
23442
23443 \begin_layout Begin Multiple Columns
23444 2
23445 \end_layout
23446
23447 \begin_layout Standard
23448
23449 \size small
23450 \begin_inset Quotes eld
23451 \end_inset
23452
23453 You're surprised to see me, sir,
23454 \begin_inset Quotes erd
23455 \end_inset
23456
23457  said he, in a strange, croaking voice.
23458 \end_layout
23459
23460 \begin_layout Standard
23461
23462 \size small
23463 I acknowledged that I was.
23464 \end_layout
23465
23466 \begin_layout Standard
23467
23468 \size small
23469 \begin_inset Quotes eld
23470 \end_inset
23471
23472 Well, I've a conscience, sir, and when I chanced to see you go into this
23473  house, as I came hobbling after you, I thought to myself, I'll just step
23474  in and see that kind gentleman, and tell him that if I was a bit gruff
23475  in my manner there was not any harm meant, and that I am much obliged to
23476  him for picking up my books.
23477 \begin_inset Quotes erd
23478 \end_inset
23479
23480
23481 \end_layout
23482
23483 \begin_layout Standard
23484
23485 \size small
23486 \begin_inset Quotes eld
23487 \end_inset
23488
23489 You make too much of a trifle,
23490 \begin_inset Quotes erd
23491 \end_inset
23492
23493  said I.
23494  
23495 \begin_inset Quotes eld
23496 \end_inset
23497
23498 May I ask how you knew who I was?
23499 \begin_inset Quotes erd
23500 \end_inset
23501
23502
23503 \end_layout
23504
23505 \begin_layout Standard
23506
23507 \size small
23508 \begin_inset Quotes eld
23509 \end_inset
23510
23511 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23512  you'll find my little bookshop at the corner of Church Street, and very
23513  happy to see you, I am sure.
23514  Maybe you collect yourself, sir.
23515  Here's 
23516 \noun on
23517 British
23518 \begin_inset space ~
23519 \end_inset
23520
23521 Birds
23522 \noun default
23523 , and 
23524 \noun on
23525 Catullus
23526 \noun default
23527 , and 
23528 \noun on
23529 The Holy War
23530 \noun default
23531 --a bargain, every one of them.
23532  With five volumes you could just fill that gap on that second shelf.
23533  It looks untidy, does it not, sir?
23534 \begin_inset Quotes erd
23535 \end_inset
23536
23537
23538 \end_layout
23539
23540 \begin_layout End Multiple Columns
23541
23542 \end_layout
23543
23544 \begin_layout Standard
23545 \begin_inset ERT
23546 status collapsed
23547
23548 \begin_layout Plain Layout
23549
23550
23551 \backslash
23552 setlength{
23553 \backslash
23554 columnseprule}{0pt}
23555 \end_layout
23556
23557 \end_inset
23558
23559
23560 \begin_inset Note Note
23561 status collapsed
23562
23563 \begin_layout Plain Layout
23564 go back to the default
23565 \end_layout
23566
23567 \end_inset
23568
23569
23570 \end_layout
23571
23572 \begin_layout Standard
23573 \begin_inset Newpage newpage
23574 \end_inset
23575
23576
23577 \end_layout
23578
23579 \begin_layout Section
23580 Non-standard Paragraph Shapes
23581 \end_layout
23582
23583 \begin_layout Standard
23584 \begin_inset ERT
23585 status collapsed
23586
23587 \begin_layout Plain Layout
23588
23589
23590 \backslash
23591 begin{sloppypar}
23592 \end_layout
23593
23594 \end_inset
23595
23596
23597 \end_layout
23598
23599 \begin_layout Standard
23600 \begin_inset ERT
23601 status collapsed
23602
23603 \begin_layout Plain Layout
23604
23605
23606 \backslash
23607 newdimen
23608 \backslash
23609 varunit 
23610 \end_layout
23611
23612 \begin_layout Plain Layout
23613
23614
23615 \backslash
23616 setlength{
23617 \backslash
23618 varunit}{4.5in}
23619 \end_layout
23620
23621 \end_inset
23622
23623
23624 \end_layout
23625
23626 \begin_layout Standard
23627 \noindent
23628 \begin_inset ERT
23629 status collapsed
23630
23631 \begin_layout Plain Layout
23632
23633
23634 \backslash
23635 parshape 19 0.45
23636 \backslash
23637 varunit 0.332
23638 \backslash
23639 varunit
23640 \end_layout
23641
23642 \begin_layout Plain Layout
23643
23644 0.40
23645 \backslash
23646 varunit 0.300
23647 \backslash
23648 varunit
23649 \end_layout
23650
23651 \begin_layout Plain Layout
23652
23653 0.35
23654 \backslash
23655 varunit 0.293
23656 \backslash
23657 varunit
23658 \end_layout
23659
23660 \begin_layout Plain Layout
23661
23662 0.30
23663 \backslash
23664 varunit 0.300
23665 \backslash
23666 varunit
23667 \end_layout
23668
23669 \begin_layout Plain Layout
23670
23671 0.25
23672 \backslash
23673 varunit 0.317
23674 \backslash
23675 varunit
23676 \end_layout
23677
23678 \begin_layout Plain Layout
23679
23680 0.20
23681 \backslash
23682 varunit 0.342
23683 \backslash
23684 varunit
23685 \end_layout
23686
23687 \begin_layout Plain Layout
23688
23689 0.15
23690 \backslash
23691 varunit 0.373
23692 \backslash
23693 varunit
23694 \end_layout
23695
23696 \begin_layout Plain Layout
23697
23698 0.10
23699 \backslash
23700 varunit 0.410
23701 \backslash
23702 varunit
23703 \end_layout
23704
23705 \begin_layout Plain Layout
23706
23707 0.05
23708 \backslash
23709 varunit 0.453
23710 \backslash
23711 varunit
23712 \end_layout
23713
23714 \begin_layout Plain Layout
23715
23716 0.00
23717 \backslash
23718 varunit 0.500
23719 \backslash
23720 varunit
23721 \end_layout
23722
23723 \begin_layout Plain Layout
23724
23725 0.05
23726 \backslash
23727 varunit 0.453
23728 \backslash
23729 varunit
23730 \end_layout
23731
23732 \begin_layout Plain Layout
23733
23734 0.10
23735 \backslash
23736 varunit 0.410
23737 \backslash
23738 varunit
23739 \end_layout
23740
23741 \begin_layout Plain Layout
23742
23743 0.15
23744 \backslash
23745 varunit 0.373
23746 \backslash
23747 varunit
23748 \end_layout
23749
23750 \begin_layout Plain Layout
23751
23752 0.20
23753 \backslash
23754 varunit 0.342
23755 \backslash
23756 varunit
23757 \end_layout
23758
23759 \begin_layout Plain Layout
23760
23761 0.25
23762 \backslash
23763 varunit 0.317
23764 \backslash
23765 varunit
23766 \end_layout
23767
23768 \begin_layout Plain Layout
23769
23770 0.30
23771 \backslash
23772 varunit 0.300
23773 \backslash
23774 varunit
23775 \end_layout
23776
23777 \begin_layout Plain Layout
23778
23779 0.35
23780 \backslash
23781 varunit 0.293
23782 \backslash
23783 varunit
23784 \end_layout
23785
23786 \begin_layout Plain Layout
23787
23788 0.40
23789 \backslash
23790 varunit 0.300
23791 \backslash
23792 varunit
23793 \end_layout
23794
23795 \begin_layout Plain Layout
23796
23797 0.45
23798 \backslash
23799 varunit 0.332
23800 \backslash
23801 varunit
23802 \end_layout
23803
23804 \begin_layout Plain Layout
23805
23806 \end_layout
23807
23808 \end_inset
23809
23810 There are times when the tyranny of rectangular paragraphs must be overthrown.
23811  In such situations, a call to the delightful plain TeX command 
23812 \family typewriter
23813
23814 \backslash
23815 parshape
23816 \family default
23817  is called for.
23818  As you can see, completely arbitrary shapes can be laid out with a suitable
23819  set of line length definitions.
23820  While this parshape may look a bit silly and useless, one could conceive
23821  of situations such as finely tuned dropped capitals, word wrapping around
23822  non-rectangular graphics, etc.
23823  which will benefit from such handcrafting.
23824 \end_layout
23825
23826 \begin_layout Standard
23827 \begin_inset VSpace bigskip
23828 \end_inset
23829
23830
23831 \end_layout
23832
23833 \begin_layout Standard
23834 The syntax is 
23835 \family typewriter
23836
23837 \backslash
23838 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23839  #nindent #nlength
23840 \family default
23841 , where 
23842 \family typewriter
23843 numlines
23844 \family default
23845  is the number of lines of text which define the paragraph.
23846  If there turn out to be fewer lines, the shape is truncated; if there are
23847  more, the excess lines have the same dimensions as the last line of the
23848  definition.
23849  The 
23850 \family typewriter
23851 #nindent
23852 \family default
23853  and 
23854 \family typewriter
23855 #nlength
23856 \family default
23857  entries specify the indentation of the line from the left margin, and the
23858  length of the line as measured from that point.
23859  The shape applies only to the current paragraph; everything is reset to
23860  normal for the next paragraph.
23861 \end_layout
23862
23863 \begin_layout Standard
23864 \begin_inset ERT
23865 status collapsed
23866
23867 \begin_layout Plain Layout
23868
23869
23870 \backslash
23871 end{sloppypar}
23872 \end_layout
23873
23874 \end_inset
23875
23876
23877 \end_layout
23878
23879 \begin_layout Bibliography
23880 \begin_inset CommandInset bibitem
23881 LatexCommand bibitem
23882 key "multicol"
23883
23884 \end_inset
23885
23886 Documentation of the LaTeX-package 
23887 \begin_inset CommandInset href
23888 LatexCommand href
23889 name "multicol"
23890 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23891
23892 \end_inset
23893
23894
23895 \begin_inset Index idx
23896 status collapsed
23897
23898 \begin_layout Plain Layout
23899 LaTeX-packages ! multicol
23900 \end_layout
23901
23902 \end_inset
23903
23904
23905 \end_layout
23906
23907 \end_body
23908 \end_document