]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
5816979b8b34787fb6486e8749ea2cf0da30b270
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 416
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % used for multi-column text
37 \usepackage{multicol}
38
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
41 \end_preamble
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
44 \begin_modules
45 logicalmkup
46 theorems-ams
47 theorems-ams-extended
48 multicol
49 \end_modules
50 \maintain_unincluded_children false
51 \begin_local_layout
52 Format 7
53 InsetLayout CharStyle:MenuItem
54 LyxType               charstyle
55 LabelString           menu
56 LatexType             command
57 LatexName             menuitem
58 Font
59 Family              Sans
60 EndFont
61 Preamble
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
63 EndPreamble
64 End
65 \end_local_layout
66 \language english
67 \language_package default
68 \inputencoding auto
69 \fontencoding global
70 \font_roman default
71 \font_sans default
72 \font_typewriter default
73 \font_default_family default
74 \use_non_tex_fonts false
75 \font_sc false
76 \font_osf false
77 \font_sf_scale 100
78 \font_tt_scale 100
79
80 \graphics default
81 \default_output_format default
82 \output_sync 0
83 \bibtex_command default
84 \index_command default
85 \paperfontsize 12
86 \spacing single
87 \use_hyperref true
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
92 \pdf_bookmarks true
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
96 \pdf_breaklinks false
97 \pdf_pdfborder false
98 \pdf_colorlinks true
99 \pdf_backref false
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \papersize default
103 \use_geometry false
104 \use_amsmath 1
105 \use_esint 0
106 \use_mhchem 1
107 \use_mathdots 1
108 \use_undertilde 1
109 \cite_engine basic
110 \use_bibtopic false
111 \use_indices false
112 \paperorientation portrait
113 \suppress_date false
114 \use_refstyle 0
115 \notefontcolor #0000ff
116 \index Index
117 \shortcut idx
118 \color #008000
119 \end_index
120 \secnumdepth 3
121 \tocdepth 3
122 \paragraph_separation indent
123 \paragraph_indentation default
124 \quotes_language english
125 \papercolumns 1
126 \papersides 2
127 \paperpagestyle headings
128 \tracking_changes false
129 \output_changes false
130 \html_math_output 0
131 \html_css_as_file 0
132 \html_be_strict true
133 \end_header
134
135 \begin_body
136
137 \begin_layout Title
138 Additional LyX Features
139 \end_layout
140
141 \begin_layout Subtitle
142 Version 2.0.x
143 \end_layout
144
145 \begin_layout Author
146 by the LyX Team
147 \begin_inset Foot
148 status collapsed
149
150 \begin_layout Plain Layout
151 \noindent
152 Principal maintainer of this file is
153 \noun on
154  Richard Heck
155 \noun default
156 .
157  If you have comments or error corrections, please send them to the LyX
158  Documentation mailing list, 
159 \begin_inset Flex Code
160 status collapsed
161
162 \begin_layout Plain Layout
163 \noindent
164 <lyx-docs@lists.lyx.org>
165 \end_layout
166
167 \end_inset
168
169 .
170 \end_layout
171
172 \end_inset
173
174
175 \end_layout
176
177 \begin_layout Standard
178 \begin_inset CommandInset toc
179 LatexCommand tableofcontents
180
181 \end_inset
182
183
184 \end_layout
185
186 \begin_layout Chapter
187 Introduction
188 \end_layout
189
190 \begin_layout Standard
191 This manual is essentially Part II of the 
192 \emph on
193 User's Guide\SpecialChar \@.
194
195 \emph default
196  The reason for separating this document out is simple: the 
197 \emph on
198 User's Guide
199 \emph default
200  is already quite lengthy, and it contains information on all of the basic
201  features one needs to know in order to prepare most documents.
202  However, the LyX Team has worked to make LyX extensible through various
203  configuration files and external packages.
204  That means that if you want to support the Fizzwizzle LaTeX package, you
205  can create a layout file (or module) for it without having to alter LyX
206  itself.
207  We've already had contributions of several new features this way, and some
208  of them are documented here.
209  There are also some more `advanced' features, such as how to control the
210  presentation of bibliographies and how to work with multi-part documents,
211  that are not covered in the 
212 \emph on
213 User's Guide
214 \emph default
215  and are discussed here.
216 \end_layout
217
218 \begin_layout Standard
219 This manual also documents some special features, like fax support, version
220  control, and SGML support, which require additional software to work properly.
221  There is also a chapter on LyX's support for HTML.
222  And lastly, there's a chapter of LaTeX tools and tips, things you can use
223  to spruce up your documents by directly using the powerful features of
224  LaTeX.
225  After all, LyX 
226 \emph on
227 is
228 \emph default
229  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
230 \end_layout
231
232 \begin_layout Standard
233 If you haven't read the 
234 \emph on
235 Introduction
236 \emph default
237  yet, you are definitely in the wrong manual.
238  The 
239 \emph on
240 Introduction
241 \emph default
242  is the first place to go, since it describes the notation and format of
243  all of the manuals.
244  You should also be thoroughly familiar with the 
245 \emph on
246 User's Guide
247 \emph default
248  and all of the basic features of LyX before attempting to read this one.
249 \end_layout
250
251 \begin_layout Standard
252 Since many of the topics in this manual depend heavily on LyX's interaction
253  with LaTeX, this first chapter covers the inner workings of LyX and how
254  to direct LyX to generate exactly the LaTeX code you want.
255  It is obviously for more seasoned LyX users.
256 \end_layout
257
258 \begin_layout Chapter
259 LyX and LaTeX
260 \end_layout
261
262 \begin_layout Section
263 How LyX Uses LaTeX
264 \end_layout
265
266 \begin_layout Standard
267 This chapter is for both TeX-nicians and the LaTeX-curious.
268  In it, we'll explain how LyX and LaTeX work together to produce printable
269  output.
270  This is the only place in any of the manuals where we assume you know something
271  about LaTeX.
272 \end_layout
273
274 \begin_layout Standard
275 At one time, LyX was called a 
276 \begin_inset Quotes eld
277 \end_inset
278
279 WYSIWYM frontend to LaTeX,
280 \begin_inset Quotes erd
281 \end_inset
282
283  but that's no longer true.
284  There are frontends to LaTeX out there.
285 \begin_inset Foot
286 status collapsed
287
288 \begin_layout Plain Layout
289 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
290  There are also the LaTeX modes for vi and emacs, of course.
291 \end_layout
292
293 \end_inset
294
295  These are basically text editors with the ability to run LaTeX and mark
296  any errors in the file you're editing.
297  Although LyX 
298 \emph on
299 is
300 \emph default
301  an editor, and it 
302 \emph on
303 does
304 \emph default
305  run LaTeX, and it also indicates errors in the file, it also does much,
306  much more.
307  For one thing, you don't need to know LaTeX to use LyX effectively.
308  And LyX has added its own extensions to LaTeX.
309  Try the following sometime: select 
310 \begin_inset Flex MenuItem
311 status collapsed
312
313 \begin_layout Plain Layout
314 Export\SpecialChar \menuseparator
315 LaTeX
316 \end_layout
317
318 \end_inset
319
320  from the 
321 \begin_inset Flex MenuItem
322 status collapsed
323
324 \begin_layout Plain Layout
325 File
326 \end_layout
327
328 \end_inset
329
330  menu (or 
331 \begin_inset Flex MenuItem
332 status collapsed
333
334 \begin_layout Plain Layout
335 View\SpecialChar \menuseparator
336 Source
337 \end_layout
338
339 \end_inset
340
341 ), then look at the preamble of the resulting 
342 \begin_inset Flex Code
343 status collapsed
344
345 \begin_layout Plain Layout
346 .tex
347 \end_layout
348
349 \end_inset
350
351  file.
352  You'll notice a variety of new macros defined specifically by LyX.
353  These macros are defined automatically, according to the features you use
354  in the document.
355 \end_layout
356
357 \begin_layout Standard
358 There are several commands that automatically invoke LaTeX.
359  They are:
360 \end_layout
361
362 \begin_layout Itemize
363 \begin_inset Flex MenuItem
364 status collapsed
365
366 \begin_layout Plain Layout
367 View\SpecialChar \menuseparator
368 View
369 \end_layout
370
371 \end_inset
372
373
374 \end_layout
375
376 \begin_layout Itemize
377 \begin_inset Flex MenuItem
378 status collapsed
379
380 \begin_layout Plain Layout
381 View\SpecialChar \menuseparator
382 Update
383 \end_layout
384
385 \end_inset
386
387
388 \end_layout
389
390 \begin_layout Itemize
391 \begin_inset Flex MenuItem
392 status collapsed
393
394 \begin_layout Plain Layout
395 File\SpecialChar \menuseparator
396 Print
397 \end_layout
398
399 \end_inset
400
401
402 \end_layout
403
404 \begin_layout Itemize
405 \begin_inset Flex MenuItem
406 status collapsed
407
408 \begin_layout Plain Layout
409 File\SpecialChar \menuseparator
410 Fax
411 \end_layout
412
413 \end_inset
414
415
416 \end_layout
417
418 \begin_layout Standard
419 They will only invoke LaTeX if the file has changed since the last time
420  LaTeX was run.
421  
422 \end_layout
423
424 \begin_layout Standard
425 When LyX runs LaTeX on the file you're editing, it performs these steps:
426 \end_layout
427
428 \begin_layout Enumerate
429 Convert the document to LaTeX and save to a file with the extension 
430 \begin_inset Flex Code
431 status collapsed
432
433 \begin_layout Plain Layout
434 .tex
435 \end_layout
436
437 \end_inset
438
439  in place of 
440 \begin_inset Flex Code
441 status collapsed
442
443 \begin_layout Plain Layout
444 .lyx
445 \end_layout
446
447 \end_inset
448
449 .
450 \end_layout
451
452 \begin_layout Enumerate
453 Run LaTeX on the 
454 \begin_inset Flex Code
455 status collapsed
456
457 \begin_layout Plain Layout
458 .tex
459 \end_layout
460
461 \end_inset
462
463  file (maybe several times), and run any other commands (such as 
464 \begin_inset Flex Code
465 status collapsed
466
467 \begin_layout Plain Layout
468 bibtex
469 \end_layout
470
471 \end_inset
472
473  or 
474 \begin_inset Flex Code
475 status collapsed
476
477 \begin_layout Plain Layout
478 makeindex
479 \end_layout
480
481 \end_inset
482
483 ) needed to compile the LaTeX file.
484 \end_layout
485
486 \begin_layout Enumerate
487 If there are any errors, show the error log.
488 \end_layout
489
490 \begin_layout Standard
491 If you have run LaTeX using 
492 \begin_inset Flex MenuItem
493 status collapsed
494
495 \begin_layout Plain Layout
496 View
497 \bar under
498 \SpecialChar \menuseparator
499
500 \bar default
501 DVI
502 \end_layout
503
504 \end_inset
505
506 , LyX then runs a DVI viewer to display the DVI-file.
507  If you have used 
508 \begin_inset Flex MenuItem
509 status collapsed
510
511 \begin_layout Plain Layout
512 View
513 \bar under
514 \SpecialChar \menuseparator
515
516 \bar default
517 PostScript
518 \end_layout
519
520 \end_inset
521
522 , LyX performs further steps:
523 \end_layout
524
525 \begin_layout Itemize
526 Run 
527 \begin_inset Flex Code
528 status collapsed
529
530 \begin_layout Plain Layout
531 dvips
532 \end_layout
533
534 \end_inset
535
536  to convert the DVI file to PostScript.
537 \end_layout
538
539 \begin_layout Itemize
540 Run a PostScript viewer, such as 
541 \begin_inset Flex Code
542 status collapsed
543
544 \begin_layout Plain Layout
545 ghostview
546 \end_layout
547
548 \end_inset
549
550 , to display the PostScript file.
551 \end_layout
552
553 \begin_layout Standard
554 LyX does similar things when viewing, or exporting, other formats.
555 \end_layout
556
557 \begin_layout Section
558 Translating LaTeX files into LyX
559 \end_layout
560
561 \begin_layout Standard
562 You can import a LaTeX file into LyX by using the 
563 \begin_inset Flex MenuItem
564 status collapsed
565
566 \begin_layout Plain Layout
567 File\SpecialChar \menuseparator
568 Import\SpecialChar \menuseparator
569 LaTeX
570 \end_layout
571
572 \end_inset
573
574  command in LyX.
575  This will call a program named 
576 \begin_inset Flex Code
577 status collapsed
578
579 \begin_layout Plain Layout
580 tex2lyx
581 \end_layout
582
583 \end_inset
584
585  which will create a file 
586 \begin_inset Flex Code
587 status collapsed
588
589 \begin_layout Plain Layout
590 foo.lyx
591 \end_layout
592
593 \end_inset
594
595  from the file 
596 \begin_inset Flex Code
597 status collapsed
598
599 \begin_layout Plain Layout
600 foo.tex
601 \end_layout
602
603 \end_inset
604
605 .
606  LyX will then open that file.
607 \begin_inset Foot
608 status collapsed
609
610 \begin_layout Plain Layout
611 \begin_inset Flex Code
612 status collapsed
613
614 \begin_layout Plain Layout
615 tex2lyx
616 \end_layout
617
618 \end_inset
619
620  can also be run from the command line, of course.
621 \end_layout
622
623 \end_inset
624
625
626 \end_layout
627
628 \begin_layout Standard
629 \begin_inset Flex Code
630 status collapsed
631
632 \begin_layout Plain Layout
633 tex2lyx
634 \end_layout
635
636 \end_inset
637
638  will translate most legal LaTeX, but not everything.
639  It will put things it doesn't understand into TeX code, so after translating
640  a file with 
641 \begin_inset Flex Code
642 status collapsed
643
644 \begin_layout Plain Layout
645 tex2lyx
646 \end_layout
647
648 \end_inset
649
650 , you can look for TeX code and hand-edit it until it looks right.
651 \end_layout
652
653 \begin_layout Standard
654 If you don't know what TeX code is, read the next section.
655 \end_layout
656
657 \begin_layout Section
658 \begin_inset CommandInset label
659 LatexCommand label
660 name "sec:Inserting-TeX-Code"
661
662 \end_inset
663
664 Inserting TeX Code into LyX Documents 
665 \end_layout
666
667 \begin_layout Standard
668 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
669  You can always insert TeX code into any LyX document.
670  LyX cannot, and will never be able to, display every possible LaTeX construct.
671  If ever you need to insert LaTeX commands into your LyX document, you can
672  use the 
673 \begin_inset Flex Code
674 status collapsed
675
676 \begin_layout Plain Layout
677 TeX Code
678 \end_layout
679
680 \end_inset
681
682  box, which you can insert into your document with 
683 \begin_inset Flex MenuItem
684 status collapsed
685
686 \begin_layout Plain Layout
687 Insert\SpecialChar \menuseparator
688 TeX Code
689 \end_layout
690
691 \end_inset
692
693 .
694 \end_layout
695
696 \begin_layout Standard
697 Here's an example of inserting LaTeX commands in a LyX document.
698  The code looks like this:
699 \end_layout
700
701 \begin_layout LyX-Code
702
703 \backslash
704 begin{tabular}{ll}
705 \begin_inset Newline newline
706 \end_inset
707
708
709 \backslash
710 begin{minipage}{5cm}
711 \begin_inset Newline newline
712 \end_inset
713
714 This is an example for a minipage environment.
715  You 
716 \begin_inset Newline newline
717 \end_inset
718
719 can put nearly everything in it, even (non-floating) 
720 \begin_inset Newline newline
721 \end_inset
722
723 figures and tables.
724  
725 \begin_inset Newline newline
726 \end_inset
727
728
729 \backslash
730 end{minipage}
731 \begin_inset Newline newline
732 \end_inset
733
734 &
735 \begin_inset Newline newline
736 \end_inset
737
738
739 \backslash
740 begin{minipage}{5cm}
741 \begin_inset Newline newline
742 \end_inset
743
744
745 \backslash
746 begin{verbatim}
747 \begin_inset Newline newline
748 \end_inset
749
750
751 \backslash
752 begin{minipage}{5cm}
753 \begin_inset Newline newline
754 \end_inset
755
756 This ...
757  
758 \begin_inset Newline newline
759 \end_inset
760
761
762 \backslash
763 end{minipage}
764 \begin_inset Newline newline
765 \end_inset
766
767
768 \backslash
769 end{verbatim}
770 \begin_inset Newline newline
771 \end_inset
772
773
774 \backslash
775 end{minipage}
776 \begin_inset Newline newline
777 \end_inset
778
779
780 \backslash
781 end{tabular}
782 \end_layout
783
784 \begin_layout LyX-Code
785
786 \end_layout
787
788 \begin_layout Standard
789 The 
790 \begin_inset Flex Code
791 status collapsed
792
793 \begin_layout Plain Layout
794 TeX Code
795 \end_layout
796
797 \end_inset
798
799  box containing this text is directly after this paragraph.
800  Those of you reading the manual in LyX will only see the TeX code inset.
801  Those reading a printed version of the manuals will see the actual results:
802 \end_layout
803
804 \begin_layout Standard
805 \begin_inset ERT
806 status collapsed
807
808 \begin_layout Plain Layout
809
810
811 \backslash
812 begin{tabular}{ll}
813 \end_layout
814
815 \begin_layout Plain Layout
816
817
818 \backslash
819 begin{minipage}{5cm}
820 \end_layout
821
822 \begin_layout Plain Layout
823
824 This is an example for a minipage environment.
825  You can put nearly everything in it, even (non-floating) figures and tables.
826  
827 \end_layout
828
829 \begin_layout Plain Layout
830
831
832 \backslash
833 end{minipage}
834 \end_layout
835
836 \begin_layout Plain Layout
837
838 &
839 \end_layout
840
841 \begin_layout Plain Layout
842
843
844 \backslash
845 begin{minipage}{5cm}
846 \end_layout
847
848 \begin_layout Plain Layout
849
850
851 \backslash
852 begin{verbatim}
853 \end_layout
854
855 \begin_layout Plain Layout
856
857
858 \backslash
859 begin{minipage}{5cm}
860 \end_layout
861
862 \begin_layout Plain Layout
863
864 This ...
865  
866 \end_layout
867
868 \begin_layout Plain Layout
869
870
871 \backslash
872 end{minipage}
873 \end_layout
874
875 \begin_layout Plain Layout
876
877
878 \backslash
879 end{verbatim}
880 \end_layout
881
882 \begin_layout Plain Layout
883
884
885 \backslash
886 end{minipage}
887 \end_layout
888
889 \begin_layout Plain Layout
890
891
892 \backslash
893 end{tabular}
894 \end_layout
895
896 \end_inset
897
898
899 \end_layout
900
901 \begin_layout Standard
902 In addition to using TeX code, you can also create a separate file containing
903  some complex LaTeX structure and then use 
904 \begin_inset Flex MenuItem
905 status collapsed
906
907 \begin_layout Plain Layout
908 Insert\SpecialChar \menuseparator
909 Child
910 \begin_inset space ~
911 \end_inset
912
913 Document
914 \end_layout
915
916 \end_inset
917
918  to include your file (you should select the type 
919 \begin_inset Flex Code
920 status collapsed
921
922 \begin_layout Plain Layout
923 Input
924 \end_layout
925
926 \end_inset
927
928 ).
929  We recommend that you only do this if you have a 
930 \begin_inset Flex Code
931 status collapsed
932
933 \begin_layout Plain Layout
934 .tex
935 \end_layout
936
937 \end_inset
938
939  file which you 
940 \emph on
941 know
942 \emph default
943  works already.
944  Otherwise, you'll have a big job tracking down LaTeX errors.
945 \end_layout
946
947 \begin_layout Standard
948 There are a few last points to emphasize:
949 \end_layout
950
951 \begin_layout Itemize
952 LyX 
953 \emph on
954 does not
955 \emph default
956  check if your LaTeX code is correct.
957 \end_layout
958
959 \begin_layout Itemize
960 Beware reinventing the wheel.
961 \end_layout
962
963 \begin_layout Standard
964 On that last point, LyX does have quite a few features tucked into it, and
965  more are coming.
966  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
967  feature before you decide you have to do it by hand.
968  Moreover, there are numerous LaTeX packages out there to do all sorts of
969  things, from labels to envelopes to fancy multipage tables.
970  Check out 
971 \begin_inset CommandInset href
972 LatexCommand href
973 name "CTAN"
974 target "http://www.ctan.org/"
975
976 \end_inset
977
978  for details, and see chapter 
979 \begin_inset CommandInset ref
980 LatexCommand ref
981 reference "cha:secrets"
982
983 \end_inset
984
985 .
986 \end_layout
987
988 \begin_layout Standard
989 If you do need to do some wild and fancy things within your document, be
990  sure to check out a good LaTeX book for assistance.
991  There are a number of them listed in the bibliography of the 
992 \emph on
993 User's Guide
994 \emph default
995 .
996 \end_layout
997
998 \begin_layout Section
999 LyX and the LaTeX Preamble
1000 \end_layout
1001
1002 \begin_layout Subsection
1003 About the LaTeX Preamble
1004 \end_layout
1005
1006 \begin_layout Standard
1007 If you already know LaTeX, there is no need to explain here what the preamble
1008  is good for.
1009  If you don't, the following will give you some ideas—we recommend again
1010  that you consult a LaTeX book for further information.
1011  In any case, you should read the points below, because they explain what
1012  you can do and what you don't need to do in the LaTeX preamble of a LyX
1013  document.
1014 \end_layout
1015
1016 \begin_layout Standard
1017 The LaTeX preamble comes at the very beginning of a document, 
1018 \emph on
1019 before
1020 \emph default
1021  the text.
1022  It serves to:
1023 \end_layout
1024
1025 \begin_layout Itemize
1026 Declare the document class.
1027  
1028 \begin_inset Newline newline
1029 \end_inset
1030
1031 LyX already does this for you.
1032  If you're a seasoned LaTeX-nician, and you have a custom document class
1033  you want to use, check out the 
1034 \emph on
1035 Customization Manual
1036 \emph default
1037  for information on how to make LyX interface to it.
1038 \end_layout
1039
1040 \begin_layout Itemize
1041 Declare the usage of packages.
1042  
1043 \begin_inset Newline newline
1044 \end_inset
1045
1046 LaTeX packages provide special commands, which are only available within
1047  a document when the package has been declared in the preamble.
1048  For example, the package 
1049 \begin_inset Flex Code
1050 status collapsed
1051
1052 \begin_layout Plain Layout
1053 indentfirst
1054 \end_layout
1055
1056 \end_inset
1057
1058  forces all paragraphs to be indented.
1059  There are other packages for labels, envelopes, margins, etc.
1060  
1061 \end_layout
1062
1063 \begin_layout Itemize
1064 Set counters, variables, lengths and widths.
1065  
1066 \begin_inset Newline newline
1067 \end_inset
1068
1069 There are several LaTeX counters and variables which 
1070 \emph on
1071 must
1072 \emph default
1073  be set globally from within the preamble in order to have the desired effect.
1074  (There are variables which you can set and reset inside the document, too.)
1075  Margins are a good example of something which must be set in the preamble.
1076  Another example is the label format for lists.
1077  You can actually set these just about anywhere, but it's best to do it
1078  just once, inside the preamble.
1079 \end_layout
1080
1081 \begin_layout Itemize
1082 Declare user defined commands (with 
1083 \begin_inset Flex Code
1084 status collapsed
1085
1086 \begin_layout Plain Layout
1087
1088 \backslash
1089 newcommand
1090 \end_layout
1091
1092 \end_inset
1093
1094  or 
1095 \begin_inset Flex Code
1096 status collapsed
1097
1098 \begin_layout Plain Layout
1099
1100 \backslash
1101 renewcommand
1102 \end_layout
1103
1104 \end_inset
1105
1106 ).
1107 \begin_inset Newline newline
1108 \end_inset
1109
1110 These are abbreviations for LaTeX commands which appear very often inside
1111  a document.
1112  Although the preamble is a good place to declare such commands, they 
1113 \emph on
1114 can
1115 \emph default
1116  be declared anywhere (before they are used for the first time, of course).
1117  This can be useful if there is a lot of raw LaTeX code in your document,
1118  which normally should not be the case.
1119 \end_layout
1120
1121 \begin_layout Standard
1122 LyX adds its own set of definitions to the preamble of the 
1123 \begin_inset Flex Code
1124 status collapsed
1125
1126 \begin_layout Plain Layout
1127 .tex
1128 \end_layout
1129
1130 \end_inset
1131
1132  file it produces.
1133  This makes LaTeX files generated by LyX portable.
1134 \end_layout
1135
1136 \begin_layout Subsection
1137 Changing the Preamble
1138 \end_layout
1139
1140 \begin_layout Standard
1141 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1142  can't change them without patching LyX itself.
1143  You can, however, add your own stuff to the preamble by selecting 
1144 \begin_inset Flex MenuItem
1145 status collapsed
1146
1147 \begin_layout Plain Layout
1148 LaTeX
1149 \begin_inset space ~
1150 \end_inset
1151
1152 Preamble
1153 \end_layout
1154
1155 \end_inset
1156
1157  in the 
1158 \begin_inset Flex MenuItem
1159 status collapsed
1160
1161 \begin_layout Plain Layout
1162 Document\SpecialChar \menuseparator
1163 Settings
1164 \end_layout
1165
1166 \end_inset
1167
1168  dialog.
1169  LyX adds anything in the 
1170 \begin_inset Flex MenuItem
1171 status collapsed
1172
1173 \begin_layout Plain Layout
1174 Preamble
1175 \end_layout
1176
1177 \end_inset
1178
1179  dialog to its own built-in preamble.
1180  Before adding your own declarations in the preamble, you should make sure
1181  that LyX doesn't already support what you want to do.
1182  (Remember what we said about reinventing the wheel?) Also, 
1183 \emph on
1184 make sure your preamble code is correct
1185 \emph default
1186 .
1187  LyX doesn't check it for you.
1188  If there is an error, you're likely to get an error like 
1189 \begin_inset Quotes eld
1190 \end_inset
1191
1192
1193 \begin_inset Flex Code
1194 status collapsed
1195
1196 \begin_layout Plain Layout
1197 Missing 
1198 \backslash
1199 begin{document}
1200 \end_layout
1201
1202 \end_inset
1203
1204
1205 \begin_inset Quotes erd
1206 \end_inset
1207
1208 .
1209  If you see this error, check your preamble.
1210 \end_layout
1211
1212 \begin_layout Subsection
1213 Examples
1214 \end_layout
1215
1216 \begin_layout Standard
1217 Here are some examples of what you can add to a preamble, and what they
1218  do.
1219 \end_layout
1220
1221 \begin_layout Subsubsection
1222 Example #1: Offsets
1223 \end_layout
1224
1225 \begin_layout Standard
1226 There are two variables under LaTeX that control page position: 
1227 \begin_inset Flex Code
1228 status collapsed
1229
1230 \begin_layout Plain Layout
1231
1232 \backslash
1233 hoffset
1234 \end_layout
1235
1236 \end_inset
1237
1238  and 
1239 \begin_inset Flex Code
1240 status collapsed
1241
1242 \begin_layout Plain Layout
1243
1244 \backslash
1245 voffset
1246 \end_layout
1247
1248 \end_inset
1249
1250 .
1251  Their names should be self-explanatory.
1252  These variables are useful if you think for a moment about computer labels.
1253  Sometimes, the size of a print medium and the area of the medium that you
1254  can actually print on aren't the same.
1255  This is where 
1256 \begin_inset Flex Code
1257 status collapsed
1258
1259 \begin_layout Plain Layout
1260
1261 \backslash
1262 hoffset
1263 \end_layout
1264
1265 \end_inset
1266
1267  and 
1268 \begin_inset Flex Code
1269 status collapsed
1270
1271 \begin_layout Plain Layout
1272
1273 \backslash
1274 voffset
1275 \end_layout
1276
1277 \end_inset
1278
1279  come in.
1280 \end_layout
1281
1282 \begin_layout Standard
1283 The default values for 
1284 \begin_inset Flex Code
1285 status collapsed
1286
1287 \begin_layout Plain Layout
1288
1289 \backslash
1290 hoffset
1291 \end_layout
1292
1293 \end_inset
1294
1295  and 
1296 \begin_inset Flex Code
1297 status collapsed
1298
1299 \begin_layout Plain Layout
1300
1301 \backslash
1302 voffset
1303 \end_layout
1304
1305 \end_inset
1306
1307  are both 0
1308 \begin_inset space \thinspace{}
1309 \end_inset
1310
1311 points, i.
1312 \begin_inset space \thinspace{}
1313 \end_inset
1314
1315 e.
1316 \begin_inset space \space{}
1317 \end_inset
1318
1319 the page isn't shifted.
1320  Unfortunately, some DVI drivers always seem to shift the page.
1321  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1322  If you're using LyX on a system that you don't personally maintain, and
1323  your sysadmin is a doofus, 
1324 \begin_inset Flex Code
1325 status collapsed
1326
1327 \begin_layout Plain Layout
1328
1329 \backslash
1330 hoffset
1331 \end_layout
1332
1333 \end_inset
1334
1335  and 
1336 \begin_inset Flex Code
1337 status collapsed
1338
1339 \begin_layout Plain Layout
1340
1341 \backslash
1342 voffset
1343 \end_layout
1344
1345 \end_inset
1346
1347  can save the day.
1348  Suppose your left and top margins are always 0.5
1349 \begin_inset space \thinspace{}
1350 \end_inset
1351
1352 inches too big.
1353  You can add this to the preamble:
1354 \end_layout
1355
1356 \begin_layout LyX-Code
1357
1358 \backslash
1359 setlength{
1360 \backslash
1361 hoffset}{-0.5 in}
1362 \end_layout
1363
1364 \begin_layout LyX-Code
1365
1366 \backslash
1367 setlength{
1368 \backslash
1369 voffset}{-0.5 in}
1370 \end_layout
1371
1372 \begin_layout Standard
1373 and your margins should now be correct.
1374 \end_layout
1375
1376 \begin_layout Subsubsection
1377 Example #2: Labels
1378 \end_layout
1379
1380 \begin_layout Standard
1381 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1382  There's a rather nice package, available at your nearest CTAN archive,
1383  for printing sheets of labels: 
1384 \begin_inset Flex Code
1385 status collapsed
1386
1387 \begin_layout Plain Layout
1388 labels.sty
1389 \end_layout
1390
1391 \end_inset
1392
1393 .
1394  Now, your system may not have this package installed by default.
1395  We leave that up to you to check.
1396  You'll also want to read the documentation for it; we're not going to do
1397  that for you.
1398  Since this is an example, however, we'll give you an example of how you
1399  use this package.
1400 \end_layout
1401
1402 \begin_layout Standard
1403 First, make sure you're using the 
1404 \begin_inset Flex Code
1405 status collapsed
1406
1407 \begin_layout Plain Layout
1408 article
1409 \end_layout
1410
1411 \end_inset
1412
1413  document class.
1414  Next, you need to put the following in your preamble:
1415 \end_layout
1416
1417 \begin_layout LyX-Code
1418
1419 \backslash
1420 usepackage{labels}
1421 \end_layout
1422
1423 \begin_layout LyX-Code
1424
1425 \backslash
1426 LabelCols=3
1427 \end_layout
1428
1429 \begin_layout LyX-Code
1430
1431 \backslash
1432 LabelRows=7
1433 \end_layout
1434
1435 \begin_layout LyX-Code
1436
1437 \backslash
1438 LeftBorder=8mm
1439 \end_layout
1440
1441 \begin_layout LyX-Code
1442
1443 \backslash
1444 RightBorder=8mm
1445 \end_layout
1446
1447 \begin_layout LyX-Code
1448
1449 \backslash
1450 TopBorder=9mm
1451 \end_layout
1452
1453 \begin_layout LyX-Code
1454
1455 \backslash
1456 BottomBorder=2mm
1457 \end_layout
1458
1459 \begin_layout Standard
1460 This sets things up for Avery label sheets, stock #5360.
1461  You're now ready to print labels, but you'll need to insert LaTeX code,
1462  placing the commands 
1463 \begin_inset Flex Code
1464 status collapsed
1465
1466 \begin_layout Plain Layout
1467
1468 \backslash
1469 begin{labels}
1470 \end_layout
1471
1472 \end_inset
1473
1474  and 
1475 \begin_inset Flex Code
1476 status collapsed
1477
1478 \begin_layout Plain Layout
1479
1480 \backslash
1481 end{labels}
1482 \end_layout
1483
1484 \end_inset
1485
1486  around each label text.
1487  This and other special features of 
1488 \begin_inset Flex Code
1489 status collapsed
1490
1491 \begin_layout Plain Layout
1492 labels.sty
1493 \end_layout
1494
1495 \end_inset
1496
1497  are explained in its documentation.
1498 \end_layout
1499
1500 \begin_layout Standard
1501 Someday, someone may write a LyX layout file to support this package directly.
1502  Maybe that someone is you.
1503 \end_layout
1504
1505 \begin_layout Subsubsection
1506 Example #3: Paragraph Indentation
1507 \end_layout
1508
1509 \begin_layout Standard
1510 Americans are trained to indent the first line of 
1511 \emph on
1512 every
1513 \emph default
1514  paragraph.
1515  As with all of their other weird quirks, most Americans will whine and
1516  moan until they can have their way and indent the first line of all paragraphs.
1517  (Yes, we're joking.
1518  (We are?) 
1519 \emph on
1520 Yeah
1521 \emph default
1522 , we are.)
1523 \end_layout
1524
1525 \begin_layout Standard
1526 Of course, this behavior isn't standard typography.
1527  In books, you typically only indent the first line of a paragraph 
1528 \emph on
1529 if
1530 \emph default
1531  it follows another one.
1532  The idea behind indenting the first line of a paragraph is to distinguish
1533  neighboring paragraphs from one another.
1534  If there is no previous paragraph—for example, if it follows a figure or
1535  is the first paragraph in a section—then there is no need for indentation.
1536  
1537 \end_layout
1538
1539 \begin_layout Standard
1540 If you're a typical American (we're still joking!), though, you don't care
1541  about such esoteric things; you want your indentation! Add this to the
1542  preamble:
1543 \end_layout
1544
1545 \begin_layout LyX-Code
1546
1547 \backslash
1548 usepackage{indentfirst}
1549 \end_layout
1550
1551 \begin_layout Standard
1552 If your TeX distribution isn't braindead, you'll have this package, and
1553  all of your paragraphs will get the indentation the Founding Fathers intended
1554  they should have.
1555 \end_layout
1556
1557 \begin_layout Subsubsection
1558 Example #4: This Document
1559 \end_layout
1560
1561 \begin_layout Standard
1562 You can also check out the preamble of this document to get an idea of some
1563  of the advanced things you can do.
1564  Also, there are more examples and an assortment of LaTeX 
1565 \begin_inset Quotes eld
1566 \end_inset
1567
1568 dirty tricks
1569 \begin_inset Quotes erd
1570 \end_inset
1571
1572  given in Chapter
1573 \begin_inset space ~
1574 \end_inset
1575
1576
1577 \begin_inset CommandInset ref
1578 LatexCommand ref
1579 reference "cha:secrets"
1580
1581 \end_inset
1582
1583 .
1584  
1585 \end_layout
1586
1587 \begin_layout Section
1588 LyX and LaTeX Errors
1589 \end_layout
1590
1591 \begin_layout Standard
1592 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593  going.
1594  It then uses the logfile from the LaTeX run to do a post-mortem.
1595  After analyzing the logfile,LyX displays a dialog listing the errors.
1596  Clicking on any one of them will take you to the position in your LyX file
1597  where the error occurred.
1598 \begin_inset Foot
1599 status collapsed
1600
1601 \begin_layout Plain Layout
1602 Well, usually.
1603  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604  right line.
1605  There are also cases where LaTeX reports the error on one line, but the
1606  actual error is earlier.
1607  This is not unlike forgetting a closing brace in a program: You'll get
1608  an error, but only later.
1609 \end_layout
1610
1611 \end_inset
1612
1613
1614 \end_layout
1615
1616 \begin_layout Standard
1617 Some folks also like to look at the log file directly: It is available from
1618  
1619 \begin_inset Flex MenuItem
1620 status collapsed
1621
1622 \begin_layout Plain Layout
1623 Document
1624 \bar under
1625 \SpecialChar \menuseparator
1626
1627 \bar default
1628 Latex
1629 \begin_inset space ~
1630 \end_inset
1631
1632 Log
1633 \end_layout
1634
1635 \end_inset
1636
1637 .
1638  There are some fairly common error messages and warnings.
1639  We'll cover those here.
1640  You should look at a good LaTeX book for a complete listing.
1641 \end_layout
1642
1643 \begin_layout Itemize
1644 \begin_inset Flex Code
1645 status collapsed
1646
1647 \begin_layout Plain Layout
1648 LaTeX Warning
1649 \end_layout
1650
1651 \end_inset
1652
1653
1654 \begin_inset Newline newline
1655 \end_inset
1656
1657 Anything beginning with these words is a warning message for the purpose
1658  of 
1659 \begin_inset Quotes eld
1660 \end_inset
1661
1662 debugging
1663 \begin_inset Quotes erd
1664 \end_inset
1665
1666  the LaTeX code itself.
1667  You'll get messages like this if you added or changed cross-references
1668  or bibliography entries, in which case, LaTeX is trying to tell you that
1669  you need to make another run.
1670  You can by-and-large ignore these.
1671 \end_layout
1672
1673 \begin_layout Itemize
1674 \begin_inset Flex Code
1675 status collapsed
1676
1677 \begin_layout Plain Layout
1678 LaTeX Font Warning
1679 \end_layout
1680
1681 \end_inset
1682
1683
1684 \begin_inset Newline newline
1685 \end_inset
1686
1687 Another warning message, this time about fonts which LaTeX couldn't find.
1688  The rest of the message will often say something about a replacement font
1689  that LaTeX used.
1690  You can safely ignore these, too.
1691 \end_layout
1692
1693 \begin_layout Itemize
1694 \begin_inset Flex Code
1695 status collapsed
1696
1697 \begin_layout Plain Layout
1698 Overfull 
1699 \backslash
1700 hbox
1701 \end_layout
1702
1703 \end_inset
1704
1705
1706 \begin_inset Newline newline
1707 \end_inset
1708
1709 LaTeX absolutely 
1710 \emph on
1711 loves
1712 \emph default
1713  to spew these out.
1714  They are warnings about lines that were too long and run past the right
1715  margin.
1716  Almost always, this is unnoticeable in the final output.
1717  (It can be just a point or two.) Or, only one or two characters extend past
1718  the margin.
1719  LaTeX seems to generate at least one of these messages for just about any
1720  document you write.
1721 \begin_inset Newline newline
1722 \end_inset
1723
1724 You can ignore these messages.
1725  Your eyes will tell you if there's a problem with something that's too
1726  wide; just look at the output.
1727 \begin_inset Foot
1728 status collapsed
1729
1730 \begin_layout Plain Layout
1731 You can also enable the `draft' option in 
1732 \begin_inset Flex MenuItem
1733 status collapsed
1734
1735 \begin_layout Plain Layout
1736 Document
1737 \bar under
1738 \SpecialChar \menuseparator
1739
1740 \bar default
1741 Settings
1742 \end_layout
1743
1744 \end_inset
1745
1746 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1747 \end_layout
1748
1749 \end_inset
1750
1751
1752 \end_layout
1753
1754 \begin_layout Itemize
1755 \begin_inset Flex Code
1756 status collapsed
1757
1758 \begin_layout Plain Layout
1759 Underfull 
1760 \backslash
1761 hbox
1762 \end_layout
1763
1764 \end_inset
1765
1766
1767 \begin_inset Newline newline
1768 \end_inset
1769
1770 Not quite as common as its cousin.
1771  LaTeX seems to like to print lines that are a bit too wide as opposed to
1772  ones that are a bit too narrow.
1773  We have no idea why.
1774 \end_layout
1775
1776 \begin_layout Itemize
1777 \begin_inset Flex Code
1778 status collapsed
1779
1780 \begin_layout Plain Layout
1781 Overfull 
1782 \backslash
1783 vbox
1784 \end_layout
1785
1786 \end_inset
1787
1788  and 
1789 \begin_inset Flex Code
1790 status collapsed
1791
1792 \begin_layout Plain Layout
1793 Underfull 
1794 \backslash
1795 vbox
1796 \end_layout
1797
1798 \end_inset
1799
1800
1801 \begin_inset Newline newline
1802 \end_inset
1803
1804 Warnings about troubles breaking the page.
1805  Once again, just look at the output.
1806  Your eyes will tell you where something has gone wrong.
1807 \end_layout
1808
1809 \begin_layout Itemize
1810 \begin_inset Flex Code
1811 status collapsed
1812
1813 \begin_layout Plain Layout
1814  LaTeX Error: File 
1815 \begin_inset Quotes els
1816 \end_inset
1817
1818 Xxxx
1819 \begin_inset Quotes ers
1820 \end_inset
1821
1822  not found
1823 \end_layout
1824
1825 \end_inset
1826
1827
1828 \begin_inset Newline newline
1829 \end_inset
1830
1831 The file 
1832 \begin_inset Quotes eld
1833 \end_inset
1834
1835 Xxxx
1836 \begin_inset Quotes erd
1837 \end_inset
1838
1839  isn't installed on this system.
1840  This usually appears because some package your document needs isn't installed.
1841  If you didn't touch the preamble or didn't use the 
1842 \begin_inset Flex Code
1843 status collapsed
1844
1845 \begin_layout Plain Layout
1846
1847 \backslash
1848 usepackage{}
1849 \end_layout
1850
1851 \end_inset
1852
1853  command, then one of the packages LyX tried to load is missing.
1854  Use 
1855 \begin_inset Flex MenuItem
1856 status collapsed
1857
1858 \begin_layout Plain Layout
1859 Help\SpecialChar \menuseparator
1860 LaTeX Configuration
1861 \end_layout
1862
1863 \end_inset
1864
1865  to get a list of packages that LyX knows about.
1866  This file is updated whenever you reconfigure LyX (using 
1867 \begin_inset Flex MenuItem
1868 status collapsed
1869
1870 \begin_layout Plain Layout
1871 Tools\SpecialChar \menuseparator
1872 Reconfigure
1873 \end_layout
1874
1875 \end_inset
1876
1877 ) and tells you which packages have been detected and what they do.
1878 \begin_inset Newline newline
1879 \end_inset
1880
1881 If you did use the 
1882 \begin_inset Flex Code
1883 status collapsed
1884
1885 \begin_layout Plain Layout
1886
1887 \backslash
1888 usepackage{}
1889 \end_layout
1890
1891 \end_inset
1892
1893  command and the package in question isn't installed, then you'll need to
1894  install it yourself.
1895 \end_layout
1896
1897 \begin_layout Itemize
1898 \begin_inset Flex Code
1899 status collapsed
1900
1901 \begin_layout Plain Layout
1902 LaTeX Error: Unknown option
1903 \end_layout
1904
1905 \end_inset
1906
1907
1908 \begin_inset Newline newline
1909 \end_inset
1910
1911 Error messages beginning with this are trying to tell you that you specified
1912  a bad or undefined option to a package.
1913  Check the package's documentation.
1914 \end_layout
1915
1916 \begin_layout Itemize
1917 \begin_inset Flex Code
1918 status collapsed
1919
1920 \begin_layout Plain Layout
1921 Undefined control sequence
1922 \end_layout
1923
1924 \end_inset
1925
1926
1927 \begin_inset Newline newline
1928 \end_inset
1929
1930 If you've inserted LaTeX code into your document, but made a typo, you'll
1931  get one of these.
1932  You may have forgotten to load a package.
1933  In any case, this error message usually means that you used an undefined
1934  command.
1935  
1936 \end_layout
1937
1938 \begin_layout Standard
1939 There are other error and warning messages.
1940  Some are self-explanatory.
1941  These are usually LaTeX messages.
1942  Others are downright cryptic.
1943  These are usually TeX error messages, and we really have 
1944 \emph on
1945 no clue
1946 \emph default
1947  what they mean or how to decipher them.
1948  No-one does.
1949 \end_layout
1950
1951 \begin_layout Standard
1952 There's a general sequence you should follow if you get error messages:
1953 \end_layout
1954
1955 \begin_layout Enumerate
1956 Look at the LaTeX code you inserted for typos.
1957 \end_layout
1958
1959 \begin_layout Enumerate
1960 If there are no typos, check that you used the command(s) correctly.
1961 \end_layout
1962
1963 \begin_layout Enumerate
1964 If you get a bunch of error boxes piled up at the very top of the document—and
1965  especially if you see a 
1966 \begin_inset Quotes eld
1967 \end_inset
1968
1969
1970 \begin_inset Flex Code
1971 status collapsed
1972
1973 \begin_layout Plain Layout
1974 Missing 
1975 \backslash
1976 begin{document}
1977 \end_layout
1978
1979 \end_inset
1980
1981
1982 \begin_inset Quotes erd
1983 \end_inset
1984
1985  error—it means that there are errors in the preamble.
1986  Start debugging your preamble.
1987 \end_layout
1988
1989 \begin_layout Enumerate
1990 If you didn't add anything to the preamble and didn't add any LaTeX code
1991  to the document, the first suspect is your LaTeX distribution itself.
1992  Check for missing packages and install them.
1993 \end_layout
1994
1995 \begin_layout Enumerate
1996 Okay, so there are no missing packages.
1997  Did you use any of the fine-tuning options in LyX? Specifically, did you
1998  
1999 \emph on
2000 misuse
2001 \emph default
2002  any of them, like trying to manually insert lots of 
2003 \begin_inset Flex Code
2004 status collapsed
2005
2006 \begin_layout Plain Layout
2007 Protected
2008 \begin_inset space ~
2009 \end_inset
2010
2011 Blanks
2012 \end_layout
2013
2014 \end_inset
2015
2016
2017 \begin_inset Flex Code
2018 status collapsed
2019
2020 \begin_layout Plain Layout
2021 Linebreaks
2022 \end_layout
2023
2024 \end_inset
2025
2026 , or 
2027 \begin_inset Flex Code
2028 status collapsed
2029
2030 \begin_layout Plain Layout
2031 Pagebreaks
2032 \end_layout
2033
2034 \end_inset
2035
2036 ? Did you try to kludge something together with these instead of using the
2037  appropriate paragraph environment?
2038 \end_layout
2039
2040 \begin_layout Enumerate
2041 All right, you didn't use any of the fine-tuning options, you played by
2042  the rules.
2043  Did you try to pull a fancy maneuver? Did you do something funky inside
2044  a table or an equation, like inserting a graphic into a table cell?
2045 \end_layout
2046
2047 \begin_layout Enumerate
2048 Do you have long sections of text where LaTeX cannot find a place to break
2049  a line? By default, LaTeX is rather strict about how much extra inter-word
2050  spacing it will add in order to break a line.
2051  Preferably, you should rework the paragraph to avoid the problem.
2052  If this isn't an option, you can wrap your text in 
2053 \begin_inset Flex Code
2054 status collapsed
2055
2056 \begin_layout Plain Layout
2057
2058 \backslash
2059 sloppypar
2060 \end_layout
2061
2062 \end_inset
2063
2064  to make LaTeX's line breaking more, well, sloppy.
2065 \end_layout
2066
2067 \begin_layout Enumerate
2068 Did you go overboard with the nesting? LyX (currently) doesn't check to
2069  make sure you're in the limits for nesting environments.
2070  If you nested a bunch of environments to the 
2071 \begin_inset Formula $17^{\mathrm{th}}$
2072 \end_inset
2073
2074  level, that's the problem.
2075  (The limit in LaTeX is five.)
2076 \end_layout
2077
2078 \begin_layout Enumerate
2079 Okay, you didn't get any error messages, but your output looks awful.
2080  If you have a table or figure that's too wide or long for the page, you
2081  need to:
2082 \end_layout
2083
2084 \begin_deeper
2085 \begin_layout Enumerate
2086 rescale the figure so it fits.
2087 \end_layout
2088
2089 \begin_layout Enumerate
2090 trim down the table so it fits.
2091 \end_layout
2092
2093 \end_deeper
2094 \begin_layout Enumerate
2095 If something else is wrong with the output, and you didn't try to pull anything
2096  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2097 \end_layout
2098
2099 \begin_layout Standard
2100 If all this doesn't help—well, then 
2101 \emph on
2102 perhaps
2103 \emph default
2104  you might have found a bug in LyX\SpecialChar \ldots{}
2105 .
2106 \end_layout
2107
2108 \begin_layout Chapter
2109 Supplemental Tools
2110 \end_layout
2111
2112 \begin_layout Section
2113 Customizing Bibliographies with BibTeX
2114 \end_layout
2115
2116 \begin_layout Standard
2117 The most basic information about how to use BibTeX with LyX is contained
2118  in the section 
2119 \emph on
2120 Bibliography databases (BibTeX)
2121 \emph default
2122  of the 
2123 \emph on
2124 User's Guide
2125 \emph default
2126 .
2127  The following subsections explain special bibliography features supported
2128  by LyX.
2129 \end_layout
2130
2131 \begin_layout Subsection
2132 Alternative Citation Styles
2133 \end_layout
2134
2135 \begin_layout Standard
2136 Standard BibTeX uses numbers (e.
2137 \begin_inset space \thinspace{}
2138 \end_inset
2139
2140 g.
2141 \begin_inset space \space{}
2142 \end_inset
2143
2144
2145 \begin_inset Quotes eld
2146 \end_inset
2147
2148 [12]
2149 \begin_inset Quotes erd
2150 \end_inset
2151
2152 ) to refer to a cited work.
2153  However, in many scientific disciplines, other citation styles are in use.
2154  The most common one is the author-year style (e.
2155 \begin_inset space \thinspace{}
2156 \end_inset
2157
2158 g.
2159 \begin_inset space \space{}
2160 \end_inset
2161
2162
2163 \begin_inset Quotes eld
2164 \end_inset
2165
2166 Knuth 1984a
2167 \begin_inset Quotes erd
2168 \end_inset
2169
2170 ).
2171  LyX supports two packages that provide this style, 
2172 \begin_inset Flex Code
2173 status collapsed
2174
2175 \begin_layout Plain Layout
2176 natbib
2177 \end_layout
2178
2179 \end_inset
2180
2181  and 
2182 \begin_inset Flex Code
2183 status collapsed
2184
2185 \begin_layout Plain Layout
2186 jurabib
2187 \end_layout
2188
2189 \end_inset
2190
2191 .
2192  Both packages have their pros and cons, which cannot be listed in detail.
2193  If you only want to have simple author-year (or author-numerical) style,
2194  or if you want to use one of the countless style files for 
2195 \begin_inset Flex Code
2196 status collapsed
2197
2198 \begin_layout Plain Layout
2199 natbib
2200 \end_layout
2201
2202 \end_inset
2203
2204 , than the established 
2205 \begin_inset Flex Code
2206 status collapsed
2207
2208 \begin_layout Plain Layout
2209 natbib
2210 \end_layout
2211
2212 \end_inset
2213
2214  package is probably your choice.
2215  If you need special features like short title references, ibidem etc., you
2216  might consider the 
2217 \begin_inset Flex Code
2218 status collapsed
2219
2220 \begin_layout Plain Layout
2221 jurabib
2222 \end_layout
2223
2224 \end_inset
2225
2226  package.
2227 \end_layout
2228
2229 \begin_layout Standard
2230 The handling of both packages in LyX is basically the same.
2231  Go to 
2232 \begin_inset Flex MenuItem
2233 status collapsed
2234
2235 \begin_layout Plain Layout
2236 Document\SpecialChar \menuseparator
2237 Settings
2238 \end_layout
2239
2240 \end_inset
2241
2242  and select under 
2243 \begin_inset Flex MenuItem
2244 status collapsed
2245
2246 \begin_layout Plain Layout
2247 Bibliography
2248 \end_layout
2249
2250 \end_inset
2251
2252  the option 
2253 \begin_inset Flex MenuItem
2254 status collapsed
2255
2256 \begin_layout Plain Layout
2257 Natbib
2258 \end_layout
2259
2260 \end_inset
2261
2262  or 
2263 \begin_inset Flex MenuItem
2264 status collapsed
2265
2266 \begin_layout Plain Layout
2267 Jurabib
2268 \end_layout
2269
2270 \end_inset
2271
2272 .
2273  With both packages, you will get some extra features in the citation dialog
2274  and you can select the style of the reference (
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 Knuth, 1984
2295 \begin_inset Quotes erd
2296 \end_inset
2297
2298
2299 \begin_inset Quotes eld
2300 \end_inset
2301
2302 1984
2303 \begin_inset Quotes erd
2304 \end_inset
2305
2306  etc.).
2307  Note that both packages need specifically designed style files.
2308  They both ship their own, but there are lots of additional style files,
2309  and there is even an interactive style file builder
2310 \begin_inset Foot
2311 status collapsed
2312
2313 \begin_layout Plain Layout
2314 See 
2315 \begin_inset Flex URL
2316 status open
2317
2318 \begin_layout Plain Layout
2319
2320 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2321 \end_layout
2322
2323 \end_inset
2324
2325
2326 \end_layout
2327
2328 \end_inset
2329
2330  for 
2331 \begin_inset Flex Code
2332 status collapsed
2333
2334 \begin_layout Plain Layout
2335 natbib
2336 \end_layout
2337
2338 \end_inset
2339
2340 .
2341 \end_layout
2342
2343 \begin_layout Subsection
2344 Sectioned Bibliographies
2345 \end_layout
2346
2347 \begin_layout Standard
2348 Sometimes you might need to divide your bibliography into several sections.
2349  If you are for instance a historian, the possibility to separate sources
2350  and scientific works is most likely a 
2351 \begin_inset Quotes eld
2352 \end_inset
2353
2354 must have
2355 \begin_inset Quotes erd
2356 \end_inset
2357
2358 .
2359  Unfortunately, BibTeX itself does not allow you to do this.
2360  But with the help of some LaTeX packages, BibTeX can be extended to fit
2361  your needs.
2362 \end_layout
2363
2364 \begin_layout Standard
2365 LyX provides native support for one of these packages, 
2366 \family typewriter
2367 bibtopic
2368 \family default
2369 .
2370 \begin_inset Foot
2371 status collapsed
2372
2373 \begin_layout Plain Layout
2374 Available from 
2375 \begin_inset Flex URL
2376 status open
2377
2378 \begin_layout Plain Layout
2379
2380 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2381 \end_layout
2382
2383 \end_inset
2384
2385
2386 \end_layout
2387
2388 \end_inset
2389
2390  The advantage of this package (compared to other packages like 
2391 \family typewriter
2392 multibib
2393 \family default
2394 ) is that you don't need to define new citation commands.
2395  Instead, you need to prepare different bibliographic databases which include
2396  the entries for the different sections of the bibliography.
2397  For example: If you want to divide your bibliography into the sections
2398  
2399 \begin_inset Quotes eld
2400 \end_inset
2401
2402 Sources
2403 \begin_inset Quotes erd
2404 \end_inset
2405
2406  and 
2407 \begin_inset Quotes eld
2408 \end_inset
2409
2410 Scientific works
2411 \begin_inset Quotes erd
2412 \end_inset
2413
2414 , you first need to create two bibliographic databases, e.
2415 \begin_inset space \thinspace{}
2416 \end_inset
2417
2418 g.
2419 \begin_inset space \space{}
2420 \end_inset
2421
2422
2423 \begin_inset Flex Code
2424 status collapsed
2425
2426 \begin_layout Plain Layout
2427 sources.bib
2428 \end_layout
2429
2430 \end_inset
2431
2432  and 
2433 \begin_inset Flex Code
2434 status collapsed
2435
2436 \begin_layout Plain Layout
2437 scientific.bib
2438 \end_layout
2439
2440 \end_inset
2441
2442 .
2443  
2444 \end_layout
2445
2446 \begin_layout Standard
2447 Go to 
2448 \begin_inset Flex MenuItem
2449 status collapsed
2450
2451 \begin_layout Plain Layout
2452 Document\SpecialChar \menuseparator
2453 Settings
2454 \end_layout
2455
2456 \end_inset
2457
2458  and check under 
2459 \begin_inset Flex MenuItem
2460 status collapsed
2461
2462 \begin_layout Plain Layout
2463 Bibliography
2464 \end_layout
2465
2466 \end_inset
2467
2468  the option 
2469 \begin_inset Flex MenuItem
2470 status collapsed
2471
2472 \begin_layout Plain Layout
2473 Sectioned bibliography
2474 \end_layout
2475
2476 \end_inset
2477
2478 .
2479  Now you can insert multiple BibTeX bibliographies, one for each section
2480  of your bibliography.
2481  Returning to our example: Insert the BibTeX bibliography 
2482 \begin_inset Flex Code
2483 status collapsed
2484
2485 \begin_layout Plain Layout
2486 sources.bib
2487 \end_layout
2488
2489 \end_inset
2490
2491  and a second one for the database 
2492 \begin_inset Flex Code
2493 status collapsed
2494
2495 \begin_layout Plain Layout
2496 scientific.bib
2497 \end_layout
2498
2499 \end_inset
2500
2501 .
2502  You are free to use the same or different styles for each section.
2503  Additionally, you can chose if the bibliography section should contain
2504  
2505 \begin_inset Quotes eld
2506 \end_inset
2507
2508 all cited references
2509 \begin_inset Quotes erd
2510 \end_inset
2511
2512  of the specified database(s) (which is the default), 
2513 \begin_inset Quotes eld
2514 \end_inset
2515
2516 all uncited references
2517 \begin_inset Quotes erd
2518 \end_inset
2519
2520  or even 
2521 \begin_inset Quotes eld
2522 \end_inset
2523
2524 all references
2525 \begin_inset Quotes erd
2526 \end_inset
2527
2528 .
2529  This might be useful if you would like to separate your bibliography into
2530  three sections: 
2531 \begin_inset Quotes eld
2532 \end_inset
2533
2534 Cited sources
2535 \begin_inset Quotes erd
2536 \end_inset
2537
2538
2539 \begin_inset Quotes eld
2540 \end_inset
2541
2542 Uncited sources
2543 \begin_inset Quotes erd
2544 \end_inset
2545
2546 , and 
2547 \begin_inset Quotes eld
2548 \end_inset
2549
2550 Scientific works
2551 \begin_inset Quotes erd
2552 \end_inset
2553
2554 .
2555  The titles for the sections can be added as ordinary sections or subsections.
2556  Since 
2557 \begin_inset Flex Code
2558 status collapsed
2559
2560 \begin_layout Plain Layout
2561 bibtopic
2562 \end_layout
2563
2564 \end_inset
2565
2566  removes the bibliography title, you have manually re-add that, too (as
2567  a chapter* or section*, for instance).
2568 \end_layout
2569
2570 \begin_layout Subsection
2571 Multiple Bibliographies
2572 \end_layout
2573
2574 \begin_layout Standard
2575 Multiple bibliographies, e.
2576 \begin_inset space \thinspace{}
2577 \end_inset
2578
2579 g.
2580 \begin_inset space \space{}
2581 \end_inset
2582
2583 a bibliography for each section or chapter of the document, are not supported
2584  by BibTeX itself.
2585  But the 
2586 \begin_inset Flex Code
2587 status collapsed
2588
2589 \begin_layout Plain Layout
2590 bibtopic
2591 \end_layout
2592
2593 \end_inset
2594
2595  package, which is used for the creation of sectioned bibliographies in
2596  LyX (see the previous section), provides an easy way to solve this task,
2597  if you are willing to use some 
2598 \begin_inset Flex MenuItem
2599 status collapsed
2600
2601 \begin_layout Plain Layout
2602 TeX Code
2603 \end_layout
2604
2605 \end_inset
2606
2607  (see section
2608 \begin_inset space ~
2609 \end_inset
2610
2611
2612 \begin_inset CommandInset ref
2613 LatexCommand ref
2614 reference "sec:Inserting-TeX-Code"
2615
2616 \end_inset
2617
2618 ).
2619 \begin_inset Foot
2620 status collapsed
2621
2622 \begin_layout Plain Layout
2623 An alternative approach is to use the 
2624 \begin_inset Flex Code
2625 status collapsed
2626
2627 \begin_layout Plain Layout
2628 chapterbib
2629 \end_layout
2630
2631 \end_inset
2632
2633  or 
2634 \begin_inset Flex Code
2635 status collapsed
2636
2637 \begin_layout Plain Layout
2638 bibunits
2639 \end_layout
2640
2641 \end_inset
2642
2643  package, respectively.
2644 \end_layout
2645
2646 \end_inset
2647
2648
2649 \end_layout
2650
2651 \begin_layout Standard
2652 First go to 
2653 \begin_inset Flex MenuItem
2654 status collapsed
2655
2656 \begin_layout Plain Layout
2657 Document\SpecialChar \menuseparator
2658 Settings
2659 \end_layout
2660
2661 \end_inset
2662
2663  and under 
2664 \begin_inset Flex MenuItem
2665 status collapsed
2666
2667 \begin_layout Plain Layout
2668 Bibliography
2669 \end_layout
2670
2671 \end_inset
2672
2673  check 
2674 \begin_inset Flex MenuItem
2675 status collapsed
2676
2677 \begin_layout Plain Layout
2678 Sectioned bibliography
2679 \end_layout
2680
2681 \end_inset
2682
2683 .
2684  In the document, you have to enclose the sections, which shall contain
2685  their own bibliography (including the BibTeX bibliography itself), between
2686  
2687 \begin_inset Flex Code
2688 status collapsed
2689
2690 \begin_layout Plain Layout
2691
2692 \backslash
2693 begin{btUnit}
2694 \end_layout
2695
2696 \end_inset
2697
2698  and 
2699 \begin_inset Flex Code
2700 status collapsed
2701
2702 \begin_layout Plain Layout
2703
2704 \backslash
2705 end{btUnit}
2706 \end_layout
2707
2708 \end_inset
2709
2710  (those commands have to be inserted as TeX code).
2711  The bibliography will contain all references which have been cited in the
2712  current 
2713 \begin_inset Flex Code
2714 status collapsed
2715
2716 \begin_layout Plain Layout
2717 btUnit
2718 \end_layout
2719
2720 \end_inset
2721
2722 .
2723  
2724 \series bold
2725 Note:
2726 \series default
2727  If you are using this approach, then every citation reference has to be
2728  inside some 
2729 \begin_inset Flex Code
2730 status collapsed
2731
2732 \begin_layout Plain Layout
2733 btUnit
2734 \end_layout
2735
2736 \end_inset
2737
2738 .
2739  Also, the 
2740 \begin_inset Flex Code
2741 status collapsed
2742
2743 \begin_layout Plain Layout
2744 btUnit
2745 \end_layout
2746
2747 \end_inset
2748
2749 s cannot be nested.
2750 \end_layout
2751
2752 \begin_layout Section
2753 Multipart Documents
2754 \end_layout
2755
2756 \begin_layout Subsection
2757 General Operation
2758 \end_layout
2759
2760 \begin_layout Standard
2761 When you are working on a large file with many sections, it is often convenient
2762  to break up the document into several files, or perhaps you have something
2763  where a table may change from time to time, but the preceding text does
2764  not.
2765  In these cases, you should seriously consider using multipart documents.
2766  For example, scientific papers often have five major sections: the introduction
2767 , observations, results, discussion, and conclusion.
2768  Each of these could be its own separate LyX file, with one 
2769 \begin_inset Quotes eld
2770 \end_inset
2771
2772 master
2773 \begin_inset Quotes erd
2774 \end_inset
2775
2776  file which contains the title, authors, abstract, references, etc., plus
2777  the five included files.
2778  It is important to note that each of these files is a full LyX file which
2779  can be formatted and printed on its own, as well as included in a master
2780  file.
2781  Each of these files must have the same document class, however—don't attempt
2782  to mix book classes with article classes.
2783  You may also include LaTeX files; however, these files must not have their
2784  own preamble (i.
2785 \begin_inset space \thinspace{}
2786 \end_inset
2787
2788 g.
2789 \begin_inset space \space{}
2790 \end_inset
2791
2792 everything up to and including the 
2793 \begin_inset Flex Code
2794 status collapsed
2795
2796 \begin_layout Plain Layout
2797
2798 \backslash
2799 begin{document}
2800 \end_layout
2801
2802 \end_inset
2803
2804  line as well as the 
2805 \begin_inset Flex Code
2806 status collapsed
2807
2808 \begin_layout Plain Layout
2809
2810 \backslash
2811 end{document}
2812 \end_layout
2813
2814 \end_inset
2815
2816  line must be deleted) or else errors will be generated when you try to
2817  make a DVI file.
2818 \end_layout
2819
2820 \begin_layout Standard
2821 LyX allows you to include files quite easily with 
2822 \begin_inset Flex MenuItem
2823 status collapsed
2824
2825 \begin_layout Plain Layout
2826 Insert\SpecialChar \menuseparator
2827 ChiId
2828 \begin_inset space ~
2829 \end_inset
2830
2831 Document
2832 \end_layout
2833
2834 \end_inset
2835
2836 .
2837  When you click on this selection a small box is inserted into the file
2838  at the current cursor location.
2839  Clicking on the box raises a dialog which allows you to select the file
2840  to be included, and the method of its inclusion.
2841  
2842 \end_layout
2843
2844 \begin_layout Standard
2845 The file selection box should by now be obvious.
2846  The three inclusion methods are 
2847 \begin_inset Quotes eld
2848 \end_inset
2849
2850 include
2851 \begin_inset Quotes erd
2852 \end_inset
2853
2854
2855 \begin_inset Quotes eld
2856 \end_inset
2857
2858 input
2859 \begin_inset Quotes erd
2860 \end_inset
2861
2862 , and 
2863 \begin_inset Quotes eld
2864 \end_inset
2865
2866 verbatim
2867 \begin_inset Quotes erd
2868 \end_inset
2869
2870 .
2871  The difference between 
2872 \begin_inset Quotes eld
2873 \end_inset
2874
2875 include
2876 \begin_inset Quotes erd
2877 \end_inset
2878
2879  and 
2880 \begin_inset Quotes eld
2881 \end_inset
2882
2883 input
2884 \begin_inset Quotes erd
2885 \end_inset
2886
2887  is really only meaningful to LaTeXperts, but the practical difference is
2888  that files which are 
2889 \begin_inset Quotes eld
2890 \end_inset
2891
2892 included
2893 \begin_inset Quotes erd
2894 \end_inset
2895
2896  are typeset beginning on a new page, while files which are 
2897 \begin_inset Quotes eld
2898 \end_inset
2899
2900 inputted
2901 \begin_inset Quotes erd
2902 \end_inset
2903
2904  are typeset starting on the current page.
2905 \end_layout
2906
2907 \begin_layout Standard
2908 Generally, the master file is converted into a full LaTeX file before typesettin
2909 g, while the included files are converted to LaTeX files which do not have
2910  all the preamble information.
2911 \end_layout
2912
2913 \begin_layout Standard
2914
2915 \begin_inset Quotes eld
2916 \end_inset
2917
2918 verbatim
2919 \begin_inset Quotes erd
2920 \end_inset
2921
2922  included file allows you to include a file typeset exactly as it appears
2923  in the file, i.
2924 \begin_inset space \thinspace{}
2925 \end_inset
2926
2927 g.
2928 \begin_inset space \space{}
2929 \end_inset
2930
2931 in 
2932 \begin_inset Flex Code
2933 status collapsed
2934
2935 \begin_layout Plain Layout
2936 verbatim
2937 \end_layout
2938
2939 \end_inset
2940
2941  mode, with the characters set in a fixed-width typewriter font.
2942  Normally, spaces in this file are invisible, though two consecutive spaces
2943  are conserved, unlike LyX's normal treatment of spaces.
2944  However, setting the 
2945 \begin_inset Flex MenuItem
2946 status collapsed
2947
2948 \begin_layout Plain Layout
2949 Mark
2950 \begin_inset space ~
2951 \end_inset
2952
2953 spaces
2954 \begin_inset space ~
2955 \end_inset
2956
2957 in
2958 \begin_inset space ~
2959 \end_inset
2960
2961 output
2962 \end_layout
2963
2964 \end_inset
2965
2966  checkbox typesets a mark to unambiguously define the presence of a space.
2967  
2968 \end_layout
2969
2970 \begin_layout Subsection
2971 Cross-References Between Files
2972 \end_layout
2973
2974 \begin_layout Standard
2975 \begin_inset Box Shadowbox
2976 position "t"
2977 hor_pos "c"
2978 has_inner_box 1
2979 inner_pos "t"
2980 use_parbox 0
2981 use_makebox 0
2982 width "100col%"
2983 special "none"
2984 height "1in"
2985 height_special "totalheight"
2986 status open
2987
2988 \begin_layout Plain Layout
2989 This section is somewhat out of date.
2990  Need to describe default master documents and how children are opened when
2991  the master is.
2992  [[FIXME]]
2993 \end_layout
2994
2995 \end_inset
2996
2997
2998 \end_layout
2999
3000 \begin_layout Standard
3001 It is possible to set up cross-references between the different files.
3002  First, open all the files in question: let's call them A and B in a two
3003  file example, where B is included in A.
3004  Let's say you insert a label in A, then want to reference it in B.
3005  Open the cross-reference dialog in whilst in document B, and you can select
3006  the 
3007 \begin_inset Quotes eld
3008 \end_inset
3009
3010 buffer
3011 \begin_inset Quotes erd
3012 \end_inset
3013
3014  to use.
3015 \end_layout
3016
3017 \begin_layout Subsection
3018 Bibliography Lists in all Subdocuments
3019 \end_layout
3020
3021 \begin_layout Standard
3022 \begin_inset Box Frameless
3023 position "t"
3024 hor_pos "c"
3025 has_inner_box 1
3026 inner_pos "t"
3027 use_parbox 0
3028 use_makebox 0
3029 width "100col%"
3030 special "none"
3031 height "1in"
3032 height_special "totalheight"
3033 status open
3034
3035 \begin_layout Plain Layout
3036 This section also needs updating.
3037  There is now material about this on the wiki, and it could be copied here.
3038 \end_layout
3039
3040 \end_inset
3041
3042
3043 \end_layout
3044
3045 \begin_layout Standard
3046 Copy the bibliography list with all entries to all subdocuments and transform
3047  them to a comment.
3048  This way LyX will find the 
3049 \begin_inset Flex Code
3050 status collapsed
3051
3052 \begin_layout Plain Layout
3053 .bib
3054 \end_layout
3055
3056 \end_inset
3057
3058 -files and you can easily insert references without making the bibliography
3059  list visible.
3060 \end_layout
3061
3062 \begin_layout Standard
3063 As the bibliography list is in a comment, LaTeX won't use use it and the
3064  references will look like this: [?], instead of like this: [1].
3065  One solution is to use the LaTeX-package 
3066 \begin_inset Flex Code
3067 status collapsed
3068
3069 \begin_layout Plain Layout
3070 comment
3071 \end_layout
3072
3073 \end_inset
3074
3075  that will only include comments by processing the files separately.
3076  To do this, add in the LaTeX preamble of every subdocument the following:
3077 \end_layout
3078
3079 \begin_layout LyX-Code
3080
3081 \backslash
3082 usepackage{comment}
3083 \end_layout
3084
3085 \begin_layout LyX-Code
3086
3087 \backslash
3088 includecomment{comment}
3089 \end_layout
3090
3091 \begin_layout Standard
3092 See also 
3093 \begin_inset Flex URL
3094 status collapsed
3095
3096 \begin_layout Plain Layout
3097
3098 http://wiki.lyx.org/FAQ/Unsorted#toc31
3099 \end_layout
3100
3101 \end_inset
3102
3103 .
3104 \end_layout
3105
3106 \begin_layout Section
3107 LyX Archives
3108 \end_layout
3109
3110 \begin_layout Standard
3111 Users sometimes need to be able to 
3112 \begin_inset Quotes eld
3113 \end_inset
3114
3115 bundle
3116 \begin_inset Quotes erd
3117 \end_inset
3118
3119  a LyX file together with all the images (and other files) on which it depends,
3120  either for sending to a publisher or for sharing with a co-author.
3121  LyX 2.0 includes a Python script (
3122 \begin_inset Flex Code
3123 status collapsed
3124
3125 \begin_layout Plain Layout
3126 lyxpak.py
3127 \end_layout
3128
3129 \end_inset
3130
3131 ) that automates this process.
3132  To use it, you must have either the 
3133 \begin_inset Flex Code
3134 status collapsed
3135
3136 \begin_layout Plain Layout
3137 zipfile
3138 \end_layout
3139
3140 \end_inset
3141
3142  or 
3143 \begin_inset Flex Code
3144 status collapsed
3145
3146 \begin_layout Plain Layout
3147 tarfile
3148 \end_layout
3149
3150 \end_inset
3151
3152  python modules installed on your system.
3153  By default, the script prefers the 
3154 \begin_inset Flex Code
3155 status collapsed
3156
3157 \begin_layout Plain Layout
3158 gzip
3159 \end_layout
3160
3161 \end_inset
3162
3163 -compressed 
3164 \begin_inset Flex Code
3165 status collapsed
3166
3167 \begin_layout Plain Layout
3168 tar
3169 \end_layout
3170
3171 \end_inset
3172
3173  format on Unix-like systems and the 
3174 \begin_inset Flex Code
3175 status collapsed
3176
3177 \begin_layout Plain Layout
3178 zip
3179 \end_layout
3180
3181 \end_inset
3182
3183  format on Windows.
3184 \end_layout
3185
3186 \begin_layout Standard
3187 LyX's configuration process will set the script up to export a `LyX Archive',
3188  and this format will then be available under 
3189 \begin_inset Flex Code
3190 status collapsed
3191
3192 \begin_layout Plain Layout
3193 File\SpecialChar \menuseparator
3194 Export
3195 \end_layout
3196
3197 \end_inset
3198
3199 .
3200 \end_layout
3201
3202 \begin_layout Standard
3203 Independently of the platform, the generation of a particular archive format
3204  can be forced by adding either the 
3205 \begin_inset Flex Code
3206 status collapsed
3207
3208 \begin_layout Plain Layout
3209 -t
3210 \end_layout
3211
3212 \end_inset
3213
3214  (for the 
3215 \begin_inset Flex Code
3216 status collapsed
3217
3218 \begin_layout Plain Layout
3219 tar
3220 \end_layout
3221
3222 \end_inset
3223
3224  format) or 
3225 \begin_inset Flex Code
3226 status collapsed
3227
3228 \begin_layout Plain Layout
3229 -z
3230 \end_layout
3231
3232 \end_inset
3233
3234  (for the 
3235 \begin_inset Flex Code
3236 status collapsed
3237
3238 \begin_layout Plain Layout
3239 zip
3240 \end_layout
3241
3242 \end_inset
3243
3244  format) switch to the 
3245 \begin_inset Flex Code
3246 status collapsed
3247
3248 \begin_layout Plain Layout
3249 LyX\SpecialChar \menuseparator
3250 LyX Archive
3251 \end_layout
3252
3253 \end_inset
3254
3255  converter in 
3256 \begin_inset Flex Code
3257 status collapsed
3258
3259 \begin_layout Plain Layout
3260 Tools\SpecialChar \menuseparator
3261 Preferences\SpecialChar \menuseparator
3262 File Handling\SpecialChar \menuseparator
3263 Converters
3264 \end_layout
3265
3266 \end_inset
3267
3268 .
3269  (Make sure you add the switch after the script name, not before it.)
3270 \end_layout
3271
3272 \begin_layout Section
3273 Fancy Headers and Footers
3274 \end_layout
3275
3276 \begin_layout Standard
3277 The default page layout is rather plain; for an 
3278 \begin_inset Flex Code
3279 status collapsed
3280
3281 \begin_layout Plain Layout
3282 article
3283 \end_layout
3284
3285 \end_inset
3286
3287  document class, all you get is a centered page number at the bottom of
3288  the page.
3289  This document uses KOMA-script's book class, so it appears to be a bit
3290  fancier.
3291  But to really put on a show, you need to set the document page style to
3292  
3293 \begin_inset Quotes eld
3294 \end_inset
3295
3296 fancy
3297 \begin_inset Quotes erd
3298 \end_inset
3299
3300 , as mentioned in the 
3301 \emph on
3302 User Guide
3303 \emph default
3304 .
3305  This section describes the LaTeX code you need to insert in your LaTeX
3306  preamble in order to get the desired effects.
3307 \end_layout
3308
3309 \begin_layout Standard
3310 For more information on fancy headers, see the 
3311 \begin_inset Flex Code
3312 status collapsed
3313
3314 \begin_layout Plain Layout
3315 fancyhdr
3316 \end_layout
3317
3318 \end_inset
3319
3320  package documentation.
3321  (
3322 \begin_inset Flex URL
3323 status collapsed
3324
3325 \begin_layout Plain Layout
3326
3327 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3328 \end_layout
3329
3330 \end_inset
3331
3332 )
3333 \end_layout
3334
3335 \begin_layout Standard
3336 The page header is divided into three fields, not surprisingly labeled 
3337 \begin_inset Quotes eld
3338 \end_inset
3339
3340 left
3341 \begin_inset Quotes erd
3342 \end_inset
3343
3344
3345 \begin_inset Quotes eld
3346 \end_inset
3347
3348 center
3349 \begin_inset Quotes erd
3350 \end_inset
3351
3352 , and 
3353 \begin_inset Quotes eld
3354 \end_inset
3355
3356 right
3357 \begin_inset Quotes erd
3358 \end_inset
3359
3360 .
3361  The footer is also divided into these three fields.
3362  The LaTeX commands to set these fields in the simplest manner are 
3363 \begin_inset Flex Code
3364 status collapsed
3365
3366 \begin_layout Plain Layout
3367
3368 \backslash
3369 lhead
3370 \end_layout
3371
3372 \end_inset
3373
3374
3375 \begin_inset Flex Code
3376 status collapsed
3377
3378 \begin_layout Plain Layout
3379
3380 \backslash
3381 chead
3382 \end_layout
3383
3384 \end_inset
3385
3386
3387 \begin_inset Flex Code
3388 status collapsed
3389
3390 \begin_layout Plain Layout
3391
3392 \backslash
3393 rhead
3394 \end_layout
3395
3396 \end_inset
3397
3398
3399 \begin_inset Flex Code
3400 status collapsed
3401
3402 \begin_layout Plain Layout
3403
3404 \backslash
3405 lfoot
3406 \end_layout
3407
3408 \end_inset
3409
3410 , etc.
3411  Suppose you wish to put your name in the upper left hand corner of each
3412  page.
3413  Simply insert the following command in the preamble: 
3414 \end_layout
3415
3416 \begin_layout Standard
3417
3418 \family typewriter
3419
3420 \backslash
3421 lhead{John Q.
3422  DocWriter}
3423 \end_layout
3424
3425 \begin_layout Standard
3426 You will now see your name in the upper left.
3427  If a field has a default entry that you would like to get rid of (often
3428  the page number appears in the central footer, simply include a command
3429  with a blank argument, e.
3430 \begin_inset space \thinspace{}
3431 \end_inset
3432
3433 g.:
3434 \end_layout
3435
3436 \begin_layout Standard
3437
3438 \family typewriter
3439
3440 \backslash
3441 cfoot{}
3442 \end_layout
3443
3444 \begin_layout Standard
3445 Let's get really fancy: lets put the section number with the word 
3446 \begin_inset Quotes eld
3447 \end_inset
3448
3449 Section
3450 \begin_inset Quotes erd
3451 \end_inset
3452
3453  (e.
3454 \begin_inset space \thinspace{}
3455 \end_inset
3456
3457 g.
3458 \begin_inset space \space{}
3459 \end_inset
3460
3461 Section 3) in the upper left, the page number (e.
3462 \begin_inset space \thinspace{}
3463 \end_inset
3464
3465 g.
3466 \begin_inset space \space{}
3467 \end_inset
3468
3469 Page 4) in the upper right, your name in the lower left, and the date in
3470  the lower right.
3471  The following commands should now appear in the preamble:
3472 \end_layout
3473
3474 \begin_layout Standard
3475
3476 \family typewriter
3477
3478 \backslash
3479 lhead{Section 
3480 \backslash
3481 thesection}
3482 \end_layout
3483
3484 \begin_layout Standard
3485
3486 \family typewriter
3487
3488 \backslash
3489 chead{}
3490 \end_layout
3491
3492 \begin_layout Standard
3493
3494 \family typewriter
3495
3496 \backslash
3497 rhead{Page 
3498 \backslash
3499 thepage}
3500 \end_layout
3501
3502 \begin_layout Standard
3503
3504 \family typewriter
3505
3506 \backslash
3507 lfoot{John Q.
3508  DocWriter}
3509 \end_layout
3510
3511 \begin_layout Standard
3512
3513 \family typewriter
3514
3515 \backslash
3516 cfoot{}
3517 \end_layout
3518
3519 \begin_layout Standard
3520
3521 \family typewriter
3522
3523 \backslash
3524 rfoot{
3525 \backslash
3526 today}
3527 \end_layout
3528
3529 \begin_layout Standard
3530 The commands 
3531 \begin_inset Flex Code
3532 status collapsed
3533
3534 \begin_layout Plain Layout
3535
3536 \backslash
3537 thesection
3538 \end_layout
3539
3540 \end_inset
3541
3542  and 
3543 \begin_inset Flex Code
3544 status collapsed
3545
3546 \begin_layout Plain Layout
3547
3548 \backslash
3549 thepage
3550 \end_layout
3551
3552 \end_inset
3553
3554  access LaTeX's section and page counters, and so print out the current
3555  section and page numbers.
3556  
3557 \begin_inset Flex Code
3558 status collapsed
3559
3560 \begin_layout Plain Layout
3561
3562 \backslash
3563 today
3564 \end_layout
3565
3566 \end_inset
3567
3568  simply prints out today's date.
3569 \end_layout
3570
3571 \begin_layout Standard
3572 The thicknesses of the horizontal rules drawn beneath the header and above
3573  the footer can also be modified.
3574  If you don't want one of the rules, set its thickness to 0.
3575  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3576  Use commands
3577 \family typewriter
3578  
3579 \family default
3580 like 
3581 \begin_inset Flex Code
3582 status collapsed
3583
3584 \begin_layout Plain Layout
3585
3586 \backslash
3587 renewcommand{
3588 \backslash
3589 headrulewidth}{0.4pt}
3590 \end_layout
3591
3592 \end_inset
3593
3594  and 
3595 \begin_inset Flex Code
3596 status collapsed
3597
3598 \begin_layout Plain Layout
3599
3600 \backslash
3601 renewcommand{
3602 \backslash
3603 footrulewidth}{0.4pt}
3604 \end_layout
3605
3606 \end_inset
3607
3608  to set the thicknesses.
3609 \end_layout
3610
3611 \begin_layout Standard
3612 You can switch the header/footer settings on and off for individual pages
3613  using commands like 
3614 \begin_inset Flex Code
3615 status collapsed
3616
3617 \begin_layout Plain Layout
3618
3619 \backslash
3620 thispagestyle{empty}
3621 \end_layout
3622
3623 \end_inset
3624
3625
3626 \begin_inset Flex Code
3627 status collapsed
3628
3629 \begin_layout Plain Layout
3630
3631 \backslash
3632 thispagestyle{plain}
3633 \end_layout
3634
3635 \end_inset
3636
3637 , and 
3638 \begin_inset Flex Code
3639 status collapsed
3640
3641 \begin_layout Plain Layout
3642
3643 \backslash
3644 thispagestyle{fancy}
3645 \end_layout
3646
3647 \end_inset
3648
3649 .
3650  Simply insert them in the text on the page you want changed and mark them
3651  as TeX code.
3652  In fact, title pages are marked as plain by default, while following pages
3653  are marked fancy when using the global fancy setting.
3654 \end_layout
3655
3656 \begin_layout Standard
3657 As a final example, it is possible to include an image in the header or
3658  footer.
3659  Suppose you want to put a company logo in the upper lefthand corner.
3660  You might try something like
3661 \end_layout
3662
3663 \begin_layout Standard
3664
3665 \family typewriter
3666
3667 \backslash
3668 lhead{
3669 \backslash
3670 resizebox{1in}{!}{
3671 \backslash
3672 includegraphics{logo.eps}}}
3673 \end_layout
3674
3675 \begin_layout Standard
3676 \noindent
3677 (you may need to preface this with 
3678 \begin_inset Flex Code
3679 status collapsed
3680
3681 \begin_layout Plain Layout
3682 \noindent
3683
3684 \backslash
3685 usepackage{graphics}
3686 \end_layout
3687
3688 \end_inset
3689
3690  if you don't include graphics elsewhere in your document).
3691 \end_layout
3692
3693 \begin_layout Section
3694 Itemize Bullet Selection
3695 \begin_inset CommandInset label
3696 LatexCommand label
3697 name "sec:bullet"
3698
3699 \end_inset
3700
3701
3702 \end_layout
3703
3704 \begin_layout Standard
3705 by
3706 \noun on
3707  Allan Rae
3708 \end_layout
3709
3710 \begin_layout Subsection
3711 Introduction
3712 \end_layout
3713
3714 \begin_layout Standard
3715 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3716  Using this dialog you can easily specify what bullet shape to use at each
3717  level of an itemized list.
3718  These settings are document-wide so you won't be able to specify different
3719  sets of bullets for different paragraphs.
3720 \begin_inset Foot
3721 status collapsed
3722
3723 \begin_layout Plain Layout
3724 Well, actually you can but you'll have to do it by hand.
3725 \end_layout
3726
3727 \end_inset
3728
3729
3730 \end_layout
3731
3732 \begin_layout Subsection
3733 How it looks
3734 \end_layout
3735
3736 \begin_layout Standard
3737 Open the dialog by selecting the 
3738 \begin_inset Flex MenuItem
3739 status collapsed
3740
3741 \begin_layout Plain Layout
3742 Document\SpecialChar \menuseparator
3743 Settings
3744 \end_layout
3745
3746 \end_inset
3747
3748  menu item and then select the 
3749 \begin_inset Flex MenuItem
3750 status collapsed
3751
3752 \begin_layout Plain Layout
3753 Bullets
3754 \end_layout
3755
3756 \end_inset
3757
3758  tab.
3759 \end_layout
3760
3761 \begin_layout Standard
3762 The dialog provides you with a table of bullet shapes.
3763  A column of buttons on the left of the table provides access to the six
3764  different panels of bullet shapes.
3765  The row of buttons across the top is used to select which bullet depth
3766  you are changing.
3767  A text entry under the table shows the currently selected bullet shape's
3768  LaTeX equivalent and this can be edited if desired.
3769  If you do modify the text you will also need to specify any needed packages
3770  in the LaTeX preamble.
3771 \end_layout
3772
3773 \begin_layout Standard
3774 The six panels are divided up by the packages they require.
3775  The following table shows the mappings from button name to LaTeX packages.
3776 \end_layout
3777
3778 \begin_layout Standard
3779 \align center
3780 \begin_inset Tabular
3781 <lyxtabular version="3" rows="7" columns="2">
3782 <features tabularvalignment="middle">
3783 <column alignment="center" valignment="top" width="0pt">
3784 <column alignment="center" valignment="top" width="0pt">
3785 <row>
3786 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3787 \begin_inset Text
3788
3789 \begin_layout Plain Layout
3790
3791 \family roman
3792 \series medium
3793 \shape up
3794 \size normal
3795 \emph off
3796 \bar no
3797 \noun off
3798 \color none
3799 Button
3800 \end_layout
3801
3802 \end_inset
3803 </cell>
3804 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3805 \begin_inset Text
3806
3807 \begin_layout Plain Layout
3808
3809 \family roman
3810 \series medium
3811 \shape up
3812 \size normal
3813 \emph off
3814 \bar no
3815 \noun off
3816 \color none
3817 Packages Required
3818 \end_layout
3819
3820 \end_inset
3821 </cell>
3822 </row>
3823 <row>
3824 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3825 \begin_inset Text
3826
3827 \begin_layout Plain Layout
3828
3829 \family sans
3830 \series medium
3831 \shape up
3832 \size normal
3833 \emph off
3834 \bar no
3835 \noun off
3836 \color none
3837 Standard
3838 \end_layout
3839
3840 \end_inset
3841 </cell>
3842 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3843 \begin_inset Text
3844
3845 \begin_layout Plain Layout
3846
3847 \series medium
3848 \shape up
3849 \size normal
3850 \emph off
3851 \bar no
3852 \noun off
3853 \color none
3854 base LaTeX
3855 \end_layout
3856
3857 \end_inset
3858 </cell>
3859 </row>
3860 <row>
3861 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3862 \begin_inset Text
3863
3864 \begin_layout Plain Layout
3865
3866 \family sans
3867 \series medium
3868 \shape up
3869 \size normal
3870 \emph off
3871 \bar no
3872 \noun off
3873 \color none
3874 Maths
3875 \end_layout
3876
3877 \end_inset
3878 </cell>
3879 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3880 \begin_inset Text
3881
3882 \begin_layout Plain Layout
3883
3884 \family typewriter
3885 \series medium
3886 \shape up
3887 \size normal
3888 \emph off
3889 \bar no
3890 \noun off
3891 \color none
3892 amssymb.sty
3893 \end_layout
3894
3895 \end_inset
3896 </cell>
3897 </row>
3898 <row>
3899 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3900 \begin_inset Text
3901
3902 \begin_layout Plain Layout
3903
3904 \family sans
3905 \series medium
3906 \shape up
3907 \size normal
3908 \emph off
3909 \bar no
3910 \noun off
3911 \color none
3912 Ding1
3913 \end_layout
3914
3915 \end_inset
3916 </cell>
3917 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3918 \begin_inset Text
3919
3920 \begin_layout Plain Layout
3921
3922 \family typewriter
3923 \series medium
3924 \shape up
3925 \size normal
3926 \emph off
3927 \bar no
3928 \noun off
3929 \color none
3930 pifont.sty
3931 \end_layout
3932
3933 \end_inset
3934 </cell>
3935 </row>
3936 <row>
3937 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3938 \begin_inset Text
3939
3940 \begin_layout Plain Layout
3941
3942 \family sans
3943 \series medium
3944 \shape up
3945 \size normal
3946 \emph off
3947 \bar no
3948 \noun off
3949 \color none
3950 Ding2
3951 \end_layout
3952
3953 \end_inset
3954 </cell>
3955 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3956 \begin_inset Text
3957
3958 \begin_layout Plain Layout
3959
3960 \family typewriter
3961 \series medium
3962 \shape up
3963 \size normal
3964 \emph off
3965 \bar no
3966 \noun off
3967 \color none
3968 pifont.sty
3969 \end_layout
3970
3971 \end_inset
3972 </cell>
3973 </row>
3974 <row>
3975 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3976 \begin_inset Text
3977
3978 \begin_layout Plain Layout
3979
3980 \family sans
3981 \series medium
3982 \shape up
3983 \size normal
3984 \emph off
3985 \bar no
3986 \noun off
3987 \color none
3988 Ding3
3989 \end_layout
3990
3991 \end_inset
3992 </cell>
3993 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3994 \begin_inset Text
3995
3996 \begin_layout Plain Layout
3997
3998 \family typewriter
3999 \series medium
4000 \shape up
4001 \size normal
4002 \emph off
4003 \bar no
4004 \noun off
4005 \color none
4006 pifont.sty
4007 \end_layout
4008
4009 \end_inset
4010 </cell>
4011 </row>
4012 <row>
4013 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4014 \begin_inset Text
4015
4016 \begin_layout Plain Layout
4017
4018 \family sans
4019 \series medium
4020 \shape up
4021 \size normal
4022 \emph off
4023 \bar no
4024 \noun off
4025 \color none
4026 Ding4
4027 \end_layout
4028
4029 \end_inset
4030 </cell>
4031 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4032 \begin_inset Text
4033
4034 \begin_layout Plain Layout
4035
4036 \family typewriter
4037 \series medium
4038 \shape up
4039 \size normal
4040 \emph off
4041 \bar no
4042 \noun off
4043 \color none
4044 pifont.sty
4045 \end_layout
4046
4047 \end_inset
4048 </cell>
4049 </row>
4050 </lyxtabular>
4051
4052 \end_inset
4053
4054
4055 \end_layout
4056
4057 \begin_layout Standard
4058 LyX doesn't stop you using bullets from packages you don't have.
4059  If you get errors from LaTeX when you try to view or print the file, then
4060  it is likely you are missing a package.
4061 \begin_inset Foot
4062 status collapsed
4063
4064 \begin_layout Plain Layout
4065 LyX doesn't restrict your use since you may be editing locally and exporting
4066  elsewhere.
4067 \end_layout
4068
4069 \end_inset
4070
4071
4072 \end_layout
4073
4074 \begin_layout Subsection
4075 How to use it
4076 \end_layout
4077
4078 \begin_layout Standard
4079 Select which bullet depth you want to change then select the bullet shape
4080  and size.
4081  Any changes will not be visible in LyX, but are visible when viewing the
4082  document.
4083 \end_layout
4084
4085 \begin_layout Standard
4086 You can reset a bullet shape to the default simply by clicking your right
4087  mouse button on the appropriate bullet depth button.
4088 \begin_inset Foot
4089 status collapsed
4090
4091 \begin_layout Plain Layout
4092 If you 
4093 \emph on
4094 really
4095 \emph default
4096  want to have multiple sets of paragraphs with different sets of bullets
4097  in each, then you're going to have to get your hands dirty with TeX code.
4098  The bullet selection dialog can help though because it provides you with
4099  the LaTeX code for a wide range of bullet shapes.
4100  To make your own custom paragraphs you have the following options:
4101 \end_layout
4102
4103 \begin_layout Plain Layout
4104 \begin_inset ERT
4105 status open
4106
4107 \begin_layout Plain Layout
4108
4109
4110 \backslash
4111 let
4112 \backslash
4113 savelabelitemi=
4114 \backslash
4115 labelitemi
4116 \end_layout
4117
4118 \end_inset
4119
4120
4121 \end_layout
4122
4123 \begin_layout Plain Layout
4124 \begin_inset ERT
4125 status open
4126
4127 \begin_layout Plain Layout
4128
4129
4130 \backslash
4131 renewcommand
4132 \backslash
4133 labelitemi[0]{
4134 \backslash
4135 small
4136 \backslash
4137 (
4138 \backslash
4139 sharp
4140 \backslash
4141 )}
4142 \end_layout
4143
4144 \end_inset
4145
4146
4147 \end_layout
4148
4149 \begin_layout Itemize
4150 Use the LaTeX command 
4151 \begin_inset Flex Code
4152 status collapsed
4153
4154 \begin_layout Plain Layout
4155
4156 \backslash
4157 renewcommand{}{}
4158 \end_layout
4159
4160 \end_inset
4161
4162  to specify a new bullet shape for a given depth.
4163  You'll also need to save the current bullet shape so you can restore it
4164  again afterwards.
4165  In this itemized list the following LaTeX code was used to change the bullet
4166  used for the first depth.
4167 \end_layout
4168
4169 \begin_deeper
4170 \begin_layout LyX-Code
4171
4172 \backslash
4173 let
4174 \backslash
4175 savelabelitemi=
4176 \backslash
4177 labelitemi 
4178 \end_layout
4179
4180 \begin_layout LyX-Code
4181
4182 \backslash
4183 renewcommand
4184 \backslash
4185 labelitemi[0]{
4186 \backslash
4187 small
4188 \backslash
4189 (
4190 \backslash
4191 sharp
4192 \backslash
4193 )}
4194 \end_layout
4195
4196 \end_deeper
4197 \begin_layout Itemize
4198 Note that the itemize depth is specified in Roman numerals as part of the
4199  
4200 \family typewriter
4201
4202 \backslash
4203 labelitem
4204 \family default
4205  command.
4206 \end_layout
4207
4208 \begin_layout Itemize
4209 \begin_inset ERT
4210 status open
4211
4212 \begin_layout Plain Layout
4213
4214 [
4215 \backslash
4216 (
4217 \backslash
4218 star
4219 \backslash
4220 )]
4221 \end_layout
4222
4223 \end_inset
4224
4225  Specify each individual entry by starting each item with the bullet shape
4226  enclosed in square brackets and set as 
4227 \begin_inset Flex MenuItem
4228 status collapsed
4229
4230 \begin_layout Plain Layout
4231 TeX Code
4232 \end_layout
4233
4234 \end_inset
4235
4236 .
4237  For example, this item was started with 
4238 \begin_inset Flex Code
4239 status collapsed
4240
4241 \begin_layout Plain Layout
4242 [
4243 \backslash
4244 (
4245 \backslash
4246 star
4247 \backslash
4248 )]
4249 \end_layout
4250
4251 \end_inset
4252
4253 .
4254 \end_layout
4255
4256 \begin_layout Plain Layout
4257 \begin_inset ERT
4258 status open
4259
4260 \begin_layout Plain Layout
4261
4262
4263 \backslash
4264 renewcommand
4265 \backslash
4266 labelitemi[0]{
4267 \backslash
4268 savelabelitemi}
4269 \end_layout
4270
4271 \end_inset
4272
4273
4274 \end_layout
4275
4276 \begin_layout Plain Layout
4277 You'll also need to revert the labelitem back to its previous setting for
4278  the global bullet shape settings to remain in effect.
4279  The way used here was:
4280 \end_layout
4281
4282 \begin_layout LyX-Code
4283
4284 \backslash
4285 renewcommand
4286 \backslash
4287 labelitemi[0]{
4288 \backslash
4289 savelabelitemi}
4290 \end_layout
4291
4292 \end_inset
4293
4294
4295 \end_layout
4296
4297 \begin_layout Chapter
4298 LyX and the World Wide Web
4299 \end_layout
4300
4301 \begin_layout Standard
4302 LyX has long supported the export of documents to various web-friendly formats,
4303  such as HTML.
4304  Before verson 2.0, however, HTML export was always accomplished by the use
4305  of external converters.
4306 \begin_inset Foot
4307 status collapsed
4308
4309 \begin_layout Plain Layout
4310 For details on the use of external converters with LyX, see the 
4311 \emph on
4312 Converters
4313 \emph default
4314  section of the Customization manual.
4315 \end_layout
4316
4317 \end_inset
4318
4319  These fall into two large groups: there are converters that use LaTeX as
4320  an intermediate format, such as 
4321 \begin_inset Flex Code
4322 status collapsed
4323
4324 \begin_layout Plain Layout
4325 htlatex
4326 \end_layout
4327
4328 \end_inset
4329
4330
4331 \begin_inset Flex Code
4332 status collapsed
4333
4334 \begin_layout Plain Layout
4335 html2latex
4336 \end_layout
4337
4338 \end_inset
4339
4340 , and 
4341 \begin_inset Flex Code
4342 status collapsed
4343
4344 \begin_layout Plain Layout
4345 plastex
4346 \end_layout
4347
4348 \end_inset
4349
4350 , relying upon LyX to produce the LaTeX; and there is a converter that works
4351  directly on LyX files, 
4352 \begin_inset Flex Code
4353 status collapsed
4354
4355 \begin_layout Plain Layout
4356 eLyXer
4357 \end_layout
4358
4359 \end_inset
4360
4361 .
4362  All of these have different advantages and disadvantages.
4363  
4364 \end_layout
4365
4366 \begin_layout Standard
4367 The LaTeX-based converters have the advantage that, in principle, they know
4368  everything about the exported document that LaTeX does.
4369  Such converters do not care, for example, if a certain block of code was
4370  produced by LyX or was Evil Red Text.
4371  These converters know about 
4372 \begin_inset Flex Code
4373 status collapsed
4374
4375 \begin_layout Plain Layout
4376 aux
4377 \end_layout
4378
4379 \end_inset
4380
4381  files, counters, and references, and can often make use of the 
4382 \begin_inset Flex Code
4383 status collapsed
4384
4385 \begin_layout Plain Layout
4386 bbl
4387 \end_layout
4388
4389 \end_inset
4390
4391  files generated by BibTeX.
4392  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4393  said that only TeX itself understands TeX---and LaTeX-based converters
4394  will often choke on what seem to be quite simple constructs; complex ones
4395  can throw them completely, and as of this writing, for example, the 
4396 \emph on
4397 Embedded Objects
4398 \emph default
4399  manual will not export with 
4400 \begin_inset Flex Code
4401 status collapsed
4402
4403 \begin_layout Plain Layout
4404 htlatex
4405 \end_layout
4406
4407 \end_inset
4408
4409 , though the others will.
4410  The other issue concerns how math is handled.
4411  These converters typically convert the formulae into little pictures that
4412  are then linked from the HTML document.
4413  Since these are actually generated by LaTeX, they are accurate.
4414  But they do not scale well, and just getting them to look as if they are
4415  actually meant to be in your document---so that the font sizes seem to
4416  be roughly the same---can be a challenge.
4417 \end_layout
4418
4419 \begin_layout Standard
4420 Alex Fernandez's 
4421 \begin_inset Flex Code
4422 status collapsed
4423
4424 \begin_layout Plain Layout
4425 eLyXer
4426 \end_layout
4427
4428 \end_inset
4429
4430  (
4431 \begin_inset CommandInset href
4432 LatexCommand href
4433 name "http://elyxer.nongnu.org/"
4434 target "http://elyxer.nongnu.org/"
4435
4436 \end_inset
4437
4438 ) solves some of these problems.
4439  In particular, the formulae it produces scale perfectly, since it renders
4440  math using a combination of HTML and CSS rather than converting the formulae
4441  to images.
4442  But even moderately complex formula are rendered less well than with 
4443 \begin_inset Flex Code
4444 status collapsed
4445
4446 \begin_layout Plain Layout
4447 htlatex
4448 \end_layout
4449
4450 \end_inset
4451
4452 ; this reflects the limitations of HTML.
4453 \begin_inset Foot
4454 status collapsed
4455
4456 \begin_layout Plain Layout
4457 That said, 
4458 \begin_inset Flex Code
4459 status collapsed
4460
4461 \begin_layout Plain Layout
4462 eLyXer
4463 \end_layout
4464
4465 \end_inset
4466
4467  can also use jsMath and MathJax for equations, but this setting is only
4468  available globally and requires one to have access to a server that runs
4469  the backend.
4470 \end_layout
4471
4472 \end_inset
4473
4474  More importantly (as of version 1.1.1, at least), 
4475 \begin_inset Flex Code
4476 status collapsed
4477
4478 \begin_layout Plain Layout
4479 eLyXer
4480 \end_layout
4481
4482 \end_inset
4483
4484  has limited support for math macros and no support for user-defined paragraph
4485  or character styles.
4486  These limitations make 
4487 \begin_inset Flex Code
4488 status collapsed
4489
4490 \begin_layout Plain Layout
4491 eLyXer
4492 \end_layout
4493
4494 \end_inset
4495
4496  unsuitable for many of the documents LyX users produce.
4497  In principle, of course, these problems could be solved, but the LyX developers
4498  have decided to follow a different path and have made LyX itself capable
4499  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4500  plaintext.
4501 \end_layout
4502
4503 \begin_layout Standard
4504 As of this writing, XHTML output remains under development and should probably
4505  be regarded as 
4506 \begin_inset Quotes eld
4507 \end_inset
4508
4509 experimental
4510 \begin_inset Quotes erd
4511 \end_inset
4512
4513 .
4514 \begin_inset Foot
4515 status collapsed
4516
4517 \begin_layout Plain Layout
4518 The file 
4519 \begin_inset Flex Code
4520 status collapsed
4521
4522 \begin_layout Plain Layout
4523 development/HTML.notes
4524 \end_layout
4525
4526 \end_inset
4527
4528 , which can be found in the LyX source tree or 
4529 \begin_inset CommandInset href
4530 LatexCommand href
4531 name "accessed online"
4532 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4533
4534 \end_inset
4535
4536 , usually contains up-to-date information about the state of XHTML output.
4537  See also the list of XHTML bugs on 
4538 \begin_inset CommandInset href
4539 LatexCommand href
4540 name "the bug tracker"
4541 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"
4542
4543 \end_inset
4544
4545 .
4546 \end_layout
4547
4548 \end_inset
4549
4550  Still, the developers have chosen this approach because it has several
4551  potential advantages over the other two.
4552 \end_layout
4553
4554 \begin_layout Standard
4555 These advantages are primarily due to the fact that the XHTML output routines,
4556  since they are part of LyX, know everything LyX knows about the document
4557  being exported.
4558 \begin_inset Foot
4559 status collapsed
4560
4561 \begin_layout Plain Layout
4562 Another advantage is that, since these routines are internal to LyX, they
4563  are immune to changes in LyX's file format, or to changes in the semantics
4564  of existing insets.
4565 \end_layout
4566
4567 \end_inset
4568
4569  So they know about the table of contents (as displayed in the outline),
4570  about the counters associated with different paragraph styles, and about
4571  user-defined styles.
4572  The XHTML output routines know what LyX knows about internationalization,
4573  too, so they will output 
4574 \begin_inset Quotes eld
4575 \end_inset
4576
4577 Chapter 1
4578 \begin_inset Quotes erd
4579 \end_inset
4580
4581  or 
4582 \begin_inset Quotes eld
4583 \end_inset
4584
4585
4586 \lang ngerman
4587 Kapitel
4588 \lang english
4589  1
4590 \begin_inset Quotes erd
4591 \end_inset
4592
4593 , depending upon the language in effect at the time.
4594  
4595 \end_layout
4596
4597 \begin_layout Standard
4598 Quite generally, the output routines know what LyX knows about document
4599  layout, that is, about how the document is to be rendered on screen.
4600  We use this information when we output the document as XHTML.
4601  In particular, LyX 
4602 \emph on
4603 automatically
4604 \emph default
4605  generates CSS style information corresponding to the layout information
4606  it uses to render the document on screen: if section headings are supposed
4607  to be sans-serif and bold as seen in LyX, then (by default) they will be
4608  sans-serif and bold when viewed in a web browser, too.
4609  And this is true not just for pre-defined styles, like Section, but for
4610  any style, including user-defined styles.
4611  Indeed, the XHTML output routines make no distinction between user-defined
4612  paragraph and character styles and LyX's own pre-defined styles: in each
4613  case, everything LyX knows about the styles is contained in the layout
4614  files.
4615  And much the same is true as regards pre-defined textual insets, such as
4616  footnotes, and various custom insets.
4617  
4618 \end_layout
4619
4620 \begin_layout Standard
4621 The result is that XHTML output can be customized and extended in exactly
4622  the same way LaTeX output can be customized and extended: through layout
4623  files and modules.
4624  See chapter five of the 
4625 \emph on
4626 Customization 
4627 \emph default
4628 manual for the details.
4629 \end_layout
4630
4631 \begin_layout Standard
4632 The remainder of this chapter contains more detailed information on XHTML
4633  output, its limitations, and ways to work around those limitations.
4634 \end_layout
4635
4636 \begin_layout Section
4637 Math Output in XHTML
4638 \end_layout
4639
4640 \begin_layout Standard
4641 LyX offers four choices for how math is rendered.
4642  These have various advantages and disadvantages:
4643 \end_layout
4644
4645 \begin_layout Itemize
4646 MathML
4647 \begin_inset Newline newline
4648 \end_inset
4649
4650 MathML is a dialect of XML designed specifically for mathematics on the
4651  web, and it typically renders very well in browsers that support it.
4652  The disadvantage is that not all browsers support MathML, and support is
4653  not complete even in the Gecko-based browsers, such as Firefox.
4654 \begin_inset Newline newline
4655 \end_inset
4656
4657 If LyX is unable to render a formula as MathML---for example, if the formula
4658  uses the 
4659 \begin_inset Flex Code
4660 status collapsed
4661
4662 \begin_layout Plain Layout
4663 xymatrix
4664 \end_layout
4665
4666 \end_inset
4667
4668  package or ERT---then it will instead output the formula as an image.
4669  
4670 \end_layout
4671
4672 \begin_layout Itemize
4673 HTML
4674 \begin_inset Newline newline
4675 \end_inset
4676
4677 As mentioned above, 
4678 \begin_inset Flex Code
4679 status collapsed
4680
4681 \begin_layout Plain Layout
4682 elyxer
4683 \end_layout
4684
4685 \end_inset
4686
4687  outputs math as HTML, styled by CSS.
4688 \begin_inset Foot
4689 status collapsed
4690
4691 \begin_layout Plain Layout
4692 LyX has borrowed some of the CSS for its HTML output from 
4693 \begin_inset Flex Code
4694 status collapsed
4695
4696 \begin_layout Plain Layout
4697 elyxer
4698 \end_layout
4699
4700 \end_inset
4701
4702 .
4703 \end_layout
4704
4705 \end_inset
4706
4707  For simple formulae, this can work quite well, though with more complicated
4708  formulae it tends to break down.
4709  Still, this method has the advantage that it is very widely supported and
4710  so it may be appropriate for documents that contain only a little, fairly
4711  simple math.
4712 \begin_inset Newline newline
4713 \end_inset
4714
4715 If Lyx is unable to render a formula as HTML---for example, if the formula
4716  uses the 
4717 \begin_inset Flex Code
4718 status collapsed
4719
4720 \begin_layout Plain Layout
4721 xymatrix
4722 \end_layout
4723
4724 \end_inset
4725
4726  package or ERT---then it will instead output the formula as an image.
4727  
4728 \end_layout
4729
4730 \begin_layout Itemize
4731 Images
4732 \begin_inset Newline newline
4733 \end_inset
4734
4735 Like 
4736 \begin_inset Flex Code
4737 status collapsed
4738
4739 \begin_layout Plain Layout
4740 htlatex
4741 \end_layout
4742
4743 \end_inset
4744
4745 , LyX will output formulae as images, the very same images, in fact, that
4746  are used for instant preview.
4747 \begin_inset Foot
4748 status collapsed
4749
4750 \begin_layout Plain Layout
4751 Instant preview does 
4752 \emph on
4753 not 
4754 \emph default
4755 have to be on for images to be output, however.
4756 \end_layout
4757
4758 \end_inset
4759
4760  The advantage to this method is that the images are simply generated by
4761  LaTeX, so they are very accurate.
4762  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4763  so they do not scale terribly well, and one cannot copy them, etc.
4764  (As of this writing, there are also problems about equation numbering.
4765  See 
4766 \begin_inset CommandInset href
4767 LatexCommand href
4768 name "bug 6894"
4769 target "http://www.lyx.org/trac/ticket/6894"
4770
4771 \end_inset
4772
4773 .)
4774 \begin_inset Newline newline
4775 \end_inset
4776
4777 The size of the images can be controlled by setting the 
4778 \begin_inset Quotes eld
4779 \end_inset
4780
4781 Math Images Scaling
4782 \begin_inset Quotes erd
4783 \end_inset
4784
4785  parameter under 
4786 \begin_inset Flex MenuItem
4787 status collapsed
4788
4789 \begin_layout Plain Layout
4790 Document\SpecialChar \menuseparator
4791 Settings\SpecialChar \menuseparator
4792 Output
4793 \end_layout
4794
4795 \end_inset
4796
4797 .
4798 \begin_inset Foot
4799 status collapsed
4800
4801 \begin_layout Plain Layout
4802 For those who want to know, this controls the resolution of the image in
4803  dots per inch and is based upon a default of 75 dpi.
4804 \end_layout
4805
4806 \end_inset
4807
4808
4809 \begin_inset Newline newline
4810 \end_inset
4811
4812 If LyX for some reason fails to create an image for a formula (e.g., if a
4813  required LaTeX package is not installed), then it will fall back to outputing
4814  the raw LaTeX.
4815 \end_layout
4816
4817 \begin_layout Itemize
4818 LaTeX
4819 \begin_inset Newline newline
4820 \end_inset
4821
4822 Finally, LyX will happily output math as LaTeX.
4823  As well as being the output of last resort, this method can be used with
4824  such tools as 
4825 \begin_inset CommandInset href
4826 LatexCommand href
4827 name "jsMath"
4828 target "http://www.math.union.edu/~dpvc/jsMath/"
4829
4830 \end_inset
4831
4832 , which uses JavaScript to render LaTeX embedded in HTML documents.
4833  LyX wraps the LaTeX in either a 
4834 \begin_inset Flex Code
4835 status collapsed
4836
4837 \begin_layout Plain Layout
4838 span
4839 \end_layout
4840
4841 \end_inset
4842
4843  (for inline formulas) or 
4844 \begin_inset Flex Code
4845 status collapsed
4846
4847 \begin_layout Plain Layout
4848 div
4849 \end_layout
4850
4851 \end_inset
4852
4853  (for displayed formulas) with 
4854 \begin_inset Flex Code
4855 status collapsed
4856
4857 \begin_layout Plain Layout
4858 class='math'
4859 \end_layout
4860
4861 \end_inset
4862
4863 , as is required for jsMath.
4864 \end_layout
4865
4866 \begin_layout Standard
4867 One of these output methods must be selected under 
4868 \begin_inset Flex MenuItem
4869 status collapsed
4870
4871 \begin_layout Plain Layout
4872 Document\SpecialChar \menuseparator
4873 Settings\SpecialChar \menuseparator
4874 Output
4875 \end_layout
4876
4877 \end_inset
4878
4879 .
4880  By default, LyX outputs MathML.
4881  This is a document-wide setting, therefore.
4882 \end_layout
4883
4884 \begin_layout Standard
4885 Eventually, LyX will offer the user the option to select an alternate output
4886  method for a particular inset, say, one that isn't being rendered very
4887  well by MathML.
4888 \begin_inset Foot
4889 status collapsed
4890
4891 \begin_layout Plain Layout
4892 That said, since LyX falls back to images if the inset contains ERT, then
4893  one can force output as an image by putting some harmless ERT into the
4894  math, for example: 
4895 \begin_inset Formula $a=b\relax$
4896 \end_inset
4897
4898 .
4899 \end_layout
4900
4901 \end_inset
4902
4903
4904 \end_layout
4905
4906 \begin_layout Section
4907 Bibliography and Citations
4908 \end_layout
4909
4910 \begin_layout Standard
4911 XHTML output fully supports bibliographies and citations.
4912  
4913 \end_layout
4914
4915 \begin_layout Standard
4916 Citation labels are generated by the same machinery that generates LyX's
4917  on-screen labels, so the labels will look in the output much as they do
4918  in LyX, though better.
4919  If you are using numerical citations, then LyX will output numerical labels,
4920  such as [1] or [17], rather than simply showing the citation key in square
4921  brackets, as it does on-screen.
4922  If you are using author-year citations, then LyX will add lowercase letters
4923  to the years, just as BibTeX does, if it finds more than one citation for
4924  a given author-year combination.
4925  The labels will be printed with the bibliography entries.
4926  Note that there is, at present, no way to customize the appearance of the
4927  labels, for example, to choose between square brackets and parentheses.
4928 \end_layout
4929
4930 \begin_layout Standard
4931 Bibliography output is handled by the same machinery that handles the presentati
4932 on of reference information in the citation dialog, so you will see in the
4933  XHTML output pretty much what you would see if you were to look at a given
4934  entry in the citation dialog.
4935  The formatting can be customized in your layout file or, preferably, in
4936  a module.
4937  See the 
4938 \emph on
4939 Customization
4940 \emph default
4941  manual for the details.
4942 \end_layout
4943
4944 \begin_layout Standard
4945 The main defect at present is that cross-referenced information is printed
4946  with every entry with which it is associated.
4947  So you can see things like this:
4948 \end_layout
4949
4950 \begin_layout Quote
4951 Jason Stanley, 
4952 \begin_inset Quotes eld
4953 \end_inset
4954
4955 Context and Logical Form
4956 \begin_inset Quotes erd
4957 \end_inset
4958
4959 , in 
4960 \emph on
4961 Language in Context: Selected Essays
4962 \emph default
4963  (Oxford: Oxford University Press, 2007), pp.
4964  30--68.
4965 \end_layout
4966
4967 \begin_layout Quote
4968 Jason Stanley, 
4969 \begin_inset Quotes eld
4970 \end_inset
4971
4972 Semantics in Context
4973 \begin_inset Quotes erd
4974 \end_inset
4975
4976 , in 
4977 \emph on
4978 Language in Context: Selected Essays
4979 \emph default
4980  (Oxford: Oxford University Press, 2007), pp.
4981  201--30.
4982 \end_layout
4983
4984 \begin_layout Standard
4985 This should be fixed before long.
4986 \end_layout
4987
4988 \begin_layout Standard
4989 There is no support at present for sectioned bibliographies.
4990  If you have multiple bibliographies, then LyX will print the same bibliography
4991  over and over.
4992 \end_layout
4993
4994 \begin_layout Section
4995 Indexes
4996 \end_layout
4997
4998 \begin_layout Standard
4999 LyX will happily export indexes as XHTML, but with certain limitations at
5000  the moment.
5001 \end_layout
5002
5003 \begin_layout Standard
5004 Index export will be most reliable when you do not attempt to use the fancy
5005  constructs that are described in the section on indexes in the 
5006 \emph on
5007 User's Guide
5008 \emph default
5009 .
5010 \begin_inset Foot
5011 status collapsed
5012
5013 \begin_layout Plain Layout
5014 The main issue here is that LyX itself does not really handle these.
5015  It just lets you enter what you would have to enter in raw LaTeX.
5016 \end_layout
5017
5018 \end_inset
5019
5020  We'll describe how they are handled using the subsection headings from
5021  that section.
5022 \end_layout
5023
5024 \begin_layout Itemize
5025 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5026  these, but the entries must be separated by 
5027 \begin_inset Quotes eld
5028 \end_inset
5029
5030  ! 
5031 \begin_inset Quotes erd
5032 \end_inset
5033
5034 , that is, there must be spaces around the exclamation point.
5035  This is because it is otherwise too difficult to check for escaped exclamation
5036  points, ones in math, and so forth.
5037 \end_layout
5038
5039 \begin_layout Itemize
5040 Page Ranges: There is no support at all for page ranges, since these make
5041  no sense with XHMTL.
5042  Instead, you will just get two index entries, one at either end.
5043 \end_layout
5044
5045 \begin_layout Itemize
5046 Cross-referencing: There is no support for cross-referencing.
5047  If LyX finds an entry containing the 
5048 \begin_inset Quotes eld
5049 \end_inset
5050
5051 |see\SpecialChar \ldots{}
5052
5053 \begin_inset Quotes erd
5054 \end_inset
5055
5056  construct, it is just dropped, and the rest is treated as an ordinary index
5057  entry.
5058 \end_layout
5059
5060 \begin_layout Itemize
5061 Index Entry Order: LyX does support attempts to fix the sorting order.
5062  It will take what is before the first `@' it finds and use that for sorting,
5063  taking what follows the first `@' to be the actual entry.
5064  At present, LyX does not check for escaped `@', so do not try to index
5065  email addresses.
5066 \end_layout
5067
5068 \begin_layout Itemize
5069 Index Entry Layout: You can format entries by using the text style dialog,
5070  or by using any other method available within LyX itself.
5071  There is no support for constructs like: 
5072 \begin_inset Quotes eld
5073 \end_inset
5074
5075 entry|textbf
5076 \begin_inset Quotes erd
5077 \end_inset
5078
5079 .
5080  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5081  and everything that follows it.
5082 \end_layout
5083
5084 \begin_layout Itemize
5085 Multiple Indexes: There is no support for multiple indexes.
5086  Rather, all index entries will be printed as one large index.
5087  To avoid our printing several versions of the index, we print only the
5088  main index, so make sure you have one.
5089 \end_layout
5090
5091 \begin_layout Section
5092 Nomenclature and Glossary
5093 \end_layout
5094
5095 \begin_layout Standard
5096 There is at present no support for glossaries.
5097  Adding it would be fairly trivial, and welcome.
5098 \end_layout
5099
5100 \begin_layout Chapter
5101 The LyX Server
5102 \end_layout
5103
5104 \begin_layout Section
5105 Introduction
5106 \end_layout
5107
5108 \begin_layout Standard
5109 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5110  and retrieve information about the LyX internal state.
5111  This is only intended for advanced users, but they should find it useful.
5112  It is by writing to the LyX server, for example, that bibliography managers,
5113  such as JabRef, are able to 
5114 \begin_inset Quotes eld
5115 \end_inset
5116
5117 push
5118 \begin_inset Quotes erd
5119 \end_inset
5120
5121  citations to LyX.
5122 \end_layout
5123
5124 \begin_layout Section
5125 Starting the LyX Server
5126 \end_layout
5127
5128 \begin_layout Standard
5129 The LyX server works through the use of a pair of named pipes.
5130  These are usually located in 
5131 \begin_inset Flex Code
5132 status collapsed
5133
5134 \begin_layout Plain Layout
5135 UserDir
5136 \end_layout
5137
5138 \end_inset
5139
5140 , (except on Windows, where 
5141 \emph on
5142 local
5143 \emph default
5144  named pipes are special objects located in 
5145 \begin_inset Flex Code
5146 status collapsed
5147
5148 \begin_layout Plain Layout
5149
5150 \backslash
5151
5152 \backslash
5153 .
5154 \backslash
5155 pipe
5156 \end_layout
5157
5158 \end_inset
5159
5160 ) and have the names 
5161 \begin_inset Quotes eld
5162 \end_inset
5163
5164
5165 \begin_inset Flex Code
5166 status collapsed
5167
5168 \begin_layout Plain Layout
5169 lyxpipe.in
5170 \end_layout
5171
5172 \end_inset
5173
5174
5175 \begin_inset Quotes erd
5176 \end_inset
5177
5178  and 
5179 \begin_inset Quotes eld
5180 \end_inset
5181
5182
5183 \begin_inset Flex Code
5184 status collapsed
5185
5186 \begin_layout Plain Layout
5187 lyxpipe.out
5188 \end_layout
5189
5190 \end_inset
5191
5192
5193 \begin_inset Quotes erd
5194 \end_inset
5195
5196 .
5197  External programs write into 
5198 \begin_inset Flex Code
5199 status collapsed
5200
5201 \begin_layout Plain Layout
5202 lyxpipe.in
5203 \end_layout
5204
5205 \end_inset
5206
5207  and read back data from 
5208 \begin_inset Flex Code
5209 status collapsed
5210
5211 \begin_layout Plain Layout
5212 lyxpipe.out
5213 \end_layout
5214
5215 \end_inset
5216
5217 .
5218  The stem of the pipe names can be defined in the 
5219 \begin_inset Flex MenuItem
5220 status collapsed
5221
5222 \begin_layout Plain Layout
5223 Tools\SpecialChar \menuseparator
5224 Preferences
5225 \end_layout
5226
5227 \end_inset
5228
5229  dialog, for example 
5230 \begin_inset Flex Code
5231 status collapsed
5232
5233 \begin_layout Plain Layout
5234 "/home/myhome/lyxpipe"
5235 \end_layout
5236
5237 \end_inset
5238
5239 , or 
5240 \begin_inset Flex Code
5241 status collapsed
5242
5243 \begin_layout Plain Layout
5244 "
5245 \backslash
5246
5247 \backslash
5248 .
5249 \backslash
5250 pipe
5251 \backslash
5252 lyxpipe"
5253 \end_layout
5254
5255 \end_inset
5256
5257  on Windows (but any working path can be used).
5258  You 
5259 \emph on
5260 must
5261 \emph default
5262  configure this manually in order for the server to start.
5263 \end_layout
5264
5265 \begin_layout Standard
5266 LyX will add the '
5267 \begin_inset Flex Code
5268 status collapsed
5269
5270 \begin_layout Plain Layout
5271 .in
5272 \end_layout
5273
5274 \end_inset
5275
5276 ' and '
5277 \begin_inset Flex Code
5278 status collapsed
5279
5280 \begin_layout Plain Layout
5281 .out
5282 \end_layout
5283
5284 \end_inset
5285
5286 ' to create the pipes.
5287  If one of the pipes already exists, LyX will assume that another LyX process
5288  is already running and will not start the server.
5289  On POSIX (Unix like) systems, if for some other reason, an unused 
5290 \begin_inset Quotes eld
5291 \end_inset
5292
5293 stale
5294 \begin_inset Quotes erd
5295 \end_inset
5296
5297  pipe is left in existence when LyX closes, then LyX will try to delete
5298  it.
5299  If this fails for some reason, you will need to delete the pipes manually
5300  and then restart LyX.
5301  On Windows, pipes are deleted by the OS on program termination or crash,
5302  so 
5303 \begin_inset Quotes eld
5304 \end_inset
5305
5306 stale
5307 \begin_inset Quotes erd
5308 \end_inset
5309
5310  pipes should not be possible.
5311 \end_layout
5312
5313 \begin_layout Standard
5314 To have several LyX processes with servers at the same time, you have to
5315  use different configurations, perhaps by using separate user directories,
5316  each with its own 
5317 \begin_inset Flex Code
5318 status collapsed
5319
5320 \begin_layout Plain Layout
5321 preferences
5322 \end_layout
5323
5324 \end_inset
5325
5326  file, for each process.
5327 \end_layout
5328
5329 \begin_layout Standard
5330 If you are developing a client program, you might find it useful to enable
5331  debugging information from the LyX server.
5332  Do this by starting LyX as 
5333 \begin_inset Flex Code
5334 status collapsed
5335
5336 \begin_layout Plain Layout
5337 lyx -dbg lyxserver
5338 \end_layout
5339
5340 \end_inset
5341
5342 .
5343 \end_layout
5344
5345 \begin_layout Standard
5346 You can find a complete example client written in C in the source distribution
5347  as 
5348 \begin_inset Flex Code
5349 status collapsed
5350
5351 \begin_layout Plain Layout
5352 development/lyxserver/server_monitor.c
5353 \end_layout
5354
5355 \end_inset
5356
5357 .
5358 \end_layout
5359
5360 \begin_layout Standard
5361 Another useful tool is command-line based client you will find in 
5362 \begin_inset Flex Code
5363 status collapsed
5364
5365 \begin_layout Plain Layout
5366 src/client/lyxclient
5367 \end_layout
5368
5369 \end_inset
5370
5371 .
5372 \end_layout
5373
5374 \begin_layout Section
5375 Normal communication
5376 \end_layout
5377
5378 \begin_layout Standard
5379 To issue a LyX call, the client writes a line of ASCII text into the input
5380  pipe.
5381  This line has the following format:
5382 \end_layout
5383
5384 \begin_layout Quote
5385 LYXCMD:
5386 \emph on
5387 clientname
5388 \emph default
5389 :
5390 \emph on
5391 function
5392 \emph default
5393 :
5394 \emph on
5395 argument
5396 \end_layout
5397
5398 \begin_layout Description
5399 clientname is a name that the client can choose arbitrarily.
5400  Its only use is that LyX will echo it if it sends an answer—so a client
5401  can dispatch results from different requesters.
5402 \end_layout
5403
5404 \begin_layout Description
5405 function is the function you want LyX to perform.
5406  It is the same as the commands you'd use in the minibuffer.
5407 \end_layout
5408
5409 \begin_layout Description
5410 argument is an optional argument which is meaningful only to some functions
5411  (for instance, the 
5412 \begin_inset Quotes eld
5413 \end_inset
5414
5415 self-insert
5416 \begin_inset Quotes erd
5417 \end_inset
5418
5419  LFUN will insert the argument as text at the cursor position).
5420 \end_layout
5421
5422 \begin_layout Standard
5423 The answer from LyX will arrive in the output pipe and be of the form
5424 \end_layout
5425
5426 \begin_layout Quote
5427 INFO:
5428 \emph on
5429 clientname
5430 \emph default
5431 :
5432 \emph on
5433 function
5434 \emph default
5435 :
5436 \emph on
5437 data
5438 \end_layout
5439
5440 \begin_layout Standard
5441 where 
5442 \emph on
5443 clientname
5444 \emph default
5445  and 
5446 \emph on
5447 function
5448 \emph default
5449  are just echoed from the command request, while 
5450 \emph on
5451 data
5452 \emph default
5453  is more or less useful information filled according to how the command
5454  execution worked out.
5455  Some commands, such as 
5456 \begin_inset Quotes eld
5457 \end_inset
5458
5459 font-state
5460 \begin_inset Quotes erd
5461 \end_inset
5462
5463 , will return information about the internal state of LyX, while other will
5464  return an empty data-response.
5465  This means that the command execution went fine.
5466 \end_layout
5467
5468 \begin_layout Standard
5469 In case of errors, the response from LyX will have this form
5470 \end_layout
5471
5472 \begin_layout Quote
5473 ERROR:
5474 \emph on
5475 clientname
5476 \emph default
5477 :
5478 \emph on
5479 function
5480 \emph default
5481 :
5482 \emph on
5483 error message
5484 \end_layout
5485
5486 \begin_layout Standard
5487 where the 
5488 \emph on
5489 error message
5490 \emph default
5491  should contain an explanation of why the command failed.
5492 \end_layout
5493
5494 \begin_layout Standard
5495 Examples:
5496 \end_layout
5497
5498 \begin_layout LyX-Code
5499 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5500 \begin_inset Newline newline
5501 \end_inset
5502
5503 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5504 \begin_inset Newline newline
5505 \end_inset
5506
5507 read a <~/.lyxpipe.out
5508 \begin_inset Newline newline
5509 \end_inset
5510
5511 echo $a
5512 \end_layout
5513
5514 \begin_layout Section
5515 Notification
5516 \end_layout
5517
5518 \begin_layout Standard
5519 LyX can notify clients of events going on asynchronously.
5520  Currently it will only do this if the user binds a key sequence with the
5521  function 
5522 \begin_inset Quotes eld
5523 \end_inset
5524
5525 notify
5526 \begin_inset Quotes erd
5527 \end_inset
5528
5529 .
5530  The format of the string LyX sends is as follows:
5531 \end_layout
5532
5533 \begin_layout Quote
5534 \begin_inset Flex Code
5535 status collapsed
5536
5537 \begin_layout Plain Layout
5538 NOTIFY:
5539 \end_layout
5540
5541 \end_inset
5542
5543
5544 \emph on
5545 key-sequence
5546 \end_layout
5547
5548 \begin_layout Standard
5549 where 
5550 \emph on
5551 key-sequence
5552 \emph default
5553  is the printed representation of the key sequence that was actually typed
5554  by the user.
5555 \end_layout
5556
5557 \begin_layout Standard
5558 This mechanism can be used to extend LyX's command set and implement macros.
5559  Bind some key sequence to 
5560 \begin_inset Quotes eld
5561 \end_inset
5562
5563 notify
5564 \begin_inset Quotes erd
5565 \end_inset
5566
5567 .
5568  Then start a client that listens on the output pipe, dispatches the command
5569  according to the sequence, and starts a function that may use LyX calls
5570  and LyX requests to issue a command or a series of commands to LyX.
5571 \end_layout
5572
5573 \begin_layout Section
5574 The simple LyX Server Protocol
5575 \end_layout
5576
5577 \begin_layout Standard
5578 LyX implements a simple protocol that can be used for session management.
5579  All messages are of the form
5580 \end_layout
5581
5582 \begin_layout Quote
5583 LYXSRV:
5584 \emph on
5585 clientname
5586 \emph default
5587 :
5588 \emph on
5589 protocol message
5590 \end_layout
5591
5592 \begin_layout Standard
5593 where 
5594 \emph on
5595 protocol message
5596 \emph default
5597  can be 
5598 \begin_inset Quotes eld
5599 \end_inset
5600
5601 hello
5602 \begin_inset Quotes erd
5603 \end_inset
5604
5605  or 
5606 \begin_inset Quotes eld
5607 \end_inset
5608
5609 bye
5610 \begin_inset Quotes erd
5611 \end_inset
5612
5613 .
5614  If 
5615 \begin_inset Quotes eld
5616 \end_inset
5617
5618 hello
5619 \begin_inset Quotes erd
5620 \end_inset
5621
5622  is received from a client, LyX will report back to inform the client that
5623  it's listening to it's messages, while 
5624 \begin_inset Quotes eld
5625 \end_inset
5626
5627 bye
5628 \begin_inset Quotes erd
5629 \end_inset
5630
5631  sent from LyX will inform clients that LyX is closing.
5632 \end_layout
5633
5634 \begin_layout Section
5635 Reverse DVI/PDF search
5636 \end_layout
5637
5638 \begin_layout Standard
5639 Some DVI/PDF viewers
5640 \begin_inset Foot
5641 status collapsed
5642
5643 \begin_layout Plain Layout
5644 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5645  Skim on Mac OSX and SumatraPDF on Windows.
5646 \end_layout
5647
5648 \end_inset
5649
5650  provide 
5651 \emph on
5652 reverse search
5653 \emph default
5654  facility (also called 
5655 \emph on
5656 inverse search
5657 \emph default
5658 ).
5659  This means that you can tell LyX to put the cursor to a specific line in
5660  the document by clicking at the respective position in the DVI/PDF output.
5661  To achieve this, the viewer must be able to communicate with LyX.
5662  This is done via the LyX server either by using the named pipe (
5663 \emph on
5664 lyxpipe
5665 \emph default
5666 ), or the UNIX domain socket (
5667 \emph on
5668 lyxsocket
5669 \emph default
5670 ) that LyX creates in its temporary directory (this is the way the 
5671 \begin_inset Flex Code
5672 status collapsed
5673
5674 \begin_layout Plain Layout
5675 lyxclient
5676 \end_layout
5677
5678 \end_inset
5679
5680  program communicates with LyX).
5681  In some cases, you need a helper script that mediates between the viewer
5682  and LyX, in others, the viewer can communicate with LyX directly.
5683  This depends on the selected viewer and on your operating system.
5684  The same applies to the way viewers need to be configured and the way the
5685  reverse search is actually performed.
5686  In what follows, we will thus describe how to setup reverse search for
5687  specific viewers.
5688  Before we turn to this, though, we will explain what needs to be done generally
5689  to enable reverse search in the DVI/PDF output.
5690 \end_layout
5691
5692 \begin_layout Subsection
5693 Automatic setup
5694 \begin_inset CommandInset label
5695 LatexCommand label
5696 name "sub:rev-search"
5697
5698 \end_inset
5699
5700
5701 \end_layout
5702
5703 \begin_layout Standard
5704 In most cases LyX will do the work for you by enabling the option 
5705 \begin_inset Flex MenuItem
5706 status collapsed
5707
5708 \begin_layout Plain Layout
5709 Synchronize with Output
5710 \end_layout
5711
5712 \end_inset
5713
5714  in the menu 
5715 \begin_inset Flex MenuItem
5716 status collapsed
5717
5718 \begin_layout Plain Layout
5719 Document\SpecialChar \menuseparator
5720 Settings\SpecialChar \menuseparator
5721 Output
5722 \end_layout
5723
5724 \end_inset
5725
5726 .
5727  In such a case LyX will automatically insert the necessary SyncTeX macro
5728  (for PDF) or load the srcltx package (for DVI) respectively.
5729  This option can be easily reached also on 
5730 \begin_inset Flex Code
5731 status collapsed
5732
5733 \begin_layout Plain Layout
5734 View/Update
5735 \end_layout
5736
5737 \end_inset
5738
5739  Toolbar.
5740 \end_layout
5741
5742 \begin_layout Standard
5743 If you need a different setting, you can select or input a custom macro
5744  from the drop down box just below 
5745 \begin_inset Flex MenuItem
5746 status collapsed
5747
5748 \begin_layout Plain Layout
5749 Document\SpecialChar \menuseparator
5750 Settings\SpecialChar \menuseparator
5751 Output\SpecialChar \menuseparator
5752 Synchronize with Output
5753 \end_layout
5754
5755 \end_inset
5756
5757 .
5758 \end_layout
5759
5760 \begin_layout Standard
5761 Note that the method 
5762 \begin_inset Flex Code
5763 status collapsed
5764
5765 \begin_layout Plain Layout
5766
5767 \backslash
5768 synctex=1
5769 \end_layout
5770
5771 \end_inset
5772
5773  enables gzip compression.
5774  If your viewer does not support it, you should instead use 
5775 \begin_inset Flex Code
5776 status collapsed
5777
5778 \begin_layout Plain Layout
5779
5780 \backslash
5781 synctex=-1
5782 \end_layout
5783
5784 \end_inset
5785
5786 .
5787 \end_layout
5788
5789 \begin_layout Standard
5790 Please aöso note that including the 
5791 \begin_inset Flex Code
5792 status collapsed
5793
5794 \begin_layout Plain Layout
5795 srcltx
5796 \end_layout
5797
5798 \end_inset
5799
5800  package or 
5801 \begin_inset Flex Code
5802 status collapsed
5803
5804 \begin_layout Plain Layout
5805 src-specials
5806 \end_layout
5807
5808 \end_inset
5809
5810  sometimes has an undesired impact on the typesetting.
5811  Thus, you should switch output synchronization off for the final typesetting
5812  if you use the 
5813 \begin_inset Flex Code
5814 status collapsed
5815
5816 \begin_layout Plain Layout
5817 srcltx
5818 \end_layout
5819
5820 \end_inset
5821
5822  package or 
5823 \begin_inset Flex Code
5824 status collapsed
5825
5826 \begin_layout Plain Layout
5827 src-specials
5828 \end_layout
5829
5830 \end_inset
5831
5832 .
5833  
5834 \end_layout
5835
5836 \begin_layout Standard
5837 In case you need some more special settings that are not covered by the
5838  automatic settings, read the next section about how to set up output synchroniz
5839 ation manually.
5840  If the automatic setup suits your needs, you can readily jump to section
5841 \begin_inset space ~
5842 \end_inset
5843
5844
5845 \begin_inset CommandInset ref
5846 LatexCommand ref
5847 reference "sub:configuring-viewers"
5848
5849 \end_inset
5850
5851 , where the necessary configuration steps in your viewer -- needed both
5852  with the automatic and the manual setup -- are described.
5853 \end_layout
5854
5855 \begin_layout Subsection
5856 Manual setup
5857 \end_layout
5858
5859 \begin_layout Standard
5860 LaTeX provides several different methods for reverse search.
5861  Some are built-in in the 
5862 \begin_inset Flex Code
5863 status collapsed
5864
5865 \begin_layout Plain Layout
5866 latex/pdflatex
5867 \end_layout
5868
5869 \end_inset
5870
5871  program, some are provided by external packages.
5872  Your choice depends on whether your LaTeX distribution already provides
5873  a given method (the built-in methods are rather new) and whether your viewer
5874  can cope with it.
5875  The available methods are described in the following.
5876 \end_layout
5877
5878 \begin_layout Subsubsection*
5879 Built-in DVI-search via src-specials (DVI only) 
5880 \end_layout
5881
5882 \begin_layout Standard
5883 This method provides the DVI file with the necessary information for reverse
5884  search.
5885  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5886  distribution should include it), and it works reliably.
5887  To enable it, change the 
5888 \begin_inset Flex MenuItem
5889 status collapsed
5890
5891 \begin_layout Plain Layout
5892 LaT
5893 \begin_inset ERT
5894 status collapsed
5895
5896 \begin_layout Plain Layout
5897
5898 {}
5899 \end_layout
5900
5901 \end_inset
5902
5903 eX (plain)->DVI
5904 \end_layout
5905
5906 \end_inset
5907
5908  or 
5909 \begin_inset Flex MenuItem
5910 status collapsed
5911
5912 \begin_layout Plain Layout
5913 LaT
5914 \begin_inset ERT
5915 status collapsed
5916
5917 \begin_layout Plain Layout
5918
5919 {}
5920 \end_layout
5921
5922 \end_inset
5923
5924 eX (plain)->DraftDVI
5925 \end_layout
5926
5927 \end_inset
5928
5929  converter in 
5930 \begin_inset Flex MenuItem
5931 status collapsed
5932
5933 \begin_layout Plain Layout
5934 Preferences\SpecialChar \menuseparator
5935 File Handling\SpecialChar \menuseparator
5936 Converters
5937 \end_layout
5938
5939 \end_inset
5940
5941  to 
5942 \begin_inset Flex Code
5943 status collapsed
5944
5945 \begin_layout Plain Layout
5946 latex -src-specials $$i
5947 \end_layout
5948
5949 \end_inset
5950
5951 .
5952  If this doesn't work, check if your TeX engine needs different options
5953  (the syntax might differ in some distributions).
5954 \end_layout
5955
5956 \begin_layout Subsubsection*
5957 External Packages (PDFSync and scrltx) 
5958 \end_layout
5959
5960 \begin_layout Standard
5961 The packages 
5962 \emph on
5963 pdfsync
5964 \emph default
5965  and 
5966 \emph on
5967 scrltx
5968 \emph default
5969  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5970  respectively.
5971  In order to enable it, load the packages in the LyX preamble: 
5972 \end_layout
5973
5974 \begin_layout Itemize
5975 \begin_inset Flex Code
5976 status collapsed
5977
5978 \begin_layout Plain Layout
5979
5980 \backslash
5981 usepackage{pdfsync}
5982 \end_layout
5983
5984 \end_inset
5985
5986  for reverse PDF search,
5987 \end_layout
5988
5989 \begin_layout Itemize
5990 \begin_inset Flex Code
5991 status collapsed
5992
5993 \begin_layout Plain Layout
5994
5995 \backslash
5996 usepackage[active]{srcltx}
5997 \end_layout
5998
5999 \end_inset
6000
6001  for reverse DVI search.
6002 \end_layout
6003
6004 \begin_layout Standard
6005 If you want to be able to perform both DVI and PDF reverse searches, you
6006  can also insert in the preamble the following lines
6007 \end_layout
6008
6009 \begin_layout LyX-Code
6010
6011 \backslash
6012 usepackage{ifpdf}
6013 \begin_inset Newline newline
6014 \end_inset
6015
6016
6017 \backslash
6018 ifpdf
6019 \begin_inset Newline newline
6020 \end_inset
6021
6022   
6023 \backslash
6024 usepackage{pdfsync}
6025 \begin_inset Newline newline
6026 \end_inset
6027
6028
6029 \backslash
6030 else
6031 \begin_inset Newline newline
6032 \end_inset
6033
6034   
6035 \backslash
6036 usepackage[active]{srcltx}
6037 \begin_inset Newline newline
6038 \end_inset
6039
6040
6041 \backslash
6042 fi
6043 \end_layout
6044
6045 \begin_layout Standard
6046 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6047  right package will be used.
6048 \end_layout
6049
6050 \begin_layout Standard
6051 Note that PDFSync might affect the output layout of your document.
6052  It is therefore advised to disable PDFsync for final documents.
6053 \end_layout
6054
6055 \begin_layout Subsubsection*
6056 Built-in reverse search via SyncTeX (DVI and PDF) 
6057 \end_layout
6058
6059 \begin_layout Standard
6060 Recent versions of 
6061 \begin_inset Flex Code
6062 status collapsed
6063
6064 \begin_layout Plain Layout
6065 (pdf)latex
6066 \end_layout
6067
6068 \end_inset
6069
6070  have built-in support for both PDF and DVI reverse search.
6071  This so-called 
6072 \emph on
6073 SyncTeX
6074 \emph default
6075  facility is basically the result of the integration of the PDFSync package
6076  to the pdftex program and its merge with the 
6077 \emph on
6078 scr-specials
6079 \emph default
6080  approach.
6081  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6082  to use it.
6083  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6084  already provide SyncTeX support.
6085 \end_layout
6086
6087 \begin_layout Standard
6088 To enable SyncTeX for DVI output, change the 
6089 \begin_inset Flex MenuItem
6090 status collapsed
6091
6092 \begin_layout Plain Layout
6093 LaT
6094 \begin_inset ERT
6095 status collapsed
6096
6097 \begin_layout Plain Layout
6098
6099 {}
6100 \end_layout
6101
6102 \end_inset
6103
6104 eX (plain) -> DVI
6105 \end_layout
6106
6107 \end_inset
6108
6109  or 
6110 \begin_inset Flex MenuItem
6111 status collapsed
6112
6113 \begin_layout Plain Layout
6114 LaT
6115 \begin_inset ERT
6116 status collapsed
6117
6118 \begin_layout Plain Layout
6119
6120 {}
6121 \end_layout
6122
6123 \end_inset
6124
6125 eX (plain) -> DraftDVI
6126 \end_layout
6127
6128 \end_inset
6129
6130  converter in 
6131 \begin_inset Flex MenuItem
6132 status collapsed
6133
6134 \begin_layout Plain Layout
6135 Preferences\SpecialChar \menuseparator
6136 File Handling\SpecialChar \menuseparator
6137 Converters
6138 \end_layout
6139
6140 \end_inset
6141
6142  to 
6143 \begin_inset Flex Code
6144 status collapsed
6145
6146 \begin_layout Plain Layout
6147 latex -synctex=1 $$i
6148 \end_layout
6149
6150 \end_inset
6151
6152 , and for PDF output, change the 
6153 \begin_inset Flex MenuItem
6154 status collapsed
6155
6156 \begin_layout Plain Layout
6157 LaT
6158 \begin_inset ERT
6159 status collapsed
6160
6161 \begin_layout Plain Layout
6162
6163 {}
6164 \end_layout
6165
6166 \end_inset
6167
6168 eX (pdflatex) -> PDF (pdflatex)
6169 \end_layout
6170
6171 \end_inset
6172
6173  or converter to 
6174 \begin_inset Flex Code
6175 status collapsed
6176
6177 \begin_layout Plain Layout
6178 pdflatex -synctex=1 $$i
6179 \end_layout
6180
6181 \end_inset
6182
6183 .
6184  Check the documentation of your viewer whether the viewer needs to be configure
6185 d for the use with SyncTeX.
6186 \begin_inset Foot
6187 status collapsed
6188
6189 \begin_layout Plain Layout
6190 Note that the option 
6191 \begin_inset Flex Code
6192 status collapsed
6193
6194 \begin_layout Plain Layout
6195 -synctex=1
6196 \end_layout
6197
6198 \end_inset
6199
6200  option enables gzip compression.
6201  If your viewer does not support it, you should instead use 
6202 \begin_inset Flex Code
6203 status collapsed
6204
6205 \begin_layout Plain Layout
6206 -synctex=-1
6207 \end_layout
6208
6209 \end_inset
6210
6211 .
6212 \end_layout
6213
6214 \end_inset
6215
6216
6217 \end_layout
6218
6219 \begin_layout Subsection
6220 Configuring and using specific viewers
6221 \begin_inset CommandInset label
6222 LatexCommand label
6223 name "sub:configuring-viewers"
6224
6225 \end_inset
6226
6227
6228 \end_layout
6229
6230 \begin_layout Subsubsection*
6231 Xdvi (all platforms)
6232 \end_layout
6233
6234 \begin_layout Standard
6235 If you use 
6236 \begin_inset Flex Code
6237 status collapsed
6238
6239 \begin_layout Plain Layout
6240 xdvi
6241 \end_layout
6242
6243 \end_inset
6244
6245 , you don't need to do anything else for performing a reverse DVI search,
6246  as LyX already provides the necessary hooks for automatically using the
6247  
6248 \begin_inset Flex Code
6249 status collapsed
6250
6251 \begin_layout Plain Layout
6252 lyxclient
6253 \end_layout
6254
6255 \end_inset
6256
6257  program.
6258  Just setup your document as described above (reverse search is triggered
6259  by Ctrl-click or Alt-click on Mac OSX, respectively).
6260 \end_layout
6261
6262 \begin_layout Standard
6263 However, if for whatever reason you want to use the named pipe instead of
6264  the socket for communicating with LyX, simply change the DVI viewer in
6265  
6266 \begin_inset Flex MenuItem
6267 status collapsed
6268
6269 \begin_layout Plain Layout
6270 Preferences\SpecialChar \menuseparator
6271 File Handling\SpecialChar \menuseparator
6272 File formats
6273 \end_layout
6274
6275 \end_inset
6276
6277  to
6278 \begin_inset Foot
6279 status collapsed
6280
6281 \begin_layout Plain Layout
6282 On Mac OSX you have to use 
6283 \begin_inset Flex Code
6284 status collapsed
6285
6286 \begin_layout Plain Layout
6287 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6288 \end_layout
6289
6290 \end_inset
6291
6292
6293 \end_layout
6294
6295 \end_inset
6296
6297  
6298 \begin_inset Flex Code
6299 status collapsed
6300
6301 \begin_layout Plain Layout
6302 xdvi -editor 'lyxeditor.sh %f %l'
6303 \end_layout
6304
6305 \end_inset
6306
6307 , where 
6308 \begin_inset Flex Code
6309 status collapsed
6310
6311 \begin_layout Plain Layout
6312 lyxeditor.sh
6313 \end_layout
6314
6315 \end_inset
6316
6317  is a suitable script.
6318  For example, a minimal shell script is the following one:
6319 \end_layout
6320
6321 \begin_layout LyX-Code
6322 #!/bin/sh
6323 \begin_inset Newline newline
6324 \end_inset
6325
6326 LYXPIPE="/path/to/lyxpipe"
6327 \begin_inset Newline newline
6328 \end_inset
6329
6330 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6331 \begin_inset Newline newline
6332 \end_inset
6333
6334 echo "$COMMAND" > "${LYXPIPE}".in || exit
6335 \begin_inset Newline newline
6336 \end_inset
6337
6338 read < "${LYXPIPE}".out || exit
6339 \end_layout
6340
6341 \begin_layout Standard
6342 where 
6343 \begin_inset Flex Code
6344 status collapsed
6345
6346 \begin_layout Plain Layout
6347 /path/to/lyxpipe
6348 \end_layout
6349
6350 \end_inset
6351
6352  is the Ly
6353 \begin_inset ERT
6354 status collapsed
6355
6356 \begin_layout Plain Layout
6357
6358 {}
6359 \end_layout
6360
6361 \end_inset
6362
6363 XServer pipe path specified in 
6364 \begin_inset Flex MenuItem
6365 status collapsed
6366
6367 \begin_layout Plain Layout
6368 Preferences\SpecialChar \menuseparator
6369 Paths
6370 \end_layout
6371
6372 \end_inset
6373
6374 .
6375 \begin_inset Foot
6376 status collapsed
6377
6378 \begin_layout Plain Layout
6379 In the 
6380 \begin_inset Flex Code
6381 status collapsed
6382
6383 \begin_layout Plain Layout
6384 development/tools
6385 \end_layout
6386
6387 \end_inset
6388
6389  folder of a source distribution you can find a 
6390 \begin_inset Flex Code
6391 status collapsed
6392
6393 \begin_layout Plain Layout
6394 lyxeditor
6395 \end_layout
6396
6397 \end_inset
6398
6399  script which is able to locate the 
6400 \emph on
6401 lyxpipe
6402 \emph default
6403  based on your preferences.
6404 \end_layout
6405
6406 \end_inset
6407
6408
6409 \end_layout
6410
6411 \begin_layout Subsubsection*
6412 MacDviX (Mac OSX)
6413 \end_layout
6414
6415 \begin_layout Standard
6416 At the end of 
6417 \begin_inset Flex Code
6418 status collapsed
6419
6420 \begin_layout Plain Layout
6421 /Applications/MacDviX_Folder/calleditor.script
6422 \end_layout
6423
6424 \end_inset
6425
6426 , add the following lines:
6427 \end_layout
6428
6429 \begin_layout LyX-Code
6430 /Applications/Ly
6431 \begin_inset ERT
6432 status collapsed
6433
6434 \begin_layout Plain Layout
6435
6436 {}
6437 \end_layout
6438
6439 \end_inset
6440
6441 X.app/Contents/MacOS/lyxeditor "$2" $1
6442 \begin_inset Newline newline
6443 \end_inset
6444
6445 exit 1
6446 \end_layout
6447
6448 \begin_layout Standard
6449 Modify the lines accordingly if you install LyX somewhere else than in the
6450  Applications folder.
6451 \end_layout
6452
6453 \begin_layout Standard
6454 Reverse search is triggered by Alt-click (OPTION-click).
6455 \end_layout
6456
6457 \begin_layout Subsubsection*
6458 Skim (Mac OSX)
6459 \end_layout
6460
6461 \begin_layout Standard
6462 Enter 
6463 \begin_inset Flex Code
6464 status collapsed
6465
6466 \begin_layout Plain Layout
6467 open -a Skim.app $$i
6468 \end_layout
6469
6470 \end_inset
6471
6472  to the viewer setting in 
6473 \begin_inset Flex MenuItem
6474 status collapsed
6475
6476 \begin_layout Plain Layout
6477 Preferences\SpecialChar \menuseparator
6478 File Handling\SpecialChar \menuseparator
6479 File formats\SpecialChar \menuseparator
6480 PDF (pdflatex)
6481 \end_layout
6482
6483 \end_inset
6484
6485 , and then in 
6486 \begin_inset Flex MenuItem
6487 status collapsed
6488
6489 \begin_layout Plain Layout
6490 Skim\SpecialChar \menuseparator
6491 Preferences\SpecialChar \menuseparator
6492 Sync
6493 \end_layout
6494
6495 \end_inset
6496
6497  select Ly
6498 \begin_inset ERT
6499 status collapsed
6500
6501 \begin_layout Plain Layout
6502
6503 {}
6504 \end_layout
6505
6506 \end_inset
6507
6508 X.
6509 \end_layout
6510
6511 \begin_layout Standard
6512 Reverse search is triggered by COMMAND-SHIFT-click
6513 \end_layout
6514
6515 \begin_layout Subsubsection*
6516 Okular (KDE)
6517 \end_layout
6518
6519 \begin_layout Standard
6520 Go to 
6521 \begin_inset Flex MenuItem
6522 status collapsed
6523
6524 \begin_layout Plain Layout
6525 Settings\SpecialChar \menuseparator
6526 Configure Okular\SpecialChar \ldots{}
6527 \SpecialChar \menuseparator
6528 Editor
6529 \end_layout
6530
6531 \end_inset
6532
6533 , select 
6534 \begin_inset Quotes eld
6535 \end_inset
6536
6537 Custom Text Editor
6538 \begin_inset Quotes erd
6539 \end_inset
6540
6541  and add the command 
6542 \begin_inset Flex Code
6543 status collapsed
6544
6545 \begin_layout Plain Layout
6546 lyxclient -g %f %l
6547 \end_layout
6548
6549 \end_inset
6550
6551 .
6552 \end_layout
6553
6554 \begin_layout Standard
6555 Reverse search is triggered by SHIFT-click.
6556 \end_layout
6557
6558 \begin_layout Subsubsection*
6559 YAP (Windows)
6560 \end_layout
6561
6562 \begin_layout Standard
6563 Launch yap, choose its 
6564 \begin_inset Flex MenuItem
6565 status collapsed
6566
6567 \begin_layout Plain Layout
6568 View\SpecialChar \menuseparator
6569 Options
6570 \end_layout
6571
6572 \end_inset
6573
6574  menu and select the 
6575 \begin_inset Quotes eld
6576 \end_inset
6577
6578 Inverse DVI Search
6579 \begin_inset Quotes erd
6580 \end_inset
6581
6582  tab.
6583  Click on the 
6584 \begin_inset Quotes eld
6585 \end_inset
6586
6587 New\SpecialChar \ldots{}
6588
6589 \begin_inset Quotes erd
6590 \end_inset
6591
6592  button and, in the window that opens, enter 
6593 \begin_inset Quotes eld
6594 \end_inset
6595
6596 LyX Editor
6597 \begin_inset Quotes erd
6598 \end_inset
6599
6600  (or any other name you like) in the 
6601 \begin_inset Quotes eld
6602 \end_inset
6603
6604 Name:
6605 \begin_inset Quotes erd
6606 \end_inset
6607
6608  field.
6609  Now click on the button labeled 
6610 \begin_inset Quotes eld
6611 \end_inset
6612
6613 \SpecialChar \ldots{}
6614
6615 \begin_inset Quotes erd
6616 \end_inset
6617
6618  to open a file dialog and navigate to the directory containing the batch
6619  file 
6620 \begin_inset Flex Code
6621 status collapsed
6622
6623 \begin_layout Plain Layout
6624 lyxeditor.bat
6625 \end_layout
6626
6627 \end_inset
6628
6629  (see below).
6630  Select 
6631 \begin_inset Flex Code
6632 status collapsed
6633
6634 \begin_layout Plain Layout
6635 lyxeditor.bat
6636 \end_layout
6637
6638 \end_inset
6639
6640  and then specify the program arguments as 
6641 \begin_inset Flex Code
6642 status collapsed
6643
6644 \begin_layout Plain Layout
6645 %f %l
6646 \end_layout
6647
6648 \end_inset
6649
6650 .
6651  The 
6652 \begin_inset Flex Code
6653 status collapsed
6654
6655 \begin_layout Plain Layout
6656 lyxeditor.bat
6657 \end_layout
6658
6659 \end_inset
6660
6661  wrapper is used for communicating with LyX through the 
6662 \emph on
6663 lyxpipe
6664 \emph default
6665  and is as follows:
6666 \end_layout
6667
6668 \begin_layout LyX-Code
6669 @echo off
6670 \begin_inset Newline newline
6671 \end_inset
6672
6673 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6674 \backslash
6675
6676 \backslash
6677 .
6678 \backslash
6679 pipe
6680 \backslash
6681 lyxpipe.in
6682 \begin_inset Newline newline
6683 \end_inset
6684
6685 type 
6686 \backslash
6687
6688 \backslash
6689 .
6690 \backslash
6691 pipe
6692 \backslash
6693 lyxpipe.out
6694 \end_layout
6695
6696 \begin_layout Standard
6697 Make sure that the LyXServer pipe path you specified in LyX is 
6698 \begin_inset Flex Code
6699 status collapsed
6700
6701 \begin_layout Plain Layout
6702
6703 \backslash
6704
6705 \backslash
6706 .
6707 \backslash
6708 pipe
6709 \backslash
6710 lyxpipe
6711 \end_layout
6712
6713 \end_inset
6714
6715 , otherwise change the 
6716 \begin_inset Flex Code
6717 status collapsed
6718
6719 \begin_layout Plain Layout
6720 lyxeditor.bat
6721 \end_layout
6722
6723 \end_inset
6724
6725  wrapper accordingly.
6726 \end_layout
6727
6728 \begin_layout Standard
6729 In yap, reverse search is triggered by double-click.
6730 \end_layout
6731
6732 \begin_layout Subsubsection*
6733 SumatraPDF (Windows)
6734 \end_layout
6735
6736 \begin_layout Standard
6737 In order to use SumatraPDF for inverse search, enter 
6738 \begin_inset Flex Code
6739 status collapsed
6740
6741 \begin_layout Plain Layout
6742 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6743 \end_layout
6744
6745 \end_inset
6746
6747  in the viewer setting in 
6748 \begin_inset Flex MenuItem
6749 status collapsed
6750
6751 \begin_layout Plain Layout
6752 Preferences\SpecialChar \menuseparator
6753 File Handling\SpecialChar \menuseparator
6754 File formats\SpecialChar \menuseparator
6755 PDF (pdflatex)
6756 \end_layout
6757
6758 \end_inset
6759
6760 , where 
6761 \begin_inset Flex Code
6762 status collapsed
6763
6764 \begin_layout Plain Layout
6765 lyxeditor.bat
6766 \end_layout
6767
6768 \end_inset
6769
6770  is the previous wrapper.
6771  If SumatraPDF.exe is not in your command PATH, use its full file name.
6772 \end_layout
6773
6774 \begin_layout Standard
6775 Reverse search is triggered by double-click.
6776 \end_layout
6777
6778 \begin_layout Subsubsection*
6779 YAP (Cygwin)
6780 \end_layout
6781
6782 \begin_layout Standard
6783 First of all, make sure that yap is your default DVI viewer in the Windows
6784  environment, then launch it, choose its 
6785 \begin_inset Flex MenuItem
6786 status collapsed
6787
6788 \begin_layout Plain Layout
6789 View\SpecialChar \menuseparator
6790 Options
6791 \end_layout
6792
6793 \end_inset
6794
6795  menu and select the 
6796 \begin_inset Quotes eld
6797 \end_inset
6798
6799 Inverse DVI Search
6800 \begin_inset Quotes erd
6801 \end_inset
6802
6803  tab.
6804  Click on the 
6805 \begin_inset Quotes eld
6806 \end_inset
6807
6808 New\SpecialChar \ldots{}
6809
6810 \begin_inset Quotes erd
6811 \end_inset
6812
6813  button and, in the window that opens, enter 
6814 \begin_inset Quotes eld
6815 \end_inset
6816
6817 LyX Editor
6818 \begin_inset Quotes erd
6819 \end_inset
6820
6821  (or any other name you like) in the 
6822 \begin_inset Quotes eld
6823 \end_inset
6824
6825 Name:
6826 \begin_inset Quotes erd
6827 \end_inset
6828
6829  field.
6830  Now click on the button labeled 
6831 \begin_inset Quotes eld
6832 \end_inset
6833
6834 \SpecialChar \ldots{}
6835
6836 \begin_inset Quotes erd
6837 \end_inset
6838
6839  to open a file dialog and navigate to the directory containing the 
6840 \begin_inset Flex Code
6841 status collapsed
6842
6843 \begin_layout Plain Layout
6844 lyxeditor.exe
6845 \end_layout
6846
6847 \end_inset
6848
6849  program (which is installed by default on Cygwin along with the LyX executable).
6850  Select 
6851 \begin_inset Flex Code
6852 status collapsed
6853
6854 \begin_layout Plain Layout
6855 lyxeditor.exe
6856 \end_layout
6857
6858 \end_inset
6859
6860  and then specify the program arguments as 
6861 \begin_inset Flex Code
6862 status collapsed
6863
6864 \begin_layout Plain Layout
6865 -g %f %l
6866 \end_layout
6867
6868 \end_inset
6869
6870 .
6871  In this way, you will be using the 
6872 \emph on
6873 lyxsocket
6874 \emph default
6875  for communicating with LyX.
6876  If, for whatever reason, you want to use the 
6877 \emph on
6878 lyxpipe
6879 \emph default
6880 , omit the 
6881 \begin_inset Flex Code
6882 status collapsed
6883
6884 \begin_layout Plain Layout
6885 -g
6886 \end_layout
6887
6888 \end_inset
6889
6890  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6891 \end_layout
6892
6893 \begin_layout Standard
6894 In yap, reverse search is triggered by double-click.
6895 \end_layout
6896
6897 \begin_layout Subsubsection*
6898 SumatraPDF (Cygwin)
6899 \end_layout
6900
6901 \begin_layout Standard
6902 In order to use SumatraPDF for inverse search, enter 
6903 \begin_inset Flex Code
6904 status collapsed
6905
6906 \begin_layout Plain Layout
6907 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6908 \end_layout
6909
6910 \end_inset
6911
6912  in the viewer setting in 
6913 \begin_inset Flex MenuItem
6914 status collapsed
6915
6916 \begin_layout Plain Layout
6917 Preferences\SpecialChar \menuseparator
6918 File Handling\SpecialChar \menuseparator
6919 File formats\SpecialChar \menuseparator
6920 PDF (pdflatex)
6921 \end_layout
6922
6923 \end_inset
6924
6925 .
6926  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6927  The 
6928 \begin_inset Flex Code
6929 status collapsed
6930
6931 \begin_layout Plain Layout
6932 -g
6933 \end_layout
6934
6935 \end_inset
6936
6937  enables communication via the 
6938 \emph on
6939 lyxsocket
6940 \emph default
6941 .
6942  Again, omit the 
6943 \begin_inset Flex Code
6944 status collapsed
6945
6946 \begin_layout Plain Layout
6947 -g
6948 \end_layout
6949
6950 \end_inset
6951
6952  option if you want to use the 
6953 \emph on
6954 lyxpipe
6955 \emph default
6956 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6957 \end_layout
6958
6959 \begin_layout Standard
6960 Reverse search is triggered by double-click.
6961 \end_layout
6962
6963 \begin_layout Section
6964 Forward search
6965 \end_layout
6966
6967 \begin_layout Standard
6968 Forward search is, as the name implies, in a sense the 
6969 \begin_inset Quotes eld
6970 \end_inset
6971
6972 opposite
6973 \begin_inset Quotes erd
6974 \end_inset
6975
6976  to reverse search.
6977  It allows you to let the viewer jump to a given position from within LyX.
6978  If forward search is set up (as described in what follows), you can put
6979  the cursor anywhere in your LyX document, and hit 
6980 \begin_inset Flex MenuItem
6981 status collapsed
6982
6983 \begin_layout Plain Layout
6984 Navigate\SpecialChar \menuseparator
6985 Forward search
6986 \end_layout
6987
6988 \end_inset
6989
6990  (or select 
6991 \begin_inset Flex MenuItem
6992 status collapsed
6993
6994 \begin_layout Plain Layout
6995 Forward search
6996 \end_layout
6997
6998 \end_inset
6999
7000  in the context menu via right mouse click), and then the viewer will jump
7001  to that position as well.
7002  This implies, of course, that your viewer supports this function.
7003 \end_layout
7004
7005 \begin_layout Standard
7006 To make forward search possible, you first need to provide the generated
7007  output PDF/DVI file with additional information about the TeX sources.
7008  This can be done via the methods described in the section 
7009 \begin_inset CommandInset ref
7010 LatexCommand ref
7011 reference "sub:rev-search"
7012
7013 \end_inset
7014
7015 .
7016 \end_layout
7017
7018 \begin_layout Standard
7019 Additionally, you need to configure LyX for using your viewers in 
7020 \begin_inset Flex MenuItem
7021 status collapsed
7022
7023 \begin_layout Plain Layout
7024 Tools\SpecialChar \menuseparator
7025 Preferences\SpecialChar \menuseparator
7026 Output\SpecialChar \menuseparator
7027 General
7028 \end_layout
7029
7030 \end_inset
7031
7032 .
7033  We provide a range of tested configurations for some viewers, which you
7034  can select from the drop down list.
7035  If none of these configurations suits you, you have to find out and enter
7036  a suitable configuration yourself.
7037  The definition syntax uses the following placeholders:
7038 \end_layout
7039
7040 \begin_layout Itemize
7041 \noindent
7042 \begin_inset Flex Code
7043 status collapsed
7044
7045 \begin_layout Plain Layout
7046 $$n
7047 \end_layout
7048
7049 \end_inset
7050
7051 : row number
7052 \end_layout
7053
7054 \begin_layout Itemize
7055 \noindent
7056 \begin_inset Flex Code
7057 status collapsed
7058
7059 \begin_layout Plain Layout
7060 $$t
7061 \end_layout
7062
7063 \end_inset
7064
7065 : name of the (temporary) exported .tex file
7066 \end_layout
7067
7068 \begin_layout Itemize
7069 \noindent
7070 \begin_inset Flex Code
7071 status collapsed
7072
7073 \begin_layout Plain Layout
7074 $$o
7075 \end_layout
7076
7077 \end_inset
7078
7079 : name of the exported output file (either dvi or pdf, depending on which
7080  one exists in the temporary directory)
7081 \end_layout
7082
7083 \begin_layout Standard
7084 Note that only some of the viewers provide full forward search functionality,
7085  among them yap, xdvi, okular and Sumatra PDF.
7086 \begin_inset Foot
7087 status collapsed
7088
7089 \begin_layout Plain Layout
7090 For Sumatra CMCDDE is needed --- downloadable from 
7091 \begin_inset CommandInset href
7092 LatexCommand href
7093 target "http://www.istri.fr/zip/CMCDDE.zip"
7094
7095 \end_inset
7096
7097
7098 \end_layout
7099
7100 \end_inset
7101
7102  While many of the widespread PDF viewers (most notably Adobe Reader) do
7103  not support forward search at all, some other viewers -- e.
7104 \begin_inset space \thinspace{}
7105 \end_inset
7106
7107 g.
7108  evince and xpdf -- allow at least to reload the document and jump to a
7109  specific page of the file, so you can at least navigate 
7110 \begin_inset Quotes eld
7111 \end_inset
7112
7113 near
7114 \begin_inset Quotes erd
7115 \end_inset
7116
7117 .
7118  These latter functionality is provided by an external call of synctex (see
7119  the predefined example configurations).
7120  
7121 \end_layout
7122
7123 \begin_layout Standard
7124 Forward search works both with DVI and PDF output.
7125  LyX simply checks which preview format you have used before (i.
7126 \begin_inset space \thinspace{}
7127 \end_inset
7128
7129 e., which format is already there in the temporary directory) and chooses
7130  the appropriate configuration for the respective format.
7131 \end_layout
7132
7133 \begin_layout Chapter
7134 Special Document Classes
7135 \end_layout
7136
7137 \begin_layout Section
7138 A&A Paper
7139 \end_layout
7140
7141 \begin_layout Standard
7142 by 
7143 \noun on
7144 Peter Sütterlin
7145 \end_layout
7146
7147 \begin_layout Subsection
7148 Introduction
7149 \end_layout
7150
7151 \begin_layout Standard
7152 This section describes how LyX can be used to write articles for submission
7153  to the scientific journal 
7154 \emph on
7155 Astronomy and Astrophysics
7156 \emph default
7157  (www.edpsciences.fr/aa/ 
7158 \begin_inset Flex URL
7159 status collapsed
7160
7161 \begin_layout Plain Layout
7162
7163 http://www.edpsciences.fr/aa/
7164 \end_layout
7165
7166 \end_inset
7167
7168 ) using Version 5.01 of the document class 
7169 \family typewriter
7170 aa.cls
7171 \family default
7172 .
7173  This package can be downloaded from the ftp site
7174 \end_layout
7175
7176 \begin_layout Standard
7177 \begin_inset VSpace medskip
7178 \end_inset
7179
7180
7181 \end_layout
7182
7183 \begin_layout Standard
7184 \align center
7185 \begin_inset Flex URL
7186 status collapsed
7187
7188 \begin_layout Plain Layout
7189
7190 ftp://ftp.edpsciences.org/pub/aa/readme.html
7191 \end_layout
7192
7193 \end_inset
7194
7195
7196 \end_layout
7197
7198 \begin_layout Standard
7199 \begin_inset VSpace medskip
7200 \end_inset
7201
7202
7203 \end_layout
7204
7205 \begin_layout Standard
7206 A manual comes together with that package, and this text is not meant to
7207  replace the original manual but is merely a short guide in how to realize
7208  the correct form of your paper.
7209  
7210 \end_layout
7211
7212 \begin_layout Standard
7213 Please note that the publisher of the journal was changed from Springer
7214  to EDP Sciences starting January 1, 2001.
7215  That change involved also some slight changes to the style files, namely
7216  the removal of the thesaurus command.
7217  The LyX class aa supports the newest version of these style files, V 5.01.
7218  If you have an older version installed, please upgrade.
7219  For compatibility, the old (version 4) layout has been kept as 
7220 \family sans
7221 article (A&A V4)
7222 \family default
7223 .
7224  Please refer to the comments in 
7225 \family typewriter
7226 LyXDir/layouts/aapaper.layout
7227 \family default
7228 .
7229 \end_layout
7230
7231 \begin_layout Subsection
7232 Getting started
7233 \end_layout
7234
7235 \begin_layout Standard
7236 It is recommended you start from the example template distributed with LyX.
7237  If you are not using a template, note the following settings:
7238 \end_layout
7239
7240 \begin_layout Itemize
7241 Select 
7242 \family sans
7243 article (A&A)
7244 \family default
7245  in the 
7246 \family sans
7247 Document\SpecialChar \menuseparator
7248 Settings
7249 \family default
7250  dialog (OK, that one was obvious).
7251 \end_layout
7252
7253 \begin_layout Itemize
7254 Don't change the option 
7255 \family sans
7256 Page
7257 \begin_inset space ~
7258 \end_inset
7259
7260 style
7261 \family default
7262 : Leave it set to 
7263 \family sans
7264 default
7265 \family default
7266 .
7267  The whole layout is done by the macros, you shouldn't change anything.
7268 \end_layout
7269
7270 \begin_layout Subsection
7271 The header block
7272 \end_layout
7273
7274 \begin_layout Standard
7275 First thing to enter is the header information.
7276  It consists of seven entries, of which some are optional.
7277  They are
7278 \end_layout
7279
7280 \begin_layout Itemize
7281
7282 \family sans
7283 Title
7284 \family default
7285 : [required] 
7286 \end_layout
7287
7288 \begin_layout Itemize
7289
7290 \family sans
7291 Subtitle
7292 \family default
7293 : [optional] 
7294 \end_layout
7295
7296 \begin_layout Itemize
7297
7298 \family sans
7299 Author
7300 \family default
7301 : [required]
7302 \end_layout
7303
7304 \begin_layout Itemize
7305
7306 \family sans
7307 Address
7308 \family default
7309 : [required]
7310 \end_layout
7311
7312 \begin_layout Itemize
7313
7314 \family sans
7315 Offprints
7316 \family default
7317 : [optional] if more than one author: whom to contact for offprint requests.
7318 \end_layout
7319
7320 \begin_layout Itemize
7321
7322 \family sans
7323 Mail
7324 \family default
7325 : [optional] mail address for contacts.
7326 \end_layout
7327
7328 \begin_layout Itemize
7329
7330 \family sans
7331 Date
7332 \family default
7333 : [required].
7334  Suggested format is 
7335 \family typewriter
7336 Received: <date>; Accepted <date> 
7337 \end_layout
7338
7339 \begin_layout Standard
7340 There is no need to issue the 
7341 \family typewriter
7342
7343 \backslash
7344 maketitle
7345 \family default
7346  command, this is done automatically by LyX when the header is finished.
7347  Although the order of the single header entries doesn't matter it is advised
7348  to keep the above sequence, just to get the best optics and meets the layout
7349  of the real document.
7350 \end_layout
7351
7352 \begin_layout Standard
7353 If you want to place footnotes in the header block, e.
7354 \begin_inset space \thinspace{}
7355 \end_inset
7356
7357 g.
7358 \begin_inset space \space{}
7359 \end_inset
7360
7361 to state your present address, just use the standard footnote via the menu
7362  
7363 \family sans
7364 Insert\SpecialChar \menuseparator
7365 Footnote.
7366
7367 \family default
7368  LyX will automagically use the term 
7369 \family typewriter
7370
7371 \backslash
7372 thanks{}
7373 \family default
7374  in that case.
7375 \end_layout
7376
7377 \begin_layout Standard
7378 In addition to these topics, the macros use three additional LaTeX commands
7379  that have no counterpart in LyX:
7380 \end_layout
7381
7382 \begin_layout Itemize
7383
7384 \family typewriter
7385
7386 \backslash
7387 and
7388 \family default
7389  to separate different names for more than one author and institute, respectivel
7390 y.
7391 \end_layout
7392
7393 \begin_layout Itemize
7394
7395 \family typewriter
7396
7397 \backslash
7398 inst{<nr>}
7399 \family default
7400 to mark corresponding author/institute pairs.
7401  The institutes are numbered sequentially as they appear in the 
7402 \family sans
7403 Address
7404 \family default
7405  field, so you have to put a marker to each author.
7406 \end_layout
7407
7408 \begin_layout Itemize
7409
7410 \family typewriter
7411
7412 \backslash
7413 email{address}
7414 \family default
7415  to supply an email address for fast contact.
7416 \end_layout
7417
7418 \begin_layout Standard
7419 In all cases, the appropriate command has to be entered in LyX and marked
7420  as LaTeX code.
7421  See the examples.
7422  
7423 \end_layout
7424
7425 \begin_layout Subsection
7426 The abstract
7427 \end_layout
7428
7429 \begin_layout Standard
7430 The abstract should immediately follow the header block.
7431  With version 5 the abstract environment was changed to a command, and there
7432  is now a resctriction to only one paragraph.
7433  In addition, it should contain an entry with the keywords.
7434  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7435  command 
7436 \family typewriter
7437
7438 \backslash
7439 keywords{}
7440 \family default
7441  by hand and mark it as LaTeX code.
7442  Refer to the example paper.
7443 \end_layout
7444
7445 \begin_layout Subsection
7446 Supported environments
7447 \end_layout
7448
7449 \begin_layout Standard
7450 The A&A paper layout supports the following environments for structuring
7451  your text:
7452 \end_layout
7453
7454 \begin_layout Itemize
7455
7456 \family sans
7457 Standard
7458 \end_layout
7459
7460 \begin_layout Itemize
7461
7462 \family sans
7463 Section
7464 \end_layout
7465
7466 \begin_layout Itemize
7467
7468 \family sans
7469 Subsection
7470 \end_layout
7471
7472 \begin_layout Itemize
7473
7474 \family sans
7475 Subsubsection
7476 \end_layout
7477
7478 \begin_layout Itemize
7479
7480 \family sans
7481 Itemize
7482 \end_layout
7483
7484 \begin_layout Itemize
7485
7486 \family sans
7487 Enumerate
7488 \end_layout
7489
7490 \begin_layout Itemize
7491
7492 \family sans
7493 Description
7494 \end_layout
7495
7496 \begin_layout Itemize
7497
7498 \family sans
7499 Caption
7500 \end_layout
7501
7502 \begin_layout Itemize
7503
7504 \family sans
7505 Abstract
7506 \end_layout
7507
7508 \begin_layout Itemize
7509
7510 \family sans
7511 Acknowledgment
7512 \end_layout
7513
7514 \begin_layout Itemize
7515
7516 \family sans
7517 Bibliography
7518 \end_layout
7519
7520 \begin_layout Itemize
7521
7522 \family sans
7523 LaTeX
7524 \end_layout
7525
7526 \begin_layout Subsection
7527 Commands not supported by LyX
7528 \end_layout
7529
7530 \begin_layout Standard
7531 Some commands are not yet supported by the 
7532 \family sans
7533 paper (A&A)
7534 \family default
7535  layout for LyX.
7536  Some have already been mentioned.
7537  For the sake of completeness, they are listed all together here:
7538 \end_layout
7539
7540 \begin_layout Itemize
7541
7542 \family typewriter
7543
7544 \backslash
7545 and
7546 \end_layout
7547
7548 \begin_layout Itemize
7549
7550 \family typewriter
7551
7552 \backslash
7553 email
7554 \end_layout
7555
7556 \begin_layout Itemize
7557
7558 \family typewriter
7559
7560 \backslash
7561 appendix
7562 \end_layout
7563
7564 \begin_layout Itemize
7565
7566 \family typewriter
7567
7568 \backslash
7569 authorrunning
7570 \end_layout
7571
7572 \begin_layout Itemize
7573
7574 \family typewriter
7575
7576 \backslash
7577 inst{}
7578 \end_layout
7579
7580 \begin_layout Itemize
7581
7582 \family typewriter
7583
7584 \backslash
7585 keywords{}
7586 \end_layout
7587
7588 \begin_layout Itemize
7589
7590 \family typewriter
7591
7592 \backslash
7593 object{}
7594 \end_layout
7595
7596 \begin_layout Itemize
7597
7598 \family typewriter
7599
7600 \backslash
7601 titlerunning{}
7602 \end_layout
7603
7604 \begin_layout Standard
7605 If you want to use any of these commands, you have to enter them yourself.
7606  
7607 \series bold
7608 Do not forget to mark them as LaTeX code!
7609 \end_layout
7610
7611 \begin_layout Subsection
7612 Figure and Table Floats
7613 \end_layout
7614
7615 \begin_layout Standard
7616 LyX provides support for the necessary float environments 
7617 \family sans
7618 figure, figure*, table
7619 \family default
7620  and 
7621 \family sans
7622 table*
7623 \family default
7624 , therefore we won't tell much about it here.
7625  Refer to the 
7626 \emph on
7627 User's
7628 \begin_inset space ~
7629 \end_inset
7630
7631 Guide
7632 \emph default
7633 .
7634  Just remember that tables should be left-aligned.
7635  For that, select the table and change the alignment in 
7636 \family sans
7637 Edit\SpecialChar \menuseparator
7638 Paragraph
7639 \begin_inset space ~
7640 \end_inset
7641
7642 Settings.
7643 \end_layout
7644
7645 \begin_layout Standard
7646 There is only one special thing: the figures with caption besides the figure.
7647  To create such a figure, you have to do the following:
7648 \end_layout
7649
7650 \begin_layout Enumerate
7651 Create a wide figure float: 
7652 \family sans
7653 Insert\SpecialChar \menuseparator
7654 Float\SpecialChar \menuseparator
7655 Figure
7656 \family default
7657 , then right click in the figure and select 
7658 \family sans
7659 \bar under
7660 S
7661 \bar default
7662 pan
7663 \begin_inset space ~
7664 \end_inset
7665
7666 columns
7667 \family default
7668 .
7669 \end_layout
7670
7671 \begin_layout Enumerate
7672 Enter your caption text.
7673 \end_layout
7674
7675 \begin_layout Enumerate
7676 Press 
7677 \family sans
7678 Return
7679 \family default
7680  to move the cursor above the caption.
7681 \end_layout
7682
7683 \begin_layout Enumerate
7684 Insert your figure
7685 \end_layout
7686
7687 \begin_layout Enumerate
7688 Position the cursor behind the figure and insert a horizontal fill: 
7689 \family sans
7690 Insert\SpecialChar \menuseparator
7691 Special
7692 \begin_inset space ~
7693 \end_inset
7694
7695 Character\SpecialChar \menuseparator
7696 Horizontal
7697 \begin_inset space ~
7698 \end_inset
7699
7700 Fill
7701 \family default
7702 .
7703 \end_layout
7704
7705 \begin_layout Enumerate
7706 Switch to LaTeX mode: 
7707 \family sans
7708 M-c
7709 \begin_inset space ~
7710 \end_inset
7711
7712 t
7713 \family default
7714 .
7715 \end_layout
7716
7717 \begin_layout Enumerate
7718 Enter 
7719 \family typewriter
7720
7721 \backslash
7722 parbox[b]{55mm}{
7723 \family default
7724 .
7725  
7726 \series bold
7727 Do not close the brace!
7728 \end_layout
7729
7730 \begin_layout Enumerate
7731 Position the cursor behind the caption text, switch to LaTeX mode and insert
7732  the closing brace: 
7733 \family sans
7734 M-c
7735 \begin_inset space ~
7736 \end_inset
7737
7738 t
7739 \family default
7740  
7741 \family typewriter
7742 }
7743 \family default
7744 .
7745 \end_layout
7746
7747 \begin_layout Standard
7748 Also, refer to the figures in the example paper.
7749 \end_layout
7750
7751 \begin_layout Subsection
7752 Referee layout
7753 \end_layout
7754
7755 \begin_layout Standard
7756 For submission, the paper has to be formated in a special double-spacing
7757  layout.
7758  For this purpose, you have to give the option 
7759 \family typewriter
7760 referee
7761 \family default
7762  to the documentclass.
7763  This must be done using the extra class options field in the 
7764 \family sans
7765 Document\SpecialChar \menuseparator
7766 Settings
7767 \family default
7768  dialog.
7769  Just enter the string 
7770 \family typewriter
7771 referee
7772 \family default
7773  there.
7774 \end_layout
7775
7776 \begin_layout Subsection
7777 The example paper
7778 \end_layout
7779
7780 \begin_layout Standard
7781 The 
7782 \family sans
7783 Examples
7784 \family default
7785  directory contains an example paper written with LyX.
7786  It is the example paper from the original macro package, translated to
7787  LyX.
7788  Use it for inspiration, and compare the original LaTeX code with LyX way
7789  of writing.
7790 \end_layout
7791
7792 \begin_layout Section
7793 AASTeX
7794 \end_layout
7795
7796 \begin_layout Standard
7797 by 
7798 \noun on
7799 Mike Ressler
7800 \end_layout
7801
7802 \begin_layout Subsection
7803 Introduction
7804 \end_layout
7805
7806 \begin_layout Standard
7807 AASTeX is a set of macros produced by the American Astronomical Society
7808  to facilitate electronic manuscript submission to the three journals they
7809  publish: the Astrophysical Journal (including the Letters and Supplement),
7810  the Astronomical Journal, and the Publications of the Astronomical Society
7811  of the Pacific.
7812  LyX has proven to be an excellent tool for generating these documents,
7813  especially given its equation, citation, and figure handling capabilities.
7814  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7815  is the version described here, or higher.
7816  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7817  incompatible with LyX.
7818  The AASTeX package may be downloaded from the AASTeX Web site
7819 \end_layout
7820
7821 \begin_layout Standard
7822 \begin_inset VSpace medskip
7823 \end_inset
7824
7825
7826 \end_layout
7827
7828 \begin_layout Standard
7829 \align center
7830 \begin_inset Flex URL
7831 status collapsed
7832
7833 \begin_layout Plain Layout
7834
7835 http://www.journals.uchicago.edu/AAS/AASTeX
7836 \end_layout
7837
7838 \end_inset
7839
7840
7841 \end_layout
7842
7843 \begin_layout Standard
7844 \begin_inset VSpace medskip
7845 \end_inset
7846
7847
7848 \end_layout
7849
7850 \begin_layout Standard
7851 A complete user guide is contained in that package and you should familiarize
7852  yourself with it thoroughly before embarking on writing a paper in LyX.
7853  LyX will not reduce the need to figure out all the AASTeX commands, it
7854  will only reduce the drudgery of typing everything in.
7855  It is your responsibility to ensure that the final exported LaTeX document
7856  conforms completely to the requirements of the journal to which you are
7857  submitting your paper.
7858 \end_layout
7859
7860 \begin_layout Subsection
7861 Starting a New Paper
7862 \end_layout
7863
7864 \begin_layout Standard
7865 I strongly suggest that you start with the AASTeX template file.
7866  Click on 
7867 \family sans
7868 File\SpecialChar \menuseparator
7869 New from
7870 \family default
7871  
7872 \family sans
7873 Template
7874 \family default
7875 , enter the new file name, then choose the 
7876 \family typewriter
7877 aastex.lyx
7878 \family default
7879  template.
7880  This will show the most common fields found in a manuscript.
7881  Simply overwrite the existing text (including the brackets, 
7882 \family typewriter
7883 <>
7884 \family default
7885 ) with the correct information.
7886  Many of the AASTeX commands and environments can be implemented directly
7887  in LyX, but some cannot: most noticeably 
7888 \family typewriter
7889
7890 \backslash
7891 altaffilmark
7892 \family default
7893  and 
7894 \family typewriter
7895
7896 \backslash
7897 altaffiltext
7898 \family default
7899 , which should stick out like a sore thumb if you actually just opened the
7900  template file.
7901  For commands such as these, the LaTeX code must be entered directly and
7902  marked as such.
7903  Such commands are referred to as TeX code, or Evil Red Text.
7904  I tried to minimize the amount of TeX code needed in an AASTeX document,
7905  but there is still a bit more required than any of us would like.
7906 \end_layout
7907
7908 \begin_layout Subsection
7909 Finishing Your Paper
7910 \end_layout
7911
7912 \begin_layout Standard
7913 When the paper is finished to your satisfaction and previews/prints correctly,
7914  there are a few 
7915 \begin_inset Quotes eld
7916 \end_inset
7917
7918 postprocessing
7919 \begin_inset Quotes erd
7920 \end_inset
7921
7922  actions which need to be done before you submit it to the journals.
7923  
7924 \end_layout
7925
7926 \begin_layout Enumerate
7927 Export your paper as a LaTeX file (
7928 \family sans
7929 File\SpecialChar \menuseparator
7930 Export\SpecialChar \menuseparator
7931 LaTeX
7932 \family default
7933 ).
7934  
7935 \end_layout
7936
7937 \begin_layout Enumerate
7938 Edit the resulting 
7939 \family typewriter
7940 .tex
7941 \family default
7942  file with your favorite text editor
7943 \end_layout
7944
7945 \begin_deeper
7946 \begin_layout Enumerate
7947 remove the comment lines before the 
7948 \family typewriter
7949
7950 \backslash
7951 documentclass
7952 \family default
7953  command
7954 \end_layout
7955
7956 \begin_layout Enumerate
7957 remove the 
7958 \family typewriter
7959
7960 \backslash
7961 usepackage...{fontenc}
7962 \family default
7963  line if it appears (usually just after 
7964 \family typewriter
7965
7966 \backslash
7967 documentclass
7968 \family default
7969 }; also remove the 
7970 \family typewriter
7971
7972 \backslash
7973 secnumdepth
7974 \family default
7975  line if it appears.
7976 \end_layout
7977
7978 \begin_layout Enumerate
7979 remove everything between (and including) the 
7980 \family typewriter
7981
7982 \backslash
7983 makeatletter
7984 \family default
7985  and 
7986 \family typewriter
7987
7988 \backslash
7989 makeatother
7990 \family default
7991  commands, except for any commands you specifically put into the LaTeX preamble
7992  (which should appear immediately after the 
7993 \begin_inset Quotes eld
7994 \end_inset
7995
7996 User specified LaTeX commands
7997 \begin_inset Quotes erd
7998 \end_inset
7999
8000  comment in the 
8001 \family typewriter
8002 .tex
8003 \family default
8004  file).
8005 \end_layout
8006
8007 \end_deeper
8008 \begin_layout Enumerate
8009 Run the resulting file through LaTeX to make sure it still processes correctly.
8010 \end_layout
8011
8012 \begin_layout Enumerate
8013 Reread the journal requirements to make sure your filenames and formats
8014  are correct.
8015 \end_layout
8016
8017 \begin_layout Enumerate
8018 Submit it.
8019 \end_layout
8020
8021 \begin_layout Subsection
8022 Comments On Specific Commands
8023 \end_layout
8024
8025 \begin_layout Standard
8026 I will not describe the detailed usage of the individual AASTeX commands:
8027  the AASTeX User Guide (
8028 \family typewriter
8029 aasguide.tex
8030 \family default
8031 ) gives a good description of each.
8032  Thus it's probably easiest for me to go down the list as found in the guide
8033  and offer comments where necessary.
8034  So let's begin \SpecialChar \ldots{}
8035
8036 \end_layout
8037
8038 \begin_layout Subsubsection
8039 Things that work as expected
8040 \end_layout
8041
8042 \begin_layout Standard
8043 Because they work as you might expect, I simply list them and the section
8044  they are found in: 
8045 \family typewriter
8046
8047 \backslash
8048 documentclass
8049 \family default
8050  (2.1.1), 
8051 \family typewriter
8052
8053 \backslash
8054 begin{document}
8055 \family default
8056  (2.2), 
8057 \family typewriter
8058
8059 \backslash
8060 title
8061 \family default
8062  (2.3), 
8063 \family typewriter
8064
8065 \backslash
8066 author
8067 \family default
8068  (2.3), 
8069 \family typewriter
8070
8071 \backslash
8072 affil
8073 \family default
8074  (2.3), 
8075 \family typewriter
8076
8077 \backslash
8078 abstract
8079 \family default
8080  (2.4), 
8081 \family typewriter
8082
8083 \backslash
8084 keywords
8085 \family default
8086  (2.5), 
8087 \family typewriter
8088
8089 \backslash
8090 section
8091 \family default
8092  (2.7), 
8093 \family typewriter
8094
8095 \backslash
8096 subsection
8097 \family default
8098  (2.7), 
8099 \family typewriter
8100
8101 \backslash
8102 subsubsection
8103 \family default
8104  (2.7), 
8105 \family typewriter
8106
8107 \backslash
8108 paragraph
8109 \family default
8110  (2.7), 
8111 \family typewriter
8112
8113 \backslash
8114 facility
8115 \family default
8116  (2.10), 
8117 \family typewriter
8118
8119 \backslash
8120 begin{displaymath}
8121 \family default
8122  (2.12), 
8123 \family typewriter
8124
8125 \backslash
8126 begin{equation}
8127 \family default
8128  (2.12), 
8129 \family typewriter
8130
8131 \backslash
8132 begin{eqnarray}
8133 \family default
8134  (2.12), 
8135 \family typewriter
8136
8137 \backslash
8138 begin{mathletters}
8139 \family default
8140  (2.12), 
8141 \family typewriter
8142
8143 \backslash
8144 begin{thebibliography}
8145 \family default
8146  (2.13.1), 
8147 \family typewriter
8148
8149 \backslash
8150 bibitem
8151 \family default
8152  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8153  graphicx figure commands (2.14.1), 
8154 \family typewriter
8155
8156 \backslash
8157 begin{table}
8158 \family default
8159  (2.15.4), 
8160 \family typewriter
8161
8162 \backslash
8163 begin{tabular}
8164 \family default
8165  (2.15.4), 
8166 \family typewriter
8167
8168 \backslash
8169 caption
8170 \family default
8171  (2.15.4), 
8172 \family typewriter
8173
8174 \backslash
8175 label
8176 \family default
8177  (2.15.4, amongst other places), 
8178 \family typewriter
8179
8180 \backslash
8181 tablerefs
8182 \family default
8183  (2.15.5), 
8184 \family typewriter
8185
8186 \backslash
8187 tablecomments
8188 \family default
8189  (2.15.5), 
8190 \family typewriter
8191
8192 \backslash
8193 url
8194 \family default
8195  (2.17.4), 
8196 \family typewriter
8197
8198 \backslash
8199 end{document}
8200 \family default
8201  (2.18).
8202 \end_layout
8203
8204 \begin_layout Standard
8205 The following style options also work correctly: 
8206 \family typewriter
8207 longabstract
8208 \family default
8209  (2.4), 
8210 \family typewriter
8211 preprint
8212 \family default
8213  (3.2.1), 
8214 \family typewriter
8215 preprint2
8216 \family default
8217  (3.2.2), 
8218 \family typewriter
8219 eqsecnum
8220 \family default
8221  (3.3), 
8222 \family typewriter
8223 flushrt
8224 \family default
8225  (3.4).
8226  Simply put them in the 
8227 \family sans
8228 Options
8229 \family default
8230  box in 
8231 \family sans
8232 Layout\SpecialChar \menuseparator
8233 Document
8234 \family default
8235 .
8236 \end_layout
8237
8238 \begin_layout Subsubsection
8239 Things that work, but require more comment
8240 \end_layout
8241
8242 \begin_layout Standard
8243 The following items work, but require a little more discussion:
8244 \end_layout
8245
8246 \begin_layout Itemize
8247 These items are reserved for use by the journal editors, but you can put
8248  them into the LaTeX preamble if you feel compelled to do so: 
8249 \family typewriter
8250
8251 \backslash
8252 received
8253 \family default
8254
8255 \family typewriter
8256
8257 \backslash
8258 revised
8259 \family default
8260
8261 \family typewriter
8262
8263 \backslash
8264 accepted
8265 \family default
8266
8267 \family typewriter
8268
8269 \backslash
8270 ccc
8271 \family default
8272
8273 \family typewriter
8274
8275 \backslash
8276 cpright
8277 \family default
8278  (all from 2.1.3)
8279 \end_layout
8280
8281 \begin_layout Itemize
8282 These items may be placed in the LaTeX preamble, and are included as blanks
8283  in the template file: 
8284 \family typewriter
8285
8286 \backslash
8287 slugcomment
8288 \family default
8289  (2.1.4), 
8290 \family typewriter
8291
8292 \backslash
8293 shorttitle
8294 \family default
8295  (2.1.5), 
8296 \family typewriter
8297
8298 \backslash
8299 shortauthors
8300 \family default
8301  (2.1.5)
8302 \end_layout
8303
8304 \begin_layout Itemize
8305
8306 \family typewriter
8307
8308 \backslash
8309 email
8310 \family default
8311  (2.3) – can only be used 
8312 \begin_inset Quotes eld
8313 \end_inset
8314
8315 standalone
8316 \begin_inset Quotes erd
8317 \end_inset
8318
8319 , not in the middle of a paragraph.
8320  Use TeX code if you need to embed it.
8321 \end_layout
8322
8323 \begin_layout Itemize
8324
8325 \family typewriter
8326
8327 \backslash
8328 and
8329 \family default
8330  (2.3) – will have extra {} after it.
8331  This should not cause an error.
8332 \end_layout
8333
8334 \begin_layout Itemize
8335
8336 \family typewriter
8337
8338 \backslash
8339 notetoeditor
8340 \family default
8341  (2.6) – can only be used 
8342 \begin_inset Quotes eld
8343 \end_inset
8344
8345 standalone
8346 \begin_inset Quotes erd
8347 \end_inset
8348
8349 , not in the middle of a paragraph.
8350  Use TeX code if you need to embed it.
8351 \end_layout
8352
8353 \begin_layout Itemize
8354
8355 \family typewriter
8356
8357 \backslash
8358 placetable
8359 \family default
8360  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8361  hand
8362 \end_layout
8363
8364 \begin_layout Itemize
8365
8366 \family typewriter
8367
8368 \backslash
8369 placefigure
8370 \family default
8371  (2.8) – same as for 
8372 \family typewriter
8373
8374 \backslash
8375 placetable
8376 \end_layout
8377
8378 \begin_layout Itemize
8379
8380 \family typewriter
8381
8382 \backslash
8383 acknowledgements
8384 \family default
8385  (2.9) – will have extra {} after it.
8386  This should not cause an error.
8387 \end_layout
8388
8389 \begin_layout Itemize
8390
8391 \family typewriter
8392
8393 \backslash
8394 appendix
8395 \family default
8396  (2.11) – will have extra {} after it.
8397  This should not cause an error.
8398 \end_layout
8399
8400 \begin_layout Itemize
8401
8402 \family typewriter
8403
8404 \backslash
8405 figcaption
8406 \family default
8407  (2.14.2) – you can insert an optional filename argument by placing the cursor
8408  at the beginning of the text and selecting 
8409 \family sans
8410 Insert\SpecialChar \menuseparator
8411 Short Title
8412 \family default
8413 .
8414  
8415 \begin_inset Quotes eld
8416 \end_inset
8417
8418 Short Title
8419 \begin_inset Quotes erd
8420 \end_inset
8421
8422  inserts an optional argument of the type needed by 
8423 \family typewriter
8424
8425 \backslash
8426 figcaption
8427 \family default
8428 .
8429  Hopefully it will be renamed someday.
8430 \end_layout
8431
8432 \begin_layout Itemize
8433
8434 \family typewriter
8435
8436 \backslash
8437 objectname
8438 \family default
8439  (2.17.1) – same as 
8440 \family typewriter
8441
8442 \backslash
8443 figcaption
8444 \family default
8445  for the catalog ID optional parameter
8446 \end_layout
8447
8448 \begin_layout Itemize
8449
8450 \family typewriter
8451
8452 \backslash
8453 dataset
8454 \family default
8455  (2.17.1) – same as 
8456 \family typewriter
8457
8458 \backslash
8459 figcaption
8460 \family default
8461  for the catalog ID optional parameter
8462 \end_layout
8463
8464 \begin_layout Subsubsection
8465 Things not implemented, use TeX code
8466 \end_layout
8467
8468 \begin_layout Standard
8469
8470 \family typewriter
8471
8472 \backslash
8473 altaffilmark
8474 \family default
8475  (2.3), 
8476 \family typewriter
8477
8478 \backslash
8479 altaffiltext
8480 \family default
8481  (2.3), 
8482 \family typewriter
8483
8484 \backslash
8485 eqnum
8486 \family default
8487  (2.12), 
8488 \family typewriter
8489
8490 \backslash
8491 setcounter{equation}
8492 \family default
8493  (2.12), Journal name abbreviations (2.13.4), 
8494 \family typewriter
8495
8496 \backslash
8497 figurenum
8498 \family default
8499  (2.14.1), 
8500 \family typewriter
8501
8502 \backslash
8503 epsscale
8504 \family default
8505  (2.14.1), 
8506 \family typewriter
8507
8508 \backslash
8509 plotone
8510 \family default
8511  (2.14.1), 
8512 \family typewriter
8513
8514 \backslash
8515 plottwo
8516 \family default
8517  (2.14.1), 
8518 \family typewriter
8519
8520 \backslash
8521 tablenum
8522 \family default
8523  (2.15.4), 
8524 \family typewriter
8525
8526 \backslash
8527 tableline
8528 \family default
8529  (2.15.4, insert it as the first element in the lefthand cell after where
8530  you want it.
8531  Don't use any of LyX's rules in the table), 
8532 \family typewriter
8533
8534 \backslash
8535 tablenotemark
8536 \family default
8537  (2.15.5), 
8538 \family typewriter
8539
8540 \backslash
8541 tablenotetext
8542 \family default
8543  (2.15.5), much of Misc (2.17, except 
8544 \family typewriter
8545
8546 \backslash
8547 objectname
8548 \family default
8549
8550 \family typewriter
8551
8552 \backslash
8553 dataset
8554 \family default
8555
8556 \family typewriter
8557
8558 \backslash
8559 url
8560 \family default
8561 , and 
8562 \family typewriter
8563
8564 \backslash
8565 email
8566 \family default
8567 ; see above), 
8568 \family typewriter
8569
8570 \backslash
8571 singlespace
8572 \family default
8573  (3.1), 
8574 \family typewriter
8575
8576 \backslash
8577 doublespace
8578 \family default
8579  (3.1), 
8580 \family typewriter
8581
8582 \backslash
8583 onecolumn
8584 \family default
8585  (3.2), 
8586 \family typewriter
8587
8588 \backslash
8589 twocolumn
8590 \family default
8591  (3.2)
8592 \end_layout
8593
8594 \begin_layout Subsubsection
8595 Things that cannot be implemented
8596 \end_layout
8597
8598 \begin_layout Standard
8599 \SpecialChar \ldots{}
8600  at least in any meaningful sort of way, so I suggest ignoring them.
8601  They are the references environment (2.13.3), and the deluxetable environment
8602  (2.15).
8603  If you really, really need to use deluxetable, I suggest editing it in
8604  a separate file with a text editor, then using 
8605 \family sans
8606 Insert\SpecialChar \menuseparator
8607 Child
8608 \begin_inset space ~
8609 \end_inset
8610
8611 Document
8612 \family default
8613  to include it in your LyX document.
8614  See the 
8615 \family typewriter
8616 aas_sample.lyx
8617 \family default
8618  file to see an example of this.
8619 \end_layout
8620
8621 \begin_layout Subsection
8622 FAQs, Tips, Tricks, and Other Ruminations
8623 \end_layout
8624
8625 \begin_layout Subsubsection
8626 Getting LyX and AASTeX to cooperate
8627 \end_layout
8628
8629 \begin_layout Standard
8630 It can be a bit tricky to get LyX to recognize a new layout and document
8631  class.
8632  When all else fails, do this:
8633 \end_layout
8634
8635 \begin_layout Enumerate
8636 Make certain that LaTeX can find AASTeX.
8637  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8638  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8639 \family typewriter
8640 sample.tex
8641 \family default
8642 .
8643 \end_layout
8644
8645 \begin_layout Enumerate
8646 Make certain that 
8647 \family typewriter
8648 aastex.layout
8649 \family default
8650  appears in LyX's 
8651 \family typewriter
8652 layouts
8653 \family default
8654  folder
8655 \end_layout
8656
8657 \begin_layout Enumerate
8658 Rerun 
8659 \family sans
8660 Tools\SpecialChar \menuseparator
8661 Reconfigure
8662 \family default
8663  in LyX, then restart LyX.
8664 \end_layout
8665
8666 \begin_layout Enumerate
8667 Open a regular new file, not from a template.
8668  Does AASTeX appear in the class list in 
8669 \family sans
8670 Document\SpecialChar \menuseparator
8671 Settings
8672 \family default
8673 ?
8674 \end_layout
8675
8676 \begin_layout Standard
8677 If you get a warning from an existing AASTeX document about not being able
8678  to find the AASTeX layout or a message about 
8679 \begin_inset Quotes eld
8680 \end_inset
8681
8682 You should not mix title layouts with normal ones
8683 \begin_inset Quotes erd
8684 \end_inset
8685
8686 , things haven't been installed correctly.
8687 \end_layout
8688
8689 \begin_layout Subsubsection
8690 LaTeX error processing a table 
8691 \end_layout
8692
8693 \begin_layout Standard
8694 LyX, by default, attempts to center the table caption/title.
8695  This seems to produce a bad interaction in AASTeX so you should click somewhere
8696  in the caption/title, then select 
8697 \family sans
8698 Edit\SpecialChar \menuseparator
8699 Paragraph
8700 \begin_inset space ~
8701 \end_inset
8702
8703 Settings
8704 \family default
8705 , then set the 
8706 \family sans
8707 Alignment
8708 \family default
8709  to 
8710 \family sans
8711 Block
8712 \family default
8713 .
8714  This took care of it for me.
8715 \end_layout
8716
8717 \begin_layout Subsubsection
8718 References
8719 \end_layout
8720
8721 \begin_layout Standard
8722 A couple of things: 1) I have noticed some funny spacing in the reference
8723  entries in the text.
8724  When you enter the bibliography item data, make sure their is 
8725 \emph on
8726 no
8727 \emph default
8728  space between the last author and the parenthesis setting off the year;
8729  
8730 \emph on
8731 e.
8732 \begin_inset space \thinspace{}
8733 \end_inset
8734
8735 g.
8736 \begin_inset space \space{}
8737 \end_inset
8738
8739
8740 \emph default
8741 type 
8742 \family typewriter
8743 Ressler(1992)
8744 \family default
8745 , not 
8746 \family typewriter
8747 Ressler (1992)
8748 \family default
8749 .
8750  2) Entering the references at all is not obvious.
8751  The easiest thing is to start typing your first reference at the end of
8752  the document, then mark it as type 
8753 \family sans
8754 References
8755 \family default
8756 .
8757  That will put a small gray box in front of what you just typed.
8758  Click on the box to fill in the rest of the information.
8759  For new references, go to the end of an existing reference and press return.
8760  That will create a new line with its own box, etc.
8761 \end_layout
8762
8763 \begin_layout Subsubsection
8764 Including EPS files
8765 \end_layout
8766
8767 \begin_layout Standard
8768 Even though AASTeX provides its own figure commands (
8769 \family typewriter
8770
8771 \backslash
8772 plotone
8773 \family default
8774 , for example), I much prefer LaTeX's standard figure commands (with the
8775  default graphicx).
8776  You can insert the 
8777 \family typewriter
8778
8779 \backslash
8780 plotone
8781 \family default
8782 , etc.
8783 \begin_inset space ~
8784 \end_inset
8785
8786 commands as TeX code into a Figure Float box if you desire, but I never
8787  have much luck getting the layout right.
8788  With the standard graphics, LyX will insert a 
8789 \family typewriter
8790
8791 \backslash
8792 usepackage{graphicx}
8793 \family default
8794  command into the LaTeX preamble and handle the figures in the standard
8795  LaTeX2e way, interspersing the figures in the text.
8796  I believe ApJ accepts figures exactly this way now; AJ might still use
8797  the 
8798 \begin_inset Quotes eld
8799 \end_inset
8800
8801 stack everything at the end
8802 \begin_inset Quotes erd
8803 \end_inset
8804
8805  technique.
8806 \end_layout
8807
8808 \begin_layout Subsubsection
8809 Things I could have done, but didn't
8810 \end_layout
8811
8812 \begin_layout Standard
8813 There are a few 
8814 \begin_inset Quotes eld
8815 \end_inset
8816
8817 pretty
8818 \begin_inset Quotes erd
8819 \end_inset
8820
8821  things I could have implemented, but chose not to.
8822  For instance, I saw no point in double-spacing the text in the LyX window,
8823  even though it is double-spaced in the paper manuscript.
8824  Also, I chose not to make separate layouts for the preprint and preprint2
8825  styles.
8826  Since I assume you will spend most of your time in the plain manuscript
8827  mode anyway, I decided not to chew up more disk space with this.
8828  
8829 \end_layout
8830
8831 \begin_layout Subsection
8832 Final Caveat
8833 \end_layout
8834
8835 \begin_layout Standard
8836 Your mileage may vary.
8837  I've now had papers published by both ApJ and AJ that have had 98% of the
8838  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8839  cleanups.
8840  I have had no trouble with the submission process, and I'm sure the journals
8841  were never aware that there might be a difference.
8842  So, go forth and publish!
8843 \end_layout
8844
8845 \begin_layout Section
8846 AMS LaTeX
8847 \end_layout
8848
8849 \begin_layout Standard
8850 by 
8851 \noun on
8852 David Johnson
8853 \noun default
8854 ; updated by 
8855 \noun on
8856 Richard Heck
8857 \end_layout
8858
8859 \begin_layout Standard
8860 \begin_inset VSpace bigskip
8861 \end_inset
8862
8863
8864 \end_layout
8865
8866 \begin_layout Standard
8867 \noindent
8868 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8869  papers to be submitted to American Mathematical Society publications.
8870  The layouts are not tailored to a specific journal, but easily can be.
8871  You should refer to the AMS documentation for specific instructions for
8872  each journal (usually it will entail only changing a single line in the
8873  TeX output).
8874  That documentation is available on the Web at 
8875 \begin_inset Flex URL
8876 status open
8877
8878 \begin_layout Plain Layout
8879
8880 http://www.ams.org
8881 \end_layout
8882
8883 \end_inset
8884
8885  or by ftp at 
8886 \begin_inset Flex URL
8887 status open
8888
8889 \begin_layout Plain Layout
8890
8891 ftp://ftp.ams.org/pub/tex/amslatex/
8892 \end_layout
8893
8894 \end_inset
8895
8896 .
8897  These layouts are appropriate, and useful, for any mathematical writing.
8898  
8899 \end_layout
8900
8901 \begin_layout Standard
8902 There are two basic AMS LaTeX layouts: 
8903 \end_layout
8904
8905 \begin_layout Itemize
8906 amsart: The standard AMS article format.
8907 \end_layout
8908
8909 \begin_layout Itemize
8910 amsbook: the standard AMS book (really, monograph) format.
8911  
8912 \end_layout
8913
8914 \begin_layout Standard
8915 The layouts themselves contain only the minimum necessary to use the AMS
8916  classes.
8917  They do not, in particular, contain any of the `theorem' environments used
8918  for setting theorems, lemmas, and the like.
8919  These are contained, instead, in the 
8920 \begin_inset Flex Code
8921 status collapsed
8922
8923 \begin_layout Plain Layout
8924 Theorems (AMS)
8925 \end_layout
8926
8927 \end_inset
8928
8929  module, which is loaded by default when when you select one of the AMS
8930  classes.
8931  (It can also be used with other classes and can be removed, if you would
8932  rather use something else.) Less commonly used environments are in the 
8933 \begin_inset Flex Code
8934 status collapsed
8935
8936 \begin_layout Plain Layout
8937 Theorems (AMS-Extended)
8938 \end_layout
8939
8940 \end_inset
8941
8942  module, which must be loaded manually.
8943 \end_layout
8944
8945 \begin_layout Standard
8946 By default, theorems and the like are numbered consecutively throughout
8947  the document, but this may be modified by loading the module 
8948 \begin_inset Flex Code
8949 status collapsed
8950
8951 \begin_layout Plain Layout
8952 Theorems (Order by Section)
8953 \end_layout
8954
8955 \end_inset
8956
8957  or, if you are using 
8958 \begin_inset Flex Code
8959 status collapsed
8960
8961 \begin_layout Plain Layout
8962 book (AMS)
8963 \end_layout
8964
8965 \end_inset
8966
8967 , the module 
8968 \begin_inset Flex Code
8969 status collapsed
8970
8971 \begin_layout Plain Layout
8972 Theorems (Order by Chapter)
8973 \end_layout
8974
8975 \end_inset
8976
8977 .
8978  These will number the results as 
8979 \begin_inset Formula $n.m$
8980 \end_inset
8981
8982 , where the first number refers to the section (or chapter) and the second
8983  refers to the total number of results so far in that section (or chapter).
8984  Many environments are also available unnumbered.
8985  These are indicated by an asterisk at the end.
8986  If you happen to want 
8987 \emph on
8988 only
8989 \emph default
8990  unnumbered results, the module 
8991 \begin_inset Flex Code
8992 status collapsed
8993
8994 \begin_layout Plain Layout
8995 Theorems (Starred)
8996 \end_layout
8997
8998 \end_inset
8999
9000  provides that option.
9001 \end_layout
9002
9003 \begin_layout Standard
9004 Note that these modules do not 
9005 \emph on
9006 have
9007 \emph default
9008  to be used with the AMS classes.
9009  It is perfectly possible to use the 
9010 \begin_inset Flex Code
9011 status collapsed
9012
9013 \begin_layout Plain Layout
9014 Theorems (AMS)
9015 \end_layout
9016
9017 \end_inset
9018
9019  module, and the others mentioned, with other classes, such as 
9020 \begin_inset Flex Code
9021 status collapsed
9022
9023 \begin_layout Plain Layout
9024 article
9025 \end_layout
9026
9027 \end_inset
9028
9029
9030 \begin_inset Flex Code
9031 status collapsed
9032
9033 \begin_layout Plain Layout
9034 report
9035 \end_layout
9036
9037 \end_inset
9038
9039
9040 \begin_inset Flex Code
9041 status collapsed
9042
9043 \begin_layout Plain Layout
9044 book (KOMA-script)
9045 \end_layout
9046
9047 \end_inset
9048
9049 , and so forth.
9050 \end_layout
9051
9052 \begin_layout Subsection
9053 What these layouts provide
9054 \end_layout
9055
9056 \begin_layout Standard
9057 There is a long list of included environments provided by these layouts.
9058  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9059  variety of `theorem' environments.
9060  However, the AMS recommends the environments that are available in LyX.
9061  
9062 \end_layout
9063
9064 \begin_layout Standard
9065 The following environments—as well as the standard environments, such as
9066  
9067 \begin_inset Flex Noun
9068 status collapsed
9069
9070 \begin_layout Plain Layout
9071 section
9072 \end_layout
9073
9074 \end_inset
9075
9076
9077 \begin_inset Flex Noun
9078 status collapsed
9079
9080 \begin_layout Plain Layout
9081 bibliography
9082 \end_layout
9083
9084 \end_inset
9085
9086
9087 \begin_inset Flex Noun
9088 status collapsed
9089
9090 \begin_layout Plain Layout
9091 title
9092 \end_layout
9093
9094 \end_inset
9095
9096
9097 \begin_inset Flex Noun
9098 status collapsed
9099
9100 \begin_layout Plain Layout
9101 author
9102 \end_layout
9103
9104 \end_inset
9105
9106 , and 
9107 \begin_inset Flex Noun
9108 status collapsed
9109
9110 \begin_layout Plain Layout
9111 date
9112 \end_layout
9113
9114 \end_inset
9115
9116 —are provided by 
9117 \begin_inset Flex Code
9118 status collapsed
9119
9120 \begin_layout Plain Layout
9121 article (AMS)
9122 \end_layout
9123
9124 \end_inset
9125
9126  and 
9127 \begin_inset Flex Code
9128 status collapsed
9129
9130 \begin_layout Plain Layout
9131 book (AMS)
9132 \end_layout
9133
9134 \end_inset
9135
9136 :
9137 \end_layout
9138
9139 \begin_layout Description
9140 Address This should be the author's permanent address.
9141 \end_layout
9142
9143 \begin_layout Description
9144 Current
9145 \begin_inset space ~
9146 \end_inset
9147
9148 Address This should be the author's temporary address at the time of submission,
9149  if different from the Address.
9150 \end_layout
9151
9152 \begin_layout Description
9153 Email Author's e-mail address
9154 \end_layout
9155
9156 \begin_layout Description
9157 URL Author's Web address, if desired.
9158 \end_layout
9159
9160 \begin_layout Description
9161 Keywords Key words or phrases used to identify specific topics discussed
9162  in the paper.
9163 \end_layout
9164
9165 \begin_layout Description
9166 Subjectclass These refer to the AMS Subject Classifications, published and
9167  described in 
9168 \emph on
9169 Mathematical Reviews
9170 \emph default
9171 .
9172  These are also available online at the AMS cites listed above.
9173 \end_layout
9174
9175 \begin_layout Description
9176 Thanks
9177 \end_layout
9178
9179 \begin_layout Description
9180 Dedicatory
9181 \end_layout
9182
9183 \begin_layout Description
9184 Translator
9185 \end_layout
9186
9187 \begin_layout Standard
9188 The following environments are provided by both the 
9189 \begin_inset Flex Code
9190 status collapsed
9191
9192 \begin_layout Plain Layout
9193 Theorems
9194 \end_layout
9195
9196 \end_inset
9197
9198  and 
9199 \begin_inset Flex Code
9200 status collapsed
9201
9202 \begin_layout Plain Layout
9203 Theorems (AMS)
9204 \end_layout
9205
9206 \end_inset
9207
9208  modules, in the latter case in both starred (unnumbered) and unstarred
9209  (numbered) versions.
9210  These same environments are provided only in the starred versions by the
9211  
9212 \begin_inset Flex Code
9213 status collapsed
9214
9215 \begin_layout Plain Layout
9216 Theorems (Starred)
9217 \end_layout
9218
9219 \end_inset
9220
9221  module:
9222 \end_layout
9223
9224 \begin_layout Theorem
9225 This is typically used for the statements of major results.
9226  
9227 \end_layout
9228
9229 \begin_layout Corollary*
9230 This is used for statements which follow fairly directly from previous statement
9231 s.
9232  Again, these can be major results.
9233  
9234 \end_layout
9235
9236 \begin_layout Lemma
9237 These are smaller results needed to prove other statements.
9238 \end_layout
9239
9240 \begin_layout Proposition
9241 These are less major results which (hopefully) add to the general theory
9242  being discussed.
9243 \end_layout
9244
9245 \begin_layout Conjecture
9246 These are statements provided without justification, which the author does
9247  not know how to prove, but which seem to be true (to the author, at least).
9248 \end_layout
9249
9250 \begin_layout Definition*
9251 Guess what this is for.
9252  The font is different for this environment than for the previous ones.
9253  
9254 \end_layout
9255
9256 \begin_layout Example*
9257 Used for examples illustrating proven results.
9258 \end_layout
9259
9260 \begin_layout Problem
9261 It's not really known what this is for.
9262  You should figure it out.
9263 \end_layout
9264
9265 \begin_layout Exercise*
9266 Write a description for this one.
9267 \end_layout
9268
9269 \begin_layout Remark
9270 This environment is also a type of theorem, usually a lesser sort of observation.
9271 \end_layout
9272
9273 \begin_layout Claim*
9274 Often used in the course of giving a proof of a larger result.
9275 \end_layout
9276
9277 \begin_layout Case
9278 Generally, these are used to break up long arguments, using specific instances
9279  of some condition.
9280  
9281 \end_layout
9282
9283 \begin_layout Case
9284 The numbering scheme for cases is on its own, not together with other numbered
9285  statements.
9286  
9287 \end_layout
9288
9289 \begin_layout Proof
9290 At the end of this environment, a QED symbol (usually a square, but it can
9291  vary with different styles) is placed.
9292  If you want to have other environments within this one—for example, Case
9293  environments—and have the QED symbol appear only after them, then the other
9294  environments need to be nested within the proof environment.
9295  See the section 
9296 \emph on
9297 Nesting Environments
9298 \emph default
9299  of the 
9300 \emph on
9301 User's Guide
9302 \emph default
9303  for information on nesting.
9304 \end_layout
9305
9306 \begin_layout Standard
9307 And these environments are provided by 
9308 \begin_inset Flex Code
9309 status collapsed
9310
9311 \begin_layout Plain Layout
9312 Theorems (AMS-Extended)
9313 \end_layout
9314
9315 \end_inset
9316
9317 :
9318 \end_layout
9319
9320 \begin_layout Criterion*
9321 A required condition.
9322 \end_layout
9323
9324 \begin_layout Algorithm*
9325 A general procedure to be used.
9326 \end_layout
9327
9328 \begin_layout Axiom*
9329 This is a property or statement taken as true within the system being discussed.
9330 \end_layout
9331
9332 \begin_layout Condition*
9333 Sometimes used to state a condition assumed within the present context of
9334  discussion.
9335 \end_layout
9336
9337 \begin_layout Note*
9338 Similar to a Remark.
9339 \end_layout
9340
9341 \begin_layout Notation*
9342 Used for the explanation of, yes, notation.
9343 \end_layout
9344
9345 \begin_layout Summary
9346 Do we really need to tell you? 
9347 \end_layout
9348
9349 \begin_layout Acknowledgement*
9350 Acknowledgement.
9351 \end_layout
9352
9353 \begin_layout Conclusion*
9354 Sometimes used at the end of a long train of argument.
9355 \end_layout
9356
9357 \begin_layout Fact
9358 Used in a way similar to Proposition, though perhaps lower on the scale.
9359 \end_layout
9360
9361 \begin_layout Standard
9362 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9363  fonts packages.
9364  They need to be available on your system in order to use these environments.
9365 \end_layout
9366
9367 \begin_layout Section
9368 AGU journals (
9369 \family sans
9370 aguplus
9371 \family default
9372 )
9373 \end_layout
9374
9375 \begin_layout Standard
9376 by 
9377 \shape smallcaps
9378 Martin Vermeer
9379 \end_layout
9380
9381 \begin_layout Subsection
9382 Description
9383 \end_layout
9384
9385 \begin_layout Standard
9386 These are the layout files for some of the journals of the American Geophysical
9387  Society.
9388  It is assumed that you have both the AGU's own class files and AGUplus
9389  installed (everything to be found at
9390 \begin_inset Flex URL
9391 status collapsed
9392
9393 \begin_layout Plain Layout
9394
9395 ftp://ftp.agu.org/journals/latex/journals
9396 \end_layout
9397
9398 \end_inset
9399
9400 ).
9401 \end_layout
9402
9403 \begin_layout Subsection
9404 New styles
9405 \end_layout
9406
9407 \begin_layout Standard
9408 Redefined are 
9409 \family sans
9410 Paragraph
9411 \family default
9412
9413 \family sans
9414 Paragraph*
9415 \family default
9416 .
9417  They are still called this in the LyX GUI, though their LaTeX equivalents
9418  in the AGU classes are 
9419 \family sans
9420 Subsubsubsection
9421 \family default
9422  and 
9423 \family sans
9424 Subsubsubsection*
9425 \family default
9426 .
9427 \end_layout
9428
9429 \begin_layout Standard
9430 Newly defined styles are 
9431 \family sans
9432 Left_Header
9433 \family default
9434
9435 \family sans
9436 Right_Header
9437 \family default
9438
9439 \family sans
9440 Received
9441 \family default
9442
9443 \family sans
9444 Revised
9445 \family default
9446
9447 \family sans
9448 Accepted
9449 \family default
9450
9451 \family sans
9452 CCC
9453 \family default
9454
9455 \family sans
9456 PaperId
9457 \family default
9458
9459 \family sans
9460 AuthorAddr
9461 \family default
9462
9463 \family sans
9464 SlugComment
9465 \family default
9466 .
9467  These are mostly manuscript attributes and defined in the AGU class documentati
9468 on.
9469 \end_layout
9470
9471 \begin_layout Standard
9472 I suspect this is still badly incomplete.
9473 \end_layout
9474
9475 \begin_layout Subsection
9476 New floats
9477 \end_layout
9478
9479 \begin_layout Standard
9480
9481 \family sans
9482 Planotable
9483 \family default
9484  and 
9485 \family sans
9486 Plate
9487 \family default
9488 .
9489  We also have a new 
9490 \family sans
9491 Table_Caption
9492 \family default
9493 .
9494 \end_layout
9495
9496 \begin_layout Subsection
9497 Supported journals
9498 \end_layout
9499
9500 \begin_layout Itemize
9501
9502 \emph on
9503 Journal of Geophysical Research
9504 \emph default
9505
9506 \family typewriter
9507 jgrga.layout
9508 \family default
9509  — Martin Vermeer
9510 \end_layout
9511
9512 \begin_layout Standard
9513 Add your own, it isn't so hard! Look at the 
9514 \family typewriter
9515 jgrga.layout
9516 \family default
9517  example and 
9518 \family typewriter
9519 aguplus.inc
9520 \family default
9521 .
9522 \end_layout
9523
9524 \begin_layout Subsection
9525 Bugs and things to remember
9526 \end_layout
9527
9528 \begin_layout Standard
9529 In order to use the new layouts, you must remember to do the following for
9530  a new document:
9531 \end_layout
9532
9533 \begin_layout Enumerate
9534
9535 \emph on
9536 Turn off babel
9537 \emph default
9538 .
9539  This can be done in the 
9540 \family sans
9541 Layout\SpecialChar \menuseparator
9542 Document
9543 \family default
9544  or 
9545 \family sans
9546 Document\SpecialChar \menuseparator
9547 Settings
9548 \family default
9549  menu item.
9550  (AGU articles are always in English, right? So 
9551 \emph on
9552 don't
9553 \emph default
9554  choose a language.)
9555 \end_layout
9556
9557 \begin_layout Enumerate
9558 Enter 
9559 \family typewriter
9560 jgrga
9561 \family default
9562  into the document's 
9563 \family sans
9564 Extra Options
9565 \family default
9566  field.
9567  (Yes, this is a bug.)
9568 \end_layout
9569
9570 \begin_layout Enumerate
9571 Make sure you use the 
9572 \family typewriter
9573 agu.bst
9574 \family default
9575  bibliography style, by entering 
9576 \family sans
9577 agu
9578 \family default
9579  into the second field of the BibTeX inset.
9580  None of the standard styles will do.
9581 \end_layout
9582
9583 \begin_layout Section
9584 Broadway
9585 \end_layout
9586
9587 \begin_layout Standard
9588 by 
9589 \shape smallcaps
9590 Garst Reese
9591 \end_layout
9592
9593 \begin_layout Subsection
9594 Introduction
9595 \end_layout
9596
9597 \begin_layout Standard
9598 Broadway is for writing plays.
9599  The format is more decorative than Hollywood, and much less standardized.
9600  This format should be suitable for workshops.
9601 \end_layout
9602
9603 \begin_layout Subsection
9604 Special problems
9605 \end_layout
9606
9607 \begin_layout Standard
9608 The same as in Hollywood.
9609 \end_layout
9610
9611 \begin_layout Subsection
9612 Special features
9613 \end_layout
9614
9615 \begin_layout Standard
9616 Insert the 
9617 \family sans
9618 Speaker
9619 \family default
9620  names as labels then cross-reference the label to insert the name.
9621  The cross-reference dialog will show the current cast of characters.
9622 \end_layout
9623
9624 \begin_layout Subsection
9625 Paper size and Margins
9626 \end_layout
9627
9628 \begin_layout Standard
9629 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9630 \end_layout
9631
9632 \begin_layout Subsection
9633 Environments
9634 \end_layout
9635
9636 \begin_layout Standard
9637 The following environments are available.
9638  You can use broadway.bind to get the bind keys shown at the right.
9639 \end_layout
9640
9641 \begin_layout Itemize
9642
9643 \family sans
9644 Standard
9645 \begin_inset Newline newline
9646 \end_inset
9647
9648
9649 \family default
9650 You should not have to use this, but it is here for anything that does not
9651  fit otherwise.
9652 \end_layout
9653
9654 \begin_layout Itemize
9655
9656 \family sans
9657 Narrative
9658 \begin_inset space \hfill{}
9659 \end_inset
9660
9661 M-z n
9662 \begin_inset Newline newline
9663 \end_inset
9664
9665
9666 \family default
9667 Used to describe stage setting and the action.
9668  First use of speaker names in all CAPs.
9669 \end_layout
9670
9671 \begin_layout Itemize
9672
9673 \family sans
9674 ACT
9675 \begin_inset space \hfill{}
9676 \end_inset
9677
9678 M-z a
9679 \begin_inset Newline newline
9680 \end_inset
9681
9682
9683 \family default
9684 Automatically numbered.
9685  On screen it will be arabic, but will print as Roman.
9686 \end_layout
9687
9688 \begin_layout Itemize
9689
9690 \family sans
9691 ACT*
9692 \begin_inset space \hfill{}
9693 \end_inset
9694
9695 M-z S at
9696 \begin_inset Newline newline
9697 \end_inset
9698
9699
9700 \family default
9701 Subtitle for 
9702 \family sans
9703 ACT.
9704
9705 \family default
9706  It is just centered text.
9707 \end_layout
9708
9709 \begin_layout Itemize
9710
9711 \family sans
9712 SCENE
9713 \begin_inset space \hfill{}
9714 \end_inset
9715
9716 M-z S-S
9717 \begin_inset Newline newline
9718 \end_inset
9719
9720
9721 \family default
9722 Not automatically numbered.
9723  You supply the number.
9724  This is because I couldn't figure out how.
9725 \end_layout
9726
9727 \begin_layout Itemize
9728
9729 \family sans
9730 AT_RISE:
9731 \begin_inset space \hfill{}
9732 \end_inset
9733
9734 M-z S-R
9735 \begin_inset Newline newline
9736 \end_inset
9737
9738
9739 \family default
9740 A special case of Narrative to describe the setting and action as the curtain
9741  rises.
9742 \end_layout
9743
9744 \begin_layout Itemize
9745
9746 \family sans
9747 Speaker
9748 \begin_inset space \hfill{}
9749 \end_inset
9750
9751 M-z s
9752 \begin_inset Newline newline
9753 \end_inset
9754
9755
9756 \family default
9757 The speaker's (actor's) title, centered in all CAPS.
9758 \end_layout
9759
9760 \begin_layout Itemize
9761
9762 \family sans
9763 Parenthetical
9764 \begin_inset space \hfill{}
9765 \end_inset
9766
9767 M-z p
9768 \begin_inset Newline newline
9769 \end_inset
9770
9771
9772 \family default
9773 Instructions to the speaker.
9774  The parentheses are automatically inserted.
9775  The ( will appear on screen, but both will be in the printed play.
9776  This environment is only used within 
9777 \family sans
9778 Dialogue
9779 \family default
9780 .
9781 \end_layout
9782
9783 \begin_layout Itemize
9784
9785 \family sans
9786 Dialogue
9787 \begin_inset space \hfill{}
9788 \end_inset
9789
9790 M-z d
9791 \begin_inset Newline newline
9792 \end_inset
9793
9794
9795 \family default
9796 What the Speaker says.
9797 \end_layout
9798
9799 \begin_layout Itemize
9800
9801 \family sans
9802 CURTAIN
9803 \begin_inset space \hfill{}
9804 \end_inset
9805
9806 M-z S-C
9807 \begin_inset Newline newline
9808 \end_inset
9809
9810
9811 \family default
9812 The curtain comes down.
9813 \end_layout
9814
9815 \begin_layout Itemize
9816
9817 \family sans
9818 Title
9819 \begin_inset space \hfill{}
9820 \end_inset
9821
9822 M-z S-T
9823 \end_layout
9824
9825 \begin_layout Itemize
9826
9827 \family sans
9828 Author
9829 \begin_inset space \hfill{}
9830 \end_inset
9831
9832 M-z S-A
9833 \end_layout
9834
9835 \begin_layout Itemize
9836
9837 \family sans
9838 Right_Address
9839 \begin_inset space \hfill{}
9840 \end_inset
9841
9842 M-z r
9843 \end_layout
9844
9845 \begin_layout Standard
9846 Hello there.
9847 \end_layout
9848
9849 \begin_layout Section
9850 Dinbrief
9851 \end_layout
9852
9853 \begin_layout Standard
9854 The document class 
9855 \family sans
9856 dinbrief
9857 \family default
9858  can be used to type letters according to German conventions.
9859  A template file is included in 
9860 \family typewriter
9861 .../lyx/share/templates
9862 \family default
9863  for you to use as a starting point.
9864 \end_layout
9865
9866 \begin_layout Section
9867 EGS journals (
9868 \family sans
9869 egs
9870 \family default
9871 )
9872 \end_layout
9873
9874 \begin_layout Standard
9875 by 
9876 \shape smallcaps
9877 Martin Vermeer
9878 \end_layout
9879
9880 \begin_layout Subsection
9881 Description
9882 \end_layout
9883
9884 \begin_layout Standard
9885 This is the layout file for the European Geophysical Society journals.
9886  The needed 
9887 \family typewriter
9888 egs.cls
9889 \family default
9890  can be downloaded from the web site of the EGS under 
9891 \begin_inset Flex URL
9892 status collapsed
9893
9894 \begin_layout Plain Layout
9895
9896 www.copernicus.org
9897 \end_layout
9898
9899 \end_inset
9900
9901 .
9902 \end_layout
9903
9904 \begin_layout Subsection
9905 New styles
9906 \end_layout
9907
9908 \begin_layout Standard
9909
9910 \family sans
9911 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9912  Accepted
9913 \family default
9914
9915 \family sans
9916 Offsets
9917 \family default
9918 .
9919  The current layout file is unfortunately very unmodular and would benefit
9920  from using the various 
9921 \family typewriter
9922 std*.inc
9923 \family default
9924  file inclusions.
9925 \end_layout
9926
9927 \begin_layout Section
9928 Elsevier Journals
9929 \end_layout
9930
9931 \begin_layout Standard
9932 See the LyX template file 
9933 \family typewriter
9934 elsarticle.lyx
9935 \family default
9936 .
9937  It contains all infos you need.
9938 \end_layout
9939
9940 \begin_layout Section
9941 Foils [aka 
9942 \family sans
9943 FoilTeX
9944 \family default
9945 ]
9946 \begin_inset CommandInset label
9947 LatexCommand label
9948 name "sec:foiltex"
9949
9950 \end_inset
9951
9952
9953 \end_layout
9954
9955 \begin_layout Standard
9956 by 
9957 \noun on
9958 Allan Rae
9959 \end_layout
9960
9961 \begin_layout Subsection
9962 Introduction
9963 \end_layout
9964
9965 \begin_layout Standard
9966 This section describes how to use LyX to make slides for overhead projectors.
9967  There are two document classes that can do this: the default slides class
9968  and the 
9969 \family sans
9970 FoilTeX
9971 \family default
9972  slides class.
9973  This section documents the latter.
9974 \end_layout
9975
9976 \begin_layout Standard
9977 I'm going to say this again, nice and clear, so that there's no misunderstanding
9978 :
9979 \end_layout
9980
9981 \begin_layout Standard
9982 \begin_inset VSpace bigskip
9983 \end_inset
9984
9985
9986 \end_layout
9987
9988 \begin_layout Standard
9989 \align center
9990
9991 \size large
9992 This section documents the class 
9993 \begin_inset Quotes eld
9994 \end_inset
9995
9996
9997 \family sans
9998 slides (FoilTeX)
9999 \family default
10000
10001 \begin_inset Quotes erd
10002 \end_inset
10003
10004  
10005 \emph on
10006 only.
10007 \end_layout
10008
10009 \begin_layout Standard
10010 \begin_inset VSpace bigskip
10011 \end_inset
10012
10013
10014 \end_layout
10015
10016 \begin_layout Standard
10017 If you're looking for the documentation for 
10018 \begin_inset Quotes eld
10019 \end_inset
10020
10021
10022 \family sans
10023 slides (default)
10024 \family default
10025
10026 \begin_inset Quotes erd
10027 \end_inset
10028
10029 , check out section
10030 \begin_inset space ~
10031 \end_inset
10032
10033
10034 \begin_inset CommandInset ref
10035 LatexCommand ref
10036 reference "sec:slitex"
10037
10038 \end_inset
10039
10040 .
10041  If your machine doesn't have the 
10042 \family sans
10043 foils
10044 \family default
10045  class [
10046 \begin_inset Quotes eld
10047 \end_inset
10048
10049
10050 \family sans
10051 slides (FoilTeX)
10052 \family default
10053
10054 \begin_inset Quotes erd
10055 \end_inset
10056
10057 ] installed, you'll probably have to use the default 
10058 \family sans
10059 slides
10060 \family default
10061  class, which isn't quite as good as 
10062 \family sans
10063 foils.
10064 \end_layout
10065
10066 \begin_layout Standard
10067 The 
10068 \family sans
10069 foils
10070 \family default
10071  class is designed for use with version 2.1 of the 
10072 \family sans
10073 foils.cls
10074 \family default
10075  LaTeX class file which is now an integral part of LaTeX2e.
10076 \end_layout
10077
10078 \begin_layout Subsection
10079 Getting Started
10080 \end_layout
10081
10082 \begin_layout Standard
10083 Obviously, to use this document class, you need to select 
10084 \begin_inset Quotes eld
10085 \end_inset
10086
10087
10088 \family sans
10089 slides (FoilTeX)
10090 \family default
10091
10092 \begin_inset Quotes erd
10093 \end_inset
10094
10095  from the 
10096 \family sans
10097 Class
10098 \family default
10099  entry in the 
10100 \family sans
10101 Document
10102 \begin_inset space ~
10103 \end_inset
10104
10105 Layout
10106 \family default
10107  dialog.
10108  There are some settings in the 
10109 \family sans
10110 Document
10111 \begin_inset space ~
10112 \end_inset
10113
10114 Layout
10115 \family default
10116  dialog that you should know about that are specific to this class:
10117 \end_layout
10118
10119 \begin_layout Itemize
10120 Don't change the options 
10121 \family sans
10122 Sides
10123 \family default
10124  and 
10125 \family sans
10126 Columns
10127 \family default
10128  on the 
10129 \family sans
10130 Document
10131 \begin_inset space ~
10132 \end_inset
10133
10134 Layout
10135 \family default
10136  dialog.
10137  They're ignored by the 
10138 \family sans
10139 foils
10140 \family default
10141  class.
10142 \end_layout
10143
10144 \begin_layout Itemize
10145 The default font size is 20
10146 \begin_inset space \thinspace{}
10147 \end_inset
10148
10149 pt with the other options being 17
10150 \begin_inset space \thinspace{}
10151 \end_inset
10152
10153 pt, 25
10154 \begin_inset space \thinspace{}
10155 \end_inset
10156
10157 pt and 30
10158 \begin_inset space \thinspace{}
10159 \end_inset
10160
10161 pt.
10162 \end_layout
10163
10164 \begin_layout Itemize
10165 The default font is 
10166 \family sans
10167 sans
10168 \family default
10169  
10170 \family sans
10171 serif
10172 \family default
10173  but all math equations are still typeset in the usual roman font.
10174 \end_layout
10175
10176 \begin_layout Itemize
10177
10178 \family sans
10179 FoilTeX
10180 \family default
10181  supports A4 and Letter paper sizes as well as a special size for working
10182  with 35
10183 \begin_inset space \thinspace{}
10184 \end_inset
10185
10186 mm slides.
10187  It doesn't support A5, B5, legal or executive paper sizes.
10188 \end_layout
10189
10190 \begin_layout Itemize
10191 Don't bother changing the 
10192 \family sans
10193 Float Placement
10194 \family default
10195  settings because they are ignored anyway.
10196  All floats appear where they are defined in the text.
10197 \end_layout
10198
10199 \begin_layout Itemize
10200 The 
10201 \family sans
10202 Pagestyle
10203 \family default
10204  setting behaves a bit differently for this class.
10205  
10206 \family sans
10207 FoilTeX
10208 \family default
10209  provides extensive footer and header capabilities including a user-defined
10210  logo.
10211  See section
10212 \begin_inset space ~
10213 \end_inset
10214
10215
10216 \begin_inset CommandInset ref
10217 LatexCommand ref
10218 reference "sec:foilfoot"
10219
10220 \end_inset
10221
10222  for more details.
10223  The title page is treated differently to all other pages in the document
10224  and is 
10225 \emph on
10226 always
10227 \emph default
10228  unnumbered and 
10229 \emph on
10230 always
10231 \emph default
10232  has the logo centered at the bottom of the page (if one is defined).
10233  The possible page style choices and what they do are as follows:
10234 \end_layout
10235
10236 \begin_deeper
10237 \begin_layout Labeling
10238 \labelwidthstring MMMMMMM
10239
10240 \family sans
10241 \series bold
10242 empty
10243 \family default
10244 \series default
10245  The final output contains no page numbers, or other headers or footers
10246  (except footnotes of course).
10247  
10248 \end_layout
10249
10250 \begin_layout Labeling
10251 \labelwidthstring MMMMMMM
10252
10253 \family sans
10254 \series bold
10255 plain
10256 \family default
10257 \series default
10258  The final output contains page numbers centered at the bottom of the page.
10259  No other headings or footers (other than footnotes).
10260 \end_layout
10261
10262 \begin_layout Labeling
10263 \labelwidthstring MMMMMMM
10264
10265 \series bold
10266 foilheadings
10267 \series default
10268  Page numbers in lower right corner.
10269  Additional headers and footers are also shown.
10270  This is also the default.
10271 \end_layout
10272
10273 \begin_layout Labeling
10274 \labelwidthstring MMMMMMM
10275
10276 \series bold
10277 fancy
10278 \series default
10279  Gives you access to the 
10280 \family sans
10281 fancyheadings
10282 \family default
10283  package although its use with 
10284 \family sans
10285 FoilTeX
10286 \family default
10287  is discouraged by the writer of the 
10288 \family sans
10289 FoilTeX
10290 \family default
10291  package because of some potential page layout clashes.
10292 \end_layout
10293
10294 \end_deeper
10295 \begin_layout Subsubsection
10296 Extra Options
10297 \end_layout
10298
10299 \begin_layout Standard
10300 The following options may be used in the extra class options in the 
10301 \family sans
10302 Document\SpecialChar \menuseparator
10303 Settings
10304 \family default
10305  dialog.
10306 \end_layout
10307
10308 \begin_layout Labeling
10309 \labelwidthstring MMMMMMx
10310
10311 \series bold
10312 35mmSlide
10313 \series default
10314  This sets up the page layout for 7.33
10315 \begin_inset space \thinspace{}
10316 \end_inset
10317
10318 in by 11
10319 \begin_inset space \thinspace{}
10320 \end_inset
10321
10322 in paper, which is about the same aspect ratio as a 35
10323 \begin_inset space \thinspace{}
10324 \end_inset
10325
10326 mm slide, making it a bit easier to work with this medium.
10327 \end_layout
10328
10329 \begin_layout Labeling
10330 \labelwidthstring MMMMMMx
10331
10332 \series bold
10333 headrule
10334 \series default
10335  Places a rule across the page below the header on every page except the
10336  title page.
10337 \end_layout
10338
10339 \begin_layout Labeling
10340 \labelwidthstring MMMMMMx
10341
10342 \series bold
10343 footrule
10344 \series default
10345  Places a rule across the page above the footer on every page except the
10346  title page.
10347 \end_layout
10348
10349 \begin_layout Labeling
10350 \labelwidthstring MMMMMMx
10351
10352 \series bold
10353 dvips
10354 \series default
10355  This is automatically set each time you create a new 
10356 \family sans
10357 foils
10358 \family default
10359  document.
10360  This option tells 
10361 \family sans
10362 FoilTeX
10363 \family default
10364  to use the dvips driver to rotate those pages that are set as landscape
10365  foils.
10366 \end_layout
10367
10368 \begin_layout Labeling
10369 \labelwidthstring MMMMMMx
10370
10371 \series bold
10372 landscape
10373 \series default
10374  Simply changes the page dimensions to those of a landscape page but doesn't
10375  do any rotation.
10376  Thus if you use this option you need to use an external program to rotate
10377  each page or feed your paper through your printer as landscape.
10378  Note that this option effectively reverses the roles of the 
10379 \family sans
10380 Foilhead
10381 \family default
10382  and 
10383 \family sans
10384 Rotatefoilhead
10385 \family default
10386  environments (don't worry these are described in the next section).
10387 \end_layout
10388
10389 \begin_layout Labeling
10390 \labelwidthstring MMMMMMx
10391
10392 \series bold
10393 leqno
10394 \series default
10395  Equation numbers on the left.
10396 \end_layout
10397
10398 \begin_layout Labeling
10399 \labelwidthstring MMMMMMx
10400
10401 \series bold
10402 fleqn
10403 \series default
10404  Flush-left equations.
10405 \end_layout
10406
10407 \begin_layout Subsection
10408 Supported Environments
10409 \end_layout
10410
10411 \begin_layout Standard
10412 Most of the environments commonly supported in other classes are also supported
10413  by the 
10414 \family sans
10415 foils
10416 \family default
10417  class.
10418  There are several additional environments provided by 
10419 \family sans
10420 FoilTeX
10421 \family default
10422  as well as a couple added by LyX.
10423  The following environments are shared with other classes:
10424 \end_layout
10425
10426 \begin_layout Standard
10427 \begin_inset ERT
10428 status open
10429
10430 \begin_layout Plain Layout
10431
10432
10433 \backslash
10434 begin{multicols}{2}
10435 \end_layout
10436
10437 \end_inset
10438
10439
10440 \end_layout
10441
10442 \begin_layout Itemize
10443
10444 \family sans
10445 Standard
10446 \end_layout
10447
10448 \begin_layout Itemize
10449
10450 \family sans
10451 Itemize
10452 \end_layout
10453
10454 \begin_layout Itemize
10455
10456 \family sans
10457 Enumerate
10458 \end_layout
10459
10460 \begin_layout Itemize
10461
10462 \family sans
10463 Description
10464 \end_layout
10465
10466 \begin_layout Itemize
10467
10468 \family sans
10469 List
10470 \end_layout
10471
10472 \begin_layout Itemize
10473
10474 \family sans
10475 LyX-Code
10476 \end_layout
10477
10478 \begin_layout Itemize
10479
10480 \family sans
10481 Verse
10482 \end_layout
10483
10484 \begin_layout Itemize
10485
10486 \family sans
10487 Quote
10488 \end_layout
10489
10490 \begin_layout Itemize
10491
10492 \family sans
10493 Quotation
10494 \end_layout
10495
10496 \begin_layout Itemize
10497
10498 \family sans
10499 Title
10500 \end_layout
10501
10502 \begin_layout Itemize
10503
10504 \family sans
10505 Author
10506 \end_layout
10507
10508 \begin_layout Itemize
10509
10510 \family sans
10511 Date
10512 \end_layout
10513
10514 \begin_layout Itemize
10515
10516 \family sans
10517 Abstract
10518 \end_layout
10519
10520 \begin_layout Itemize
10521
10522 \family sans
10523 Bibliography
10524 \end_layout
10525
10526 \begin_layout Itemize
10527
10528 \family sans
10529 Address
10530 \end_layout
10531
10532 \begin_layout Itemize
10533
10534 \family sans
10535 RightAddress
10536 \end_layout
10537
10538 \begin_layout Itemize
10539
10540 \family sans
10541 Caption
10542 \end_layout
10543
10544 \begin_layout Itemize
10545
10546 \family sans
10547 Comment
10548 \end_layout
10549
10550 \begin_layout Standard
10551 \begin_inset ERT
10552 status open
10553
10554 \begin_layout Plain Layout
10555
10556
10557 \backslash
10558 end{multicols}
10559 \end_layout
10560
10561 \end_inset
10562
10563
10564 \end_layout
10565
10566 \begin_layout Standard
10567 That is, all the major environments apart from the sectioning environments.
10568  Since foils are essentially self-contained sections, with a title and body,
10569  
10570 \family sans
10571 FoilTeX
10572 \family default
10573  provides specific commands for starting new foils and these are:
10574 \end_layout
10575
10576 \begin_layout Itemize
10577
10578 \family sans
10579 Foilhead
10580 \end_layout
10581
10582 \begin_layout Itemize
10583
10584 \family sans
10585 Rotatefoilhead
10586 \end_layout
10587
10588 \begin_layout Standard
10589 LyX also provides slightly modified versions of these two environments called:
10590 \end_layout
10591
10592 \begin_layout Itemize
10593
10594 \family sans
10595 ShortFoilhead
10596 \end_layout
10597
10598 \begin_layout Itemize
10599
10600 \family sans
10601 ShortRotatefoilhead
10602 \end_layout
10603
10604 \begin_layout Standard
10605 and the differences will be explained in the next section.
10606 \end_layout
10607
10608 \begin_layout Standard
10609 Since foils are often used in presenting ideas or new theorems and such
10610  
10611 \family sans
10612 FoilTeX
10613 \family default
10614  also provides a comprehensive box of goodies for presenting them:
10615 \end_layout
10616
10617 \begin_layout Standard
10618 \begin_inset ERT
10619 status open
10620
10621 \begin_layout Plain Layout
10622
10623
10624 \backslash
10625 begin{multicols}{2}
10626 \end_layout
10627
10628 \end_inset
10629
10630
10631 \end_layout
10632
10633 \begin_layout Itemize
10634
10635 \family sans
10636 Theorem
10637 \end_layout
10638
10639 \begin_layout Itemize
10640
10641 \family sans
10642 Lemma
10643 \end_layout
10644
10645 \begin_layout Itemize
10646
10647 \family sans
10648 Corollary
10649 \end_layout
10650
10651 \begin_layout Itemize
10652
10653 \family sans
10654 Proposition
10655 \end_layout
10656
10657 \begin_layout Itemize
10658
10659 \family sans
10660 Definition
10661 \end_layout
10662
10663 \begin_layout Itemize
10664
10665 \family sans
10666 Proof
10667 \end_layout
10668
10669 \begin_layout Itemize
10670
10671 \family sans
10672 Theorem*
10673 \end_layout
10674
10675 \begin_layout Itemize
10676
10677 \family sans
10678 Lemma*
10679 \end_layout
10680
10681 \begin_layout Itemize
10682
10683 \family sans
10684 Corollary*
10685 \end_layout
10686
10687 \begin_layout Itemize
10688
10689 \family sans
10690 Proposition*
10691 \end_layout
10692
10693 \begin_layout Itemize
10694
10695 \family sans
10696 Definition*
10697 \end_layout
10698
10699 \begin_layout Standard
10700 \begin_inset ERT
10701 status open
10702
10703 \begin_layout Plain Layout
10704
10705
10706 \backslash
10707 end{multicols}
10708 \end_layout
10709
10710 \end_inset
10711
10712
10713 \end_layout
10714
10715 \begin_layout Standard
10716 The starred versions are unnumbered while the unstarred versions are numbered.
10717  There are also two list environments added by LyX and these are:
10718 \end_layout
10719
10720 \begin_layout Itemize
10721
10722 \family sans
10723 TickList
10724 \end_layout
10725
10726 \begin_layout Itemize
10727
10728 \family sans
10729 CrossList
10730 \end_layout
10731
10732 \begin_layout Standard
10733
10734 \family sans
10735 FoilTeX
10736 \family default
10737  provides some powerful header and footer capabilities that are best set
10738  in the preamble although they may be set at any point in a document.
10739  If you want to change these settings in your document the best place to
10740  do so is at the very top of a foil, i.
10741 \begin_inset space \thinspace{}
10742 \end_inset
10743
10744 g.
10745 \emph on
10746
10747 \begin_inset space \space{}
10748 \end_inset
10749
10750
10751 \emph default
10752 straight after the foilhead.
10753 \end_layout
10754
10755 \begin_layout Standard
10756 For this purpose, the following command styles are provided [
10757 \shape smallcaps
10758 Martin Vermeer
10759 \shape default
10760 ]:
10761 \end_layout
10762
10763 \begin_layout Standard
10764 \begin_inset ERT
10765 status open
10766
10767 \begin_layout Plain Layout
10768
10769
10770 \backslash
10771 begin{multicols}{2}
10772 \end_layout
10773
10774 \end_inset
10775
10776
10777 \end_layout
10778
10779 \begin_layout Itemize
10780
10781 \family sans
10782 My
10783 \begin_inset space ~
10784 \end_inset
10785
10786 Logo
10787 \end_layout
10788
10789 \begin_layout Itemize
10790
10791 \family sans
10792 Restriction
10793 \end_layout
10794
10795 \begin_layout Itemize
10796
10797 \family sans
10798 Right
10799 \begin_inset space ~
10800 \end_inset
10801
10802 Footer
10803 \end_layout
10804
10805 \begin_layout Itemize
10806
10807 \family sans
10808 Right
10809 \begin_inset space ~
10810 \end_inset
10811
10812 Header
10813 \end_layout
10814
10815 \begin_layout Itemize
10816
10817 \family sans
10818 Left
10819 \begin_inset space ~
10820 \end_inset
10821
10822 Header
10823 \end_layout
10824
10825 \begin_deeper
10826 \begin_layout Standard
10827 \begin_inset space ~
10828 \end_inset
10829
10830
10831 \end_layout
10832
10833 \end_deeper
10834 \begin_layout Standard
10835 \begin_inset ERT
10836 status open
10837
10838 \begin_layout Plain Layout
10839
10840
10841 \backslash
10842 end{multicols}
10843 \end_layout
10844
10845 \end_inset
10846
10847
10848 \end_layout
10849
10850 \begin_layout Standard
10851 There are also a few commands provided by 
10852 \family sans
10853 FoilTeX
10854 \family default
10855  that aren't directly supported by LyX but I'll tell you what they do and
10856  how to use them in section
10857 \begin_inset space ~
10858 \end_inset
10859
10860
10861 \begin_inset CommandInset ref
10862 LatexCommand ref
10863 reference "sec:unsuppfoils"
10864
10865 \end_inset
10866
10867 .
10868 \end_layout
10869
10870 \begin_layout Subsection
10871 Building a Set of Foils
10872 \end_layout
10873
10874 \begin_layout Standard
10875 This section will give a simple introduction to using the different environments
10876  to build a set of foils.
10877  If you want to see an example set of foils, take a look at the 
10878 \family typewriter
10879 Foils.lyx
10880 \family default
10881  file you find in LyX's 
10882 \family typewriter
10883 examples
10884 \family default
10885  folder.
10886 \end_layout
10887
10888 \begin_layout Subsubsection
10889 Give It a Title Page
10890 \end_layout
10891
10892 \begin_layout Standard
10893 Unlike other classes that provide 
10894 \family sans
10895 Title
10896 \family default
10897
10898 \family sans
10899 Author
10900 \family default
10901
10902 \family sans
10903 Date
10904 \family default
10905  and 
10906 \family sans
10907 Abstract
10908 \family default
10909  environments, 
10910 \family sans
10911 foils
10912 \family default
10913  creates the title on a page of its own.
10914  If you leave out the 
10915 \family sans
10916 Date
10917 \family default
10918  environment LaTeX will substitute the current date (every time you regenerate
10919  the output).
10920 \end_layout
10921
10922 \begin_layout Subsubsection
10923 Start a New Foil
10924 \end_layout
10925
10926 \begin_layout Standard
10927 As I mentioned earlier, there are four ways of starting a new foil.
10928  For portrait foils you should use 
10929 \family sans
10930 Foilhead
10931 \family default
10932  or 
10933 \family sans
10934 ShortFoilhead.
10935
10936 \family default
10937  The difference between these two environments is the amount of space between
10938  the title of the foil (the foilhead) and the body of the foil.
10939 \end_layout
10940
10941 \begin_layout Standard
10942 Landscape foils are generated using the 
10943 \family sans
10944 Rotatefoilhead
10945 \family default
10946  and 
10947 \family sans
10948 ShortRotatefoilhead
10949 \family default
10950  environments.
10951  Again the only difference is the spacing between foilhead and body.
10952  Both of the short versions have 0.5 inches less separation between the foilhead
10953  and the body.
10954  
10955 \end_layout
10956
10957 \begin_layout Standard
10958 One problem with the support for landscape foils is the requirement that
10959  you have to use the 
10960 \family typewriter
10961 dvips
10962 \family default
10963  driver to generate the PostScript output otherwise the foils won't be rotated.
10964  It is possible to get landscape foils even if you haven't got the 
10965 \family typewriter
10966 dvips
10967 \family default
10968  driver provided you can feed your foils sideways through your printer ;-)
10969 \end_layout
10970
10971 \begin_layout Subsubsection
10972 Theorems, Lemmas, Proofs and more
10973 \end_layout
10974
10975 \begin_layout Standard
10976 Due to a small bug in LyX you can't have two of the same type of these environme
10977 nts directly following each other.
10978  They must be separated by something.
10979  If you try, you will just be extending the previous environment as if you
10980  had merged the two environments together.
10981  So, how do you get around this problem? The simplest option is to insert
10982  some text between the two environments or add a 
10983 \family sans
10984 LaTeX
10985 \family default
10986  environment between the two with just a 
10987 \begin_inset Quotes eld
10988 \end_inset
10989
10990
10991 \family typewriter
10992 %
10993 \family default
10994
10995 \begin_inset Quotes erd
10996 \end_inset
10997
10998  in it.
10999  This will force LyX to produce two separate environments and hence the
11000  correct LaTeX output.
11001  An example is provided in the example file included with the LyX distribution.
11002  Remember, this problem only occurs if you are trying to place two of the
11003  same type of theorem-like environments one directly after the other.
11004 \end_layout
11005
11006 \begin_layout Subsubsection
11007 Lists
11008 \end_layout
11009
11010 \begin_layout Standard
11011 You get all the commonly supported list styles found in other classes as
11012  well as two new ones.
11013  I'll only describe the new ones here.
11014  If you want to find out more about the other list environments check out
11015  the 
11016 \emph on
11017 User's Guide.
11018
11019 \emph default
11020  If you intend to use itemized lists you might also want to read about the
11021  
11022 \family sans
11023 Itemize
11024 \begin_inset space ~
11025 \end_inset
11026
11027 Bullet
11028 \begin_inset space ~
11029 \end_inset
11030
11031 Selection
11032 \family default
11033  dialog described above in section
11034 \begin_inset space ~
11035 \end_inset
11036
11037
11038 \begin_inset CommandInset ref
11039 LatexCommand ref
11040 reference "sec:bullet"
11041
11042 \end_inset
11043
11044 .
11045 \end_layout
11046
11047 \begin_layout Standard
11048 The two new list styles, 
11049 \family sans
11050 TickList
11051 \family default
11052  and 
11053 \family sans
11054 CrossList
11055 \family default
11056 , are designed to make it easier for you to create lists of do's and don'ts
11057  or right and wrong by providing dedicated environments that use a tick
11058  or a cross as the label of the list.
11059  These lists are in fact dedicated variants of the 
11060 \family sans
11061 Itemize
11062 \family default
11063  environment.
11064  They do however require that you have the 
11065 \family typewriter
11066 psnfss
11067 \family default
11068  packages installed.
11069 \end_layout
11070
11071 \begin_layout Subsubsection
11072 Figures and Tables
11073 \end_layout
11074
11075 \begin_layout Standard
11076
11077 \family sans
11078 FoilTeX
11079 \family default
11080  redefines the floating tables and figures so that they appear exactly where
11081  they are in the text rather than pushing them to the top of the page or
11082  to some user specified location.
11083  In fact if you change the float placement settings they are simply ignored.
11084 \end_layout
11085
11086 \begin_layout Subsubsection
11087 Page Headers and Footers
11088 \begin_inset CommandInset label
11089 LatexCommand label
11090 name "sec:foilfoot"
11091
11092 \end_inset
11093
11094
11095 \end_layout
11096
11097 \begin_layout Standard
11098
11099 \family sans
11100 My
11101 \begin_inset space ~
11102 \end_inset
11103
11104 Logo
11105 \family default
11106  and 
11107 \family sans
11108 Restriction
11109 \family default
11110  are two commands used to control the left-footer text string.
11111  The first is meant to allow you to include a graphic logo on your foils
11112  and defaults to 
11113 \begin_inset Quotes eld
11114 \end_inset
11115
11116 -Typeset by 
11117 \family sans
11118 FoilTeX
11119 \family default
11120 -
11121 \begin_inset Quotes erd
11122 \end_inset
11123
11124 .
11125  While the second is meant to provide a classification for the audience,
11126  
11127 \emph on
11128 e.
11129 \begin_inset space \thinspace{}
11130 \end_inset
11131
11132 g.
11133 \emph default
11134
11135 \begin_inset space \space{}
11136 \end_inset
11137
11138 Confidential.
11139  It is empty by default.
11140 \end_layout
11141
11142 \begin_layout Standard
11143 The remaining page corners can be filled by 
11144 \family sans
11145 Right
11146 \begin_inset space ~
11147 \end_inset
11148
11149 Footer
11150 \family default
11151  (which defaults to page numbers), 
11152 \family sans
11153 Right
11154 \begin_inset space ~
11155 \end_inset
11156
11157 Header
11158 \family default
11159  (top right) and 
11160 \family sans
11161 Left
11162 \begin_inset space ~
11163 \end_inset
11164
11165 Header
11166 \family default
11167  (top left).
11168 \end_layout
11169
11170 \begin_layout Subsection
11171 Unsupported 
11172 \family sans
11173 FoilTeX
11174 \family default
11175  Goodies
11176 \begin_inset CommandInset label
11177 LatexCommand label
11178 name "sec:unsuppfoils"
11179
11180 \end_inset
11181
11182
11183 \end_layout
11184
11185 \begin_layout Standard
11186 All the commands mentioned below need to be set in a 
11187 \family sans
11188 LaTeX
11189 \family default
11190  environment or as 
11191 \family sans
11192 TeX
11193 \family default
11194  within another environment.
11195 \end_layout
11196
11197 \begin_layout Subsubsection
11198 Lengths
11199 \end_layout
11200
11201 \begin_layout Standard
11202 All lengths are adjusted using the 
11203 \family typewriter
11204
11205 \backslash
11206 setlength{
11207 \family default
11208 \emph on
11209 lengthname
11210 \family typewriter
11211 \emph default
11212 }{
11213 \family default
11214 \emph on
11215 newlength
11216 \family typewriter
11217 \emph default
11218 }
11219 \family default
11220  command.
11221  Where 
11222 \emph on
11223 lengthname
11224 \emph default
11225  should be replaced by the name given to the length you want to change and
11226  
11227 \emph on
11228 newlength
11229 \emph default
11230  is the length value.
11231  All lengths should be specified in units of length such as inches (
11232 \family typewriter
11233 in
11234 \family default
11235 ), millimeters (
11236 \family typewriter
11237 mm
11238 \family default
11239 ) or points (
11240 \family typewriter
11241 pt
11242 \family default
11243 ) or relative to some document or font-based length such as 
11244 \family typewriter
11245
11246 \backslash
11247 textwidth
11248 \family default
11249 .
11250  
11251 \end_layout
11252
11253 \begin_layout Standard
11254 It's possible to change the spacing between a foilhead and the body of the
11255  foil by adjusting the length specified by 
11256 \family typewriter
11257
11258 \backslash
11259 foilheadskip
11260 \family default
11261 .
11262  For example, to make 
11263 \emph on
11264 all
11265 \emph default
11266  foilheads 0.5
11267 \begin_inset space \space{}
11268 \end_inset
11269
11270 in closer to their bodies put the following in the preamble: 
11271 \family typewriter
11272
11273 \backslash
11274 setlength{
11275 \backslash
11276 foilheadskip}{-0.5in}
11277 \end_layout
11278
11279 \begin_layout Standard
11280 The spacings around floats can be adjusted by setting these lengths:
11281 \end_layout
11282
11283 \begin_layout Labeling
11284 \labelwidthstring MMMMMMMMMMM
11285
11286 \family typewriter
11287
11288 \backslash
11289 abovefloatskip
11290 \family default
11291  Separation between the text and the top of the float
11292 \end_layout
11293
11294 \begin_layout Labeling
11295 \labelwidthstring MMMMMMMMMMM
11296
11297 \family typewriter
11298
11299 \backslash
11300 abovecaptionskip
11301 \family default
11302  Separation between the float and the caption
11303 \end_layout
11304
11305 \begin_layout Labeling
11306 \labelwidthstring MMMMMMMMMMM
11307
11308 \family typewriter
11309
11310 \backslash
11311 belowcaptionskip
11312 \family default
11313  Separation between the caption and the following text
11314 \end_layout
11315
11316 \begin_layout Labeling
11317 \labelwidthstring MMMMMMMMMMM
11318
11319 \family typewriter
11320
11321 \backslash
11322 captionwidth
11323 \family default
11324  You can make the captions narrower than the surrounding text by adjusting
11325  this length.
11326  Best done relative to 
11327 \family typewriter
11328
11329 \backslash
11330 textwidth
11331 \family default
11332 .
11333 \end_layout
11334
11335 \begin_layout Standard
11336 There are also several title page related lengths that you may find useful
11337  if you have a long title or several authors:
11338 \end_layout
11339
11340 \begin_layout Labeling
11341 \labelwidthstring MMMMMMMMMMM
11342
11343 \family typewriter
11344
11345 \backslash
11346 abovetitleskip
11347 \family default
11348  Separation from headers to 
11349 \family sans
11350 Title
11351 \end_layout
11352
11353 \begin_layout Labeling
11354 \labelwidthstring MMMMMMMMMMM
11355
11356 \family typewriter
11357
11358 \backslash
11359 titleauthorskip
11360 \family default
11361  between 
11362 \family sans
11363 Title
11364 \family default
11365  and 
11366 \family sans
11367 Author
11368 \family default
11369  environments
11370 \end_layout
11371
11372 \begin_layout Labeling
11373 \labelwidthstring MMMMMMMMMMM
11374
11375 \family typewriter
11376
11377 \backslash
11378 authorauthorskip
11379 \family default
11380  between multiple 
11381 \family sans
11382 Author
11383 \family default
11384  lines
11385 \end_layout
11386
11387 \begin_layout Labeling
11388 \labelwidthstring MMMMMMMMMMM
11389
11390 \family typewriter
11391
11392 \backslash
11393 authordateskip
11394 \family default
11395  between the 
11396 \family sans
11397 Author
11398 \family default
11399  and the 
11400 \family sans
11401 Date
11402 \end_layout
11403
11404 \begin_layout Labeling
11405 \labelwidthstring MMMMMMMMMMM
11406
11407 \family typewriter
11408
11409 \backslash
11410 dateabstractskip
11411 \family default
11412  between the 
11413 \family sans
11414 Date
11415 \family default
11416  and the 
11417 \family sans
11418 Abstract
11419 \end_layout
11420
11421 \begin_layout Standard
11422 The last length related command affects all the list environments.
11423  If you place 
11424 \family typewriter
11425
11426 \backslash
11427 zerolistvertdimens
11428 \family default
11429  
11430 \emph on
11431 inside
11432 \emph default
11433  a list environment then all the vertical spacing between the list items
11434  is removed.
11435  Note that this is a command not a length so it doesn't require 
11436 \family typewriter
11437
11438 \backslash
11439 setlength
11440 \family default
11441  like the stuff mentioned above.
11442 \end_layout
11443
11444 \begin_layout Subsubsection
11445 Headers and Footers
11446 \end_layout
11447
11448 \begin_layout Standard
11449 The 
11450 \family typewriter
11451
11452 \backslash
11453 LogoOn
11454 \family default
11455  and 
11456 \family typewriter
11457
11458 \backslash
11459 LogoOff
11460 \family default
11461  commands control whether the logo in the 
11462 \family sans
11463 MyLogo
11464 \family default
11465  definition appear on a given page.
11466  If you put 
11467 \family typewriter
11468
11469 \backslash
11470 LogoOff
11471 \family default
11472  in the preamble then none of the foils will have the logo on them.
11473  If you don't want the logo on a particular page place the 
11474 \family typewriter
11475
11476 \backslash
11477 LogoOff
11478 \family default
11479  directly after the foilhead of that page and the 
11480 \family typewriter
11481
11482 \backslash
11483 LogoOn
11484 \family default
11485  directly after the next foilhead.
11486 \end_layout
11487
11488 \begin_layout Standard
11489 If you decide to use the 
11490 \family sans
11491 fancy
11492 \family default
11493  page style setting in the 
11494 \family sans
11495 Document
11496 \begin_inset space ~
11497 \end_inset
11498
11499 Layout
11500 \family default
11501  dialog you should probably add 
11502 \family typewriter
11503
11504 \backslash
11505 let
11506 \backslash
11507 headwidth
11508 \backslash
11509 textwidth
11510 \family default
11511  to your preamble so headers and footers on landscape pages are correctly
11512  placed when rotated.
11513  This is due to some clashes between the page layouts provided by the 
11514 \family sans
11515 fancyheadings
11516 \family default
11517  package and the 
11518 \family sans
11519 foils
11520 \family default
11521  class.
11522 \end_layout
11523
11524 \begin_layout Section
11525 Hollywood (Hollywood spec scripts)
11526 \end_layout
11527
11528 \begin_layout Standard
11529 by 
11530 \shape smallcaps
11531 Garst Reese
11532 \end_layout
11533
11534 \begin_layout Subsection
11535 Introduction
11536 \end_layout
11537
11538 \begin_layout Standard
11539 Getting the format of a Hollywood script right is a 
11540 \begin_inset Quotes eld
11541 \end_inset
11542
11543 rite of passage.
11544 \begin_inset Quotes erd
11545 \end_inset
11546
11547  It is designed to make the readers focus on content and to be easy and
11548  familiar for the actors to read.
11549  Each page of a script should be one minute of film.
11550  Nothing goes in a script that you cannot see or hear on screen.
11551  The courier 12 pt font should be used throughout.
11552  No italics.
11553 \end_layout
11554
11555 \begin_layout Subsection
11556 Special problems
11557 \end_layout
11558
11559 \begin_layout Standard
11560 Speakers' lines should NEVER break in mid-sentence.
11561  If a speaker's lines continue over a page break, repeat the 
11562 \family sans
11563 Speaker
11564 \family default
11565  title followed by (Cont'd).
11566 \end_layout
11567
11568 \begin_layout Subsection
11569 Special features
11570 \end_layout
11571
11572 \begin_layout Standard
11573 Insert the 
11574 \family sans
11575 Speaker
11576 \family default
11577  names as labels then cross-reference the label to insert the name.
11578  The cross-reference dialog will show the current cast of characters.
11579  You can use this to insert the speaker name in narratives also.
11580 \end_layout
11581
11582 \begin_layout Subsection
11583 Paper size and Margins
11584 \end_layout
11585
11586 \begin_layout Standard
11587 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11588 \end_layout
11589
11590 \begin_layout Subsection
11591 Environments
11592 \end_layout
11593
11594 \begin_layout Standard
11595 The following environments are available.
11596  You can use hollywood.bind to get the bind keys shown at the right.
11597 \end_layout
11598
11599 \begin_layout Itemize
11600
11601 \family sans
11602 Standard
11603 \begin_inset Newline newline
11604 \end_inset
11605
11606
11607 \family default
11608 Used where nothing else works.
11609  Try to avoid it.
11610 \end_layout
11611
11612 \begin_layout Itemize
11613
11614 \family sans
11615 FADE_IN
11616 \family default
11617 :
11618 \begin_inset space \hfill{}
11619 \end_inset
11620
11621
11622 \family sans
11623 M-z S-I
11624 \family default
11625
11626 \begin_inset Newline newline
11627 \end_inset
11628
11629 Usually followed by something like 
11630 \begin_inset Quotes eld
11631 \end_inset
11632
11633 on Sally waking up.
11634 \begin_inset Quotes erd
11635 \end_inset
11636
11637
11638 \end_layout
11639
11640 \begin_layout Itemize
11641
11642 \family sans
11643 INT:
11644 \begin_inset space \hfill{}
11645 \end_inset
11646
11647 M-z i
11648 \begin_inset Newline newline
11649 \end_inset
11650
11651
11652 \family default
11653 Introduces a new INTERIOR camera set-up.
11654  Always followed by DAY or NIGHT, or something similar to define the lighting
11655  required.
11656  Everthing on this line in CAPS.
11657 \end_layout
11658
11659 \begin_layout Itemize
11660
11661 \family sans
11662 EXT:
11663 \begin_inset space \hfill{}
11664 \end_inset
11665
11666 M-z e
11667 \begin_inset Newline newline
11668 \end_inset
11669
11670
11671 \family default
11672 Introduces a new EXTERIOR camera set-up.
11673  Everthing on this line in CAPS.
11674 \end_layout
11675
11676 \begin_layout Itemize
11677
11678 \family sans
11679 Speaker
11680 \begin_inset space \hfill{}
11681 \end_inset
11682
11683 M-z s
11684 \begin_inset Newline newline
11685 \end_inset
11686
11687
11688 \family default
11689 The character speaking.
11690 \end_layout
11691
11692 \begin_layout Itemize
11693
11694 \family sans
11695 Parenthetical
11696 \begin_inset space \hfill{}
11697 \end_inset
11698
11699 M-z p
11700 \begin_inset Newline newline
11701 \end_inset
11702
11703
11704 \family default
11705 Instructions to the speaker.
11706  The () are automatically inserted, but only the ( will show in LyX.
11707  Both will be printed.
11708 \end_layout
11709
11710 \begin_layout Itemize
11711
11712 \family sans
11713 Dialogue
11714 \begin_inset space \hfill{}
11715 \end_inset
11716
11717 M-z d
11718 \begin_inset Newline newline
11719 \end_inset
11720
11721
11722 \family default
11723 What the 
11724 \family sans
11725 Speaker
11726 \family default
11727  says.
11728 \end_layout
11729
11730 \begin_layout Itemize
11731
11732 \family sans
11733 Transition
11734 \begin_inset space \hfill{}
11735 \end_inset
11736
11737 M-z t
11738 \begin_inset Newline newline
11739 \end_inset
11740
11741
11742 \family default
11743 Camera movement instruction.
11744  e.
11745 \begin_inset space \thinspace{}
11746 \end_inset
11747
11748 g.
11749 \begin_inset space \space{}
11750 \end_inset
11751
11752 CUT TO:
11753 \end_layout
11754
11755 \begin_layout Itemize
11756
11757 \family sans
11758 FADE OUT:
11759 \begin_inset space \hfill{}
11760 \end_inset
11761
11762 M-z S-I
11763 \end_layout
11764
11765 \begin_layout Itemize
11766
11767 \family sans
11768 Author
11769 \begin_inset space \hfill{}
11770 \end_inset
11771
11772 M-z S-A
11773 \end_layout
11774
11775 \begin_layout Itemize
11776
11777 \family sans
11778 Title
11779 \begin_inset space \hfill{}
11780 \end_inset
11781
11782 M-z S-T
11783 \end_layout
11784
11785 \begin_layout Itemize
11786
11787 \family sans
11788 Right_Address
11789 \begin_inset space \hfill{}
11790 \end_inset
11791
11792 M-z r
11793 \end_layout
11794
11795 \begin_layout Subsection
11796 Script jargon
11797 \end_layout
11798
11799 \begin_layout Itemize
11800 (O.S) — off screen
11801 \end_layout
11802
11803 \begin_layout Itemize
11804 (V.0) — voice over
11805 \end_layout
11806
11807 \begin_layout Itemize
11808 b.
11809 \begin_inset space \thinspace{}
11810 \end_inset
11811
11812 g.
11813  — background
11814 \end_layout
11815
11816 \begin_layout Itemize
11817 C.U.
11818  — close-up
11819 \end_layout
11820
11821 \begin_layout Itemize
11822 PAN — camera movement
11823 \end_layout
11824
11825 \begin_layout Itemize
11826 INSERT — cut to close-up of
11827 \end_layout
11828
11829 \begin_layout Section
11830 ijmpc and ijmpd
11831 \end_layout
11832
11833 \begin_layout Standard
11834 by 
11835 \noun on
11836 Panayotis Papasotiriou
11837 \end_layout
11838
11839 \begin_layout Subsection
11840 Overview
11841 \end_layout
11842
11843 \begin_layout Standard
11844 The ijmpc package is a set of macros that facilitates electronic manuscript
11845  submission to the 
11846 \emph on
11847 International Journal of Modern Physics C
11848 \emph default
11849 .
11850  Similarly, the ijmpd package is for creating manuscripts to be submitted
11851  to the 
11852 \emph on
11853 International Journal of Modern Physics D
11854 \emph default
11855 .
11856  Both journals are published by World Scientific.
11857  The corresponding document classes are named 
11858 \family typewriter
11859 ws-ijmpc.cls
11860 \family default
11861  and 
11862 \family typewriter
11863 ws-ijmpd.cls
11864 \family default
11865 , respectively.
11866  These files, together with instructions for the authors, can be downloaded
11867  from the sites 
11868 \begin_inset Flex URL
11869 status collapsed
11870
11871 \begin_layout Plain Layout
11872
11873 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11874 \end_layout
11875
11876 \end_inset
11877
11878  and 
11879 \begin_inset Flex URL
11880 status collapsed
11881
11882 \begin_layout Plain Layout
11883
11884 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11885 \end_layout
11886
11887 \end_inset
11888
11889 .
11890  Both packages are modified versions of the standard 
11891 \begin_inset Quotes eld
11892 \end_inset
11893
11894 article
11895 \begin_inset Quotes erd
11896 \end_inset
11897
11898  package, and they are almost (but not exactly) identical.
11899  Most of their features are supported by LyX.
11900  I have used LyX successfully to write articles submitted to both journals
11901  without any problem.
11902 \end_layout
11903
11904 \begin_layout Subsection
11905 Writing a paper
11906 \end_layout
11907
11908 \begin_layout Standard
11909 As usual, the easiest way to write a paper is to start with a template.
11910  Click on 
11911 \family sans
11912 File\SpecialChar \menuseparator
11913 New from
11914 \family default
11915  
11916 \family sans
11917 \bar under
11918 T
11919 \bar default
11920 emplate
11921 \family default
11922 , then choose the 
11923 \family typewriter
11924 ijmpc.lyx
11925 \family default
11926  or 
11927 \family typewriter
11928 ijmpd.lyx
11929 \family default
11930  template.
11931  This will give an (almost) empty document that includes the most common
11932  fields found in a manuscript.
11933  Simply overwrite the existing text (including the brackets, 
11934 \family typewriter
11935 <>
11936 \family default
11937 ) with your text.
11938  You should keep in mind the following remarks.
11939 \end_layout
11940
11941 \begin_layout Enumerate
11942 LyX won't let you change the font size and the page style of the document,
11943  because such modifications are not allowed by both packages.
11944 \end_layout
11945
11946 \begin_layout Enumerate
11947 The language of the document should not be changed.
11948  Before previewing your paper, be sure that the babel package is not used.
11949  To do this, click on 
11950 \family sans
11951 Tools\SpecialChar \menuseparator
11952 Preferences
11953 \family default
11954 , select the 
11955 \family sans
11956 Lang Opts
11957 \family default
11958  tab, deselect the 
11959 \family sans
11960 Use babel
11961 \family default
11962  checkbox in the language settings, and click on 
11963 \family sans
11964 Apply
11965 \family default
11966  (or 
11967 \family sans
11968 Save
11969 \family default
11970 , if you wish to make this change permanent).
11971 \end_layout
11972
11973 \begin_layout Enumerate
11974 The 
11975 \begin_inset Quotes eld
11976 \end_inset
11977
11978 Keywords
11979 \begin_inset Quotes erd
11980 \end_inset
11981
11982  style must be used to define keywords.
11983 \end_layout
11984
11985 \begin_layout Enumerate
11986 The ijmpc package provides a style named 
11987 \begin_inset Quotes eld
11988 \end_inset
11989
11990 Classification Codes
11991 \begin_inset Quotes erd
11992 \end_inset
11993
11994 , which can be used to define classification codes, such as PACS numbers.
11995  Note that this facility is not supported by the ijmpd package.
11996 \end_layout
11997
11998 \begin_layout Enumerate
11999 Several new environments are available: 
12000 \begin_inset Quotes eld
12001 \end_inset
12002
12003 Definition
12004 \begin_inset Quotes erd
12005 \end_inset
12006
12007
12008 \begin_inset Quotes eld
12009 \end_inset
12010
12011 Step
12012 \begin_inset Quotes erd
12013 \end_inset
12014
12015
12016 \begin_inset Quotes eld
12017 \end_inset
12018
12019 Example
12020 \begin_inset Quotes erd
12021 \end_inset
12022
12023
12024 \begin_inset Quotes eld
12025 \end_inset
12026
12027 Remark
12028 \begin_inset Quotes erd
12029 \end_inset
12030
12031
12032 \begin_inset Quotes eld
12033 \end_inset
12034
12035 Notation
12036 \begin_inset Quotes erd
12037 \end_inset
12038
12039
12040 \begin_inset Quotes eld
12041 \end_inset
12042
12043 Theorem
12044 \begin_inset Quotes erd
12045 \end_inset
12046
12047
12048 \begin_inset Quotes eld
12049 \end_inset
12050
12051 Proof
12052 \begin_inset Quotes erd
12053 \end_inset
12054
12055
12056 \begin_inset Quotes eld
12057 \end_inset
12058
12059 Corollary
12060 \begin_inset Quotes erd
12061 \end_inset
12062
12063
12064 \begin_inset Quotes eld
12065 \end_inset
12066
12067 Lemma
12068 \begin_inset Quotes erd
12069 \end_inset
12070
12071
12072 \begin_inset Quotes eld
12073 \end_inset
12074
12075 Proposition
12076 \begin_inset Quotes erd
12077 \end_inset
12078
12079
12080 \begin_inset Quotes eld
12081 \end_inset
12082
12083 Prop
12084 \begin_inset Quotes erd
12085 \end_inset
12086
12087
12088 \begin_inset Quotes eld
12089 \end_inset
12090
12091 Question
12092 \begin_inset Quotes erd
12093 \end_inset
12094
12095
12096 \begin_inset Quotes eld
12097 \end_inset
12098
12099 Claim
12100 \begin_inset Quotes erd
12101 \end_inset
12102
12103 , and 
12104 \begin_inset Quotes eld
12105 \end_inset
12106
12107 Conjecture
12108 \begin_inset Quotes erd
12109 \end_inset
12110
12111 .
12112  Their use is more or less obvious.
12113  LyX supports all these environments; it will use the proper label, text
12114  style, and numbering scheme for each of them.
12115 \end_layout
12116
12117 \begin_layout Enumerate
12118 Both packages use basic citations; the natbib package should not be used.
12119  In LyX, citation references are shown as usual; in the output, citations
12120  are shown as superscripts.
12121  If you want to use a citation as normal text, you should use the 
12122 \family typewriter
12123 refcite
12124 \family default
12125  command, e.
12126 \begin_inset space \thinspace{}
12127 \end_inset
12128
12129 g.
12130 \begin_inset space \space{}
12131 \end_inset
12132
12133
12134 \begin_inset Quotes eld
12135 \end_inset
12136
12137 See Ref.
12138 \begin_inset space \space{}
12139 \end_inset
12140
12141
12142 \family typewriter
12143
12144 \backslash
12145 refcite{key}
12146 \family default
12147
12148 \begin_inset Quotes erd
12149 \end_inset
12150
12151 .
12152 \end_layout
12153
12154 \begin_layout Enumerate
12155 There is no 
12156 \begin_inset Quotes eld
12157 \end_inset
12158
12159 Acknowledgments
12160 \begin_inset Quotes erd
12161 \end_inset
12162
12163  section in both packages.
12164  To put acknowledgments, just use the 
12165 \begin_inset Quotes eld
12166 \end_inset
12167
12168 Section*
12169 \begin_inset Quotes erd
12170 \end_inset
12171
12172  environment.
12173 \end_layout
12174
12175 \begin_layout Enumerate
12176 Appendices may be added to the paper, 
12177 \emph on
12178 after
12179 \emph default
12180  the Acknowledgments and 
12181 \shape italic
12182 before
12183 \shape default
12184  the References.
12185  LyX provides a special environment, called 
12186 \begin_inset Quotes eld
12187 \end_inset
12188
12189 Appendices Section
12190 \begin_inset Quotes erd
12191 \end_inset
12192
12193  which marks the beginning of the appendices.
12194  This environment should be left blank; it just sends a LaTeX command, but
12195  nothing is really printed.
12196  In LyX, the word 
12197 \begin_inset Quotes eld
12198 \end_inset
12199
12200 Appendix
12201 \begin_inset Quotes erd
12202 \end_inset
12203
12204  is printed with blue letters, as a signal that all sections after that
12205  point are appendices.
12206  To write an appendix, use the 
12207 \begin_inset Quotes eld
12208 \end_inset
12209
12210 Appendix
12211 \begin_inset Quotes erd
12212 \end_inset
12213
12214  environment.
12215  LyX will number each appendix with capital letters, as required by both
12216  journals.
12217  Note that 
12218 \begin_inset Quotes eld
12219 \end_inset
12220
12221 Appendices Section
12222 \begin_inset Quotes erd
12223 \end_inset
12224
12225  
12226 \emph on
12227 must
12228 \emph default
12229  be present before the first appendix; if not, all appendices will be numbered
12230  as normal sections in the output.
12231 \end_layout
12232
12233 \begin_layout Enumerate
12234 The ijmpc and the ijmpd packages use the 
12235 \family typewriter
12236 tbl
12237 \family default
12238  command to implement table captions.
12239  As a result, a table created by LyX is printed correctly, but its caption
12240  is ignored.
12241  However, you can use some TeX code to overcome this problem, so that captions
12242  are printed as expected.
12243  To do so, create a float table as usual, remove the caption, and replace
12244  it with the TeX code 
12245 \family typewriter
12246
12247 \backslash
12248 tbl{
12249 \emph on
12250 your table caption
12251 \emph default
12252 }{
12253 \family default
12254  (sic); you must also the TeX code 
12255 \family typewriter
12256 }
12257 \family default
12258  immediately after the tabular material.
12259  Study the example table included in the template files to see how this
12260  trick is implemented.
12261  Alternatively, If you need table captions, you should implement the whole
12262  table float in a 
12263 \family typewriter
12264 .tex
12265 \family default
12266  file, then include this file to the LyX document (
12267 \family sans
12268 Insert\SpecialChar \menuseparator
12269 File\SpecialChar \menuseparator
12270 Child
12271 \begin_inset space ~
12272 \end_inset
12273
12274 Document
12275 \family default
12276 ).
12277  Details on how to create a table float can be found in the files 
12278 \family typewriter
12279 ws-ijmpc.tex
12280 \family default
12281  and 
12282 \family typewriter
12283 ws-ijmpd.tex
12284 \family default
12285 , included in the corresponding packages.
12286 \end_layout
12287
12288 \begin_layout Subsection
12289 Preparing a paper for submission
12290 \end_layout
12291
12292 \begin_layout Standard
12293 Before you submit your paper you must export the LyX document as a LaTeX
12294  file (
12295 \family sans
12296 File\SpecialChar \menuseparator
12297 Export\SpecialChar \menuseparator
12298 LaTeX
12299 \family default
12300 )
12301 \begin_inset Foot
12302 status open
12303
12304 \begin_layout Plain Layout
12305 Actually you have the choice between LaTeX (plain) and pdflatex.
12306  If you intend to use pdflatex to prepare the paper, you should use the
12307  pdflatex option so that included graphics are converted to PDF format,
12308  ready for use by pdflatex.
12309 \end_layout
12310
12311 \end_inset
12312
12313 , then make the following changes to the resulting 
12314 \family typewriter
12315 .tex
12316 \family default
12317  file.
12318 \end_layout
12319
12320 \begin_layout Enumerate
12321 Remove the comment lines before the 
12322 \family typewriter
12323
12324 \backslash
12325 documentclass
12326 \family default
12327  command.
12328 \end_layout
12329
12330 \begin_layout Enumerate
12331 Remove everything between (and including) the 
12332 \family typewriter
12333
12334 \backslash
12335 makeatletter
12336 \family default
12337  and 
12338 \family typewriter
12339
12340 \backslash
12341 makeatother
12342 \family default
12343  commands, except for any commands you specifically put into the LaTeX preamble.
12344 \end_layout
12345
12346 \begin_layout Standard
12347 The modified 
12348 \family typewriter
12349 .tex
12350 \family default
12351  file should be saved and processed through LaTeX as many times as necessary.
12352  You may also want to check the resulting 
12353 \family typewriter
12354 .dvi
12355 \family default
12356  document.
12357 \end_layout
12358
12359 \begin_layout Subsection
12360 Use of TeX code
12361 \end_layout
12362
12363 \begin_layout Standard
12364 The use of TeX code is reduced to two commands, which must be placed at
12365  the top of the document.
12366  If you started writing your paper by using the 
12367 \family typewriter
12368 ijmpc.lyx
12369 \family default
12370  or the 
12371 \family typewriter
12372 ijmpd.lyx
12373 \family default
12374  template, the TeX code needed is already in its place; you usually don't
12375  need to delete it.
12376  You may only modify the first TeX code to specify the information printed
12377  to the top of odd and even pages (authors' names and short paper's title,
12378  respectively).
12379  This TeX code must have the form 
12380 \family typewriter
12381
12382 \backslash
12383 markboth{Authors' Names}{Short Paper's Title}
12384 \family default
12385 .
12386 \end_layout
12387
12388 \begin_layout Section
12389 iopart
12390 \end_layout
12391
12392 \begin_layout Standard
12393 by 
12394 \noun on
12395 Uwe Stöhr
12396 \end_layout
12397
12398 \begin_layout Subsection
12399 Overview
12400 \end_layout
12401
12402 \begin_layout Standard
12403 The iopart package provides a document class to create electronic manuscript
12404  submission to the journals published by the Institute of Physics.
12405  Instructions for the authors how to create a paper using the iopart class
12406  can be downloaded together with the iopart package from the site 
12407 \begin_inset Flex URL
12408 status collapsed
12409
12410 \begin_layout Plain Layout
12411
12412 ftp://ftp.iop.org/pub/journals/latex2e
12413 \end_layout
12414
12415 \end_inset
12416
12417 .
12418 \end_layout
12419
12420 \begin_layout Subsection
12421 Writing a paper
12422 \end_layout
12423
12424 \begin_layout Standard
12425 The easiest way to write a paper is to start with the file 
12426 \emph on
12427 IOP-article.lyx
12428 \emph default
12429  that is available in LyX's examples files folder.
12430  Open this file, save it under a new name, and start writing.
12431  The example file explains how to use the special text environments.
12432  Here are the most important advices:
12433 \end_layout
12434
12435 \begin_layout Itemize
12436 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12437  two options 
12438 \family sans
12439 Use AMS math package
12440 \family default
12441  in the document settings under 
12442 \family sans
12443 Math Options
12444 \family default
12445  are not used!
12446 \end_layout
12447
12448 \begin_layout Itemize
12449
12450 \size normal
12451 The title environment defines the kind of your paper.
12452  So use one of the following environments for the title:
12453 \end_layout
12454
12455 \begin_deeper
12456 \begin_layout Itemize
12457
12458 \family sans
12459 \size normal
12460 Title
12461 \family default
12462  for a Paper
12463 \end_layout
12464
12465 \begin_layout Itemize
12466
12467 \family sans
12468 \size normal
12469 Review
12470 \family default
12471  for a Review
12472 \end_layout
12473
12474 \begin_layout Itemize
12475
12476 \family sans
12477 \size normal
12478 Topical
12479 \family default
12480  for a Topical review
12481 \end_layout
12482
12483 \begin_layout Itemize
12484
12485 \family sans
12486 \size normal
12487 Comment
12488 \family default
12489  for a Comment
12490 \end_layout
12491
12492 \begin_layout Itemize
12493
12494 \family sans
12495 \size normal
12496 Note
12497 \family default
12498  for a Note
12499 \end_layout
12500
12501 \begin_layout Itemize
12502
12503 \family sans
12504 \size normal
12505 Paper
12506 \family default
12507  for a Paper (same as Title)
12508 \end_layout
12509
12510 \begin_layout Itemize
12511
12512 \family sans
12513 \size normal
12514 Prelim
12515 \family default
12516  for a Preliminary communication
12517 \end_layout
12518
12519 \begin_layout Itemize
12520
12521 \family sans
12522 \size normal
12523 Rapid
12524 \family default
12525  for a Rapid communication
12526 \end_layout
12527
12528 \begin_layout Itemize
12529
12530 \family sans
12531 \size normal
12532 Letter
12533 \family default
12534  for a Letter to the editor
12535 \end_layout
12536
12537 \end_deeper
12538 \begin_layout Itemize
12539
12540 \size normal
12541 All title environments except of 
12542 \family sans
12543 Letter
12544 \family default
12545  can have an optional short title.
12546 \end_layout
12547
12548 \begin_layout Itemize
12549 There is a general title environment 
12550 \family sans
12551 Article
12552 \family default
12553  which is not directly supported by the LyX.
12554  This can be used as TeX code when your document doesn't fit into one of
12555  the other title types.
12556 \end_layout
12557
12558 \begin_layout Standard
12559 For more informations like hints for special table and formula formatting,
12560  look at the IOP author guidelines.
12561 \end_layout
12562
12563 \begin_layout Section
12564 Kluwer
12565 \end_layout
12566
12567 \begin_layout Standard
12568 by 
12569 \noun on
12570 Panayotis Papasotiriou
12571 \end_layout
12572
12573 \begin_layout Subsection
12574 Overview
12575 \end_layout
12576
12577 \begin_layout Standard
12578 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12579  that facilitates electronic manuscript submission to the journals they
12580  publish.
12581  Most known of them (at least in my domain of interest) are 
12582 \emph on
12583 Astrophysics and Space Science
12584 \emph default
12585  and 
12586 \emph on
12587 Solar Physics
12588 \emph default
12589 , but there are many others (see a complete list at 
12590 \begin_inset Flex URL
12591 status open
12592
12593 \begin_layout Plain Layout
12594
12595 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12596 \end_layout
12597
12598 \end_inset
12599
12600 ).
12601  The Kluwer package may be downloaded from the site 
12602 \begin_inset Flex URL
12603 status collapsed
12604
12605 \begin_layout Plain Layout
12606
12607 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12608 \end_layout
12609
12610 \end_inset
12611
12612 .
12613  A complete user guide is contained in that package (but it can also be
12614  downloaded separately).
12615 \end_layout
12616
12617 \begin_layout Standard
12618 LyX supports many features of the package but not everything.
12619  However, the TeX code needed is reduced to some 
12620 \begin_inset Quotes eld
12621 \end_inset
12622
12623 peculiar
12624 \begin_inset Quotes erd
12625 \end_inset
12626
12627  commands of the package (see
12628 \begin_inset space ~
12629 \end_inset
12630
12631
12632 \begin_inset CommandInset ref
12633 LatexCommand ref
12634 reference "subsec:kluwer_peculiarities"
12635
12636 \end_inset
12637
12638 ).
12639  I have recently used LyX to write an article submitted to the 
12640 \emph on
12641 Astrophysics and Space Science
12642 \emph default
12643  without any problem.
12644 \end_layout
12645
12646 \begin_layout Subsection
12647 Writing a paper
12648 \end_layout
12649
12650 \begin_layout Standard
12651 The easiest way to write a paper is to start with the Kluwer template file.
12652  Click on 
12653 \family sans
12654 File\SpecialChar \menuseparator
12655 New from
12656 \family default
12657  
12658 \family sans
12659 Template
12660 \family default
12661 , then choose the 
12662 \family typewriter
12663 kluwer.lyx
12664 \family default
12665  template.
12666  This will give an (almost) empty document that includes the most common
12667  fields found in a manuscript and a short description of their use.
12668  As in most templates, simply overwrite the existing text (including the
12669  brackets, 
12670 \family typewriter
12671 <>
12672 \family default
12673 ) with the correct information.
12674 \end_layout
12675
12676 \begin_layout Subsection
12677 Preparing a paper for submission
12678 \end_layout
12679
12680 \begin_layout Standard
12681 As in the AASTeX package, before you submit your paper to a journal you
12682  must 
12683 \begin_inset Quotes eld
12684 \end_inset
12685
12686 postprocess
12687 \begin_inset Quotes erd
12688 \end_inset
12689
12690  it as follows.
12691 \end_layout
12692
12693 \begin_layout Enumerate
12694 Export your paper as a LaTeX file.
12695  To do this, click on 
12696 \family sans
12697 File\SpecialChar \menuseparator
12698 Export\SpecialChar \menuseparator
12699 LaTeX
12700 \family default
12701 .
12702  
12703 \end_layout
12704
12705 \begin_layout Enumerate
12706 Edit the resulting 
12707 \family typewriter
12708 .tex
12709 \family default
12710  file with a text editor and make the following changes
12711 \end_layout
12712
12713 \begin_deeper
12714 \begin_layout Enumerate
12715 remove the comment lines before the 
12716 \family typewriter
12717
12718 \backslash
12719 documentclass
12720 \family default
12721  command,
12722 \end_layout
12723
12724 \begin_layout Enumerate
12725 remove everything between (and including) the 
12726 \family typewriter
12727
12728 \backslash
12729 makeatletter
12730 \family default
12731  and 
12732 \family typewriter
12733
12734 \backslash
12735 makeatother
12736 \family default
12737  commands, except for any commands you specifically put into the LaTeX preamble.
12738 \end_layout
12739
12740 \begin_layout Standard
12741 Save the resulting 
12742 \family typewriter
12743 .tex
12744 \family default
12745  file.
12746 \end_layout
12747
12748 \end_deeper
12749 \begin_layout Enumerate
12750 Run the 
12751 \family typewriter
12752 .tex
12753 \family default
12754  file through LaTeX as many times as necessary (usually up to three).
12755 \end_layout
12756
12757 \begin_layout Enumerate
12758 View the resulting 
12759 \family typewriter
12760 .dvi
12761 \family default
12762  document using, e.
12763 \begin_inset space \thinspace{}
12764 \end_inset
12765
12766 g.
12767 \begin_inset space \space{}
12768 \end_inset
12769
12770
12771 \family sans
12772 xdvi
12773 \family default
12774 , and check if everything is OK (it should, if you didn't make any mistake).
12775 \end_layout
12776
12777 \begin_layout Subsection
12778 \begin_inset Quotes eld
12779 \end_inset
12780
12781 Peculiarities
12782 \begin_inset Quotes erd
12783 \end_inset
12784
12785  of the Kluwer package
12786 \begin_inset CommandInset label
12787 LatexCommand label
12788 name "subsec:kluwer_peculiarities"
12789
12790 \end_inset
12791
12792
12793 \end_layout
12794
12795 \begin_layout Standard
12796 The Kluwer package has the following 
12797 \begin_inset Quotes eld
12798 \end_inset
12799
12800 peculiarities
12801 \begin_inset Quotes erd
12802 \end_inset
12803
12804 .
12805 \end_layout
12806
12807 \begin_layout Enumerate
12808 It is possible to write multiple articles in the same LaTeX file
12809 \begin_inset Foot
12810 status collapsed
12811
12812 \begin_layout Plain Layout
12813 I can't imagine any good reason to do this.
12814 \end_layout
12815
12816 \end_inset
12817
12818 .
12819  Each article must be included in the environment 
12820 \begin_inset Quotes eld
12821 \end_inset
12822
12823 article
12824 \begin_inset Quotes erd
12825 \end_inset
12826
12827 .
12828  Unfortunately, this environment cannot be omitted, even if you write just
12829  one article.
12830  Therefore, each article starts with the command 
12831 \family typewriter
12832
12833 \backslash
12834 begin{article}
12835 \family default
12836  and, obviously, ends with the command 
12837 \family typewriter
12838
12839 \backslash
12840 end{article}
12841 \family default
12842 .
12843  Although this can be implemented in LyX, I didn't included it, since it
12844  looks ugly and can confuse the novice user.
12845  Therefore, you need to enter them directly and mark them as LaTeX code
12846  (the well-known 
12847 \begin_inset Quotes eld
12848 \end_inset
12849
12850 TeX code
12851 \begin_inset Quotes erd
12852 \end_inset
12853
12854 ).
12855 \end_layout
12856
12857 \begin_layout Enumerate
12858 Information given at the beginning of the article (i.
12859 \begin_inset space \thinspace{}
12860 \end_inset
12861
12862 g.
12863 \begin_inset space \space{}
12864 \end_inset
12865
12866 title, subtitle, author, institution, running title, running author, abstract
12867  and keywords) must be included in an environment called 
12868 \begin_inset Quotes eld
12869 \end_inset
12870
12871 opening
12872 \begin_inset Quotes erd
12873 \end_inset
12874
12875 .
12876  This is not implemented in LyX, so you must enter title, subtitle etc.
12877 \begin_inset space ~
12878 \end_inset
12879
12880 between two TeX code lines (
12881 \family typewriter
12882
12883 \backslash
12884 begin{opening}
12885 \family default
12886  and 
12887 \family typewriter
12888
12889 \backslash
12890 end{opening}
12891 \family default
12892 ).
12893 \end_layout
12894
12895 \begin_layout Enumerate
12896 According to the user manual, the label of each bibliography item must be
12897  written as 
12898 \family typewriter
12899
12900 \backslash
12901 protect
12902 \backslash
12903 citeauthoryear{
12904 \family default
12905 \emph on
12906 author(s)
12907 \family typewriter
12908 \emph default
12909 }{
12910 \family default
12911 \emph on
12912 year
12913 \family typewriter
12914 \emph default
12915 }
12916 \family default
12917 .
12918 \end_layout
12919
12920 \begin_layout Standard
12921 The 
12922 \family typewriter
12923 kluwer.lyx
12924 \family default
12925  template takes care of all these 
12926 \begin_inset Quotes eld
12927 \end_inset
12928
12929 peculiarities
12930 \begin_inset Quotes erd
12931 \end_inset
12932
12933 .
12934  If you start a new paper using this template you don't need to do anything
12935  special.
12936  Just 
12937 \end_layout
12938
12939 \begin_layout Enumerate
12940 don't delete the TeX code included in the template, and
12941 \end_layout
12942
12943 \begin_layout Enumerate
12944 copy the example bibliography item included in the template and modify it
12945  as necessary to enter new bibliography items.
12946 \end_layout
12947
12948 \begin_layout Section
12949 Koma-Script
12950 \end_layout
12951
12952 \begin_layout Standard
12953 by 
12954 \noun on
12955 Bernd Rellermeyer
12956 \end_layout
12957
12958 \begin_layout Subsection
12959 Overview
12960 \end_layout
12961
12962 \begin_layout Standard
12963 The LyX document classes 
12964 \emph on
12965 article (koma-script)
12966 \emph default
12967
12968 \emph on
12969 report (koma-script)
12970 \emph default
12971
12972 \emph on
12973 book
12974 \emph default
12975  
12976 \emph on
12977 (koma-script)
12978 \emph default
12979 , and 
12980 \emph on
12981 letter
12982 \emph default
12983  
12984 \emph on
12985 (koma-script)
12986 \emph default
12987  correspond to the LaTeX document classes 
12988 \family typewriter
12989 scrartcl.cls
12990 \family default
12991
12992 \family typewriter
12993 scrreprt.cls
12994 \family default
12995
12996 \family typewriter
12997 scrbook.cls
12998 \family default
12999 , and 
13000 \family typewriter
13001 scrlettr.cls
13002 \family default
13003 , resp.
13004 \begin_inset space ~
13005 \end_inset
13006
13007 of the Koma-Script family.
13008  They are replacements for the standard document classes 
13009 \family typewriter
13010 article.cls
13011 \family default
13012
13013 \family typewriter
13014 report.cls
13015 \family default
13016
13017 \family typewriter
13018 book.cls
13019 \family default
13020  and 
13021 \family typewriter
13022 letter.cls
13023 \family default
13024 , resp., and fit better to European typography conventions in a number of
13025  points.
13026 \end_layout
13027
13028 \begin_layout Itemize
13029 Standard character size is 11pt in 
13030 \emph on
13031 article (koma-script)
13032 \emph default
13033
13034 \emph on
13035 report (koma-script)
13036 \emph default
13037 , and 
13038 \emph on
13039 book (koma-script)
13040 \emph default
13041 , and 12pt in 
13042 \emph on
13043 letter (koma-script)
13044 \emph default
13045 .
13046 \end_layout
13047
13048 \begin_layout Itemize
13049 Headings, labels of the description environment, and a number of elements
13050  of the 
13051 \emph on
13052 letter (koma-script)
13053 \emph default
13054  document class are set in a bold sans serif font.
13055 \begin_inset Foot
13056 status collapsed
13057
13058 \begin_layout Plain Layout
13059 There is a big difference between the bold sans serif old cm fonts and new
13060  ec fonts, especially in the appearance of headings.
13061  In comparison, the ec bold sans serif fonts look a bit thin.
13062  Here the LaTeX package 
13063 \family typewriter
13064 cmsd.sty by
13065 \family default
13066  
13067 \shape smallcaps
13068 Walter Schmidt
13069 \shape default
13070  helps to produce the 
13071 \begin_inset Quotes eld
13072 \end_inset
13073
13074 usual
13075 \begin_inset Quotes erd
13076 \end_inset
13077
13078  appearance when using the ec fonts.
13079 \end_layout
13080
13081 \end_inset
13082
13083  The numbering of chapter headings is made in the same way as the numbering
13084  of section headings, that is without the extra line 
13085 \begin_inset Quotes eld
13086 \end_inset
13087
13088 Chapter\SpecialChar \ldots{}
13089
13090 \begin_inset Quotes erd
13091 \end_inset
13092
13093 .
13094  In addition, the appearance of the headings can be modified by using a
13095  number of options (in LyX to be entered in the field 
13096 \family sans
13097 Extra
13098 \begin_inset space ~
13099 \end_inset
13100
13101 Options
13102 \family default
13103  of the dialog 
13104 \family sans
13105 Layout\SpecialChar \menuseparator
13106 Document
13107 \family default
13108 ).
13109  
13110 \end_layout
13111
13112 \begin_layout Itemize
13113 The main means in the Koma-Script document classes to design the type area
13114  are the options 
13115 \family sans
13116 BCOR
13117 \family default
13118  and 
13119 \family sans
13120 DIV
13121 \family default
13122  (in LyX to be entered in the extra class options field in the dialog 
13123 \family sans
13124 Document\SpecialChar \menuseparator
13125 Settings
13126 \family default
13127 ).
13128  They make a clearer modification of page margins possible as do the options
13129  of the dialog 
13130 \family sans
13131 Document\SpecialChar \menuseparator
13132 Settings
13133 \family default
13134 .
13135  
13136 \end_layout
13137
13138 \begin_layout Itemize
13139 The LaTeX document classes of the Koma-Script family define a number of
13140  additional commands.
13141  Those part of it which makes sense in LyX is implemented in corresponding
13142  paragraph types.
13143 \end_layout
13144
13145 \begin_layout Standard
13146 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13147  can be found in the Koma-Script documentation 
13148 \emph on
13149 scrguide
13150 \emph default
13151  (German) and 
13152 \emph on
13153 scrguien
13154 \emph default
13155  (English).
13156 \end_layout
13157
13158 \begin_layout Subsection
13159 article (koma-script), report (koma-script), and book (koma-script)
13160 \end_layout
13161
13162 \begin_layout Standard
13163 The document classes 
13164 \emph on
13165 article (koma-script)
13166 \emph default
13167
13168 \emph on
13169 report (koma-script)
13170 \emph default
13171 , and 
13172 \emph on
13173 book
13174 \emph default
13175  
13176 \emph on
13177 (koma-script)
13178 \emph default
13179  are implemented in the layout files 
13180 \family typewriter
13181 scrartcl.layout
13182 \family default
13183
13184 \family typewriter
13185 scrreprt.layout
13186 \family default
13187 , and 
13188 \family typewriter
13189 scrbook.layout
13190 \family default
13191 , resp.
13192  They contain all the paragraph types of the corresponding standard document
13193  classes 
13194 \emph on
13195 article
13196 \emph default
13197
13198 \emph on
13199 report
13200 \emph default
13201 , and 
13202 \emph on
13203 book
13204 \emph default
13205 , resp., partly modified, with the exception of the LyX specific 
13206 \family sans
13207 List
13208 \family default
13209 -type, which is replaced by the new 
13210 \family sans
13211 Labeling
13212 \family default
13213 -type having the same functionality.
13214  Beside the 
13215 \family sans
13216 Labeling
13217 \family default
13218 -Type there is a number of new paragraph types added.
13219  They are 
13220 \emph on
13221 not
13222 \emph default
13223  part of 
13224 \emph on
13225 letter (koma-script)
13226 \emph default
13227 .
13228 \end_layout
13229
13230 \begin_layout Itemize
13231
13232 \family sans
13233 Addpart, Addchap
13234 \family default
13235
13236 \family sans
13237 Addsec
13238 \family default
13239 : are equivalents to 
13240 \family sans
13241 Part*, Chapter*
13242 \family default
13243  and 
13244 \family sans
13245 Section*
13246 \family default
13247 , resp., additionally inserting an entry in the table of contents.
13248  
13249 \family sans
13250 Addpart
13251 \family default
13252  and 
13253 \family sans
13254 Addchap
13255 \family default
13256  are not contained in 
13257 \emph on
13258 article (koma-script)
13259 \emph default
13260 .
13261 \end_layout
13262
13263 \begin_layout Itemize
13264
13265 \family sans
13266 Addchap*
13267 \family default
13268
13269 \family sans
13270 Addsec*
13271 \family default
13272 : behave exactly as 
13273 \family sans
13274 Addchap
13275 \family default
13276  and 
13277 \family sans
13278 Addsec
13279 \family default
13280 , resp., additionally clearing running heads.
13281  
13282 \family sans
13283 Addchap*
13284 \family default
13285  is not contained in 
13286 \emph on
13287 article (koma-script)
13288 \emph default
13289 .
13290 \begin_inset Foot
13291 status collapsed
13292
13293 \begin_layout Plain Layout
13294 There is also an 
13295 \family typewriter
13296
13297 \backslash
13298 addpart*
13299 \family default
13300  command in 
13301 \emph on
13302 book (koma-script)
13303 \emph default
13304  and in 
13305 \emph on
13306 report (koma-script)
13307 \emph default
13308 , but since this is identical to 
13309 \family sans
13310 Part*
13311 \family default
13312 , is has not been implemented in LyX.
13313 \end_layout
13314
13315 \end_inset
13316
13317
13318 \end_layout
13319
13320 \begin_layout Itemize
13321
13322 \family sans
13323 Minisec
13324 \family default
13325 : generates a heading directly above the following paragraph in the standard
13326  character size without affecting the structure of the document.
13327 \end_layout
13328
13329 \begin_layout Itemize
13330
13331 \family sans
13332 Captionabove
13333 \family default
13334  and 
13335 \family sans
13336 Captionbelow
13337 \family default
13338  are special captions which respect the different space settings needed
13339  for captions placed above or below an element (if you follow strict typographic
13340  rules, you might want to place table captions always above the table).
13341  You can also use the class option 
13342 \family typewriter
13343 tablecaptionsabove
13344 \family default
13345 , which will switch 
13346 \family sans
13347 caption
13348 \family default
13349  to 
13350 \family sans
13351 captionabove
13352 \family default
13353  for tables and 
13354 \family sans
13355 captionbelow
13356 \family default
13357  for figures.
13358  You need at least Koma-Script version 2.8q to use this.
13359 \end_layout
13360
13361 \begin_layout Itemize
13362
13363 \family sans
13364 Dictum
13365 \family default
13366 : can be used to set a bonmot, e.
13367 \begin_inset space \thinspace{}
13368 \end_inset
13369
13370 g.
13371 \begin_inset space \space{}
13372 \end_inset
13373
13374 at the beginning of a chapter.
13375  If you use the optional argument (
13376 \family sans
13377 Insert\SpecialChar \menuseparator
13378 Short
13379 \begin_inset space ~
13380 \end_inset
13381
13382 Title
13383 \family default
13384 ), you can insert the dictum's author there.
13385  Dictum and author are separated by a line.
13386  You need at least Koma-Script version 2.8q to use this.
13387  
13388 \family sans
13389 Dictum
13390 \family default
13391  is not contained in 
13392 \emph on
13393 article (koma-script)
13394 \emph default
13395 .
13396 \end_layout
13397
13398 \begin_layout Standard
13399 The following types, together with the standard types 
13400 \family sans
13401 Title
13402 \family default
13403
13404 \family sans
13405 Author
13406 \family default
13407 , and 
13408 \family sans
13409 Date
13410 \family default
13411 , form the title area of the document.
13412  They must be entered ahead of the first 
13413 \begin_inset Quotes eld
13414 \end_inset
13415
13416 ordinary
13417 \begin_inset Quotes erd
13418 \end_inset
13419
13420  paragraph.
13421 \begin_inset Foot
13422 status collapsed
13423
13424 \begin_layout Plain Layout
13425 The corresponding LaTeX commands must appear before the 
13426 \family typewriter
13427
13428 \backslash
13429 maketitle
13430 \family default
13431  command.
13432 \end_layout
13433
13434 \end_inset
13435
13436  When such a type is used more than once, the latter usage overwrites the
13437  former one, that means, for every type only the latest usage is valid.
13438  The order of the different types however has, like 
13439 \family sans
13440 Title
13441 \family default
13442
13443 \family sans
13444 Author
13445 \family default
13446 , and 
13447 \family sans
13448 Date
13449 \family default
13450 , no effect on the appearance of the produced document.
13451 \end_layout
13452
13453 \begin_layout Itemize
13454
13455 \family sans
13456 Subject
13457 \family default
13458 : produces a centered paragraph above the ordinary title (
13459 \family sans
13460 Title
13461 \family default
13462
13463 \family sans
13464 Author
13465 \family default
13466
13467 \family sans
13468 Date
13469 \family default
13470 ) for the subject of the document.
13471 \end_layout
13472
13473 \begin_layout Itemize
13474
13475 \family sans
13476 Publishers
13477 \family default
13478 : produces a centered paragraph below the ordinary title (
13479 \family sans
13480 Title
13481 \family default
13482
13483 \family sans
13484 Author
13485 \family default
13486
13487 \family sans
13488 Date
13489 \family default
13490 ) for the publishers' name.
13491 \end_layout
13492
13493 \begin_layout Itemize
13494
13495 \family sans
13496 Dedication
13497 \family default
13498 : in 
13499 \emph on
13500 report (koma-script)
13501 \emph default
13502  and 
13503 \emph on
13504 book (koma-script)
13505 \emph default
13506  produces a centered paragraph on its own page behind the title page, or
13507  in 
13508 \emph on
13509 article (koma-script)
13510 \emph default
13511  produces a centered paragraph below the ordinary title (
13512 \family sans
13513 Title
13514 \family default
13515
13516 \family sans
13517 Author
13518 \family default
13519
13520 \family sans
13521 Date
13522 \family default
13523
13524 \family sans
13525 Publishers
13526 \family default
13527 ) for a dedication.
13528 \end_layout
13529
13530 \begin_layout Itemize
13531
13532 \family sans
13533 Titlehead
13534 \family default
13535 : produces a left aligned paragraph above the ordinary title (
13536 \family sans
13537 Title
13538 \family default
13539
13540 \family sans
13541 Author
13542 \family default
13543
13544 \family sans
13545 Date
13546 \family default
13547
13548 \family sans
13549 Subject
13550 \family default
13551 ) for a document`s head.
13552 \end_layout
13553
13554 \begin_layout Itemize
13555
13556 \family sans
13557 Uppertitleback
13558 \family default
13559 : produces in a double-sided print in 
13560 \emph on
13561 report (koma-script)
13562 \emph default
13563  and 
13564 \emph on
13565 book (koma-script)
13566 \emph default
13567  a left-aligned paragraph at the top of the title page`s back or has no
13568  effect in a single-sided print or in 
13569 \emph on
13570 article (koma-script)
13571 \emph default
13572 .
13573 \end_layout
13574
13575 \begin_layout Itemize
13576
13577 \family sans
13578 Lowertitleback
13579 \family default
13580 : produces in a double-sided print in 
13581 \emph on
13582 report (koma-script)
13583 \emph default
13584  and 
13585 \emph on
13586 book (koma-script)
13587 \emph default
13588  a left-aligned paragraph at the bottom of the title page`s back or has
13589  no effect in a single-sided print or in 
13590 \emph on
13591 article (koma-script)
13592 \emph default
13593 .
13594 \end_layout
13595
13596 \begin_layout Itemize
13597
13598 \family sans
13599 Extratitle
13600 \family default
13601 : produces a special 
13602 \begin_inset Quotes eld
13603 \end_inset
13604
13605 dirty
13606 \begin_inset Quotes erd
13607 \end_inset
13608
13609  page ahead of the actual document containing a paragraph without special
13610  formatting.
13611 \end_layout
13612
13613 \begin_layout Standard
13614 The layout files for the document classes 
13615 \emph on
13616 article (koma-script)
13617 \emph default
13618
13619 \emph on
13620 report (koma-script)
13621 \emph default
13622 , and 
13623 \emph on
13624 book (koma-script)
13625 \emph default
13626  do include the file 
13627 \family typewriter
13628 scrmacros.inc
13629 \family default
13630 .
13631  This is thought of as a place to define your own types.
13632  Copy scrmacros
13633 \family typewriter
13634 .inc
13635 \family default
13636  in your personal layout directory and edit the file!
13637 \end_layout
13638
13639 \begin_layout Subsection
13640 letter (koma-script)
13641 \end_layout
13642
13643 \begin_layout Standard
13644 \noindent
13645 The document class 
13646 \emph on
13647 letter (koma-script)
13648 \emph default
13649  is implemented in the layout file 
13650 \family typewriter
13651 scrlettr.layout
13652 \family default
13653 .
13654  It contains all the paragraph types of the corresponding standard document
13655  class 
13656 \emph on
13657 letter
13658 \emph default
13659 , partly modified, with the exception of the LyX specific types 
13660 \family sans
13661 LyX-Code
13662 \family default
13663  and 
13664 \family sans
13665 Comment
13666 \family default
13667  and the 
13668 \family sans
13669 List
13670 \family default
13671  type, which is replaced by the new 
13672 \family sans
13673 Labeling
13674 \family default
13675  type.
13676  In addition, it contains, in contrast to the standard document class, the
13677  standard types 
13678 \family sans
13679 LaTeX
13680 \family default
13681
13682 \family sans
13683 Quotation
13684 \family default
13685
13686 \family sans
13687 Quote
13688 \family default
13689 , and 
13690 \family sans
13691 Verse
13692 \family default
13693 .
13694  Furthermore, there are a number of new letter specific types.
13695 \end_layout
13696
13697 \begin_layout Standard
13698 The appearance of the letter produced by this document class can be controlled
13699  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13700 \begin_inset Foot
13701 status collapsed
13702
13703 \begin_layout Plain Layout
13704 For example, the standard appearance of the letter`s heading, consisting
13705  of name and address, is quite self-willed.
13706  An 
13707 \begin_inset Quotes eld
13708 \end_inset
13709
13710 ordinary
13711 \begin_inset Quotes erd
13712 \end_inset
13713
13714  heading is produced by the following LaTeX commands in the preamble:
13715 \end_layout
13716
13717 \begin_layout LyX-Code
13718
13719 \backslash
13720 firsthead{
13721 \backslash
13722 parbox[b]{
13723 \backslash
13724 textwidth}
13725 \end_layout
13726
13727 \begin_layout LyX-Code
13728   {
13729 \backslash
13730 ignorespaces 
13731 \backslash
13732 fromname
13733 \backslash
13734
13735 \backslash
13736  
13737 \backslash
13738 ignorespaces 
13739 \backslash
13740 fromaddress}} 
13741 \end_layout
13742
13743 \begin_layout LyX-Code
13744
13745 \backslash
13746 nexthead{
13747 \backslash
13748 parbox[b]{
13749 \backslash
13750 textwidth}
13751 \end_layout
13752
13753 \begin_layout LyX-Code
13754   {
13755 \backslash
13756 ignorespaces 
13757 \backslash
13758 fromname 
13759 \backslash
13760 hfill 
13761 \backslash
13762 ignorespaces 
13763 \backslash
13764 pagename
13765 \backslash
13766  
13767 \backslash
13768 thepage}}
13769 \end_layout
13770
13771 \end_inset
13772
13773  A detailed German description of such LaTeX commands can be found in the
13774  Koma-Script documentation 
13775 \emph on
13776 scrguide
13777 \emph default
13778 .
13779  With it, the letter's author can produce his personal letter layout.
13780 \end_layout
13781
13782 \begin_layout Standard
13783 The types 
13784 \family sans
13785 Letter
13786 \family default
13787  and 
13788 \family sans
13789 Opening
13790 \family default
13791  define the beginning of the letter and must be used in every letter.
13792  To emphasize them in the LyX document class, they are marked with the letter
13793  
13794 \shape italic
13795 L
13796 \shape default
13797  or 
13798 \shape italic
13799 O
13800 \shape default
13801 , resp.
13802 \begin_inset space ~
13803 \end_inset
13804
13805 in the left margin.
13806  It is possible to write any number of letters in one file.
13807  An 
13808 \family sans
13809 Opening
13810 \family default
13811  type produces a new letter using the same addressee and a 
13812 \family sans
13813 Letter
13814 \family default
13815  type produces a new addressee.
13816  The types 
13817 \family sans
13818 Closing
13819 \family default
13820
13821 \family sans
13822 PS
13823 \family default
13824
13825 \family sans
13826 CC
13827 \family default
13828 , and 
13829 \family sans
13830 Encl
13831 \family default
13832  are ordinary paragraph types and can also be used several times in one
13833  and the same letter.
13834 \end_layout
13835
13836 \begin_layout Itemize
13837
13838 \family sans
13839 Letter
13840 \family default
13841 : produces a paragraph for the addressee and implicitly defines the beginning
13842  of the letter.
13843 \end_layout
13844
13845 \begin_layout Itemize
13846
13847 \family sans
13848 Opening
13849 \family default
13850 : produces a paragraph for the form of address and implicitly produces a
13851  new letter.
13852 \end_layout
13853
13854 \begin_layout Itemize
13855
13856 \family sans
13857 Closing
13858 \family default
13859 : produces a paragraph for a close.
13860 \end_layout
13861
13862 \begin_layout Itemize
13863
13864 \family sans
13865 PS
13866 \family default
13867 : produces a paragraph for a postscript.
13868 \end_layout
13869
13870 \begin_layout Itemize
13871
13872 \family sans
13873 CC
13874 \family default
13875 : produces a paragraph for a distribution list.
13876 \end_layout
13877
13878 \begin_layout Itemize
13879
13880 \family sans
13881 Encl
13882 \family default
13883 : produces a paragraph for enclosures.
13884 \end_layout
13885
13886 \begin_layout Standard
13887 The types 
13888 \family sans
13889 Name
13890 \family default
13891
13892 \family sans
13893 Signature
13894 \family default
13895
13896 \family sans
13897 Address
13898 \family default
13899
13900 \family sans
13901 Telephone
13902 \family default
13903
13904 \family sans
13905 Place
13906 \family default
13907
13908 \family sans
13909 Backaddress
13910 \family default
13911
13912 \family sans
13913 Specialmail
13914 \family default
13915
13916 \family sans
13917 Location
13918 \family default
13919
13920 \family sans
13921 Title
13922 \family default
13923 , and 
13924 \family sans
13925 Subject
13926 \family default
13927  are input types provided with a label to enter information, which will
13928  be processed by the document class.
13929 \begin_inset Foot
13930 status open
13931
13932 \begin_layout Plain Layout
13933 It could be seen as a matter of inconsequence, that the types 
13934 \family sans
13935 Letter
13936 \family default
13937  and 
13938 \family sans
13939 Opening
13940 \family default
13941  described above are not such input types as well.
13942  Because of the special meaning of those types, however, I have implemented
13943  them as ordinary paragraph types with a one letter mark in the left margin.
13944  Moreover, it would affect my feeling of symmetry, if the 
13945 \family sans
13946 Opening
13947 \family default
13948  type and the 
13949 \family sans
13950 Closing
13951 \family default
13952  type had such a serious different appearance.
13953 \end_layout
13954
13955 \end_inset
13956
13957  The types must be used ahead of the corresponding 
13958 \family sans
13959 Opening
13960 \family default
13961  type.
13962 \end_layout
13963
13964 \begin_layout Standard
13965 An implementation of these types in a WYSIWYG fashion does not seem to make
13966  sense, because the real appearance of the produced letter does not only
13967  depend on the usage of the particular type, but also on other factors.
13968  For example, a signature entered in the 
13969 \family sans
13970 Signature
13971 \family default
13972  type will in the standard behavior appear in the produced letter only,
13973  when in the same letter also a 
13974 \family sans
13975 Closing
13976 \family default
13977  type is used.
13978  The entered value of the 
13979 \family sans
13980 Telephone
13981 \family default
13982  type will in the standard behavior not appear in the produced letter at
13983  all.
13984  The possibility to design the letter`s heading freely is already indicated
13985  in a footnote above.
13986 \end_layout
13987
13988 \begin_layout Standard
13989 The input types can also be used as empty paragraphs.
13990  This makes sense e.
13991 \begin_inset space \thinspace{}
13992 \end_inset
13993
13994 g.
13995 \begin_inset space \space{}
13996 \end_inset
13997
13998 for the 
13999 \family sans
14000 Signature
14001 \family default
14002  type.
14003  If the 
14004 \family sans
14005 Signature
14006 \family default
14007  type is not used at all, in the standard behavior the value of the 
14008 \family sans
14009 Name
14010 \family default
14011  type is used as signature, whereas if an empty 
14012 \family sans
14013 Signature
14014 \family default
14015  type is used, no signature value is defined.
14016 \end_layout
14017
14018 \begin_layout Standard
14019 By using the input types it is possible to write a letter template, containing
14020  filled input types with your personal dates (name, address, etc.) and empty
14021  input types for other dates you want to enter.
14022 \end_layout
14023
14024 \begin_layout Itemize
14025
14026 \family sans
14027 Name
14028 \family default
14029 : sender's name, in the standard behavior appears as a centered paragraph
14030  in small caps in the letter`s heading.
14031 \end_layout
14032
14033 \begin_layout Itemize
14034
14035 \family sans
14036 Signature
14037 \family default
14038 : sender's signature, in the standard behavior appears below the 
14039 \family sans
14040 Closing
14041 \family default
14042  type.
14043  If no 
14044 \family sans
14045 Signature
14046 \family default
14047  type is used, the value of the 
14048 \family sans
14049 Name
14050 \family default
14051  type appears instead.
14052 \end_layout
14053
14054 \begin_layout Itemize
14055
14056 \family sans
14057 Address
14058 \family default
14059 : sender's address, in the standard behavior appears in a centered paragraph
14060  in the letter`s heading below the sender's name.
14061 \end_layout
14062
14063 \begin_layout Itemize
14064
14065 \family sans
14066 Telephone
14067 \family default
14068 : sender's telephone number, in the standard behavior only sets the LaTeX
14069  variable 
14070 \family typewriter
14071
14072 \backslash
14073 telephonenum
14074 \family default
14075 .
14076 \end_layout
14077
14078 \begin_layout Itemize
14079
14080 \family sans
14081 Place
14082 \family default
14083 : place of the letter`s making.
14084 \end_layout
14085
14086 \begin_layout Itemize
14087
14088 \family sans
14089 Date
14090 \family default
14091 : date of the letter`s making.
14092  
14093 \family sans
14094 Place
14095 \family default
14096  and 
14097 \family sans
14098 Date
14099 \family default
14100 , in the standard behavior, produce the place and the date in a right-aligned
14101  line below the addressee's field.
14102  If an empty 
14103 \family sans
14104 Date
14105 \family default
14106  type is used, neither place nor date appear, independent of the value of
14107  the 
14108 \family sans
14109 Place
14110 \family default
14111  type.
14112  If no 
14113 \family sans
14114 Date
14115 \family default
14116  type is used, the date of the letter `s production is used.
14117 \end_layout
14118
14119 \begin_layout Itemize
14120
14121 \family sans
14122 Backaddress
14123 \family default
14124 : sender`s back address, in the standard behavior appears above the addressee's
14125  field in a small sans serif font.
14126 \end_layout
14127
14128 \begin_layout Itemize
14129
14130 \family sans
14131 Specialmail
14132 \family default
14133 : special mail information, in the standard behavior appears underlined
14134  above the addressee's field below the back address.
14135 \end_layout
14136
14137 \begin_layout Itemize
14138
14139 \family sans
14140 Location
14141 \family default
14142 : additional information, in the standard behavior appears on right side
14143  below the addressee`s field.
14144 \end_layout
14145
14146 \begin_layout Itemize
14147
14148 \family sans
14149 Title
14150 \family default
14151 : the letter's title, in the standard behavior appears in a big, bold, sans
14152  serif font above the subject.
14153 \end_layout
14154
14155 \begin_layout Itemize
14156
14157 \family sans
14158 Subject
14159 \family default
14160 : the letter's subject, in the standard behavior appears in a bold font
14161  above the 
14162 \family sans
14163 Opening
14164 \family default
14165  paragraph.
14166 \end_layout
14167
14168 \begin_layout Standard
14169 The types 
14170 \family sans
14171 Yourref
14172 \family default
14173
14174 \family sans
14175 Yourmail
14176 \family default
14177
14178 \family sans
14179 Myref
14180 \family default
14181
14182 \family sans
14183 Customer
14184 \family default
14185 , and 
14186 \family sans
14187 Invoice
14188 \family default
14189  produce a business letter like line above the 
14190 \family sans
14191 Title
14192 \family default
14193  line containing the fields 
14194 \begin_inset Quotes eld
14195 \end_inset
14196
14197 Your ref.
14198 \begin_inset Quotes erd
14199 \end_inset
14200
14201
14202 \begin_inset Quotes eld
14203 \end_inset
14204
14205 Your letter of
14206 \begin_inset Quotes erd
14207 \end_inset
14208
14209
14210 \begin_inset Quotes eld
14211 \end_inset
14212
14213 Our ref.
14214 \begin_inset Quotes erd
14215 \end_inset
14216
14217
14218 \begin_inset Quotes eld
14219 \end_inset
14220
14221 Customer no.
14222 \begin_inset Quotes erd
14223 \end_inset
14224
14225
14226 \begin_inset Quotes eld
14227 \end_inset
14228
14229 Invoice no.
14230 \begin_inset Quotes erd
14231 \end_inset
14232
14233 , and 
14234 \begin_inset Quotes eld
14235 \end_inset
14236
14237 Date
14238 \begin_inset Quotes erd
14239 \end_inset
14240
14241 .
14242  For the date field, the value of the 
14243 \family sans
14244 Date
14245 \family default
14246  type is used.
14247  If one of these 
14248 \begin_inset Quotes eld
14249 \end_inset
14250
14251 business letter types
14252 \begin_inset Quotes erd
14253 \end_inset
14254
14255  is used, the value of the 
14256 \family sans
14257 Place
14258 \family default
14259  type however does not appear, but only the LaTeX variable 
14260 \family typewriter
14261
14262 \backslash
14263 fromplace
14264 \family default
14265  is set.
14266  The ordinary output of place and date in a right-aligned line below the
14267  addressee`s field is suppressed.
14268  The types are implemented as input types provided with a label and must
14269  be used ahead of the corresponding 
14270 \family sans
14271 Opening
14272 \family default
14273  type.
14274 \end_layout
14275
14276 \begin_layout Itemize
14277
14278 \family sans
14279 Yourref
14280 \family default
14281 : Your ref.
14282 \end_layout
14283
14284 \begin_layout Itemize
14285
14286 \family sans
14287 Yourmail
14288 \family default
14289 : Your letter of.
14290 \end_layout
14291
14292 \begin_layout Itemize
14293
14294 \family sans
14295 Myref
14296 \family default
14297 : Our ref.
14298 \end_layout
14299
14300 \begin_layout Itemize
14301
14302 \family sans
14303 Customer
14304 \family default
14305 : Customer no.
14306 \end_layout
14307
14308 \begin_layout Itemize
14309
14310 \family sans
14311 Invoice
14312 \family default
14313 : Invoice no.
14314 \end_layout
14315
14316 \begin_layout Subsection
14317 The new letter class: letter (koma-script v.2)
14318 \end_layout
14319
14320 \begin_layout Standard
14321 by 
14322 \noun on
14323 Jürgen Spitzmüller
14324 \end_layout
14325
14326 \begin_layout Standard
14327 \begin_inset VSpace medskip
14328 \end_inset
14329
14330
14331 \end_layout
14332
14333 \begin_layout Standard
14334 \noindent
14335 Koma-Script version 2.8 has introduced a new letter class 
14336 \family typewriter
14337 scrlttr2
14338 \family default
14339  which supersedes the now unsupported 
14340 \family typewriter
14341 scrlettr
14342 \family default
14343 .
14344  It has — on the LaTeX side — a completely new interface and is not compatible
14345  with the old class.
14346  Therefore, LyX supports both, though it is recommended you use the new
14347  class.
14348 \end_layout
14349
14350 \begin_layout Standard
14351 This class covers the same functionality as 
14352 \emph on
14353 letter (koma-script),
14354 \emph default
14355  and a few more.
14356  The basic items are 
14357 \family sans
14358 Address
14359 \family default
14360  (receiver's address, same as 
14361 \family sans
14362 Letter
14363 \family default
14364  in the old layout), 
14365 \family sans
14366 Opening
14367 \family default
14368 , and 
14369 \family sans
14370 Closing
14371 \family default
14372 .
14373  
14374 \family sans
14375 NextAddress
14376 \family default
14377  will start a new letter (i.
14378 \begin_inset space \thinspace{}
14379 \end_inset
14380
14381 g.
14382 \begin_inset space \space{}
14383 \end_inset
14384
14385 you can write several letters per document).
14386  New elements are sender's 
14387 \family sans
14388 E-Mail
14389 \family default
14390
14391 \family sans
14392 URL
14393 \family default
14394
14395 \family sans
14396 Fax
14397 \family default
14398
14399 \family sans
14400 Bank
14401 \family default
14402  and the possibility to use a 
14403 \family sans
14404 Logo
14405 \family default
14406  (via 
14407 \family sans
14408 Insert\SpecialChar \menuseparator
14409 Graphics
14410 \family default
14411 ) in the header.
14412 \end_layout
14413
14414 \begin_layout Standard
14415 The biggest improvement is, though, that the letter's layout is configurable
14416  to meet almost any needs.
14417  This can be done via the preamble or with a special style file (Letter
14418  Class Option, extension 
14419 \family typewriter
14420 *.lco
14421 \family default
14422 ), that will be read in as a class option.
14423 \begin_inset Foot
14424 status collapsed
14425
14426 \begin_layout Plain Layout
14427 The KOMA package comes with some default 
14428 \family typewriter
14429 *.lco
14430 \family default
14431  files.
14432  There is, for instance, a 
14433 \family typewriter
14434 DIN.lco
14435 \family default
14436  file that follows german typesetting rules, or a 
14437 \family typewriter
14438 KOMAold.lco
14439 \family default
14440  that provides the default layout of the old 
14441 \family typewriter
14442 scrlettr
14443 \family default
14444  class.
14445  The latter can be loaded with the class option 
14446 \family typewriter
14447 KOMAold
14448 \family default
14449 , inserted via the 
14450 \family sans
14451 \bar under
14452 L
14453 \bar default
14454 ayout\SpecialChar \menuseparator
14455
14456 \bar under
14457 D
14458 \bar default
14459 ocument\SpecialChar \menuseparator
14460 Extra Options
14461 \family default
14462  field.
14463 \end_layout
14464
14465 \end_inset
14466
14467  Have a look at the 
14468 \emph on
14469 koma-letter2
14470 \emph default
14471  template that is included in LyX for examples.
14472  A detailed description is to be found in the Koma-Script documentation
14473  (
14474 \emph on
14475 scrguide
14476 \emph default
14477 ).
14478 \end_layout
14479
14480 \begin_layout Subsection
14481 Problems
14482 \end_layout
14483
14484 \begin_layout Standard
14485 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14486  some problems.
14487 \end_layout
14488
14489 \begin_layout Itemize
14490 The chapter number of a 
14491 \family sans
14492 Chapter
14493 \family default
14494  type appears on a line of its own above the chapter heading instead of
14495  appearing in the same line ahead of it.
14496  The cause for that is the LyX internal behavior for the labeltype 
14497 \family sans
14498 Counter_Chapter
14499 \family default
14500  in the layout file.
14501 \end_layout
14502
14503 \begin_layout Itemize
14504 The headings of the types 
14505 \family sans
14506 Addchap
14507 \family default
14508  and 
14509 \family sans
14510 Addsec
14511 \family default
14512  are only put in the 
14513 \begin_inset Quotes eld
14514 \end_inset
14515
14516 true
14517 \begin_inset Quotes erd
14518 \end_inset
14519
14520  LaTeX table of contents, but not in the LyX table of contents (
14521 \family sans
14522 Document\SpecialChar \menuseparator
14523 Table
14524 \begin_inset space ~
14525 \end_inset
14526
14527 of
14528 \begin_inset space ~
14529 \end_inset
14530
14531 Contents
14532 \family default
14533 ).
14534 \end_layout
14535
14536 \begin_layout Itemize
14537 The paragraphs in a 
14538 \emph on
14539 letter
14540 \emph default
14541  document class appear in a skip separation mode, not indented.
14542  This is the standard behavior, no special LaTeX commands are needed for
14543  that.
14544  But in the 
14545 \family sans
14546 Document\SpecialChar \menuseparator
14547 Settings
14548 \family default
14549  dialog the corresponding radio button indicates 
14550 \family sans
14551 Indent
14552 \family default
14553 .
14554  A 
14555 \family sans
14556 Skip
14557 \family default
14558  value always has the effect that extra LaTeX commands are inserted in the
14559  document to produce the gap, which is not what is wanted in this case.
14560 \end_layout
14561
14562 \begin_layout Section
14563 Memoir
14564 \end_layout
14565
14566 \begin_layout Standard
14567 By 
14568 \noun on
14569 Jürgen Spitzmüller
14570 \end_layout
14571
14572 \begin_layout Subsection
14573 Overview
14574 \end_layout
14575
14576 \begin_layout Standard
14577 Memoir is a very powerful and constantly evolving class.
14578  It has been designed with regard to fictional and non-fictional literature.
14579  Its aim is to let the user have maximum control over the typesetting of
14580  his document.
14581  Memoir is based on the standard book class, but it can also emulate the
14582  article class (see below).
14583 \end_layout
14584
14585 \begin_layout Standard
14586 Peter Wilson, the developer of Memoir, is known as the author of lots of
14587  useful packages in the LaTeX world.
14588  Most of them have been merged with Memoir.
14589  Therefore, it is much easier to layout the table of contents, appendices,
14590  chapter designs and such.
14591  LyX, though, does not support all of these goodies natively.
14592  Some of them might be added to forthcoming releases
14593 \begin_inset Foot
14594 status collapsed
14595
14596 \begin_layout Plain Layout
14597 You are invited to send suggestions to 
14598 \begin_inset Flex URL
14599 status collapsed
14600
14601 \begin_layout Plain Layout
14602
14603 lyx-devel@lists.lyx.org
14604 \end_layout
14605
14606 \end_inset
14607
14608 .
14609 \end_layout
14610
14611 \end_inset
14612
14613 , lots will probably never, due to the limitations of LyX's framework.
14614  Of course you can still use all features with the help of some native LaTeX
14615  commands (TeX code
14616 \begin_inset Foot
14617 status collapsed
14618
14619 \begin_layout Plain Layout
14620 Cf.
14621 \begin_inset ERT
14622 status collapsed
14623
14624 \begin_layout Plain Layout
14625
14626
14627 \backslash
14628  
14629 \end_layout
14630
14631 \end_inset
14632
14633 section
14634 \begin_inset space ~
14635 \end_inset
14636
14637
14638 \begin_inset CommandInset ref
14639 LatexCommand ref
14640 reference "sec:Inserting-TeX-Code"
14641
14642 \end_inset
14643
14644  for details.
14645 \end_layout
14646
14647 \end_inset
14648
14649 ).
14650  In this section, we can only list those features which are natively supported
14651  by LyX.
14652  For detailed descriptions (and for the rest of features) we recommend you
14653  have a look at the detailed manual of the Memoir class
14654 \begin_inset Foot
14655 status collapsed
14656
14657 \begin_layout Plain Layout
14658 Cf.
14659 \begin_inset ERT
14660 status collapsed
14661
14662 \begin_layout Plain Layout
14663
14664
14665 \backslash
14666  
14667 \end_layout
14668
14669 \end_inset
14670
14671
14672 \begin_inset Flex URL
14673 status collapsed
14674
14675 \begin_layout Plain Layout
14676
14677 CTAN:/macros/latex/memoir/memman.pdf
14678 \end_layout
14679
14680 \end_inset
14681
14682 .
14683 \end_layout
14684
14685 \end_inset
14686
14687 , which is not only a user guide for the class, but also both a comprehensive
14688  description on good typesetting and a superb example for good typesetting
14689  itself.
14690 \end_layout
14691
14692 \begin_layout Subsection
14693 Basic features and restrictions
14694 \end_layout
14695
14696 \begin_layout Standard
14697 Memoir supports basically all features of the standard book classes.
14698  There are, however, some differences, as follows:
14699 \end_layout
14700
14701 \begin_layout Description
14702 Font
14703 \begin_inset space ~
14704 \end_inset
14705
14706 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14707 \end_layout
14708
14709 \begin_layout Description
14710 Page
14711 \begin_inset space ~
14712 \end_inset
14713
14714 style: The fancy page style is not supported, due to a command clash between
14715  Memoir and the fancyhdr package (they both define a command with the same
14716  name, which confuses LaTeX).
14717  Instead, Memoir comes with a number of its own page styles (see 
14718 \family sans
14719 Layout\SpecialChar \menuseparator
14720 Document\SpecialChar \menuseparator
14721 Page
14722 \begin_inset space ~
14723 \end_inset
14724
14725 Style
14726 \family default
14727 ).
14728  If you want to use these for the chapter pages, you have to use the command
14729  
14730 \family typewriter
14731
14732 \backslash
14733 chapterstyle
14734 \family default
14735  in the main text or in preamble (e.
14736 \begin_inset space \thinspace{}
14737 \end_inset
14738
14739 g.
14740 \begin_inset space \space{}
14741 \end_inset
14742
14743
14744 \family typewriter
14745
14746 \backslash
14747 chapterstyle{companion}
14748 \family default
14749 ).
14750 \end_layout
14751
14752 \begin_layout Description
14753 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14754  optional argument in the standard classes.
14755  With this, you can specify an alternative version of the title for the
14756  table of contents and the headers (for instance, if the title is too long).
14757  In LyX, you can do this via 
14758 \family sans
14759 Insert\SpecialChar \menuseparator
14760 Short
14761 \begin_inset space ~
14762 \end_inset
14763
14764 Title
14765 \family default
14766  at the beginning of a chapter/section.
14767  Memoir features a second optional argument and thus separates the table
14768  of contents from the header.
14769  You can define three variants of a title with this: one for the main text,
14770  one for the table of contents, and one for the headers.
14771  Simply insert two optional arguments if you need this feature, the first
14772  one containing the short title for the Table of Contents, the second one
14773  containing an alternative short title for the headers.
14774 \end_layout
14775
14776 \begin_layout Description
14777 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14778  of contents, the list of figures and the list of table start a new page
14779  automatically.
14780  Memoir does not follow this route.
14781  You have to insert a page break yourself, if you want to have one.
14782 \end_layout
14783
14784 \begin_layout Description
14785 Titlepage: For some unknown reason, Memoir uses pagination on the title
14786  page (in the standard classes, title pages are 
14787 \begin_inset Quotes eld
14788 \end_inset
14789
14790 empty
14791 \begin_inset Quotes erd
14792 \end_inset
14793
14794 , i.
14795 \begin_inset space \thinspace{}
14796 \end_inset
14797
14798 g.
14799 \begin_inset space \space{}
14800 \end_inset
14801
14802 without pagina).
14803  If you want an empty title page, type 
14804 \family typewriter
14805
14806 \backslash
14807 aliaspagestyle{title}{empty}
14808 \family default
14809  in the preamble.
14810 \end_layout
14811
14812 \begin_layout Description
14813 Article: With the class option 
14814 \emph on
14815 article
14816 \emph default
14817  (to be inserted in 
14818 \family sans
14819 Layout\SpecialChar \menuseparator
14820 Document\SpecialChar \menuseparator
14821 Extra
14822 \begin_inset space ~
14823 \end_inset
14824
14825 Options
14826 \family default
14827 ), you can emulate article style.
14828  That is, counters (footnotes, figures, tables etc.) will not be reset on
14829  new chapters, chapters don't start a new page (but are—in contrary to 
14830 \begin_inset Quotes eld
14831 \end_inset
14832
14833 real
14834 \begin_inset Quotes erd
14835 \end_inset
14836
14837  article classes—still allowed), parts, though, use their own page, as in
14838  book.
14839 \end_layout
14840
14841 \begin_layout Description
14842 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14843  font commands, which have been used in the old LaTeX version 2.09 (e.
14844 \begin_inset space \thinspace{}
14845 \end_inset
14846
14847 g.
14848 \begin_inset space \space{}
14849 \end_inset
14850
14851
14852 \family typewriter
14853
14854 \backslash
14855 rm
14856 \family default
14857
14858 \family typewriter
14859
14860 \backslash
14861 it
14862 \family default
14863 ).
14864  It produces an error and stops LaTeX whenever such a command appears.
14865  The class option 
14866 \emph on
14867 oldfontcommands
14868 \emph default
14869  reallows the commands and spits out warnings instead (which does at least
14870  not stop LaTeX).
14871  Since a lot of packages and particularly BibTeX style files are still using
14872  those commands, we have decided to use this option by default.
14873 \end_layout
14874
14875 \begin_layout Subsection
14876 Extra features
14877 \end_layout
14878
14879 \begin_layout Standard
14880 We will only describe the features supported by LyX (which is not much currently
14881 ).
14882  Please consult the Memoir manual
14883 \begin_inset Foot
14884 status collapsed
14885
14886 \begin_layout Plain Layout
14887 Cf.
14888 \begin_inset ERT
14889 status collapsed
14890
14891 \begin_layout Plain Layout
14892
14893
14894 \backslash
14895  
14896 \end_layout
14897
14898 \end_inset
14899
14900
14901 \begin_inset Flex URL
14902 status collapsed
14903
14904 \begin_layout Plain Layout
14905
14906 CTAN:/macros/latex/memoir/memman.pdf
14907 \end_layout
14908
14909 \end_inset
14910
14911 .
14912 \end_layout
14913
14914 \end_inset
14915
14916  for details.
14917 \end_layout
14918
14919 \begin_layout Description
14920 Abstract: You may wonder why an abstract is an extra feature.
14921  Well, it is in book class.
14922  Usually books don't have abstracts.
14923  Memoir, however, has.
14924  You can use it wherever and how often you like.
14925 \end_layout
14926
14927 \begin_layout Description
14928 Chapterprecis: You may know this older typesetting style: The contents of
14929  a chapter are summarized below the title and also in the table of contents
14930  (e.
14931 \begin_inset space \thinspace{}
14932 \end_inset
14933
14934 g.
14935 \begin_inset space \space{}
14936 \end_inset
14937
14938
14939 \emph on
14940 Our hero arrives in Troia; he loses some friends; he finds others
14941 \emph default
14942 ).
14943  Chapterprecis does exactly this.
14944  It is therefore only sensible below a chapter.
14945 \end_layout
14946
14947 \begin_layout Description
14948 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14949  The epigraph environment provides an elegant way of typesetting such a
14950  motto.
14951  The motto itself (text) and its author (source) are divided by a short
14952  line.
14953  Unfortunately, we have to fool LyX a bit here again, since the environment
14954  needs two arguments (text and source).
14955  In this case, we have to use curly brackets (in TeX mode) between the two
14956  arguments: 
14957 \emph on
14958 <smart slogan>
14959 \emph default
14960  
14961 \family typewriter
14962 }{
14963 \family default
14964  
14965 \emph on
14966 <author of the slogan>.
14967 \end_layout
14968
14969 \begin_layout Description
14970 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14971  complex figurative poems).
14972  LyX can only support a few of them.
14973  One is poemtitle, which is a centered title for poems, which will also
14974  be added to the table of contents (verse is the standard environment for
14975  poems.
14976  Memoir has some enhanced versions of verse, but you need to use TeX code,
14977  because they have to be nested inside regular verse environments, which
14978  is not possible with LyX).
14979 \end_layout
14980
14981 \begin_layout Description
14982 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14983 \end_layout
14984
14985 \begin_layout Section
14986 Article (mwart), book (mwbk) and report (mwrep)
14987 \begin_inset Argument
14988 status collapsed
14989
14990 \begin_layout Plain Layout
14991 The 
14992 \family typewriter
14993 mw
14994 \family default
14995  Classes
14996 \end_layout
14997
14998 \end_inset
14999
15000
15001 \end_layout
15002
15003 \begin_layout Standard
15004 by 
15005 \noun on
15006 Tomasz Luczak
15007 \end_layout
15008
15009 \begin_layout Standard
15010 The LyX document classes 
15011 \emph on
15012 article (mwart)
15013 \emph default
15014
15015 \emph on
15016 report (mwrep)
15017 \emph default
15018  and 
15019 \emph on
15020 book
15021 \emph default
15022  
15023 \emph on
15024 (mwbk)
15025 \emph default
15026  correspond to the LaTeX document classes 
15027 \family typewriter
15028 mwart.cls
15029 \family default
15030
15031 \family typewriter
15032 mwrep.cls
15033 \family default
15034  and 
15035 \family typewriter
15036 mwbk.cls
15037 \family default
15038 , resp.
15039  They are replacements for the standard document classes 
15040 \family typewriter
15041 article.cls
15042 \family default
15043
15044 \family typewriter
15045 report.cls
15046 \family default
15047  and 
15048 \family typewriter
15049 book.cls
15050 \family default
15051 , resp., and fit better to Polish typography conventions in a number of points.
15052  
15053 \end_layout
15054
15055 \begin_layout Standard
15056 Basic differences:
15057 \end_layout
15058
15059 \begin_layout Itemize
15060 Unnumbered titles (with star, e.
15061 \begin_inset space \thinspace{}
15062 \end_inset
15063
15064 g.
15065 \begin_inset space \space{}
15066 \end_inset
15067
15068
15069 \family sans
15070 Section*
15071 \family default
15072 ) are added into table of contents,
15073 \end_layout
15074
15075 \begin_layout Itemize
15076 Additional page styles:
15077 \end_layout
15078
15079 \begin_deeper
15080 \begin_layout Description
15081 uheadings header with separated lines,
15082 \end_layout
15083
15084 \begin_layout Description
15085 myheadings custom header, contents headers via commands: 
15086 \family typewriter
15087
15088 \backslash
15089 markright
15090 \family default
15091  and 
15092 \family typewriter
15093
15094 \backslash
15095 markboth
15096 \family default
15097 ,
15098 \end_layout
15099
15100 \begin_layout Description
15101 myuheadings custom header with separated lines,
15102 \end_layout
15103
15104 \begin_layout Description
15105 outer page number is placed on outer side of page
15106 \end_layout
15107
15108 \end_deeper
15109 \begin_layout Itemize
15110 Options 
15111 \end_layout
15112
15113 \begin_deeper
15114 \begin_layout Description
15115 rmheadings serif titles — default,
15116 \end_layout
15117
15118 \begin_layout Description
15119 sfheadings sansserif titles,
15120 \end_layout
15121
15122 \begin_layout Description
15123 authortitle on title page first placed is author next title — default,
15124 \end_layout
15125
15126 \begin_layout Description
15127 titleauthor on title page first placed is title next author,
15128 \end_layout
15129
15130 \begin_layout Description
15131 withmarginpar reserve place on page for margins.
15132 \end_layout
15133
15134 \end_deeper
15135 \begin_layout Section
15136 Paper
15137 \end_layout
15138
15139 \begin_layout Standard
15140 The document class 
15141 \family sans
15142 paper
15143 \family default
15144  provides an alternative to the standard 
15145 \family sans
15146 article
15147 \family default
15148  class.
15149  It provides similar functionality, but you might prefer this layout with
15150  sans serif sections, headings, and more.
15151 \end_layout
15152
15153 \begin_layout Section
15154 RevTeX4
15155 \end_layout
15156
15157 \begin_layout Standard
15158 by 
15159 \noun on
15160 Amir Karger
15161 \end_layout
15162
15163 \begin_layout Standard
15164 \begin_inset VSpace bigskip
15165 \end_inset
15166
15167
15168 \end_layout
15169
15170 \begin_layout Standard
15171 \noindent
15172 The 
15173 \family sans
15174 Revtex
15175 \begin_inset space ~
15176 \end_inset
15177
15178 4
15179 \family default
15180  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15181 \begin_inset Formula $\beta$
15182 \end_inset
15183
15184  release of May, 1999) class.
15185 \end_layout
15186
15187 \begin_layout Standard
15188 LyX has a 
15189 \family sans
15190 Revtex
15191 \family default
15192  textclass, which works with RevTeX 3.1.
15193  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15194  That means that it doesn't interact very well with LyX, which requires
15195  LaTeX2e, although it has been kludged to work.
15196  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15197  LyX with the 
15198 \family sans
15199 RevTeX
15200 \begin_inset space ~
15201 \end_inset
15202
15203 4
15204 \family default
15205  textclass should also be pretty easy to use.
15206 \end_layout
15207
15208 \begin_layout Standard
15209 These documents are supposed to be used in 
15210 \emph on
15211 addition
15212 \emph default
15213  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15214  macros, and assume you'll know what to put in the preamble if necessary.
15215 \end_layout
15216
15217 \begin_layout Subsection
15218 Installation
15219 \end_layout
15220
15221 \begin_layout Standard
15222 All you need to do is install RevTeX 4, as described in the package's README
15223  file.
15224  The package can be found at The RevTeX 4 Web Site 
15225 \begin_inset Flex URL
15226 status collapsed
15227
15228 \begin_layout Plain Layout
15229
15230 http://publish.aps.org/revtex4/
15231 \end_layout
15232
15233 \end_inset
15234
15235 .
15236  Install it somewhere that LaTeX can see it.
15237  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15238  (i.
15239 \begin_inset space \thinspace{}
15240 \end_inset
15241
15242 g.
15243 \begin_inset space \space{}
15244 \end_inset
15245
15246 not the directory where you installed the class file.) Then, if you reconfigure
15247  LyX, it will find the class file and let you use the RevTeX4 textclass.
15248 \end_layout
15249
15250 \begin_layout Standard
15251 Probably the easiest way to get started is either to import a RevTeX 4 document
15252  using 
15253 \family typewriter
15254 tex2lyx
15255 \family default
15256 , or to use the 
15257 \family sans
15258 Revtex
15259 \begin_inset space ~
15260 \end_inset
15261
15262 4
15263 \family default
15264  template, found in the templates directory.
15265 \end_layout
15266
15267 \begin_layout Subsection
15268 Preamble Matter
15269 \end_layout
15270
15271 \begin_layout Standard
15272 Optional arguments to 
15273 \family typewriter
15274
15275 \backslash
15276 documentclass
15277 \family default
15278 , like 
15279 \begin_inset Quotes eld
15280 \end_inset
15281
15282 preprint
15283 \begin_inset Quotes erd
15284 \end_inset
15285
15286  and 
15287 \begin_inset Quotes eld
15288 \end_inset
15289
15290 aps
15291 \begin_inset Quotes erd
15292 \end_inset
15293
15294 , go in the 
15295 \family sans
15296 E
15297 \bar under
15298 x
15299 \bar default
15300 tra
15301 \begin_inset space ~
15302 \end_inset
15303
15304 Options
15305 \family default
15306  field in the 
15307 \family sans
15308 Document
15309 \begin_inset space ~
15310 \end_inset
15311
15312 Layout
15313 \family default
15314  dialog, as usual.
15315  Remember that in RevTeX, at least one optional argument is required! 
15316 \end_layout
15317
15318 \begin_layout Standard
15319 Other preamble matter, like 
15320 \family typewriter
15321
15322 \backslash
15323 draft
15324 \family default
15325  etc.
15326 \begin_inset space ~
15327 \end_inset
15328
15329 goes in the 
15330 \family sans
15331 LaTeX
15332 \begin_inset space ~
15333 \end_inset
15334
15335 Preamble
15336 \family default
15337  dialog, also as usual.
15338 \end_layout
15339
15340 \begin_layout Subsection
15341 Layouts
15342 \end_layout
15343
15344 \begin_layout Standard
15345 The layouts basically correspond to the commands in RevTeX4.0.
15346  For example, the Email layout corresponds to 
15347 \family typewriter
15348
15349 \backslash
15350 email{}
15351 \family default
15352 .
15353  Note that (at least as of RevTeX 4.0 Beta), the 
15354 \family sans
15355 Address
15356 \family default
15357  and 
15358 \family sans
15359 Affiliation
15360 \family default
15361  layouts are exactly equivalent, so you shouldn't need to use both.
15362 \begin_inset Foot
15363 status collapsed
15364
15365 \begin_layout Plain Layout
15366 In case you're curious, both were included so that 
15367 \family typewriter
15368 tex2lyx
15369 \family default
15370  would be able to translate both 
15371 \family typewriter
15372
15373 \backslash
15374 address
15375 \family default
15376  and 
15377 \family typewriter
15378
15379 \backslash
15380 affiliation
15381 \family default
15382 .
15383 \end_layout
15384
15385 \end_inset
15386
15387
15388 \end_layout
15389
15390 \begin_layout Subsection
15391 Important Notes
15392 \end_layout
15393
15394 \begin_layout Standard
15395 There are a couple of important unique aspects of RevTeX 4 which might cause
15396  bugs that will be even more confusing in LyX.
15397 \end_layout
15398
15399 \begin_layout Standard
15400 In RevTeX, the 
15401 \family typewriter
15402
15403 \backslash
15404 thanks
15405 \family default
15406  command goes 
15407 \emph on
15408 outside
15409 \emph default
15410  the 
15411 \family typewriter
15412
15413 \backslash
15414 author
15415 \family default
15416  command.
15417  The LyX equivalent is that there is a separate Thanks layout.
15418  Do 
15419 \emph on
15420 not
15421 \emph default
15422  write footnotes in the 
15423 \family sans
15424 Author
15425 \family default
15426  layout, or weird things may happen.
15427  See the RevTeX 4 documentation for more details.
15428 \end_layout
15429
15430 \begin_layout Standard
15431 Also, the 
15432 \family sans
15433 Author
15434 \begin_inset space ~
15435 \end_inset
15436
15437 Email
15438 \family default
15439
15440 \family sans
15441 Author
15442 \begin_inset space ~
15443 \end_inset
15444
15445 URL
15446 \family default
15447 , and 
15448 \family sans
15449 Thanks
15450 \family default
15451  layouts must be placed 
15452 \emph on
15453 in between
15454 \emph default
15455  the 
15456 \family sans
15457 Author
15458 \family default
15459  layout and the corresponding 
15460 \family sans
15461 Address
15462 \family default
15463  (or equivalent 
15464 \family sans
15465 Affiliation
15466 \family default
15467 ) layout.
15468  If you put the 
15469 \family sans
15470 Thanks
15471 \family default
15472  after the 
15473 \family sans
15474 Address
15475 \family default
15476 , the LaTeX won't compile.
15477 \end_layout
15478
15479 \begin_layout Subsection
15480 Drawbacks
15481 \end_layout
15482
15483 \begin_layout Standard
15484 The main problem with this layout is that you can't use the optional arguments
15485  to layouts like Email and Title.
15486  (The problem is not unique to this layout; you can't use optional arguments
15487  to the Section layouts either.) This means that after you export that file
15488  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15489  need to edit the LaTeX file with a text editor to add the optional arguments
15490  to set, e.
15491 \begin_inset space \thinspace{}
15492 \end_inset
15493
15494 g.
15495 \begin_inset space \space{}
15496 \end_inset
15497
15498 the running title for the page headers.
15499  Lacking these layouts makes the 
15500 \family typewriter
15501
15502 \backslash
15503 altaffiliation
15504 \family default
15505  (and the equivalent 
15506 \family typewriter
15507
15508 \backslash
15509 altaddress
15510 \family default
15511 ) useless, so the corresponding layouts don't exist, and will have to be
15512  added by hand.
15513 \begin_inset Foot
15514 status collapsed
15515
15516 \begin_layout Plain Layout
15517
15518 \emph on
15519 Note from JMarc:
15520 \emph default
15521  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15522  has not been updated yet to take advantage of it.
15523 \end_layout
15524
15525 \end_inset
15526
15527  
15528 \end_layout
15529
15530 \begin_layout Section
15531 Springer Journals (
15532 \family sans
15533 svjour
15534 \family default
15535 )
15536 \end_layout
15537
15538 \begin_layout Standard
15539 by 
15540 \noun on
15541 Martin Vermeer
15542 \end_layout
15543
15544 \begin_layout Subsection
15545 Description
15546 \end_layout
15547
15548 \begin_layout Standard
15549 These are the layout files for some of the journal formats used by Springer
15550  Verlag and listed on 
15551 \begin_inset Flex URL
15552 status collapsed
15553
15554 \begin_layout Plain Layout
15555
15556 http://www.springer.de/author/tex/help-journals.html
15557 \end_layout
15558
15559 \end_inset
15560
15561 , where you should also go to fetch the class files (yes, these are LaTeX2e
15562  now!).
15563  It is a modular system: the things common to all journals are implemented
15564  in 
15565 \family typewriter
15566 svjour.inc
15567 \family default
15568 , which journal-specific layout files (such as, e.
15569 \begin_inset space \thinspace{}
15570 \end_inset
15571
15572 g.
15573 \begin_inset space \space{}
15574 \end_inset
15575
15576
15577 \family typewriter
15578 svjog.layout
15579 \family default
15580  for Journal of Geodesy) can include.
15581 \end_layout
15582
15583 \begin_layout Standard
15584 This means that implementing support for any other Springer journal on this
15585  list is as simple as writing your own 
15586 \family typewriter
15587 sv
15588 \family default
15589 <myjournal>
15590 \family typewriter
15591 .layout
15592 \family default
15593  file following the outline given in 
15594 \family typewriter
15595 svjog.layout
15596 \family default
15597 .
15598  
15599 \end_layout
15600
15601 \begin_layout Standard
15602 It is reasonably well tested only for the Journal of Geodesy.
15603  
15604 \family typewriter
15605 svjour
15606 \family default
15607  and 
15608 \family typewriter
15609 svjog
15610 \family default
15611  come with the standard LyX distribution.
15612  Install the relevant class file (downloaded from Springer) in a proper
15613  directory, reconfigure LaTeX (in the teTeX case by running 
15614 \family typewriter
15615 texhash
15616 \family default
15617 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15618  and it should work.
15619 \end_layout
15620
15621 \begin_layout Subsection
15622 New styles
15623 \end_layout
15624
15625 \begin_layout Standard
15626 A large number of theorem-like styles — 
15627 \family sans
15628 Claim, Conjecture,
15629 \family default
15630  
15631 \family sans
15632 \SpecialChar \ldots{}
15633 Theorem
15634 \family default
15635 .
15636 \end_layout
15637
15638 \begin_layout Standard
15639
15640 \family sans
15641 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15642  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15643 \family default
15644 .
15645  See the Springer class file documentation for details.
15646 \end_layout
15647
15648 \begin_layout Subsection
15649 Supported journals
15650 \end_layout
15651
15652 \begin_layout Itemize
15653
15654 \emph on
15655 Journal of Geodesy
15656 \emph default
15657
15658 \family typewriter
15659 svjog.layout
15660 \family default
15661  — Martin Vermeer
15662 \end_layout
15663
15664 \begin_layout Itemize
15665
15666 \emph on
15667 Probability Theory and Related Fields
15668 \emph default
15669
15670 \family typewriter
15671 svprobth.layout
15672 \family default
15673  — Jean-Marc Lasgouttes
15674 \end_layout
15675
15676 \begin_layout Standard
15677 Add your own, it isn't so hard!
15678 \end_layout
15679
15680 \begin_layout Subsection
15681 Credits
15682 \end_layout
15683
15684 \begin_layout Standard
15685 These files are partly based on the older 
15686 \family typewriter
15687 ejour2.layout
15688 \family default
15689 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15690  file from Springer.
15691  All this, and the 
15692 \family typewriter
15693 ejour2
15694 \family default
15695  layout, are now defunct.
15696  Jean-Marc Lasgouttes helped out big in making me find my way around the
15697  LyX layout file mechanism.
15698 \end_layout
15699
15700 \begin_layout Subsection
15701 Bugs
15702 \end_layout
15703
15704 \begin_layout Standard
15705 Probably.
15706  But probably less than in the old hacked-LaTeX 
15707 \family typewriter
15708 ejour2
15709 \family default
15710 .
15711 \end_layout
15712
15713 \begin_layout Standard
15714 Limitations e.
15715 \begin_inset space \thinspace{}
15716 \end_inset
15717
15718 g.: does not display the number for theorem-like layouts, just #.
15719 \end_layout
15720
15721 \begin_layout Section
15722 Slides [aka 
15723 \noun on
15724 SliTeX
15725 \noun default
15726 ]
15727 \begin_inset CommandInset label
15728 LatexCommand label
15729 name "sec:slitex"
15730
15731 \end_inset
15732
15733
15734 \end_layout
15735
15736 \begin_layout Standard
15737 by 
15738 \noun on
15739 John Weiss
15740 \noun default
15741  
15742 \end_layout
15743
15744 \begin_layout Subsection
15745 Introduction
15746 \end_layout
15747
15748 \begin_layout Standard
15749 This section describes how to use LyX to make slides for overhead projectors.
15750  There are two document classes that can do this: the default slides class
15751  and the 
15752 \family sans
15753 FoilTeX
15754 \family default
15755  slides class.
15756  This section documents the former.
15757 \end_layout
15758
15759 \begin_layout Standard
15760 I'm going to say this again, nice and clear, so that there's no misunderstanding
15761 :
15762 \end_layout
15763
15764 \begin_layout Standard
15765 \begin_inset VSpace bigskip
15766 \end_inset
15767
15768
15769 \end_layout
15770
15771 \begin_layout Standard
15772 \align center
15773
15774 \size large
15775 This section documents the class 
15776 \begin_inset Quotes eld
15777 \end_inset
15778
15779
15780 \family sans
15781 slides (default)
15782 \family default
15783
15784 \begin_inset Quotes erd
15785 \end_inset
15786
15787  
15788 \emph on
15789 only.
15790 \end_layout
15791
15792 \begin_layout Standard
15793 \begin_inset VSpace bigskip
15794 \end_inset
15795
15796
15797 \end_layout
15798
15799 \begin_layout Standard
15800 If you're looking for the documentation for 
15801 \begin_inset Quotes eld
15802 \end_inset
15803
15804
15805 \family sans
15806 slides (FoilTeX)
15807 \family default
15808
15809 \begin_inset Quotes erd
15810 \end_inset
15811
15812 , check out section
15813 \begin_inset space ~
15814 \end_inset
15815
15816
15817 \begin_inset CommandInset ref
15818 LatexCommand ref
15819 reference "sec:foiltex"
15820
15821 \end_inset
15822
15823 .
15824  The 
15825 \family sans
15826 foils
15827 \family default
15828  class [
15829 \begin_inset Quotes eld
15830 \end_inset
15831
15832
15833 \family sans
15834 slides (FoilTeX)
15835 \family default
15836
15837 \begin_inset Quotes erd
15838 \end_inset
15839
15840 ] is actually somewhat better than the default 
15841 \family sans
15842 slides
15843 \family default
15844  class,
15845 \begin_inset Foot
15846 status collapsed
15847
15848 \begin_layout Plain Layout
15849 \SpecialChar \ldots{}
15850 or so I've been told repeatedly by its advocates.
15851  Having never used it, I have no idea if this claim is true or not.
15852 \end_layout
15853
15854 \end_inset
15855
15856  which this section documents.
15857 \end_layout
15858
15859 \begin_layout Standard
15860 This class is the LaTeX2e improvement of the old 
15861 \noun on
15862 SliTeX
15863 \noun default
15864  package.
15865  Every LaTeX2e distribution includes this class [which I'll just refer to
15866  as 
15867 \begin_inset Quotes eld
15868 \end_inset
15869
15870
15871 \family sans
15872 slides
15873 \family default
15874
15875 \begin_inset Quotes erd
15876 \end_inset
15877
15878  from now on], so you're bound to have it.
15879  As I noted earlier, there are other classes, such as 
15880 \family sans
15881 foils
15882 \family default
15883 , which also produce slides for overhead projectors and do a better job
15884  at it.
15885  However, there are some things which 
15886 \family sans
15887 slides
15888 \family default
15889  can do which the others can't, such as generate overlays.
15890  Read on to learn more!
15891 \end_layout
15892
15893 \begin_layout Subsection
15894 Getting Started
15895 \begin_inset CommandInset label
15896 LatexCommand label
15897 name "sec:slidesetup"
15898
15899 \end_inset
15900
15901
15902 \end_layout
15903
15904 \begin_layout Standard
15905 Obviously, to use this document class, you need to select 
15906 \begin_inset Quotes eld
15907 \end_inset
15908
15909
15910 \family sans
15911 slides (default)
15912 \family default
15913
15914 \begin_inset Quotes erd
15915 \end_inset
15916
15917  from the class list in the 
15918 \family sans
15919 Document\SpecialChar \menuseparator
15920 Settings
15921 \family default
15922  dialog.
15923  There are some other special things you should know about this class:
15924 \end_layout
15925
15926 \begin_layout Itemize
15927 Don't bother changing the options 
15928 \family sans
15929 Sides and Columns
15930 \family default
15931 .
15932  They're not supported by the 
15933 \family sans
15934 slides
15935 \family default
15936  class, anyways.
15937 \end_layout
15938
15939 \begin_layout Itemize
15940 The option 
15941 \family sans
15942 Page
15943 \begin_inset space ~
15944 \end_inset
15945
15946 style
15947 \family default
15948  behaves a bit differently for this class.
15949  The possible choices and what they do are as follows:
15950 \end_layout
15951
15952 \begin_deeper
15953 \begin_layout Description
15954
15955 \family sans
15956 plain
15957 \family default
15958  The final output contains page numbers in the lower right corner.
15959 \end_layout
15960
15961 \begin_layout Description
15962
15963 \family sans
15964 headings
15965 \family default
15966  Like 
15967 \family sans
15968 plain
15969 \family default
15970 , but also prints out any time markers you've put in.
15971  This is the default.
15972 \end_layout
15973
15974 \begin_layout Description
15975
15976 \family sans
15977 empty
15978 \family default
15979  The final output contains no page numbers, time markers, or alignment markers.
15980 \end_layout
15981
15982 \end_deeper
15983 \begin_layout Itemize
15984 The 
15985 \family sans
15986 slides
15987 \family default
15988  class has an extra option: 
15989 \family typewriter
15990 clock
15991 \family default
15992 .
15993  To use it, put 
15994 \begin_inset Quotes eld
15995 \end_inset
15996
15997
15998 \family typewriter
15999 clock
16000 \family default
16001
16002 \begin_inset Quotes erd
16003 \end_inset
16004
16005  in the extra class options.
16006 \end_layout
16007
16008 \begin_deeper
16009 \begin_layout Standard
16010 Using this options allows you to add time markers to 
16011 \family sans
16012 Note
16013 \family default
16014 s.
16015  See section
16016 \begin_inset space ~
16017 \end_inset
16018
16019
16020 \begin_inset CommandInset ref
16021 LatexCommand ref
16022 reference "sec:slideNote"
16023
16024 \end_inset
16025
16026  for more details.
16027 \end_layout
16028
16029 \end_deeper
16030 \begin_layout Standard
16031 You can also use the template file 
16032 \begin_inset Quotes eld
16033 \end_inset
16034
16035
16036 \family typewriter
16037 slides.lyx
16038 \family default
16039
16040 \begin_inset Quotes erd
16041 \end_inset
16042
16043  to automatically set up a document to use the 
16044 \family sans
16045 slides
16046 \family default
16047  class [using 
16048 \family sans
16049 File\SpecialChar \menuseparator
16050 New
16051 \begin_inset space ~
16052 \end_inset
16053
16054 from
16055 \begin_inset space ~
16056 \end_inset
16057
16058 Template
16059 \family default
16060  to open your new document].
16061  The template file also contains some examples of the special paragraph
16062  environments used by this class.
16063  I'll describe those next.
16064 \end_layout
16065
16066 \begin_layout Subsection
16067 Paragraph Environments
16068 \end_layout
16069
16070 \begin_layout Subsubsection
16071 Supported Environments
16072 \end_layout
16073
16074 \begin_layout Standard
16075 The first thing you'll notice when you start up a new 
16076 \family sans
16077 slides
16078 \family default
16079  document is the font size and type: it's the equivalent of the size 
16080 \begin_inset Quotes eld
16081 \end_inset
16082
16083
16084 \family sans
16085 Largest
16086 \family default
16087
16088 \begin_inset Quotes erd
16089 \end_inset
16090
16091  in the 
16092 \family sans
16093 Sans
16094 \begin_inset space ~
16095 \end_inset
16096
16097 Serif
16098 \family default
16099  font.
16100  This is also what's used in the output.
16101  Think of this as a 
16102 \begin_inset Quotes eld
16103 \end_inset
16104
16105 visual cue
16106 \begin_inset Quotes erd
16107 \end_inset
16108
16109  to remind you that this is a slide.
16110  Your final slides will use a larger font; ergo, you'll have less space.
16111  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16112 \end_layout
16113
16114 \begin_layout Standard
16115 The next thing that becomes obvious is the changes to the paragraph environment
16116  pull-down box [at the far-left end of the toolbar].
16117  Most of the paragraph environments you're used to seeing are missing.
16118  There are also five new ones.
16119  That's because the 
16120 \family sans
16121 slides
16122 \family default
16123  class itself only supports certain paragraph environments:
16124 \end_layout
16125
16126 \begin_layout Itemize
16127
16128 \family sans
16129 Standard
16130 \end_layout
16131
16132 \begin_layout Itemize
16133
16134 \family sans
16135 Itemize
16136 \end_layout
16137
16138 \begin_layout Itemize
16139
16140 \family sans
16141 Enumerate
16142 \end_layout
16143
16144 \begin_layout Itemize
16145
16146 \family sans
16147 Description
16148 \end_layout
16149
16150 \begin_layout Itemize
16151
16152 \family sans
16153 List
16154 \end_layout
16155
16156 \begin_layout Itemize
16157
16158 \family sans
16159 Quotation
16160 \end_layout
16161
16162 \begin_layout Itemize
16163
16164 \family sans
16165 Quote
16166 \end_layout
16167
16168 \begin_layout Itemize
16169
16170 \family sans
16171 Verse
16172 \end_layout
16173
16174 \begin_layout Itemize
16175
16176 \family sans
16177 Caption
16178 \end_layout
16179
16180 \begin_layout Itemize
16181
16182 \family sans
16183 LyX-Code
16184 \end_layout
16185
16186 \begin_layout Itemize
16187
16188 \family sans
16189 Comment
16190 \end_layout
16191
16192 \begin_layout Standard
16193 All of the other standard environments, including the section-heading environmen
16194 ts, aren't used in the 
16195 \family sans
16196 slides
16197 \family default
16198  class.
16199 \end_layout
16200
16201 \begin_layout Standard
16202 On the other hand, you'll notice the following new environments:
16203 \end_layout
16204
16205 \begin_layout Itemize
16206
16207 \family sans
16208 Slide
16209 \end_layout
16210
16211 \begin_layout Itemize
16212
16213 \family sans
16214 Overlay
16215 \end_layout
16216
16217 \begin_layout Itemize
16218
16219 \family sans
16220 Note
16221 \end_layout
16222
16223 \begin_layout Itemize
16224
16225 \family sans
16226 InvisibleText
16227 \end_layout
16228
16229 \begin_layout Itemize
16230
16231 \family sans
16232 VisibleText
16233 \end_layout
16234
16235 \begin_layout Standard
16236 These five are kind of quirky, due to a 
16237 \begin_inset Quotes eld
16238 \end_inset
16239
16240 feature
16241 \begin_inset Quotes erd
16242 \end_inset
16243
16244  in LyX.
16245  You see, LyX doesn't permit you to nest any other paragraph environment
16246  into an empty environment.
16247  Now, that's fine and dandy, but it means that you wouldn't be able to start
16248  a slide with anything except plain text.
16249  To deal with this, I've performed a little 
16250 \begin_inset Quotes eld
16251 \end_inset
16252
16253 LaTeX magic.
16254 \begin_inset Quotes erd
16255 \end_inset
16256
16257  
16258 \end_layout
16259
16260 \begin_layout Subsubsection
16261 Quirks of the New Environments
16262 \begin_inset CommandInset label
16263 LatexCommand label
16264 name "sec:slideQuirk"
16265
16266 \end_inset
16267
16268
16269 \end_layout
16270
16271 \begin_layout Standard
16272 All five of the new paragraph environments are somewhat quirky due to inherent
16273  limitiations in the current version of LyX.
16274  As I just mentioned, LyX forbids environments that begin with another environme
16275 nt.
16276  To get around this, the 
16277 \family sans
16278 Slide
16279 \family default
16280  environment isn't a paragraph environment as described in the 
16281 \emph on
16282 User's Guide
16283 \emph default
16284 .
16285  
16286 \end_layout
16287
16288 \begin_layout Standard
16289 You should consider 
16290 \family sans
16291 Slide
16292 \family default
16293
16294 \family sans
16295 Overlay
16296 \family default
16297 , and 
16298 \family sans
16299 Note
16300 \family default
16301  to be 
16302 \begin_inset Quotes eld
16303 \end_inset
16304
16305 pseudo-environments.
16306 \begin_inset Quotes erd
16307 \end_inset
16308
16309  They look like a section heading or a 
16310 \begin_inset Quotes eld
16311 \end_inset
16312
16313
16314 \family sans
16315 Caption
16316 \family default
16317 ,
16318 \begin_inset Quotes erd
16319 \end_inset
16320
16321  but really begin a [and, if necessary, end the previous] paragraph environment.
16322  Likewise, treat 
16323 \family sans
16324 InvisibleText
16325 \family default
16326  and 
16327 \family sans
16328 VisibleText
16329 \family default
16330  as 
16331 \begin_inset Quotes eld
16332 \end_inset
16333
16334 pseudo-commands.
16335 \begin_inset Quotes erd
16336 \end_inset
16337
16338  These two perform some action.
16339 \end_layout
16340
16341 \begin_layout Standard
16342 A common feature of all five environments, 
16343 \family sans
16344 Slide
16345 \family default
16346
16347 \family sans
16348 Overlay
16349 \family default
16350
16351 \family sans
16352 Note
16353 \family default
16354
16355 \family sans
16356 InvisibleText
16357 \family default
16358  and 
16359 \family sans
16360 VisibleText
16361 \family default
16362 , is a rather long-ish label.
16363  The text following this label — ordinarily the contents of the paragraph
16364  environment — is utterly irrelevant for 
16365 \family sans
16366 Slide
16367 \family default
16368
16369 \family sans
16370 Overlay
16371 \family default
16372
16373 \family sans
16374 Note
16375 \family default
16376
16377 \family sans
16378 InvisibleText
16379 \family default
16380  and 
16381 \family sans
16382 VisibleText
16383 \family default
16384 .
16385  LyX completely ignores it.
16386  In fact, you can leave these five environments completely empty.
16387  
16388 \end_layout
16389
16390 \begin_layout Standard
16391 While you don't 
16392 \emph on
16393 have
16394 \emph default
16395  to put any text after the rather long-ish label, you might want to.
16396  This could be a short description of the contents of the 
16397 \family sans
16398 Slide
16399 \family default
16400 , for example.
16401  In that case, enter your descriptive comment and hit 
16402 \family sans
16403 Return
16404 \family default
16405  as you normally would.
16406 \end_layout
16407
16408 \begin_layout Standard
16409 If, on the other hand, you don't want to enter any descriptive text, you'll
16410  hit another LyX quirk.
16411  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16412  environment until you put something in the old one.
16413  So, do this:
16414 \end_layout
16415
16416 \begin_layout Itemize
16417 Start entering the text that will 
16418 \emph on
16419 follow
16420 \emph default
16421  the new 
16422 \family sans
16423 Slide
16424 \family default
16425
16426 \family sans
16427 Overlay
16428 \family default
16429
16430 \family sans
16431 Note
16432 \family default
16433
16434 \family sans
16435 InvisibleText
16436 \family default
16437  or 
16438 \family sans
16439 VisibleText
16440 \family default
16441 .
16442  
16443 \end_layout
16444
16445 \begin_layout Itemize
16446 Now move to the beginning of that paragraph.
16447  
16448 \end_layout
16449
16450 \begin_layout Itemize
16451 Next, hit 
16452 \family sans
16453 Return
16454 \family default
16455 .
16456  
16457 \end_layout
16458
16459 \begin_layout Itemize
16460 Finally, change this new, empty paragraph to a 
16461 \family sans
16462 Slide
16463 \family default
16464
16465 \family sans
16466 Overlay
16467 \family default
16468
16469 \family sans
16470 Note
16471 \family default
16472
16473 \family sans
16474 InvisibleText
16475 \family default
16476  or 
16477 \family sans
16478 VisibleText
16479 \family default
16480 .
16481  
16482 \end_layout
16483
16484 \begin_layout Standard
16485 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16486
16487 \end_layout
16488
16489 \begin_layout Subsection
16490 Making a Presentation with 
16491 \family sans
16492 Slide
16493 \family default
16494
16495 \family sans
16496 Overlay
16497 \family default
16498  and 
16499 \family sans
16500 Note
16501 \end_layout
16502
16503 \begin_layout Subsubsection
16504 Using the 
16505 \family sans
16506 Slide
16507 \family default
16508  Environment
16509 \end_layout
16510
16511 \begin_layout Standard
16512 If you're expecting this section to teach you how to actually make a presentatio
16513 n, you'll be sorely disappointed.
16514  Naturally, I'll describe all of the ways the 
16515 \family sans
16516 slides
16517 \family default
16518  class can assist you in preparing the materials for a presentation.
16519  Filling in the contents, however, is up to you.
16520  [Then again, that 
16521 \emph on
16522 is
16523 \emph default
16524  the LyX philosophy.]
16525 \end_layout
16526
16527 \begin_layout Standard
16528 Choosing the 
16529 \family sans
16530 Slide
16531 \family default
16532  environment [in the manner described in section
16533 \begin_inset space ~
16534 \end_inset
16535
16536
16537 \begin_inset CommandInset ref
16538 LatexCommand ref
16539 reference "sec:slideQuirk"
16540
16541 \end_inset
16542
16543 ] tells LyX to begin a new slide [duh].
16544  The label for this environment/
16545 \begin_inset Quotes erd
16546 \end_inset
16547
16548 pseudo-command
16549 \begin_inset Quotes erd
16550 \end_inset
16551
16552  is an 
16553 \begin_inset Quotes eld
16554 \end_inset
16555
16556 ASCII line,
16557 \begin_inset Quotes erd
16558 \end_inset
16559
16560  in cool blue, followed by the label, 
16561 \begin_inset Quotes eld
16562 \end_inset
16563
16564 NewSlide:
16565 \begin_inset Quotes erd
16566 \end_inset
16567
16568 .
16569  Any text or paragraph environments that follow this one go on the new slide.
16570  It's that simple.
16571 \end_layout
16572
16573 \begin_layout Standard
16574 Slides are probably the only time you'll need to forcibly end pages in LyX
16575  (this can be specified in the 
16576 \family sans
16577 Paragraph Layout
16578 \family default
16579  dialog).
16580  In fact, you'll want to, once you finish entering the contents of one slide.
16581  If you've entered more text than can physically fit on a slide, the extra
16582  overflows onto a new slide.
16583  I don't recommend doing this, however, since the overflow slide won't have
16584  any page number on it.
16585  Furthermore, it may interfere with any 
16586 \family sans
16587 Overlay
16588 \family default
16589  you've made to accompany the oversized 
16590 \family sans
16591 Slide
16592 \family default
16593 .
16594 \end_layout
16595
16596 \begin_layout Standard
16597 The 
16598 \family sans
16599 Overlay
16600 \family default
16601  and 
16602 \family sans
16603 Note
16604 \family default
16605  environments work the same way as the 
16606 \family sans
16607 Slide
16608 \family default
16609  environment.
16610  They both create an 
16611 \begin_inset Quotes eld
16612 \end_inset
16613
16614 ASCII line
16615 \begin_inset Quotes erd
16616 \end_inset
16617
16618  followed by a label [
16619 \begin_inset Quotes eld
16620 \end_inset
16621
16622 NewOverlay:
16623 \begin_inset Quotes erd
16624 \end_inset
16625
16626  and 
16627 \begin_inset Quotes eld
16628 \end_inset
16629
16630 NewNote:
16631 \begin_inset Quotes erd
16632 \end_inset
16633
16634 , respectively].
16635  The color is a stunning magenta instead of blue, and the 
16636 \begin_inset Quotes eld
16637 \end_inset
16638
16639 ASCII line
16640 \begin_inset Quotes erd
16641 \end_inset
16642
16643  will look different, in style and in length.
16644  The label fonts of all three also differ from one another.
16645 \end_layout
16646
16647 \begin_layout Standard
16648 As with a 
16649 \family sans
16650 Slide
16651 \family default
16652 , if the contents of a 
16653 \family sans
16654 Note
16655 \family default
16656  or 
16657 \family sans
16658 Overlay
16659 \family default
16660  exceed the physical size of a slide or sheet of paper, the extra will overflow
16661  onto a new sheet.
16662  Again, you should avoid this.
16663  It defeats the whole purpose of 
16664 \family sans
16665 Note
16666 \family default
16667 s and 
16668 \family sans
16669 Overlay
16670 \family default
16671 s.
16672 \end_layout
16673
16674 \begin_layout Subsubsection
16675 Using 
16676 \family sans
16677 Overlay
16678 \family default
16679  with 
16680 \family sans
16681 Slide
16682 \end_layout
16683
16684 \begin_layout Standard
16685 The idea behind an 
16686 \family sans
16687 Overlay
16688 \family default
16689  is a slide that sits atop another slide.
16690  Perhaps you wish to discuss a figure on the main 
16691 \family sans
16692 Slide
16693 \family default
16694  before displaying the text associated with it.
16695  One way to accomplish this is tape a flap of dark paper over the part of
16696  the 
16697 \family sans
16698 Slide
16699 \family default
16700  you want to display later.
16701  This method fails, however, if you wish to overlap one graph with another,
16702  for example.
16703  You would then have to fumble while speaking to align the two separate,
16704  overlapping 
16705 \family sans
16706 Slide
16707 \family default
16708 s to align the two graphs.
16709  The use of an 
16710 \family sans
16711 Overlay
16712 \family default
16713  environment in both cases makes life much easier.
16714 \end_layout
16715
16716 \begin_layout Standard
16717 Each 
16718 \family sans
16719 Overlay
16720 \family default
16721  receives the page number of its 
16722 \begin_inset Quotes eld
16723 \end_inset
16724
16725 parent
16726 \begin_inset Quotes erd
16727 \end_inset
16728
16729  
16730 \family sans
16731 Slide
16732 \family default
16733 , appended by 
16734 \begin_inset Quotes eld
16735 \end_inset
16736
16737
16738 \family typewriter
16739 -a
16740 \family default
16741
16742 \begin_inset Quotes erd
16743 \end_inset
16744
16745 .
16746 \begin_inset Foot
16747 status collapsed
16748
16749 \begin_layout Plain Layout
16750 Presumably, mutliple 
16751 \family sans
16752 Overlay
16753 \family default
16754 s would have 
16755 \begin_inset Quotes eld
16756 \end_inset
16757
16758
16759 \family typewriter
16760 -a
16761 \family default
16762
16763 \begin_inset Quotes erd
16764 \end_inset
16765
16766
16767 \begin_inset Quotes eld
16768 \end_inset
16769
16770
16771 \family typewriter
16772 -b
16773 \family default
16774
16775 \begin_inset Quotes erd
16776 \end_inset
16777
16778
16779 \begin_inset Quotes eld
16780 \end_inset
16781
16782
16783 \family typewriter
16784 -c
16785 \family default
16786
16787 \begin_inset Quotes erd
16788 \end_inset
16789
16790 , etc.
16791 \begin_inset space ~
16792 \end_inset
16793
16794 appended to the page number of the parent 
16795 \family sans
16796 Slide
16797 \family default
16798 .
16799  
16800 \end_layout
16801
16802 \end_inset
16803
16804  Clearly, you want the contents of both the 
16805 \family sans
16806 Slide
16807 \family default
16808  and the 
16809 \family sans
16810 Overlay
16811 \family default
16812  to each fit on a single physical slide! You should probably consider an
16813  
16814 \family sans
16815 Overlay
16816 \family default
16817  as 
16818 \begin_inset Quotes eld
16819 \end_inset
16820
16821 part of
16822 \begin_inset Quotes erd
16823 \end_inset
16824
16825  a 
16826 \family sans
16827 Slide
16828 \family default
16829 .
16830  Indeed, the LyX 
16831 \family sans
16832 slides
16833 \family default
16834  class provides a visual cue for this: the label at the start of an 
16835 \family sans
16836 Overlay
16837 \family default
16838  is shorter than that at the start of a 
16839 \family sans
16840 Slide
16841 \family default
16842 .
16843  Lastly, when you generate printable output, you'll find alignment markers
16844  in all four corners of both the 
16845 \family sans
16846 Overlay
16847 \family default
16848  page and its parent 
16849 \family sans
16850 Slide
16851 \family default
16852 .
16853  These will assist you in lining up the two physical slides.
16854 \end_layout
16855
16856 \begin_layout Standard
16857 The major problem in overlaying two slides is aligning the contents of the
16858  two transparencies.
16859  How much space should you leave for that graph on the second slide? Worse
16860  still, what if you want a graph and a sentence on second slide, but there
16861  is text on the main transparency that goes in between them? You could try
16862  and insert vertical space of the right size.
16863  The better way is to use 
16864 \family sans
16865 InvisibleText
16866 \family default
16867  and 
16868 \family sans
16869 VisibleText
16870 \family default
16871 .
16872 \end_layout
16873
16874 \begin_layout Standard
16875 As their names imply, 
16876 \family sans
16877 InvisibleText
16878 \family default
16879  and 
16880 \family sans
16881 VisibleText
16882 \family default
16883  are two command-like paragraph environments that make all subsequent text
16884  invisible and visible, respectively.
16885  Note from section
16886 \begin_inset space ~
16887 \end_inset
16888
16889
16890 \begin_inset CommandInset ref
16891 LatexCommand ref
16892 reference "sec:slideQuirk"
16893
16894 \end_inset
16895
16896  that you don't place anything 
16897 \emph on
16898 into
16899 \emph default
16900  these two environments, however.
16901  When you create an 
16902 \family sans
16903 InvisibleText
16904 \family default
16905 , it inserts a centered, sky-blue label into the page reading 
16906 \begin_inset Quotes eld
16907 \end_inset
16908
16909 <Invisible Text Follows>
16910 \begin_inset Quotes erd
16911 \end_inset
16912
16913 .
16914  For paragraphs following this label, the parts of the 
16915 \family sans
16916 Slide
16917 \family default
16918  [or 
16919 \family sans
16920 Overlay
16921 \family default
16922 ; it doesn't matter which] where they would be contain instead blank space.
16923  
16924 \end_layout
16925
16926 \begin_layout Standard
16927 For 
16928 \family sans
16929 VisibleText
16930 \family default
16931 , the corresponding centered label is 
16932 \begin_inset Quotes eld
16933 \end_inset
16934
16935 <Visible Text Follows>
16936 \begin_inset Quotes erd
16937 \end_inset
16938
16939  in blazing green.
16940  Paragraphs following this label behave normally.
16941  Note that the beginning of a new 
16942 \family sans
16943 Slide
16944 \family default
16945
16946 \family sans
16947 Overlay
16948 \family default
16949 , or 
16950 \family sans
16951 Note
16952 \family default
16953  automatically shuts off an 
16954 \family sans
16955 InvisibleText
16956 \family default
16957 .
16958  It's therefore not necessary to use 
16959 \family sans
16960 VisibleText
16961 \family default
16962  at the end of a 
16963 \family sans
16964 Slide
16965 \family default
16966 .
16967 \end_layout
16968
16969 \begin_layout Standard
16970 By now, it should be obvious how to create overlay transparencies using
16971  the proper combination of 
16972 \family sans
16973 InvisibleText
16974 \family default
16975  and 
16976 \family sans
16977 VisibleText
16978 \family default
16979  on a 
16980 \family sans
16981 Slide
16982 \family default
16983  and 
16984 \family sans
16985 Overlay
16986 \family default
16987 :
16988 \end_layout
16989
16990 \begin_layout Enumerate
16991 Create a 
16992 \family sans
16993 Slide
16994 \family default
16995 , including everything that will appear on it, whether on the main slide
16996  or on the 
16997 \family sans
16998 Overlay
16999 \family default
17000 .
17001 \end_layout
17002
17003 \begin_layout Enumerate
17004 Before each figure or paragraph that will appear only on the 
17005 \family sans
17006 Overlay
17007 \family default
17008 , insert an 
17009 \family sans
17010 InvisibleText
17011 \family default
17012  environment.
17013  If necessary, insert a 
17014 \family sans
17015 VisibleText
17016 \family default
17017  environment after the 
17018 \family sans
17019 Overlay
17020 \family default
17021 -only text.
17022 \end_layout
17023
17024 \begin_layout Enumerate
17025 Start an 
17026 \family sans
17027 Overlay
17028 \family default
17029  immediately following the 
17030 \family sans
17031 Slide
17032 \family default
17033 .
17034 \end_layout
17035
17036 \begin_layout Enumerate
17037 Copy the contents of this 
17038 \family sans
17039 Slide
17040 \family default
17041  into the 
17042 \family sans
17043 Overlay
17044 \family default
17045 .
17046 \end_layout
17047
17048 \begin_layout Enumerate
17049 Within the 
17050 \family sans
17051 Overlay
17052 \family default
17053 , change all of the 
17054 \family sans
17055 InvisibleText
17056 \family default
17057  lines to 
17058 \family sans
17059 VisibleText
17060 \family default
17061  and vice-versa.
17062 \end_layout
17063
17064 \begin_layout Standard
17065 That's it.
17066  You've just made an 
17067 \family sans
17068 Overlay
17069 \family default
17070 .
17071 \end_layout
17072
17073 \begin_layout Standard
17074 There's one problem with the way I've designed the LyX 
17075 \family sans
17076 slides
17077 \family default
17078  class: you can't make text in the middle of a paragraph invisible, nor
17079  make text in the middle of an invisible paragraph visible again.
17080  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17081 \begin_inset Foot
17082 status collapsed
17083
17084 \begin_layout Plain Layout
17085 The commands of interest are: 
17086 \end_layout
17087
17088 \begin_layout Itemize
17089
17090 \family typewriter
17091 {
17092 \backslash
17093 invisible \SpecialChar \ldots{}
17094  }
17095 \end_layout
17096
17097 \begin_layout Itemize
17098
17099 \family typewriter
17100 {
17101 \backslash
17102 visible \SpecialChar \ldots{}
17103  }
17104 \end_layout
17105
17106 \begin_layout Plain Layout
17107 \SpecialChar \ldots{}
17108 and need to be marked as TeX.
17109  The text whose 
17110 \begin_inset Quotes eld
17111 \end_inset
17112
17113 visibility
17114 \begin_inset Quotes erd
17115 \end_inset
17116
17117  you wish to change goes in between the brackets [and after the 
17118 \family typewriter
17119
17120 \backslash
17121 invisible
17122 \family default
17123  or 
17124 \family typewriter
17125
17126 \backslash
17127 visible
17128 \family default
17129  command].
17130  If you don't know how to mark text as TeX, see the appropriate section
17131  of the 
17132 \emph on
17133 User's Guide
17134 \emph default
17135 .
17136 \end_layout
17137
17138 \end_inset
17139
17140
17141 \end_layout
17142
17143 \begin_layout Subsubsection
17144 Using 
17145 \family sans
17146 Note
17147 \family default
17148  with 
17149 \family sans
17150 Slide
17151 \family default
17152
17153 \begin_inset CommandInset label
17154 LatexCommand label
17155 name "sec:slideNote"
17156
17157 \end_inset
17158
17159
17160 \end_layout
17161
17162 \begin_layout Standard
17163 Like an 
17164 \family sans
17165 Overlay
17166 \family default
17167 , a 
17168 \family sans
17169 Note
17170 \family default
17171  is associated with a 
17172 \begin_inset Quotes eld
17173 \end_inset
17174
17175 parent
17176 \begin_inset Quotes erd
17177 \end_inset
17178
17179  
17180 \family sans
17181 Slide
17182 \family default
17183 .
17184  Here, too, the LyX 
17185 \family sans
17186 slides
17187 \family default
17188  class provides visual cues.
17189  The label for a 
17190 \family sans
17191 Note
17192 \family default
17193  is shorter than that of a 
17194 \family sans
17195 Slide
17196 \family default
17197  [yet longer than that of an 
17198 \family sans
17199 Overlay
17200 \family default
17201 ] and, like the label of an 
17202 \family sans
17203 Overlay
17204 \family default
17205  is shockingly magenta.
17206  Additionally, the printed 
17207 \family sans
17208 Note
17209 \family default
17210  has the page number of its 
17211 \begin_inset Quotes eld
17212 \end_inset
17213
17214 parent
17215 \begin_inset Quotes erd
17216 \end_inset
17217
17218  
17219 \family sans
17220 Slide
17221 \family default
17222 , appended by 
17223 \begin_inset Quotes eld
17224 \end_inset
17225
17226
17227 \family typewriter
17228 -
17229 \family default
17230 1
17231 \begin_inset Quotes erd
17232 \end_inset
17233
17234
17235 \begin_inset Quotes eld
17236 \end_inset
17237
17238
17239 \family typewriter
17240 -
17241 \family default
17242 2
17243 \begin_inset Quotes erd
17244 \end_inset
17245
17246
17247 \begin_inset Quotes eld
17248 \end_inset
17249
17250
17251 \family typewriter
17252 -
17253 \family default
17254 3
17255 \begin_inset Quotes erd
17256 \end_inset
17257
17258 , etc.
17259  You can have multiple 
17260 \family sans
17261 Note
17262 \family default
17263 s associated with a single 
17264 \family sans
17265 Slide
17266 \family default
17267 , and, as with 
17268 \family sans
17269 Slide
17270 \family default
17271  and 
17272 \family sans
17273 Overlay
17274 \family default
17275 , you'll probably want to break up long 
17276 \family sans
17277 Note
17278 \family default
17279 s so that they fit on a single sheet of paper.
17280 \end_layout
17281
17282 \begin_layout Standard
17283 The purpose of a 
17284 \family sans
17285 Note
17286 \family default
17287  is obvious: it contains anything additional you might want to say about
17288  a 
17289 \family sans
17290 Slide
17291 \family default
17292 .
17293  It could also be used as a sheet of reminders for a particular 
17294 \family sans
17295 Slide
17296 \family default
17297 .
17298  In the case of the latter, you might want to make use of time markers.
17299  Currently, the LyX 
17300 \family sans
17301 slides
17302 \family default
17303  class has no 
17304 \begin_inset Quotes eld
17305 \end_inset
17306
17307 native
17308 \begin_inset Quotes erd
17309 \end_inset
17310
17311  support for time markers, a 
17312 \noun on
17313 SliTeX
17314 \noun default
17315  feature.
17316  So, you'll have to resort to using the LaTeX codes.
17317 \end_layout
17318
17319 \begin_layout Standard
17320 To use time markers, you'll need to specify the extra class option 
17321 \begin_inset Quotes eld
17322 \end_inset
17323
17324
17325 \family typewriter
17326 clock
17327 \family default
17328
17329 \begin_inset Quotes erd
17330 \end_inset
17331
17332  [see section
17333 \begin_inset space ~
17334 \end_inset
17335
17336
17337 \begin_inset CommandInset ref
17338 LatexCommand ref
17339 reference "sec:slidesetup"
17340
17341 \end_inset
17342
17343 ].
17344  This option turns on timing marks, which will appear in the lower-left-hand
17345  corner of every 
17346 \family sans
17347 Note
17348 \family default
17349  you generate.
17350  To set what appears in the time marker, you use the LaTeX commands 
17351 \begin_inset Quotes eld
17352 \end_inset
17353
17354
17355 \family typewriter
17356
17357 \backslash
17358 settime{}
17359 \family default
17360
17361 \begin_inset Quotes erd
17362 \end_inset
17363
17364  and 
17365 \begin_inset Quotes eld
17366 \end_inset
17367
17368
17369 \family typewriter
17370
17371 \backslash
17372 addtime{}
17373 \family default
17374
17375 \begin_inset Quotes erd
17376 \end_inset
17377
17378 .
17379  The arguments of both commands are time measured in seconds.
17380  
17381 \begin_inset Quotes eld
17382 \end_inset
17383
17384
17385 \family typewriter
17386
17387 \backslash
17388 settime{}
17389 \family default
17390
17391 \begin_inset Quotes erd
17392 \end_inset
17393
17394  sets the time marker to a given time.
17395  
17396 \begin_inset Quotes eld
17397 \end_inset
17398
17399
17400 \family typewriter
17401
17402 \backslash
17403 addtime{}
17404 \family default
17405
17406 \begin_inset Quotes erd
17407 \end_inset
17408
17409  increments the time marker by the specified amount.
17410  Using time markers and 
17411 \family sans
17412 Note
17413 \family default
17414 s in this fashion, you can remind yourself how much time to spend on a particula
17415
17416 \family sans
17417 Slide
17418 \family default
17419 .
17420 \end_layout
17421
17422 \begin_layout Standard
17423 There's one last feature to describe.
17424  Clearly, you'd like to print out all of your 
17425 \family sans
17426 Slide
17427 \family default
17428 s and 
17429 \family sans
17430 Overlay
17431 \family default
17432 s on transparencies while printing all of your 
17433 \family sans
17434 Note
17435 \family default
17436 s on plain paper.
17437  However, a 
17438 \family sans
17439 Note
17440 \family default
17441  
17442 \emph on
17443 must
17444 \emph default
17445  follow the 
17446 \family sans
17447 Slide
17448 \family default
17449  with which it is associated.
17450  What's a person to do?
17451 \end_layout
17452
17453 \begin_layout Standard
17454 Luckily, there are two LaTeX commands that allow you to select what to print
17455  out.
17456  Both must be placed into the preamble of your document.
17457  The command 
17458 \begin_inset Quotes eld
17459 \end_inset
17460
17461
17462 \family typewriter
17463
17464 \backslash
17465 onlyslides{
17466 \backslash
17467 slides}
17468 \family default
17469
17470 \begin_inset Quotes erd
17471 \end_inset
17472
17473  will cause the output to contain only the 
17474 \family sans
17475 Slide
17476 \family default
17477 s and 
17478 \family sans
17479 Overlay
17480 \family default
17481 s.
17482  Correspondingly, the command 
17483 \begin_inset Quotes eld
17484 \end_inset
17485
17486
17487 \family typewriter
17488
17489 \backslash
17490 onlynotes{
17491 \backslash
17492 notes}
17493 \family default
17494
17495 \begin_inset Quotes erd
17496 \end_inset
17497
17498  prevents the output of anything but 
17499 \family sans
17500 Note
17501 \family default
17502 s.
17503  I'd advise placing both commands in the preamble and initially comment
17504  both out.
17505  You can then preview your entire presentation as you write.
17506  When you're done writing, you can then uncomment one of the two to select
17507  what you want to print.
17508  I like to uncomment 
17509 \begin_inset Quotes eld
17510 \end_inset
17511
17512
17513 \family typewriter
17514
17515 \backslash
17516 onlyslides{
17517 \backslash
17518 slides}
17519 \family default
17520
17521 \begin_inset Quotes erd
17522 \end_inset
17523
17524  , print to a file with 
17525 \begin_inset Quotes eld
17526 \end_inset
17527
17528
17529 \family typewriter
17530 -slides
17531 \family default
17532
17533 \begin_inset Quotes erd
17534 \end_inset
17535
17536  in its name, comment it back out, then uncomment 
17537 \begin_inset Quotes eld
17538 \end_inset
17539
17540
17541 \family typewriter
17542
17543 \backslash
17544 onlynotes{
17545 \backslash
17546 notes}
17547 \family default
17548
17549 \begin_inset Quotes erd
17550 \end_inset
17551
17552  and print to a 
17553 \begin_inset Quotes eld
17554 \end_inset
17555
17556
17557 \family typewriter
17558 *-notes.ps
17559 \family default
17560
17561 \begin_inset Quotes erd
17562 \end_inset
17563
17564  file.
17565  I can then send either file to a printer, loading transparencies or plain
17566  paper as appropriate.
17567 \end_layout
17568
17569 \begin_layout Standard
17570 You can also provide other arguments to the 
17571 \begin_inset Quotes eld
17572 \end_inset
17573
17574
17575 \family typewriter
17576
17577 \backslash
17578 onlyslides{}
17579 \family default
17580
17581 \begin_inset Quotes erd
17582 \end_inset
17583
17584  and 
17585 \begin_inset Quotes eld
17586 \end_inset
17587
17588
17589 \family typewriter
17590
17591 \backslash
17592 onlynotes{}
17593 \family default
17594
17595 \begin_inset Quotes erd
17596 \end_inset
17597
17598  commands.
17599  See a good LaTeX book for details.
17600 \end_layout
17601
17602 \begin_layout Subsection
17603 The 
17604 \family sans
17605 slides
17606 \family default
17607  Class Template File
17608 \end_layout
17609
17610 \begin_layout Standard
17611 I have also provided a template file, 
17612 \begin_inset Quotes eld
17613 \end_inset
17614
17615
17616 \family typewriter
17617 slides.lyx
17618 \family default
17619
17620 \begin_inset Quotes erd
17621 \end_inset
17622
17623 , with the 
17624 \family sans
17625 slides
17626 \family default
17627  class.
17628  To use it, begin your new presentation with 
17629 \family sans
17630 \bar under
17631 F
17632 \bar default
17633 ile\SpecialChar \menuseparator
17634 New
17635 \begin_inset space ~
17636 \end_inset
17637
17638 from
17639 \begin_inset space ~
17640 \end_inset
17641
17642
17643 \bar under
17644 T
17645 \bar default
17646 emplate
17647 \family default
17648 .
17649  Your new LyX presentation file will contain an example 
17650 \family sans
17651 Slide
17652 \family default
17653  – 
17654 \family sans
17655 Overlay
17656 \family default
17657  – 
17658 \family sans
17659 Note
17660 \family default
17661  triplet.
17662  The 
17663 \family sans
17664 Slide
17665 \family default
17666  and 
17667 \family sans
17668 Overlay
17669 \family default
17670  additionally contain an example of the use of 
17671 \family sans
17672 InvisibleText
17673 \family default
17674  and 
17675 \family sans
17676 VisibleText
17677 \family default
17678 .
17679  Lastly, the preamble will contain:
17680 \end_layout
17681
17682 \begin_layout LyX-Code
17683 % Uncomment to print out only slides and overlays
17684 \end_layout
17685
17686 \begin_layout LyX-Code
17687 %
17688 \end_layout
17689
17690 \begin_layout LyX-Code
17691 %
17692 \backslash
17693 onlyslides{
17694 \backslash
17695 slides}
17696 \begin_inset Newline newline
17697 \end_inset
17698
17699  
17700 \end_layout
17701
17702 \begin_layout LyX-Code
17703 % Uncomment to print out only notes
17704 \end_layout
17705
17706 \begin_layout LyX-Code
17707 %
17708 \end_layout
17709
17710 \begin_layout LyX-Code
17711 %
17712 \backslash
17713 onlynotes{
17714 \backslash
17715 notes}
17716 \end_layout
17717
17718 \begin_layout Standard
17719 One final thing: I created this class to support the LaTeX2e 
17720 \begin_inset Quotes eld
17721 \end_inset
17722
17723
17724 \noun on
17725 SliTeX
17726 \noun default
17727  emulation
17728 \begin_inset Quotes erd
17729 \end_inset
17730
17731  class, one of the built-in LaTeX2e classes.
17732  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17733  built-in slide class.
17734  It's here if you want it or need it.
17735  There exist other LaTeX2e classes for creating presentations, such as the
17736  
17737 \family sans
17738 Foils
17739 \family default
17740  class [see section
17741 \begin_inset space ~
17742 \end_inset
17743
17744
17745 \begin_inset CommandInset ref
17746 LatexCommand ref
17747 reference "sec:foiltex"
17748
17749 \end_inset
17750
17751 ] or the 
17752 \begin_inset Quotes eld
17753 \end_inset
17754
17755
17756 \family typewriter
17757 seminar
17758 \family default
17759
17760 \begin_inset Quotes erd
17761 \end_inset
17762
17763  package [present on some TeX distributions].
17764  The latter is not yet supported under LyX.
17765 \begin_inset Foot
17766 status collapsed
17767
17768 \begin_layout Plain Layout
17769 Perhaps you can take on the task\SpecialChar \ldots{}
17770
17771 \end_layout
17772
17773 \end_inset
17774
17775  I know nothing about these other classes.
17776  Try them out to see what sort of alternative they provide.
17777 \end_layout
17778
17779 \begin_layout Chapter
17780 LyX Features needing Extra Software
17781 \end_layout
17782
17783 \begin_layout Section
17784 Checking TeX
17785 \end_layout
17786
17787 \begin_layout Standard
17788 by 
17789 \noun on
17790 Asger Alstrup
17791 \end_layout
17792
17793 \begin_layout Subsection
17794 Introduction
17795 \end_layout
17796
17797 \begin_layout Standard
17798 If you have the 
17799 \family typewriter
17800 chktex
17801 \family default
17802  program installed
17803 \begin_inset Foot
17804 status collapsed
17805
17806 \begin_layout Plain Layout
17807
17808 \family typewriter
17809 chktex
17810 \family default
17811  is not yet available when you are using the LaTeX distribution MiKTeX.
17812 \end_layout
17813
17814 \end_inset
17815
17816 , you'll find in the 
17817 \family sans
17818 Tools
17819 \family default
17820  menu the entry: 
17821 \family sans
17822 Check
17823 \begin_inset space ~
17824 \end_inset
17825
17826 TeX
17827 \family default
17828 .
17829  You can get 
17830 \family typewriter
17831 chktex
17832 \family default
17833  it from CTAN, 
17834 \begin_inset CommandInset href
17835 LatexCommand href
17836 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17837
17838 \end_inset
17839
17840 .
17841 \end_layout
17842
17843 \begin_layout Standard
17844 The 
17845 \family sans
17846 ChkTeX
17847 \family default
17848  package is a program that was written by 
17849 \begin_inset Flex Noun
17850 status collapsed
17851
17852 \begin_layout Plain Layout
17853 Jens T.
17854 \begin_inset space ~
17855 \end_inset
17856
17857 Berger Thielemann
17858 \end_layout
17859
17860 \end_inset
17861
17862  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17863  and easy to forget.
17864  The program runs over your LaTeX file, checks the integrity of the file,
17865  and flags some common errors.
17866  In other technical words, it is 
17867 \family typewriter
17868 lint
17869 \family default
17870  for LaTeX.
17871 \end_layout
17872
17873 \begin_layout Standard
17874 Well, what is a syntax checker doing in LyX which is supposed to produce
17875  correct LaTeX anyways? The answer is simple: Just as 
17876 \family typewriter
17877 Lint
17878 \family default
17879  not only checks the 
17880 \emph on
17881 syntax
17882 \emph default
17883  of C programs, but also does 
17884 \emph on
17885 semantic
17886 \emph default
17887  checks for type-errors, 
17888 \family sans
17889 ChkTeX
17890 \family default
17891  catches some common 
17892 \emph on
17893 typographic
17894 \emph default
17895  errors, in addition to the syntactical ones.
17896  Specifically, 
17897 \family sans
17898 ChkTeX
17899 \family default
17900  is capable of detecting several common errors, such as
17901 \end_layout
17902
17903 \begin_layout Itemize
17904 Ellipsis detection:
17905 \begin_inset Newline newline
17906 \end_inset
17907
17908 Use \SpecialChar \ldots{}
17909  instead of ...
17910 \end_layout
17911
17912 \begin_layout Itemize
17913 No space in front of/after parenthesis:
17914 \begin_inset Newline newline
17915 \end_inset
17916
17917 ( wrong spacing )
17918 \end_layout
17919
17920 \begin_layout Itemize
17921 Enforcement of normal space after common abbreviations:
17922 \begin_inset Newline newline
17923 \end_inset
17924
17925 e.
17926 \begin_inset space \thinspace{}
17927 \end_inset
17928
17929 g.
17930 \begin_inset space \space{}
17931 \end_inset
17932
17933 is too wide spacing.
17934 \end_layout
17935
17936 \begin_layout Itemize
17937 Enforcement of end-of-sentence space when the last sentence ends with a
17938  capital letter:
17939 \begin_inset Newline newline
17940 \end_inset
17941
17942 This is a TEST.
17943  And this is wrong spacing.
17944 \end_layout
17945
17946 \begin_layout Itemize
17947 Space in front of labels and similar commands:
17948 \begin_inset Newline newline
17949 \end_inset
17950
17951 The label should stick right up to the text to avoid falling to a wrong
17952  page.
17953  
17954 \begin_inset CommandInset label
17955 LatexCommand label
17956 name "sec:chktex"
17957
17958 \end_inset
17959
17960  
17961 \begin_inset Foot
17962 status collapsed
17963
17964 \begin_layout Plain Layout
17965 This footnote is in danger of falling off to a wrong page
17966 \end_layout
17967
17968 \end_inset
17969
17970  The label is separated too much.
17971 \end_layout
17972
17973 \begin_layout Itemize
17974 Space in front of references, instead of hard spaces:
17975 \begin_inset Newline newline
17976 \end_inset
17977
17978 In you are in bad luck, the text will break right between the referenced
17979  text and reference number, and that's a pity.
17980  See section 
17981 \begin_inset CommandInset ref
17982 LatexCommand ref
17983 reference "sec:chktex"
17984
17985 \end_inset
17986
17987 .
17988 \end_layout
17989
17990 \begin_layout Itemize
17991 Use of 
17992 \begin_inset Quotes eld
17993 \end_inset
17994
17995 x
17996 \begin_inset Quotes erd
17997 \end_inset
17998
17999  instead of 
18000 \begin_inset Formula $\times$
18001 \end_inset
18002
18003  between numbers:
18004 \begin_inset Newline newline
18005 \end_inset
18006
18007 2x2 looks cheap compared to 
18008 \begin_inset Formula $2\times2$
18009 \end_inset
18010
18011 .
18012 \end_layout
18013
18014 \begin_layout Standard
18015 and more \SpecialChar \ldots{}
18016  It is an invaluable tool when you are 
18017 \begin_inset Quotes eld
18018 \end_inset
18019
18020 finishing up
18021 \begin_inset Quotes erd
18022 \end_inset
18023
18024  your document before printing, and you should run it right after the obligatory
18025  spelling check, and before you go fine tuning the typesetting.
18026 \end_layout
18027
18028 \begin_layout Subsection
18029 How to use it
18030 \end_layout
18031
18032 \begin_layout Standard
18033 If you have the program installed, usage is as simple as choosing 
18034 \family sans
18035 Tools\SpecialChar \menuseparator
18036 Check
18037 \begin_inset space ~
18038 \end_inset
18039
18040 TeX
18041 \family default
18042 .
18043  This will make LyX generate a LaTeX file of your document, start 
18044 \family sans
18045 ChkTeX
18046 \family default
18047  to check it, and then make LyX insert 
18048 \begin_inset Quotes eld
18049 \end_inset
18050
18051 error boxes
18052 \begin_inset Quotes erd
18053 \end_inset
18054
18055  with the warnings from 
18056 \family sans
18057 ChkTeX
18058 \family default
18059 , if there were any.
18060  The warnings will be placed close to the point of the mistake, and you
18061  can quickly find them by using the 
18062 \family sans
18063 Navigate\SpecialChar \menuseparator
18064 Error
18065 \family default
18066  menu item, or the shortcut key 
18067 \family sans
18068 C-g
18069 \family default
18070  from the default 
18071 \family typewriter
18072 cua
18073 \family default
18074  bind file.
18075  Open the error boxes by clicking on them with the mouse, or use the shortcut
18076  key 
18077 \family sans
18078 C-i
18079 \family default
18080  from 
18081 \family typewriter
18082 cua
18083 \family default
18084  bindings, or the corresponding 
18085 \family sans
18086 C-o
18087 \family default
18088  for the alternate 
18089 \family typewriter
18090 emacs
18091 \family default
18092  bind file.
18093  Read the warning and correct the mistake, if it is a mistake.
18094  If you have trouble understanding what the warning is about, you can safely
18095  ignore it.
18096  Remember that there is a hidden layer between the document on screen and
18097  the technical details in invoking 
18098 \family sans
18099 ChkTeX
18100 \family default
18101 , and this gap can make some warnings seem arcane or just right down plain
18102  silly.
18103 \end_layout
18104
18105 \begin_layout Standard
18106 This document is an excellent testing bed for the feature, and it should
18107  provide quite a few warnings for you to fiddle with.
18108  Since computers are only so smart, expect most of the warnings to be false
18109  alarms, though.
18110 \end_layout
18111
18112 \begin_layout Subsection
18113 How to fine tune it
18114 \end_layout
18115
18116 \begin_layout Standard
18117 Sometimes, you'll find that 
18118 \family sans
18119 ChkTeX
18120 \family default
18121  makes more noise than suits your mood.
18122  Then you can choose not to use it, wait until your mood changes, or try
18123  to customize 
18124 \family sans
18125 ChkTeX
18126 \family default
18127  to get better along with you.
18128 \end_layout
18129
18130 \begin_layout Standard
18131 Although 
18132 \family sans
18133 ChkTeX
18134 \family default
18135  
18136 \emph on
18137 is
18138 \emph default
18139  very configurable and extensible, you shouldn't expect to solve all problems
18140  with 
18141 \family sans
18142 ChkTeX
18143 \family default
18144  in LyX this way.
18145  Since LyX has to generate a somewhat special LaTeX file to be able to match
18146  the line numbers from the 
18147 \family sans
18148 ChkTeX
18149 \family default
18150  output
18151 \begin_inset Foot
18152 status collapsed
18153
18154 \begin_layout Plain Layout
18155 You can inspect the specific output from 
18156 \family sans
18157 chktex
18158 \family default
18159  by using 
18160 \family sans
18161 Edit\SpecialChar \menuseparator
18162 View
18163 \begin_inset space ~
18164 \end_inset
18165
18166 LaTeX
18167 \begin_inset space ~
18168 \end_inset
18169
18170 Log
18171 \family default
18172  right after a 
18173 \family sans
18174 chktex
18175 \family default
18176  run.
18177 \end_layout
18178
18179 \end_inset
18180
18181  to the internal document structure, some of the warnings will not seen
18182  to appear correctly.
18183  There are two things you can do about this:
18184 \end_layout
18185
18186 \begin_layout Itemize
18187 Fine tune the 
18188 \family sans
18189 ChkTeX
18190 \family default
18191  invocation command line in 
18192 \family sans
18193 Preferences
18194 \family default
18195  (tabs 
18196 \family sans
18197 Outputs
18198 \family default
18199
18200 \family sans
18201 Misc
18202 \family default
18203 ), or the global 
18204 \family sans
18205 ChkTeX
18206 \family default
18207  installation configuration file (usually with the file 
18208 \family typewriter
18209 chktexrc
18210 \family default
18211 ).
18212  See below to learn what warnings can be enabled and disabled on the command
18213  line.
18214  
18215 \end_layout
18216
18217 \begin_layout Itemize
18218 Export your document as a raw LaTeX file using 
18219 \family sans
18220 File\SpecialChar \menuseparator
18221 Export\SpecialChar \menuseparator
18222 LaTeX
18223 \family default
18224  and run 
18225 \family typewriter
18226 chktex
18227 \family default
18228  manually on that.
18229  Invoked in this way, it can be a hassle to find the corresponding place
18230  in the document inside LyX, but with a little patience, you should be able
18231  to do it.
18232 \end_layout
18233
18234 \begin_layout Standard
18235 Here follows the warning messages that can be enabled and disabled in 
18236 \family sans
18237 Preferences
18238 \family default
18239 .
18240  Use 
18241 \family typewriter
18242 -n#
18243 \family default
18244  to disable a warning, and 
18245 \family typewriter
18246 -w#
18247 \family default
18248  to enable a warning.
18249  The emphasized entries are disabled by default, because the default is
18250  "
18251 \family typewriter
18252 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18253 \family default
18254 ".
18255 \end_layout
18256
18257 \begin_layout Standard
18258 Notice that you should only use the options that enable and disable warnings,
18259  because LyX relies on some of the other command line parameters to be set
18260  in a specific way to have a chance to communicate with 
18261 \family typewriter
18262 chktex
18263 \family default
18264 .
18265 \end_layout
18266
18267 \begin_layout Enumerate
18268
18269 \size small
18270 \emph on
18271 Command terminated with space.
18272 \end_layout
18273
18274 \begin_layout Enumerate
18275
18276 \size small
18277 Non-breaking space (
18278 \begin_inset Quotes eld
18279 \end_inset
18280
18281
18282 \family typewriter
18283 ~
18284 \family default
18285
18286 \begin_inset Quotes erd
18287 \end_inset
18288
18289 ) should have been used.
18290 \end_layout
18291
18292 \begin_layout Enumerate
18293
18294 \size small
18295 \emph on
18296 You should enclose the previous parenthesis with 
18297 \begin_inset Quotes eld
18298 \end_inset
18299
18300
18301 \family typewriter
18302 {}
18303 \family default
18304
18305 \begin_inset Quotes erd
18306 \end_inset
18307
18308 .
18309 \end_layout
18310
18311 \begin_layout Enumerate
18312
18313 \size small
18314 Italic correction (
18315 \begin_inset Quotes eld
18316 \end_inset
18317
18318
18319 \family typewriter
18320
18321 \backslash
18322 /
18323 \family default
18324
18325 \begin_inset Quotes erd
18326 \end_inset
18327
18328 ) found in non-italic buffer.
18329 \end_layout
18330
18331 \begin_layout Enumerate
18332
18333 \size small
18334 Italic correction (
18335 \begin_inset Quotes eld
18336 \end_inset
18337
18338
18339 \family typewriter
18340
18341 \backslash
18342 /
18343 \family default
18344
18345 \begin_inset Quotes erd
18346 \end_inset
18347
18348 ) found more than once.
18349 \end_layout
18350
18351 \begin_layout Enumerate
18352
18353 \size small
18354 \emph on
18355 No italic correction (
18356 \begin_inset Quotes eld
18357 \end_inset
18358
18359
18360 \family typewriter
18361
18362 \backslash
18363 /
18364 \family default
18365
18366 \begin_inset Quotes erd
18367 \end_inset
18368
18369 ) found.
18370 \end_layout
18371
18372 \begin_layout Enumerate
18373
18374 \size small
18375 Accent command 
18376 \begin_inset Quotes eld
18377 \end_inset
18378
18379
18380 \family typewriter
18381 cmd
18382 \family default
18383
18384 \begin_inset Quotes erd
18385 \end_inset
18386
18387  needs use of 
18388 \begin_inset Quotes eld
18389 \end_inset
18390
18391
18392 \family typewriter
18393 cmd
18394 \family default
18395
18396 \begin_inset Quotes erd
18397 \end_inset
18398
18399 .
18400 \end_layout
18401
18402 \begin_layout Enumerate
18403
18404 \size small
18405 Wrong length of dash may have been used.
18406 \end_layout
18407
18408 \begin_layout Enumerate
18409
18410 \size small
18411 \emph on
18412 \begin_inset Quotes eld
18413 \end_inset
18414
18415
18416 \family typewriter
18417 %s
18418 \family default
18419
18420 \begin_inset Quotes erd
18421 \end_inset
18422
18423  expected, found 
18424 \begin_inset Quotes eld
18425 \end_inset
18426
18427
18428 \family typewriter
18429 %s
18430 \family default
18431
18432 \begin_inset Quotes erd
18433 \end_inset
18434
18435 .
18436 \end_layout
18437
18438 \begin_layout Enumerate
18439
18440 \size small
18441 Solo 
18442 \begin_inset Quotes eld
18443 \end_inset
18444
18445
18446 \family typewriter
18447 %s
18448 \family default
18449
18450 \begin_inset Quotes erd
18451 \end_inset
18452
18453  found.
18454 \end_layout
18455
18456 \begin_layout Enumerate
18457
18458 \size small
18459 You should use 
18460 \begin_inset Quotes eld
18461 \end_inset
18462
18463
18464 \family typewriter
18465 %s
18466 \family default
18467
18468 \begin_inset Quotes erd
18469 \end_inset
18470
18471  to achieve an ellipsis.
18472 \end_layout
18473
18474 \begin_layout Enumerate
18475
18476 \size small
18477 Inter-word spacing (
18478 \begin_inset Quotes eld
18479 \end_inset
18480
18481
18482 \family typewriter
18483
18484 \backslash
18485
18486 \family default
18487  
18488 \begin_inset Quotes eld
18489 \end_inset
18490
18491 ) should perhaps be used.
18492 \end_layout
18493
18494 \begin_layout Enumerate
18495
18496 \size small
18497 Inter-sentence spacing (
18498 \begin_inset Quotes eld
18499 \end_inset
18500
18501
18502 \family typewriter
18503
18504 \backslash
18505 @
18506 \family default
18507
18508 \begin_inset Quotes erd
18509 \end_inset
18510
18511 ) should perhaps be used.
18512 \end_layout
18513
18514 \begin_layout Enumerate
18515
18516 \size small
18517 Could not find argument for command.
18518 \end_layout
18519
18520 \begin_layout Enumerate
18521
18522 \size small
18523 No match found for 
18524 \begin_inset Quotes eld
18525 \end_inset
18526
18527
18528 \family typewriter
18529 %s
18530 \family default
18531
18532 \begin_inset Quotes erd
18533 \end_inset
18534
18535 .
18536 \end_layout
18537
18538 \begin_layout Enumerate
18539
18540 \size small
18541 Math mode still on at end of LaTeX file.
18542 \end_layout
18543
18544 \begin_layout Enumerate
18545
18546 \size small
18547 Number of 
18548 \begin_inset Quotes eld
18549 \end_inset
18550
18551
18552 \family typewriter
18553 char
18554 \family default
18555
18556 \begin_inset Quotes erd
18557 \end_inset
18558
18559  doesn't match the number of 
18560 \begin_inset Quotes eld
18561 \end_inset
18562
18563
18564 \family typewriter
18565 char
18566 \family default
18567
18568 \begin_inset Quotes erd
18569 \end_inset
18570
18571 .
18572 \end_layout
18573
18574 \begin_layout Enumerate
18575
18576 \size small
18577 You should use either 
18578 \family typewriter
18579
18580 \begin_inset Quotes eld
18581 \end_inset
18582
18583
18584 \family default
18585  or 
18586 \family typewriter
18587
18588 \begin_inset Quotes erd
18589 \end_inset
18590
18591
18592 \family default
18593  as an alternative to 
18594 \begin_inset Quotes eld
18595 \end_inset
18596
18597
18598 \family typewriter
18599 "
18600 \family default
18601
18602 \begin_inset Quotes erd
18603 \end_inset
18604
18605 .
18606 \end_layout
18607
18608 \begin_layout Enumerate
18609
18610 \size small
18611 You should use "
18612 \family typewriter
18613 '
18614 \family default
18615 " (ASCII 39) instead of "
18616 \family typewriter
18617 ´
18618 \family default
18619 " (ASCII 180).
18620 \end_layout
18621
18622 \begin_layout Enumerate
18623
18624 \size small
18625 User-specified pattern found.
18626 \end_layout
18627
18628 \begin_layout Enumerate
18629
18630 \size small
18631 This command might not be intended.
18632 \end_layout
18633
18634 \begin_layout Enumerate
18635
18636 \size small
18637 \emph on
18638 Comment displayed.
18639 \end_layout
18640
18641 \begin_layout Enumerate
18642
18643 \size small
18644 Either 
18645 \family typewriter
18646 ''
18647 \backslash
18648 ,'
18649 \family default
18650  or 
18651 \family typewriter
18652 '
18653 \backslash
18654 ,''
18655 \family default
18656  will look better.
18657 \end_layout
18658
18659 \begin_layout Enumerate
18660
18661 \size small
18662 Delete this space to maintain correct page references.
18663 \end_layout
18664
18665 \begin_layout Enumerate
18666
18667 \size small
18668 \emph on
18669 You might wish to put this between a pair of 
18670 \begin_inset Quotes eld
18671 \end_inset
18672
18673
18674 \family typewriter
18675 {}
18676 \family default
18677
18678 \begin_inset Quotes erd
18679 \end_inset
18680
18681 .
18682 \end_layout
18683
18684 \begin_layout Enumerate
18685
18686 \size small
18687 You ought to remove spaces in front of punctuation.
18688 \end_layout
18689
18690 \begin_layout Enumerate
18691
18692 \size small
18693 Could not execute LaTeX command.
18694 \end_layout
18695
18696 \begin_layout Enumerate
18697
18698 \size small
18699 Don't use 
18700 \family typewriter
18701
18702 \backslash
18703 /
18704 \family default
18705  in front of small punctuation.
18706 \end_layout
18707
18708 \begin_layout Enumerate
18709
18710 \family typewriter
18711 \size small
18712 $
18713 \backslash
18714 times$
18715 \family default
18716  may look prettier here.
18717 \end_layout
18718
18719 \begin_layout Enumerate
18720
18721 \size small
18722 \emph on
18723 Multiple spaces detected in output.
18724 \end_layout
18725
18726 \begin_layout Enumerate
18727
18728 \size small
18729 This text may be ignored.
18730 \end_layout
18731
18732 \begin_layout Enumerate
18733
18734 \size small
18735 Use 
18736 \family typewriter
18737
18738 \begin_inset Quotes eld
18739 \end_inset
18740
18741
18742 \family default
18743  to begin quotation, not 
18744 \family typewriter
18745 '
18746 \family default
18747 .
18748 \end_layout
18749
18750 \begin_layout Enumerate
18751
18752 \size small
18753 Use 
18754 \family typewriter
18755 '
18756 \family default
18757  to end quotation, not 
18758 \family typewriter
18759
18760 \begin_inset Quotes eld
18761 \end_inset
18762
18763
18764 \family default
18765 .
18766 \end_layout
18767
18768 \begin_layout Enumerate
18769
18770 \size small
18771 Don't mix quotes.
18772 \end_layout
18773
18774 \begin_layout Enumerate
18775
18776 \size small
18777 You should perhaps use 
18778 \begin_inset Quotes eld
18779 \end_inset
18780
18781
18782 \family typewriter
18783 cmd
18784 \family default
18785
18786 \begin_inset Quotes erd
18787 \end_inset
18788
18789  instead.
18790 \end_layout
18791
18792 \begin_layout Enumerate
18793
18794 \size small
18795 You should put a space in front of/after parenthesis.
18796 \end_layout
18797
18798 \begin_layout Enumerate
18799
18800 \size small
18801 You should avoid spaces in front of/after parenthesis.
18802 \end_layout
18803
18804 \begin_layout Enumerate
18805
18806 \size small
18807 \emph on
18808 You should not use punctuation in front of/after quotes.
18809 \end_layout
18810
18811 \begin_layout Enumerate
18812
18813 \size small
18814 Double space found.
18815 \end_layout
18816
18817 \begin_layout Enumerate
18818
18819 \size small
18820 You should put punctuation outside inner/inside display math mode.
18821 \end_layout
18822
18823 \begin_layout Enumerate
18824
18825 \size small
18826 You ought to not use primitive TeX in LaTeX code.
18827 \end_layout
18828
18829 \begin_layout Enumerate
18830
18831 \size small
18832 You should remove spaces in front of 
18833 \begin_inset Quotes eld
18834 \end_inset
18835
18836
18837 \family typewriter
18838 %s
18839 \family default
18840
18841 \begin_inset Quotes erd
18842 \end_inset
18843
18844
18845 \end_layout
18846
18847 \begin_layout Enumerate
18848
18849 \size small
18850 \begin_inset Quotes eld
18851 \end_inset
18852
18853
18854 \family typewriter
18855 %s
18856 \family default
18857
18858 \begin_inset Quotes erd
18859 \end_inset
18860
18861  is normally not followed by 
18862 \begin_inset Quotes eld
18863 \end_inset
18864
18865
18866 \family typewriter
18867 %c
18868 \family default
18869
18870 \begin_inset Quotes erd
18871 \end_inset
18872
18873 .
18874 \end_layout
18875
18876 \begin_layout Standard
18877 In later versions of LyX, we hope to provide a more complete interface to
18878  this tool (and it's smaller cousin 
18879 \family typewriter
18880 lacheck
18881 \family default
18882 ) to exploit the full power of it.
18883  But it's not exactly useless as it is now: go try it on one of your existing
18884  documents of a certain length and be surprised.
18885 \end_layout
18886
18887 \begin_layout Section
18888 Version Control in LyX
18889 \end_layout
18890
18891 \begin_layout Standard
18892 by
18893 \noun on
18894  Lars Gullik Bjønnes 
18895 \noun default
18896 and 
18897 \noun on
18898 Pavel Sanda
18899 \end_layout
18900
18901 \begin_layout Subsection
18902 Introduction
18903 \end_layout
18904
18905 \begin_layout Standard
18906 A friend of mine wanted to try LyX for a group project.
18907  When he didn't find support for version control or file locking, he dropped
18908  it.
18909  This angered me a bit, so I thought that I should at least make support
18910  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18911  This has been done.
18912  LyX now supports some of the most basic RCS/CVS/SVN commands.
18913  If you need something a bit more sophisticated you will have to do that
18914  manually in a terminal.
18915 \end_layout
18916
18917 \begin_layout Standard
18918 Also note that CVS support is not as good as subversion support so we advice
18919  using SVN instead.
18920  Good place to start with Subversion is SVN Book
18921 \begin_inset Foot
18922 status open
18923
18924 \begin_layout Plain Layout
18925 \begin_inset CommandInset href
18926 LatexCommand href
18927 target "http://svnbook.red-bean.com/"
18928
18929 \end_inset
18930
18931
18932 \end_layout
18933
18934 \end_inset
18935
18936 .
18937  In case of RCS you should read 
18938 \begin_inset Quotes eld
18939 \end_inset
18940
18941 rcsintro
18942 \begin_inset Quotes erd
18943 \end_inset
18944
18945  (a man file, read it with 
18946 \family typewriter
18947 man rcsintro
18948 \family default
18949 ).
18950  This file describes all the basic features of RCS.
18951  You should especially notice the comment about a RCS directory, and the
18952  notion of a master RCS file (the file ending in 
18953 \family typewriter
18954 ,v
18955 \family default
18956 ).
18957 \end_layout
18958
18959 \begin_layout Standard
18960 Before you begin to use the version control features in LyX, you should
18961  be familiar with RCS/CVS/SVN usage.
18962  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18963  package—no guarantees are made for older versions.
18964  Most of the log messages are not currently displayed after operations —
18965  you can check them in Messages pane if unsure.
18966 \end_layout
18967
18968 \begin_layout Standard
18969 For introducing your own external commands consult vc-command in the manual
18970  of LyX functions.
18971 \end_layout
18972
18973 \begin_layout Subsection
18974 RCS commands in LyX
18975 \end_layout
18976
18977 \begin_layout Standard
18978 The following sections describe the RCS commands supported by LyX.
18979  You can find them in the 
18980 \family sans
18981 File\SpecialChar \menuseparator
18982 Version
18983 \begin_inset space ~
18984 \end_inset
18985
18986 Control
18987 \family default
18988  submenu.
18989  LyX was tested against RCS 5.7.
18990 \end_layout
18991
18992 \begin_layout Subsubsection
18993
18994 \family sans
18995 Register
18996 \end_layout
18997
18998 \begin_layout Standard
18999 If your document is not under revision control, this is the only item shown
19000  in the menu.
19001  And if it is under revision control, the 
19002 \family sans
19003 Register
19004 \family default
19005  item is not visible.
19006  
19007 \end_layout
19008
19009 \begin_layout Standard
19010 This command registers your document with RCS (unless you are under the
19011  directory managed by CVS)\SpecialChar \@.
19012  You are asked interactively to supply an initial
19013  description of the document.
19014  The document is now set in Read-Only mode and you have to 
19015 \family sans
19016 Check
19017 \begin_inset space ~
19018 \end_inset
19019
19020 Out
19021 \begin_inset space ~
19022 \end_inset
19023
19024 For
19025 \begin_inset space ~
19026 \end_inset
19027
19028 Edit
19029 \family default
19030 , before making any changes to it.
19031  A document under revision control has a 
19032 \begin_inset Quotes eld
19033 \end_inset
19034
19035 [RCS:<version> <locker>]
19036 \begin_inset Quotes erd
19037 \end_inset
19038
19039  item tagged to the filename in the minibuffer.
19040 \end_layout
19041
19042 \begin_layout Standard
19043 RCS command that is run: 
19044 \family typewriter
19045 ci -q -u -i -t-"<initial description>" <file-name>
19046 \end_layout
19047
19048 \begin_layout Standard
19049 Read 
19050 \family typewriter
19051 man ci
19052 \family default
19053  to understand the switches.
19054  
19055 \end_layout
19056
19057 \begin_layout Subsubsection
19058
19059 \family sans
19060 Check In Changes
19061 \end_layout
19062
19063 \begin_layout Standard
19064 When you are finished editing a file, you check in your changes.
19065  When you do this, you are asked for a description of the changes.
19066  This is stored in the history log.
19067  The version number is bumped, your changes are applied to the master RCS
19068  file, the document is unlocked and set to Read-Only mode.
19069  
19070 \end_layout
19071
19072 \begin_layout Standard
19073 RCS command: 
19074 \family typewriter
19075 ci -q -u -m"<description>" <file-name>
19076 \end_layout
19077
19078 \begin_layout Subsubsection
19079
19080 \family sans
19081 Check Out For Edit
19082 \end_layout
19083
19084 \begin_layout Standard
19085 By doing this you lock the document so that only you can edit it.
19086  This will also make the document Read-Write only for you.
19087  You will usually continue editing for a while and when you are finished
19088  you check in your changes.
19089  The status line is changed to reflect that you have locked the file.
19090  
19091 \end_layout
19092
19093 \begin_layout Standard
19094 RCS command: 
19095 \family typewriter
19096 co -q -l <file-name>
19097 \end_layout
19098
19099 \begin_layout Subsubsection
19100
19101 \family sans
19102 Revert To Repository Version
19103 \end_layout
19104
19105 \begin_layout Standard
19106 This will discard all changes made to the document since the last check
19107  in.
19108  You get a warning before changes are discarded.
19109 \end_layout
19110
19111 \begin_layout Standard
19112 RCS command: 
19113 \family typewriter
19114 co -f -u<version> <file-name>
19115 \end_layout
19116
19117 \begin_layout Subsubsection
19118
19119 \family sans
19120 Undo Last Checkin
19121 \end_layout
19122
19123 \begin_layout Standard
19124 This makes as if the last check in never happened.
19125  No changes are made to the document loaded into LyX, but the last version
19126  is removed from the master RCS file.
19127  
19128 \end_layout
19129
19130 \begin_layout Standard
19131 RCS command: 
19132 \family typewriter
19133 rcs -o<version> <file-name>
19134 \end_layout
19135
19136 \begin_layout Subsubsection
19137
19138 \family sans
19139 Show History
19140 \end_layout
19141
19142 \begin_layout Standard
19143 This shows the complete history of the RCS document.
19144  The output of 
19145 \family typewriter
19146 rlog <file-name>
19147 \family default
19148  is shown in a browser.
19149  See 
19150 \family typewriter
19151 man rlog
19152 \family default
19153  for more info.
19154 \end_layout
19155
19156 \begin_layout Subsubsection
19157 Revision info
19158 \end_layout
19159
19160 \begin_layout Standard
19161 LyX supports RCS version number, author name, date and time of last commit.
19162  All those are extracted from 
19163 \family typewriter
19164 rlog -r <file-name>
19165 \family default
19166 .
19167  For other details see 
19168 \begin_inset CommandInset ref
19169 LatexCommand ref
19170 reference "sub:VCS-Revision-Information"
19171
19172 \end_inset
19173
19174  for details.
19175 \end_layout
19176
19177 \begin_layout Subsection
19178 CVS commands in LyX
19179 \end_layout
19180
19181 \begin_layout Standard
19182 A subset of CVS operations is supported by LyX.
19183  You can find the commands in the 
19184 \family sans
19185 File\SpecialChar \menuseparator
19186 Version
19187 \begin_inset space ~
19188 \end_inset
19189
19190 Control
19191 \family default
19192  submenu.
19193  The version control system SVN is more powerful, so please use it instead
19194  of CVS if possible.
19195 \end_layout
19196
19197 \begin_layout Subsubsection
19198
19199 \family sans
19200 General CVS usage
19201 \end_layout
19202
19203 \begin_layout Standard
19204 If you start from scratch with CVS you have to create your repository and
19205  checkout the working copy with external tools.
19206  If you're using a client-server setup you may need to login before doing
19207  the first repository checkout.
19208 \end_layout
19209
19210 \begin_layout Standard
19211 If your documents are under revision control and others are using the same
19212  repository problems arise when different changes to the same document at
19213  the same location happen.
19214  Standard CVS repositories doesn't operate with a file locking mechanism.
19215  This may be surprising, but conflicts only occur if people disagree on
19216  the proper content of the same part of a document.
19217  So, if co-workers are used to communicate regularly, these conflicts occur
19218  rarely.
19219  If they don't communicate they have a fundamental problem anyway.
19220  Nevertheless some people like to work with so called 
19221 \begin_inset Quotes eld
19222 \end_inset
19223
19224 reserved checkouts
19225 \begin_inset Quotes erd
19226 \end_inset
19227
19228 .
19229  If they do so the working copy of all files is readonly when checked out
19230  first and the user starts editing after using a special command to make
19231  the working copy writable.
19232  When the changes are checked in the working copy returns to readonly state.
19233  With LyX one has to edit the 
19234 \begin_inset Flex Code
19235 status collapsed
19236
19237 \begin_layout Plain Layout
19238 .cvsrc
19239 \end_layout
19240
19241 \end_inset
19242
19243  file and add the line 
19244 \begin_inset Flex Code
19245 status collapsed
19246
19247 \begin_layout Plain Layout
19248 cvs -r
19249 \end_layout
19250
19251 \end_inset
19252
19253  to work with reserved checkouts.
19254  The benefit is the possibility to see who is using a writable copy of some
19255  document.
19256  It's not guaranteed only one user makes a copy writable.
19257 \end_layout
19258
19259 \begin_layout Standard
19260 LyX tries to guess if you're using reserved or non-reserved checkouts.
19261  If your working copy is readonly or it is writable and an additional copy
19262  of your document exists in the CVS/Base sub-directory a reserved otherwise
19263  a non-reserved checkout is assumed.
19264  When a reserved checkout is detected you have to use 
19265 \begin_inset Flex MenuItem
19266 status collapsed
19267
19268 \begin_layout Plain Layout
19269 Check Out
19270 \end_layout
19271
19272 \end_inset
19273
19274  to make your working copy writable if it's readonly.
19275  After doing so the 
19276 \begin_inset Flex MenuItem
19277 status collapsed
19278
19279 \begin_layout Plain Layout
19280 Check In
19281 \end_layout
19282
19283 \end_inset
19284
19285  operation is possible and that makes your working copy readonly again after
19286  transferring your changes to the repository.
19287 \end_layout
19288
19289 \begin_layout Standard
19290 More information about CVS can be found here 
19291 \begin_inset Flex URL
19292 status collapsed
19293
19294 \begin_layout Plain Layout
19295
19296 http://www.nongnu.org/cvs
19297 \end_layout
19298
19299 \end_inset
19300
19301  and here 
19302 \begin_inset Flex URL
19303 status collapsed
19304
19305 \begin_layout Plain Layout
19306
19307 http://ximbiot.com/cvs
19308 \end_layout
19309
19310 \end_inset
19311
19312 .
19313 \end_layout
19314
19315 \begin_layout Standard
19316 Read 
19317 \family typewriter
19318 man cvs
19319 \family default
19320  to understand the sub-commands and the switches mentioned below.
19321 \end_layout
19322
19323 \begin_layout Subsubsection
19324
19325 \family sans
19326 Register
19327 \end_layout
19328
19329 \begin_layout Standard
19330 If your document is not under revision control, this is the only item shown
19331  in the menu.
19332  And if it is under revision control, the 
19333 \family sans
19334 \bar under
19335 R
19336 \bar default
19337 egister
19338 \family default
19339  item is not visible.
19340  
19341 \end_layout
19342
19343 \begin_layout Standard
19344 This command registers in CVS your document 
19345 \begin_inset Flex Strong
19346 status collapsed
19347
19348 \begin_layout Plain Layout
19349
19350 \emph on
19351 only
19352 \end_layout
19353
19354 \end_inset
19355
19356  in case you have already the documents directory under CVS control (in
19357  particular 
19358 \family typewriter
19359 CVS/Entries
19360 \family default
19361  file exists).
19362  This means you have to create or checkout the archive by yourself using
19363  external tools.
19364  (In case you forget that step LyX registers the document with RCS.)
19365 \end_layout
19366
19367 \begin_layout Standard
19368 Then you are asked interactively to supply an initial description of the
19369  document.
19370  Don't forget that registered file is not yet checked in.
19371 \end_layout
19372
19373 \begin_layout Standard
19374 CVS command that is run: 
19375 \family typewriter
19376 cvs -q add -m"<entered message>" "<file-name>"
19377 \end_layout
19378
19379 \begin_layout Standard
19380 The term 
19381 \family typewriter
19382 "<file-name>"
19383 \family default
19384  above and for all other CVS commands is an abbreviation for 
19385 \begin_inset Quotes eld
19386 \end_inset
19387
19388 change the current working directory to file location and use the file name
19389  without path component as argument
19390 \begin_inset Quotes erd
19391 \end_inset
19392
19393 .
19394 \end_layout
19395
19396 \begin_layout Subsubsection
19397
19398 \family sans
19399 Check In Changes
19400 \end_layout
19401
19402 \begin_layout Standard
19403 When you are finished editing a file, you commit your changes.
19404  When you do this and you had changed the document, you are asked for a
19405  description of the changes.
19406  After that changes are written to the repository.
19407  In case you didn't change the document and a reserved checkout is detected
19408  the reservation made on 
19409 \begin_inset Flex MenuItem
19410 status collapsed
19411
19412 \begin_layout Plain Layout
19413 Check Out
19414 \end_layout
19415
19416 \end_inset
19417
19418  is undone.
19419 \end_layout
19420
19421 \begin_layout Labeling
19422 \labelwidthstring 00.00.0000
19423 CVS
19424 \begin_inset space ~
19425 \end_inset
19426
19427 command: 
19428 \begin_inset space ~
19429 \end_inset
19430
19431
19432 \begin_inset Newline newline
19433 \end_inset
19434
19435
19436 \begin_inset Flex Code
19437 status collapsed
19438
19439 \begin_layout Plain Layout
19440 cvs 
19441 \family typewriter
19442 -q commit -m"<description>" "<file-name>"
19443 \end_layout
19444
19445 \end_inset
19446
19447  or
19448 \begin_inset Newline newline
19449 \end_inset
19450
19451
19452 \begin_inset Flex Code
19453 status collapsed
19454
19455 \begin_layout Plain Layout
19456 cvs -q unedit 
19457 \family typewriter
19458 "<file-name>"
19459 \end_layout
19460
19461 \end_inset
19462
19463
19464 \end_layout
19465
19466 \begin_layout Subsubsection
19467
19468 \family sans
19469 Check Out Changes
19470 \end_layout
19471
19472 \begin_layout Standard
19473 When you are sharing a repository with others, you may have to incorporate
19474  their changes into your working copy.
19475 \end_layout
19476
19477 \begin_layout Standard
19478 CVS command: 
19479 \family typewriter
19480 cvs -q update "<file-name>"
19481 \end_layout
19482
19483 \begin_layout Standard
19484 If a readonly checkout is detected the working copy is made writable and
19485  reserved.
19486 \end_layout
19487
19488 \begin_layout Standard
19489 CVS command: 
19490 \family typewriter
19491 cvs -q edit "<file-name>"
19492 \end_layout
19493
19494 \begin_layout Subsubsection
19495
19496 \family sans
19497 Revert To Repository Version
19498 \end_layout
19499
19500 \begin_layout Standard
19501 This will discard all changes made to the document since the last check
19502  in.
19503  You get a warning before changes are discarded.
19504  Firstly the file is deleted, secondly CVS update command is run.
19505 \end_layout
19506
19507 \begin_layout Standard
19508 CVS command: 
19509 \family typewriter
19510 cvs -q update "<file-name>"
19511 \end_layout
19512
19513 \begin_layout Standard
19514 If a reserved checkout is detected and the working copy has no changes only
19515  the reservation is undone.
19516 \end_layout
19517
19518 \begin_layout Standard
19519 CVS command: 
19520 \family typewriter
19521 cvs -q unedit "<file-name>"
19522 \end_layout
19523
19524 \begin_layout Subsubsection
19525 Update of the local directory checkout from repository
19526 \end_layout
19527
19528 \begin_layout Standard
19529 Once your documents gets more complex, containing sub-documents and pictures,
19530  including external 
19531 \begin_inset Flex Code
19532 status collapsed
19533
19534 \begin_layout Plain Layout
19535 .tex
19536 \end_layout
19537
19538 \end_inset
19539
19540  files and so on using version control becomes more complicated.
19541  LyX supports updating the whole tree in which resides the document.
19542  This become especially useful once you cooperate with people which neither
19543  have detailed knowledge about CVS usage nor they have ambition to commit
19544  additional material to the repository.
19545  You have to organize the files structure so that all external files are
19546  in the same directory or subdirectories of the document.
19547  It's good practice anyway to store multipart documents in an extra directory.
19548 \end_layout
19549
19550 \begin_layout Standard
19551 The 
19552 \begin_inset Flex Code
19553 status collapsed
19554
19555 \begin_layout Plain Layout
19556 Update local directory from repository
19557 \end_layout
19558
19559 \end_inset
19560
19561  command updates the whole directory.
19562  If local changes are detected user is warned before update starts.
19563  In case of merge conflicts both versions of the conflicting document parts
19564  are placed in the final document.
19565  You have to review and correct the result of the merge.
19566  You'll find the conflicts enclosed in pairs of 
19567 \begin_inset Flex Code
19568 status collapsed
19569
19570 \begin_layout Plain Layout
19571 <<<<<<<
19572 \end_layout
19573
19574 \end_inset
19575
19576  and 
19577 \begin_inset Flex Code
19578 status collapsed
19579
19580 \begin_layout Plain Layout
19581 >>>>>>>
19582 \end_layout
19583
19584 \end_inset
19585
19586  separated by 
19587 \begin_inset Flex Code
19588 status collapsed
19589
19590 \begin_layout Plain Layout
19591 =======
19592 \end_layout
19593
19594 \end_inset
19595
19596 .
19597  The first part is your version as before the update operation with the
19598  document name prepended.
19599  The second one is the repository version with the version number after
19600  the sequence of 
19601 \begin_inset Flex Code
19602 status collapsed
19603
19604 \begin_layout Plain Layout
19605 >
19606 \end_layout
19607
19608 \end_inset
19609
19610  signs.
19611 \end_layout
19612
19613 \begin_layout Labeling
19614 \labelwidthstring 00.00.0000
19615 CVS
19616 \begin_inset space ~
19617 \end_inset
19618
19619 commands: 
19620 \begin_inset space ~
19621 \end_inset
19622
19623
19624 \begin_inset Newline newline
19625 \end_inset
19626
19627
19628 \begin_inset Flex Code
19629 status collapsed
19630
19631 \begin_layout Plain Layout
19632 cd $path; cvs diff 
19633 \family typewriter
19634 "."
19635 \end_layout
19636
19637 \end_inset
19638
19639  (Ask if changes are detected.)
19640 \begin_inset Newline newline
19641 \end_inset
19642
19643
19644 \begin_inset Flex Code
19645 status collapsed
19646
19647 \begin_layout Plain Layout
19648 cd $path; cvs -q update 
19649 \family typewriter
19650 "."
19651 \end_layout
19652
19653 \end_inset
19654
19655
19656 \end_layout
19657
19658 \begin_layout Standard
19659 where 
19660 \begin_inset Flex Code
19661 status collapsed
19662
19663 \begin_layout Plain Layout
19664 $path
19665 \end_layout
19666
19667 \end_inset
19668
19669  stands for the path to the document.
19670 \end_layout
19671
19672 \begin_layout Subsubsection
19673
19674 \family sans
19675 Show History
19676 \end_layout
19677
19678 \begin_layout Standard
19679 This shows the complete history of the CVS document.
19680  The output of 
19681 \family typewriter
19682 cvs log "<file-name>"
19683 \family default
19684  is shown in a browser.
19685 \end_layout
19686
19687 \begin_layout Subsection
19688 SVN commands in LyX
19689 \end_layout
19690
19691 \begin_layout Standard
19692 SVN is now partially supported by LyX.
19693  You can find the commands in the 
19694 \family sans
19695 File\SpecialChar \menuseparator
19696 Version
19697 \begin_inset space ~
19698 \end_inset
19699
19700 Control
19701 \family default
19702  submenu.
19703  Please note that if you use password protected access to repository via
19704  ssh, you will be asked in terminal window.
19705  LyX was tested against SVN 1.5 and 1.6
19706 \begin_inset Foot
19707 status open
19708
19709 \begin_layout Plain Layout
19710 Most of the commands will work with 1.4 too, see 
19711 \begin_inset CommandInset ref
19712 LatexCommand ref
19713 reference "sub:SVN-Repo-Update"
19714
19715 \end_inset
19716
19717 .
19718 \end_layout
19719
19720 \end_inset
19721
19722
19723 \end_layout
19724
19725 \begin_layout Subsubsection
19726
19727 \family sans
19728 Register
19729 \end_layout
19730
19731 \begin_layout Standard
19732 If your document is not under revision control, this is the only item shown
19733  in the menu.
19734  And if it is under revision control, the 
19735 \family sans
19736 \bar under
19737 R
19738 \bar default
19739 egister
19740 \family default
19741  item is not visible.
19742  
19743 \end_layout
19744
19745 \begin_layout Standard
19746 This command registers in SVN your document ONLY in case you have already
19747  the documents directory under SVN control (in particular 
19748 \family typewriter
19749 .svn/entries
19750 \family default
19751  file exists).
19752  This means you have to checkout the archive by yourself.
19753  
19754 \end_layout
19755
19756 \begin_layout Standard
19757 Then you are asked interactively to supply an initial description of the
19758  document.
19759  Don't forget that registered file is not yet commited.
19760 \end_layout
19761
19762 \begin_layout Standard
19763 SVN command that is run: 
19764 \family typewriter
19765 svn add -q 
19766 \begin_inset Quotes eld
19767 \end_inset
19768
19769 <file-name>
19770 \begin_inset Quotes erd
19771 \end_inset
19772
19773
19774 \end_layout
19775
19776 \begin_layout Standard
19777 Read 
19778 \family typewriter
19779 man svn
19780 \family default
19781  to understand the switches.
19782  
19783 \end_layout
19784
19785 \begin_layout Subsubsection
19786
19787 \family sans
19788 Check In Changes
19789 \end_layout
19790
19791 \begin_layout Standard
19792 When you are finished editing a file, you commit your changes.
19793  When you do this, you are asked for a description of the changes.
19794  After that changes are commited.
19795 \end_layout
19796
19797 \begin_layout Standard
19798 SVN command:
19799 \begin_inset Foot
19800 status collapsed
19801
19802 \begin_layout Plain Layout
19803 In case locking is not enabled.
19804  See Section 
19805 \begin_inset CommandInset ref
19806 LatexCommand ref
19807 reference "subsec:SVN-File-Locking"
19808
19809 \end_inset
19810
19811 .
19812 \end_layout
19813
19814 \end_inset
19815
19816  
19817 \family typewriter
19818 svn commit -q -m"<description>" <file-name>
19819 \end_layout
19820
19821 \begin_layout Subsubsection
19822
19823 \family sans
19824 Check Out For Edit
19825 \end_layout
19826
19827 \begin_layout Standard
19828 Updates the changes of this file from the repository.
19829  Be sure you understand SVN merging and conflicts resolving before using
19830  this function, because all conflicts has to be resolved manually by you!
19831 \end_layout
19832
19833 \begin_layout Standard
19834 SVN command:
19835 \begin_inset Foot
19836 status collapsed
19837
19838 \begin_layout Plain Layout
19839 Ditto.
19840 \end_layout
19841
19842 \end_inset
19843
19844  
19845 \family typewriter
19846 svn update --non-interactive 
19847 \begin_inset Quotes eld
19848 \end_inset
19849
19850 <file-name>
19851 \begin_inset Quotes erd
19852 \end_inset
19853
19854
19855 \end_layout
19856
19857 \begin_layout Subsubsection
19858
19859 \family sans
19860 Revert To Repository Version
19861 \end_layout
19862
19863 \begin_layout Standard
19864 This will discard all changes made to the document since the last check
19865  in.
19866  You get a warning before changes are discarded.
19867  
19868 \end_layout
19869
19870 \begin_layout Standard
19871 SVN command: 
19872 \family typewriter
19873 svn revert -q 
19874 \begin_inset Quotes eld
19875 \end_inset
19876
19877 <file-name>
19878 \begin_inset Quotes erd
19879 \end_inset
19880
19881
19882 \end_layout
19883
19884 \begin_layout Subsubsection
19885 \begin_inset CommandInset label
19886 LatexCommand label
19887 name "sub:SVN-Repo-Update"
19888
19889 \end_inset
19890
19891 Update of the local directory checkout from repository
19892 \begin_inset Foot
19893 status collapsed
19894
19895 \begin_layout Plain Layout
19896 Note that this command will work only with subversion 
19897 \begin_inset Formula $\geqq1.5$
19898 \end_inset
19899
19900
19901 \end_layout
19902
19903 \end_inset
19904
19905
19906 \end_layout
19907
19908 \begin_layout Standard
19909 All the commands above have one shortcomming - they deal with the current
19910  document only.
19911  Once your document contains pictures, includes external 
19912 \begin_inset Flex Code
19913 status collapsed
19914
19915 \begin_layout Plain Layout
19916 .tex
19917 \end_layout
19918
19919 \end_inset
19920
19921  files and so on administration becomes more complicated.
19922  LyX now supports updating the whole tree in which resides the document
19923 \begin_inset Foot
19924 status collapsed
19925
19926 \begin_layout Plain Layout
19927 One need to organize the files structure so that all external files are
19928  in the same directory or subdirectories of the document.
19929  
19930 \end_layout
19931
19932 \end_inset
19933
19934 .
19935  This become especially useful once you cooperate with people which neither
19936  know about subversion management nor they have ambition to commit additional
19937  material to the repository.
19938  
19939 \end_layout
19940
19941 \begin_layout Standard
19942 \begin_inset Flex Code
19943 status collapsed
19944
19945 \begin_layout Plain Layout
19946 Update local directory from repository
19947 \end_layout
19948
19949 \end_inset
19950
19951  command updates the whole directory and in case of merge conflicts local
19952  version of the files are left, so no unintended data loss occurs.
19953  If local changes are detected user is warned before update starts.
19954 \end_layout
19955
19956 \begin_layout Labeling
19957 \labelwidthstring 00.00.0000
19958 SVN
19959 \begin_inset space ~
19960 \end_inset
19961
19962 commands: 
19963 \begin_inset space ~
19964 \end_inset
19965
19966
19967 \begin_inset Newline newline
19968 \end_inset
19969
19970
19971 \begin_inset Flex Code
19972 status collapsed
19973
19974 \begin_layout Plain Layout
19975 svn diff $path
19976 \end_layout
19977
19978 \end_inset
19979
19980  (Ask if changes are detected.)
19981 \begin_inset Newline newline
19982 \end_inset
19983
19984
19985 \begin_inset Flex Code
19986 status collapsed
19987
19988 \begin_layout Plain Layout
19989 svn update --accept mine-full $path
19990 \end_layout
19991
19992 \end_inset
19993
19994
19995 \end_layout
19996
19997 \begin_layout Standard
19998 where 
19999 \begin_inset Flex Code
20000 status collapsed
20001
20002 \begin_layout Plain Layout
20003 $path
20004 \end_layout
20005
20006 \end_inset
20007
20008  stands for the path to the document.
20009 \end_layout
20010
20011 \begin_layout Subsubsection
20012
20013 \family sans
20014 Show History
20015 \end_layout
20016
20017 \begin_layout Standard
20018 This shows the complete history of the SVN document.
20019  The output of 
20020 \family typewriter
20021 svn log 
20022 \begin_inset Quotes eld
20023 \end_inset
20024
20025 <file-name>
20026 \begin_inset Quotes erd
20027 \end_inset
20028
20029
20030 \family default
20031  is shown in a browser.
20032 \end_layout
20033
20034 \begin_layout Subsubsection
20035 File Locking
20036 \begin_inset CommandInset label
20037 LatexCommand label
20038 name "subsec:SVN-File-Locking"
20039
20040 \end_inset
20041
20042
20043 \end_layout
20044
20045 \begin_layout Standard
20046 The file exchange through various revision control systems brings the problem
20047  of merge conflicts in case two different users try to edit the same (parts
20048  of) document.
20049  When such a conflict happens it needs manual resolving and one reasonable
20050  alternative is to provide some kind of locking mechanism, which guarantees
20051  that only one user is allowed to edit file at the given time.
20052 \end_layout
20053
20054 \begin_layout Standard
20055 SVN has two such mechanisms to provide mutual exclusivity for file access
20056  - locks and automatic setting of write permissions (see sec.
20057  
20058 \begin_inset CommandInset ref
20059 LatexCommand ref
20060 reference "subsec:Automatical-Locking-Property"
20061
20062 \end_inset
20063
20064 ) based on 
20065 \begin_inset Flex Code
20066 status collapsed
20067
20068 \begin_layout Plain Layout
20069 svn:needs-lock
20070 \end_layout
20071
20072 \end_inset
20073
20074  file svn property
20075 \begin_inset Foot
20076 status open
20077
20078 \begin_layout Plain Layout
20079 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20080 \end_layout
20081
20082 \end_inset
20083
20084 .
20085  If this property is detected for a given document LyX starts to use SVN
20086  locks for document editing automatically and the whole check-in/out mechanism
20087  switches to the same regimen as for RCS.
20088  This in particular means there are two different modes of file use in LyX:
20089 \end_layout
20090
20091 \begin_layout Itemize
20092 Unlocked state.
20093  The loaded file is in the read-only mode.
20094  For editing on needs to check-out.
20095  
20096 \emph on
20097 Check-out
20098 \emph default
20099  consists of updating from the repository and gaining write lock.
20100  If the lock is not possible to obtain, we remain in unlocked state.
20101 \end_layout
20102
20103 \begin_layout Itemize
20104 Locked state.
20105  The loaded file is in the 'normal' edit mode.
20106  No other user is allowed to edit the file.
20107  
20108 \emph on
20109 Check-in
20110 \emph default
20111  consists of commiting changes and releasing write-lock.
20112  If no changes have been made to the document, no commit will be produced
20113 \begin_inset Foot
20114 status collapsed
20115
20116 \begin_layout Plain Layout
20117 Don't be puzzled by the fact that you will be asked for commit message anyway.
20118 \end_layout
20119
20120 \end_inset
20121
20122  and only the write-lock will be released.
20123 \end_layout
20124
20125 \begin_layout Standard
20126 SVN commands:
20127 \end_layout
20128
20129 \begin_layout Labeling
20130 \labelwidthstring 00.00.0000
20131 Check-in:
20132 \family typewriter
20133  svn commit -q -m"<description>" "<file-name>"
20134 \begin_inset Newline newline
20135 \end_inset
20136
20137 svn unlock "<file-name>"
20138 \end_layout
20139
20140 \begin_layout Labeling
20141 \labelwidthstring 00.00.0000
20142 Check-out: 
20143 \family typewriter
20144 svn update "<file-name>"
20145 \begin_inset Newline newline
20146 \end_inset
20147
20148 svn lock "<file-name>"
20149 \end_layout
20150
20151 \begin_layout Subsubsection
20152
20153 \family typewriter
20154 \begin_inset CommandInset label
20155 LatexCommand label
20156 name "subsec:Automatical-Locking-Property"
20157
20158 \end_inset
20159
20160
20161 \family default
20162 Automatic Locking Property
20163 \end_layout
20164
20165 \begin_layout Standard
20166 The above mentioned automatic setting of write permissions of the .lyx file
20167  can be set through
20168 \family sans
20169 \bar under
20170  F
20171 \bar default
20172 ile\SpecialChar \menuseparator
20173
20174 \bar under
20175 V
20176 \bar default
20177 ersion
20178 \begin_inset space ~
20179 \end_inset
20180
20181 Control\SpecialChar \menuseparator
20182
20183 \bar under
20184 T
20185 \bar default
20186 oggle locking property
20187 \family default
20188 .
20189  This command is active only when the file is not locked on the svn server
20190  (i.e.
20191  you need to check-out before proceeding).
20192 \end_layout
20193
20194 \begin_layout Labeling
20195 \labelwidthstring 00.00.0000
20196 SVN
20197 \begin_inset space ~
20198 \end_inset
20199
20200 commands:
20201 \end_layout
20202
20203 \begin_layout Labeling
20204 \labelwidthstring 00.00.0000
20205 Set:
20206 \family typewriter
20207  svn propset svn:needs-lock ON "<file-name>"
20208 \end_layout
20209
20210 \begin_layout Labeling
20211 \labelwidthstring 00.00.0000
20212 Unset: 
20213 \family typewriter
20214 svn propdel svn:needs-lock "<file-name>"
20215 \end_layout
20216
20217 \begin_layout Subsubsection
20218 \begin_inset CommandInset label
20219 LatexCommand label
20220 name "sub:VCS-Revision-Information"
20221
20222 \end_inset
20223
20224 Revision Information in Documents
20225 \end_layout
20226
20227 \begin_layout Standard
20228 There are more possibilities how to activate revision information in our
20229  document.
20230 \end_layout
20231
20232 \begin_layout Itemize
20233 LyX supports directly:
20234 \end_layout
20235
20236 \begin_deeper
20237 \begin_layout Itemize
20238 tree revision information (
20239 \begin_inset Flex Code
20240 status collapsed
20241
20242 \begin_layout Plain Layout
20243 vcs-tree-revision
20244 \end_layout
20245
20246 \end_inset
20247
20248 ).
20249  The result is the output of the 
20250 \begin_inset Flex Code
20251 status collapsed
20252
20253 \begin_layout Plain Layout
20254 svnversion
20255 \end_layout
20256
20257 \end_inset
20258
20259  command, the following table gives you an idea, how to read the results.
20260 \end_layout
20261
20262 \begin_layout Standard
20263 \align center
20264 \begin_inset Tabular
20265 <lyxtabular version="3" rows="6" columns="2">
20266 <features tabularvalignment="middle">
20267 <column alignment="center" valignment="top" width="0">
20268 <column alignment="center" valignment="top" width="0">
20269 <row>
20270 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20271 \begin_inset Text
20272
20273 \begin_layout Plain Layout
20274 Output
20275 \end_layout
20276
20277 \end_inset
20278 </cell>
20279 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20280 \begin_inset Text
20281
20282 \begin_layout Plain Layout
20283 Meaning
20284 \end_layout
20285
20286 \end_inset
20287 </cell>
20288 </row>
20289 <row>
20290 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20291 \begin_inset Text
20292
20293 \begin_layout Plain Layout
20294 4123:4168
20295 \end_layout
20296
20297 \end_inset
20298 </cell>
20299 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20300 \begin_inset Text
20301
20302 \begin_layout Plain Layout
20303 mixed revision working copy
20304 \end_layout
20305
20306 \end_inset
20307 </cell>
20308 </row>
20309 <row>
20310 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20311 \begin_inset Text
20312
20313 \begin_layout Plain Layout
20314 4168M
20315 \end_layout
20316
20317 \end_inset
20318 </cell>
20319 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20320 \begin_inset Text
20321
20322 \begin_layout Plain Layout
20323 modified working copy
20324 \end_layout
20325
20326 \end_inset
20327 </cell>
20328 </row>
20329 <row>
20330 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20331 \begin_inset Text
20332
20333 \begin_layout Plain Layout
20334 4123S
20335 \end_layout
20336
20337 \end_inset
20338 </cell>
20339 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20340 \begin_inset Text
20341
20342 \begin_layout Plain Layout
20343 switched working copy
20344 \end_layout
20345
20346 \end_inset
20347 </cell>
20348 </row>
20349 <row>
20350 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20351 \begin_inset Text
20352
20353 \begin_layout Plain Layout
20354 4123P
20355 \end_layout
20356
20357 \end_inset
20358 </cell>
20359 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20360 \begin_inset Text
20361
20362 \begin_layout Plain Layout
20363 partial working copy, from a sparse checkout
20364 \end_layout
20365
20366 \end_inset
20367 </cell>
20368 </row>
20369 <row>
20370 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20371 \begin_inset Text
20372
20373 \begin_layout Plain Layout
20374 4123:4168MS
20375 \end_layout
20376
20377 \end_inset
20378 </cell>
20379 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20380 \begin_inset Text
20381
20382 \begin_layout Plain Layout
20383 mixed revision, modified, switched working copy
20384 \end_layout
20385
20386 \end_inset
20387 </cell>
20388 </row>
20389 </lyxtabular>
20390
20391 \end_inset
20392
20393
20394 \end_layout
20395
20396 \begin_layout Itemize
20397 file revision information.
20398  The result comes from parsing the output of 
20399 \begin_inset Flex Code
20400 status collapsed
20401
20402 \begin_layout Plain Layout
20403 svn
20404 \begin_inset space ~
20405 \end_inset
20406
20407 info
20408 \begin_inset space ~
20409 \end_inset
20410
20411 --xml
20412 \begin_inset space ~
20413 \end_inset
20414
20415 file.lyx
20416 \end_layout
20417
20418 \end_inset
20419
20420 .
20421  Supported flags are:
20422 \end_layout
20423
20424 \begin_deeper
20425 \begin_layout Itemize
20426 version number of the last commit (
20427 \begin_inset Flex Code
20428 status collapsed
20429
20430 \begin_layout Plain Layout
20431 vcs-revision
20432 \end_layout
20433
20434 \end_inset
20435
20436 )
20437 \end_layout
20438
20439 \begin_layout Itemize
20440 author of the last commit (
20441 \begin_inset Flex Code
20442 status collapsed
20443
20444 \begin_layout Plain Layout
20445 vcs-author
20446 \end_layout
20447
20448 \end_inset
20449
20450 )
20451 \end_layout
20452
20453 \begin_layout Itemize
20454 date of the last commit (
20455 \begin_inset Flex Code
20456 status collapsed
20457
20458 \begin_layout Plain Layout
20459 vcs-date
20460 \end_layout
20461
20462 \end_inset
20463
20464 )
20465 \end_layout
20466
20467 \begin_layout Itemize
20468 time of the last commit (
20469 \begin_inset Flex Code
20470 status collapsed
20471
20472 \begin_layout Plain Layout
20473 vcs-time
20474 \end_layout
20475
20476 \end_inset
20477
20478 )
20479 \end_layout
20480
20481 \end_deeper
20482 \begin_layout Standard
20483 You can obtain this info via InsetInfo (e.g.
20484  
20485 \begin_inset Flex Code
20486 status collapsed
20487
20488 \begin_layout Plain Layout
20489 info-insert buffer vcs-date
20490 \end_layout
20491
20492 \end_inset
20493
20494 ).
20495  The information will be available only when you have the file stored under
20496  svn managment (i.e.
20497  the 
20498 \begin_inset Flex Code
20499 status collapsed
20500
20501 \begin_layout Plain Layout
20502 .svn
20503 \end_layout
20504
20505 \end_inset
20506
20507  directory is available with your document).
20508 \end_layout
20509
20510 \end_deeper
20511 \begin_layout Itemize
20512 Another---a hacking one---possibility is to use svn keywords
20513 \begin_inset Foot
20514 status collapsed
20515
20516 \begin_layout Plain Layout
20517 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20518 \end_layout
20519
20520 \end_inset
20521
20522 .
20523  In short -- you set file keywords property (e.g.
20524  
20525 \family sans
20526 svn propset svn:keywords 'Rev' file.lyx
20527 \family default
20528 ) and then paste keyword TeX code
20529 \begin_inset Foot
20530 status collapsed
20531
20532 \begin_layout Plain Layout
20533 This is an easy way how to ensure that LyX won't break the line in the middle
20534  of keyword tag.
20535 \end_layout
20536
20537 \end_inset
20538
20539  tag in your document (e.g.
20540  
20541 \begin_inset ERT
20542 status open
20543
20544 \begin_layout Plain Layout
20545
20546 $Rev$
20547 \end_layout
20548
20549 \end_inset
20550
20551 ).
20552  This way svn client will automatically substitute revision number (e.g.
20553  
20554 \begin_inset ERT
20555 status open
20556
20557 \begin_layout Plain Layout
20558
20559 $Rev: 59 $
20560 \end_layout
20561
20562 \end_inset
20563
20564 ) after each update and commit.
20565  There are more problems with this approach.
20566  Firstly, the '$' character is used in TeX world for math equations, so
20567  any occurence of math formula 
20568 \begin_inset Formula $Rev$
20569 \end_inset
20570
20571  become 
20572 \begin_inset Formula $Rev:59$
20573 \end_inset
20574
20575  in your LyX document.
20576  Similarly for other keywords like Id, Date, Author, etc.
20577  Secondly svn output is dependent on your locales, so its very easy that
20578  svn would produce some problematic strings once Date is used.
20579  Thirdly you get the whole 'Rev: 59' string in your document instead of
20580  the plain number.
20581  Until subversion implements user's custom keywords it will be hard to use
20582  this approach reliably or let LyX to support it directly.
20583 \end_layout
20584
20585 \begin_layout Subsection
20586 SVN and Windows Environment
20587 \end_layout
20588
20589 \begin_layout Quote
20590 My inclination is to say that if the user cannot figure out the command
20591  line operations on their own fairly quickly, they would be well advised
20592  to use TortoiseSVN.
20593  ---P.
20594  A.
20595  Rubin
20596 \end_layout
20597
20598 \begin_layout Subsubsection
20599 Preparation
20600 \end_layout
20601
20602 \begin_layout Standard
20603 In addition to installing LyX, and having access to a Subversion repository,
20604  the user will need to install the Subversion client program.
20605  A Windows installer for the client program is available from 
20606 \begin_inset CommandInset href
20607 LatexCommand href
20608 name "CollabNet"
20609 target "http://www.collab.net/nonav/downloads/subversion/"
20610
20611 \end_inset
20612
20613 .
20614  The user may also want to install 
20615 \begin_inset CommandInset href
20616 LatexCommand href
20617 name "TortoiseSVN"
20618 target "http://tortoisesvn.tigris.org/"
20619
20620 \end_inset
20621
20622 , which integrates Subversion operations into the context (rightclick) menu
20623  of Windows Explorer.
20624  Operations done outside LyX will typically be more convenient using the
20625  Explorer context menu.
20626  Note that TortoiseSVN is not a replacement for the client program, which
20627  is what LyX itself will use.
20628 \end_layout
20629
20630 \begin_layout Subsubsection
20631 Bringing a document under Subversion control
20632 \end_layout
20633
20634 \begin_layout Standard
20635 Before a LyX document can be brought under version control in Subversion,
20636  its parent directory needs to be under version control.
20637  If the document is being added to a project already in the repository,
20638  this is accomplished by checking the project out to the directory where
20639  the new document will be placed.
20640  If the project itself is not yet under version control (for instance, if
20641  this document starts a new project), the directory must be imported into
20642  the repository.
20643  This is done outside LyX.
20644  Both import and checkout are easily accomplished from the Explorer context
20645  menu using TortoiseSVN, or alternatively can be done using the command
20646  line client at a DOS prompt.
20647  The procedure for importing the project using TortoiseSVN is described
20648  below, assuming an existing repository and a new project being started
20649  in 
20650 \family typewriter
20651 C:
20652 \backslash
20653 new project
20654 \family default
20655 .
20656  For information on using the Subversion client program, run 
20657 \family typewriter
20658 svn --help 
20659 \family default
20660 in a DOS shell.
20661 \end_layout
20662
20663 \begin_layout Enumerate
20664 Locate 
20665 \family typewriter
20666 C:
20667 \backslash
20668 new project 
20669 \family default
20670 in Windows Explorer, right click it, and select 
20671 \family typewriter
20672 TortoiseSVN > Repo-browser
20673 \family default
20674 .
20675  If necessary, adjust the URL for the repository, then click OK.
20676 \end_layout
20677
20678 \begin_layout Enumerate
20679 Right click the level of the repository under which you want to place the
20680  new project folder (typically the top level) and click 
20681 \family typewriter
20682 Create folder\SpecialChar \ldots{}
20683
20684 \family default
20685  Supply a name for the project folder and click OK.
20686  Add a message for the log file if desired, then click OK again.
20687  The new project folder should appear in the repository.
20688  Finally, click OK again to exit the repository browser.
20689 \end_layout
20690
20691 \begin_layout Enumerate
20692 Once again right click 
20693 \family typewriter
20694 C:
20695 \backslash
20696 new project
20697 \family default
20698 , this time selecting SVN Checkout\SpecialChar \ldots{}
20699  Select the URL of the project folder
20700  you just created in the repository, and set the checkout directory to 
20701 \family typewriter
20702 C:
20703 \backslash
20704 new project.
20705
20706 \family default
20707  Click OK.
20708  You will be warned about a non-empty folder; click OK to proceed.
20709  You should now have a 
20710 \family typewriter
20711 .svn
20712 \family default
20713  directory under 
20714 \family typewriter
20715 C:
20716 \backslash
20717 new project.
20718 \end_layout
20719
20720 \begin_layout Enumerate
20721 Create or open your document in LyX and click 
20722 \family sans
20723 \bar under
20724 F
20725 \bar default
20726 ile\SpecialChar \menuseparator
20727
20728 \bar under
20729 V
20730 \bar default
20731 ersion
20732 \begin_inset space ~
20733 \end_inset
20734
20735 Control\SpecialChar \menuseparator
20736
20737 \bar under
20738 R
20739 \bar default
20740 egister.
20741  
20742 \family default
20743 Add a log message and click OK to commit the document to version control.
20744 \end_layout
20745
20746 \begin_layout Standard
20747 From this point onward, you should have full functionality in the 
20748 \family sans
20749 \bar under
20750 F
20751 \bar default
20752 ile\SpecialChar \menuseparator
20753
20754 \bar under
20755 V
20756 \bar default
20757 ersion
20758 \begin_inset space ~
20759 \end_inset
20760
20761 Control
20762 \family default
20763  menu.
20764  You also have the option of checking the document in and out, viewing its
20765  history, etc.
20766  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20767  client program from a command prompt.
20768 \end_layout
20769
20770 \begin_layout Subsubsection
20771 SSH tunnel used with SVN under Windows
20772 \end_layout
20773
20774 \begin_layout Standard
20775 Compared with Linux setting up svn client to communicate over ssh under
20776  Windows is a rather troublesome task.
20777  We will at least offer some hints how to setup the client side but prior
20778  knowledge about ssh and the Windows command line is needed, also be prepared
20779  for a great deal of frustration\SpecialChar \ldots{}
20780
20781 \end_layout
20782
20783 \begin_layout Enumerate
20784 Get a svn client for windows, as described in the previous sections.
20785  When it is a fresh install run some svn command (e.g.
20786  
20787 \begin_inset Flex Code
20788 status collapsed
20789
20790 \begin_layout Plain Layout
20791 svn --version
20792 \end_layout
20793
20794 \end_inset
20795
20796 ) to create config files, which you will need to change later on.
20797 \end_layout
20798
20799 \begin_layout Enumerate
20800 Choose a ssh client for Windows.
20801  There are several possibilities, we will use the one from Putty tools
20802 \begin_inset Foot
20803 status open
20804
20805 \begin_layout Plain Layout
20806 \begin_inset Flex URL
20807 status collapsed
20808
20809 \begin_layout Plain Layout
20810
20811 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20812 \end_layout
20813
20814 \end_inset
20815
20816
20817 \end_layout
20818
20819 \end_inset
20820
20821 .
20822  You will need to set the connection up so that the client doesn't ask for
20823  any password from you.
20824  To keep things easy we will use only keys without any additional password
20825  protection etc.
20826 \end_layout
20827
20828 \begin_deeper
20829 \begin_layout Enumerate
20830 Generate keys by 
20831 \begin_inset Flex Code
20832 status collapsed
20833
20834 \begin_layout Plain Layout
20835 puttygen
20836 \end_layout
20837
20838 \end_inset
20839
20840 .
20841  Save your private .ppk key file and put the public one on the server side.
20842  If the SVN server runs on Linux, note that the format of the public key
20843  is not compatible with Linux openssh and you will need to direcly copy-paste
20844  the key from the “
20845 \emph on
20846 Public key for pasting into OpenSSH authorized_keys file
20847 \emph default
20848 :” edit field into the server's 
20849 \begin_inset Flex Code
20850 status collapsed
20851
20852 \begin_layout Plain Layout
20853 ~/.ssh/authorized_keys
20854 \end_layout
20855
20856 \end_inset
20857
20858
20859 \begin_inset Flex Code
20860 status collapsed
20861
20862 \begin_layout Plain Layout
20863 authorized_keys2
20864 \end_layout
20865
20866 \end_inset
20867
20868  file.
20869 \end_layout
20870
20871 \begin_layout Enumerate
20872 Get the Putty's 
20873 \begin_inset Flex Code
20874 status collapsed
20875
20876 \begin_layout Plain Layout
20877 plink
20878 \end_layout
20879
20880 \end_inset
20881
20882 .
20883  In the SVN config file
20884 \begin_inset Foot
20885 status collapsed
20886
20887 \begin_layout Plain Layout
20888 Exact path depends on Windows version, usually somewhere around 
20889 \begin_inset Flex Code
20890 status collapsed
20891
20892 \begin_layout Plain Layout
20893 c:
20894 \backslash
20895 Documents and Settings
20896 \backslash
20897 user
20898 \backslash
20899 Application Data
20900 \backslash
20901 Subversion
20902 \backslash
20903 config
20904 \end_layout
20905
20906 \end_inset
20907
20908  / 
20909 \begin_inset Flex Code
20910 status collapsed
20911
20912 \begin_layout Plain Layout
20913 AppData
20914 \backslash
20915 Roaming
20916 \backslash
20917 Subversion
20918 \end_layout
20919
20920 \end_inset
20921
20922 .
20923 \end_layout
20924
20925 \end_inset
20926
20927 , section [tunnels], setup ssh command, e.g.
20928  
20929 \begin_inset Flex Code
20930 status collapsed
20931
20932 \begin_layout Plain Layout
20933 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20934 \end_layout
20935
20936 \end_inset
20937
20938 .
20939 \begin_inset Foot
20940 status collapsed
20941
20942 \begin_layout Plain Layout
20943 It will usually take a lot of time to get exact command right and it depends
20944  on many things.
20945  For example do not have some remote server saved as a default session in
20946  Putty etc.
20947  If things fail, try to connect via plink without SVN first.
20948 \end_layout
20949
20950 \end_inset
20951
20952
20953 \end_layout
20954
20955 \end_deeper
20956 \begin_layout Enumerate
20957 Checkout the SVN archive, e.g.
20958  
20959 \begin_inset Flex Code
20960 status collapsed
20961
20962 \begin_layout Plain Layout
20963 svn co svn+ssh://user@server/repository_path
20964 \end_layout
20965
20966 \end_inset
20967
20968 .
20969 \end_layout
20970
20971 \begin_layout Subsubsection
20972 End-of-Line Conversions
20973 \end_layout
20974
20975 \begin_layout Standard
20976 When the collaborators are mixing Linux and Windows environments, LyX will
20977  use different line endings inside the .lyx files.
20978  This is not a problem as far as LyX functionality is concerned, but the
20979  commit diffs will be huge and merge-conflicts prone.
20980  Fortunately SVN itself knows
20981 \begin_inset Foot
20982 status collapsed
20983
20984 \begin_layout Plain Layout
20985 \begin_inset Flex URL
20986 status collapsed
20987
20988 \begin_layout Plain Layout
20989
20990 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20991 \end_layout
20992
20993 \end_inset
20994
20995
20996 \end_layout
20997
20998 \end_inset
20999
21000  how to deal with CR/LF problems when switching .lyx files to the 
21001 \begin_inset Flex Code
21002 status collapsed
21003
21004 \begin_layout Plain Layout
21005 native
21006 \end_layout
21007
21008 \end_inset
21009
21010  mode.
21011 \begin_inset Foot
21012 status collapsed
21013
21014 \begin_layout Plain Layout
21015 For the lazy guys: 
21016 \begin_inset Flex Code
21017 status collapsed
21018
21019 \begin_layout Plain Layout
21020 svn propset svn:eol-style native FILE_NAME
21021 \end_layout
21022
21023 \end_inset
21024
21025
21026 \end_layout
21027
21028 \end_inset
21029
21030
21031 \end_layout
21032
21033 \begin_layout Subsection
21034 Further tuning
21035 \end_layout
21036
21037 \begin_layout Standard
21038 With the recent addition of the vc-command function LyX power users are
21039  allowed to create their own commands for revision control.
21040 \end_layout
21041
21042 \begin_layout Standard
21043 As an example you can see how two TortoiseSVN commands could be integrated
21044  directly:
21045 \end_layout
21046
21047 \begin_layout Description
21048 Commit: 
21049 \begin_inset Flex Code
21050 status collapsed
21051
21052 \begin_layout Plain Layout
21053 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21054 \end_layout
21055
21056 \end_inset
21057
21058
21059 \end_layout
21060
21061 \begin_layout Description
21062 Revert: 
21063 \begin_inset Flex Code
21064 status collapsed
21065
21066 \begin_layout Plain Layout
21067 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21068 \end_layout
21069
21070 \end_inset
21071
21072
21073 \end_layout
21074
21075 \begin_layout Subsection
21076 Version control and Document comparison
21077 \end_layout
21078
21079 \begin_layout Standard
21080 One of the typical uses of version control is to inspect the changes between
21081  revisions, usually by creating 
21082 \begin_inset Flex Code
21083 status collapsed
21084
21085 \begin_layout Plain Layout
21086 diff
21087 \end_layout
21088
21089 \end_inset
21090
21091  dumps.
21092  While this is useful for plain text files, it is much less useful in the
21093  case of LyX files, which have more complicated structure.
21094  Hence we provide binding to the Document comparison feature.
21095  They are two ways of calling this feature - either by direct call of 
21096 \begin_inset Flex Code
21097 status collapsed
21098
21099 \begin_layout Plain Layout
21100 VC_COMPARE
21101 \end_layout
21102
21103 \end_inset
21104
21105  LyX function (for details see LyX functions manual) or by icon/menu item
21106  
21107 \begin_inset Flex MenuItem
21108 status collapsed
21109
21110 \begin_layout Plain Layout
21111 Compare with older revision...
21112 \end_layout
21113
21114 \end_inset
21115
21116 .
21117  One can either compare two chosen revisions of the document or he can simply
21118  compare the current version of edited text with older revisions (where
21119  '
21120 \begin_inset Flex MenuItem
21121 status collapsed
21122
21123 \begin_layout Plain Layout
21124 0
21125 \end_layout
21126
21127 \end_inset
21128
21129 ' revisions back means comparison of the edited file with last commited
21130  revision).
21131  
21132 \end_layout
21133
21134 \begin_layout Standard
21135 This feature is supported for SVN and RCS though due to the more complicated
21136  versioning scheme of RCS there is a constraint -- when addressing the revisions
21137  in dialog, numbers always point to the last number in RCS revision number,
21138  i.e.
21139  '35' in '1.2.35'.
21140 \end_layout
21141
21142 \begin_layout Section
21143 Literate Programming
21144 \end_layout
21145
21146 \begin_layout Standard
21147 Updated by 
21148 \noun on
21149 Kayvan Sylvan 
21150 \noun default
21151 (kayvan@sylvan.com)
21152 \noun on
21153
21154 \noun default
21155 original documentation written by 
21156 \noun on
21157 Edmar Wienskoski Jr.
21158
21159 \noun default
21160  (edmar-w-jr@technologist.com)
21161 \end_layout
21162
21163 \begin_layout Subsection
21164 Introduction
21165 \end_layout
21166
21167 \begin_layout Standard
21168 The main purpose of this documentation is to show you how to use LyX for
21169  literate programming, where it is assumed that you are familiar with this
21170  programming technique, and know what 
21171 \begin_inset Quotes eld
21172 \end_inset
21173
21174 tangling
21175 \begin_inset Quotes erd
21176 \end_inset
21177
21178  and 
21179 \begin_inset Quotes eld
21180 \end_inset
21181
21182 weaving
21183 \begin_inset Quotes erd
21184 \end_inset
21185
21186  means.
21187  If that is not the case, please follow the web links provided in the following
21188  sections.
21189  There is a lot of good documentation out there covering old development
21190  history to the latest tools tips.
21191 \end_layout
21192
21193 \begin_layout Standard
21194 It is also assumed that you are familiar with LyX itself to a point that
21195  you are comfortable changing your LyX preferences, and X resources file.
21196  If that is not the case please refer to other LyX documentation to cover
21197  your specific needs.
21198 \end_layout
21199
21200 \begin_layout Subsection
21201 Literate Programming
21202 \end_layout
21203
21204 \begin_layout Standard
21205 From the Literate Programming FAQ: 
21206 \end_layout
21207
21208 \begin_layout Quotation
21209 Literate programming is the combination of documentation and source together
21210  in a fashion suited for reading by human beings.
21211  In fact, literate programs should be enjoyable reading, even inviting!
21212  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21213  and documentation in a single file.
21214  Literate programming tools then parse the file to produce either readable
21215  documentation or compilable source.
21216  The WEB style of literate programming was created by D.
21217 \begin_inset space \thinspace{}
21218 \end_inset
21219
21220 E.
21221  Knuth during the development of his TeX typesetting software.
21222  
21223 \end_layout
21224
21225 \begin_layout Standard
21226 Another excerpt says:
21227 \end_layout
21228
21229 \begin_layout Quotation
21230
21231 \emph on
21232 How is literate programming different from verbose commenting?
21233 \end_layout
21234
21235 \begin_layout Quotation
21236 There are three distinguishing characteristics.
21237  In order of importance, they are: 
21238 \end_layout
21239
21240 \begin_deeper
21241 \begin_layout Itemize
21242 flexible order of elaboration 
21243 \end_layout
21244
21245 \begin_layout Itemize
21246 automatic support for browsing 
21247 \end_layout
21248
21249 \begin_layout Itemize
21250 typeset documentation, especially diagrams and mathematics 
21251 \end_layout
21252
21253 \end_deeper
21254 \begin_layout Standard
21255 Now that I sparked your curiosity, take a look in the references.
21256 \end_layout
21257
21258 \begin_layout Subsubsection
21259 References
21260 \end_layout
21261
21262 \begin_layout Standard
21263 The complete Literate Programming FAQ can be found at:
21264 \end_layout
21265
21266 \begin_layout Quote
21267 Literate Programming FAQ 
21268 \begin_inset Flex URL
21269 status collapsed
21270
21271 \begin_layout Plain Layout
21272
21273 http://www.literateprogramming.com/lpfaq.pdf
21274 \end_layout
21275
21276 \end_inset
21277
21278
21279 \end_layout
21280
21281 \begin_layout Standard
21282 The FAQ lists 23 (twenty three!) different literate programming tools.
21283  Where some are specialized or 
21284 \begin_inset Quotes eld
21285 \end_inset
21286
21287 tailored
21288 \begin_inset Quotes erd
21289 \end_inset
21290
21291  for particular programming languages, while other have general scope.
21292  I selected 
21293 \noun on
21294 Noweb
21295 \noun default
21296  for my own use for several reasons:
21297 \end_layout
21298
21299 \begin_layout Itemize
21300 It can generate the documentation either in LaTeX or HTML.
21301 \end_layout
21302
21303 \begin_layout Itemize
21304 It has a open architecture, i.
21305 \begin_inset space \thinspace{}
21306 \end_inset
21307
21308 g.
21309 \begin_inset space \space{}
21310 \end_inset
21311
21312 it is easy to plug in new filters and to perform special processing that
21313  you may need.
21314  
21315 \end_layout
21316
21317 \begin_layout Itemize
21318 There is a good selection of filters available already (the HTML is one
21319  of them).
21320 \end_layout
21321
21322 \begin_layout Itemize
21323 It is free.
21324 \end_layout
21325
21326 \begin_layout Standard
21327 The Noweb web page can be found at: 
21328 \end_layout
21329
21330 \begin_layout Quote
21331 Noweb home page 
21332 \begin_inset Flex URL
21333 status collapsed
21334
21335 \begin_layout Plain Layout
21336
21337 http://www.cs.virginia.edu/~nr/noweb/
21338 \end_layout
21339
21340 \end_inset
21341
21342
21343 \end_layout
21344
21345 \begin_layout Standard
21346 Starting from there you can reach many other interesting links and even
21347  some literate program examples.
21348 \end_layout
21349
21350 \begin_layout Subsection
21351 LyX and Literate Programming
21352 \end_layout
21353
21354 \begin_layout Standard
21355 The LyX support for Literate Programming is provided by using the generic
21356  LyX converters mechanism.
21357  This support is provided in a 
21358 \begin_inset Quotes eld
21359 \end_inset
21360
21361 Noweb independent
21362 \begin_inset Quotes erd
21363 \end_inset
21364
21365  way, i.
21366 \begin_inset space \thinspace{}
21367 \end_inset
21368
21369 g.
21370 \begin_inset space \space{}
21371 \end_inset
21372
21373 you will be able to use this new LyX feature with some other literate programmin
21374 g tool of your choice by just changing your LyX preferences.
21375 \end_layout
21376
21377 \begin_layout Subsubsection
21378 Generating documents and code (weaving and tangling)
21379 \end_layout
21380
21381 \begin_layout Paragraph
21382 Selecting the document class
21383 \end_layout
21384
21385 \begin_layout Standard
21386 If you have installed Noweb and LyX successfully, whenever you open a new
21387  document or try to change the document class of an existing one, you will
21388  find that there are three new document classes available:
21389 \end_layout
21390
21391 \begin_layout Itemize
21392 Article (Noweb)
21393 \end_layout
21394
21395 \begin_layout Itemize
21396 Book (Noweb)
21397 \end_layout
21398
21399 \begin_layout Itemize
21400 Report (Noweb)
21401 \end_layout
21402
21403 \begin_layout Standard
21404 You must select one of them to create your literate documents from.
21405  
21406 \end_layout
21407
21408 \begin_layout Standard
21409 Note that literate documents are not limited to these three classes.
21410  New classes can be generated from other styles like letter or in combination
21411  with other class variations like Article (AMS).
21412  If you have special needs that cannot be covered by one of the existing
21413  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21414  will arrange to insert a new entry, or teach you how to do it.
21415 \begin_inset Foot
21416 status collapsed
21417
21418 \begin_layout Plain Layout
21419 It is very simple, it involves the creation of a file with four lines, and
21420  re-running of the auto configuration.
21421 \end_layout
21422
21423 \end_inset
21424
21425  Moreover, if you use a literate tool other than Noweb you may need to create
21426  a new set of document classes for it.
21427 \end_layout
21428
21429 \begin_layout Paragraph
21430 Typing code in
21431 \end_layout
21432
21433 \begin_layout Standard
21434 LyX enables you to write code with a layout named 
21435 \noun on
21436 Scrap
21437 \noun default
21438 .
21439 \begin_inset Foot
21440 status collapsed
21441
21442 \begin_layout Plain Layout
21443 The equivalent Noweb term is 
21444 \begin_inset Quotes eld
21445 \end_inset
21446
21447 Chunk
21448 \begin_inset Quotes erd
21449 \end_inset
21450
21451 .
21452  For historical reasons, I got used to the term 
21453 \begin_inset Quotes eld
21454 \end_inset
21455
21456 scrap
21457 \begin_inset Quotes erd
21458 \end_inset
21459
21460  introduced by other literate tool named Nuweb, which I used for many years
21461  before rendering myself to Noweb.
21462 \end_layout
21463
21464 \end_inset
21465
21466  Noweb delimits scraps like this:
21467 \end_layout
21468
21469 \begin_layout LyX-Code
21470 <<My scrap>>=
21471 \end_layout
21472
21473 \begin_layout LyX-Code
21474   code
21475 \end_layout
21476
21477 \begin_layout LyX-Code
21478   more code
21479 \end_layout
21480
21481 \begin_layout LyX-Code
21482   even more code
21483 \end_layout
21484
21485 \begin_layout LyX-Code
21486   @
21487 \end_layout
21488
21489 \begin_layout Standard
21490 The problem is that whatever is written in between the << and the 
21491 \family typewriter
21492 @
21493 \family default
21494  must be taken literally, i.
21495 \begin_inset space \thinspace{}
21496 \end_inset
21497
21498 g.
21499 \begin_inset space \space{}
21500 \end_inset
21501
21502 LyX should be prevented from making any special interpretation of what has
21503  been written.
21504  This is handled by a special layout named Scrap, that works like a normal
21505  paragraph but has a free spacing capability.
21506 \end_layout
21507
21508 \begin_layout Standard
21509 The down side of the Scrap paragraph layout is that consecutive paragraphs
21510  of code will be spaced with one empty line in the source code and also
21511  in the printed documentation.
21512  The work around is to enter each line of code within a single Scrap, with
21513  a newline (ctrl-return).
21514  The example above will look like this:
21515 \begin_inset Foot
21516 status collapsed
21517
21518 \begin_layout Plain Layout
21519 If you have a printed version of this document you will not see any difference
21520  between the previous example and this one.
21521 \end_layout
21522
21523 \end_inset
21524
21525
21526 \end_layout
21527
21528 \begin_layout LyX-Code
21529 <<My scrap>>=
21530 \begin_inset Newline newline
21531 \end_inset
21532
21533   code
21534 \begin_inset Newline newline
21535 \end_inset
21536
21537   more code
21538 \begin_inset Newline newline
21539 \end_inset
21540
21541   even more code
21542 \begin_inset Newline newline
21543 \end_inset
21544
21545   @
21546 \end_layout
21547
21548 \begin_layout Standard
21549 This layout works fine.
21550  The only real inconvenience is that you have to type ctrl-return instead
21551  of a plain return.
21552 \begin_inset Foot
21553 status collapsed
21554
21555 \begin_layout Plain Layout
21556 It is in my list of 
21557 \begin_inset Quotes eld
21558 \end_inset
21559
21560 improvements
21561 \begin_inset Quotes erd
21562 \end_inset
21563
21564  to fix that.
21565 \end_layout
21566
21567 \end_inset
21568
21569
21570 \end_layout
21571
21572 \begin_layout Standard
21573 As a special note, you can also use the 
21574 \begin_inset Quotes eld
21575 \end_inset
21576
21577 %def
21578 \begin_inset Quotes erd
21579 \end_inset
21580
21581  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21582 rence:
21583 \end_layout
21584
21585 \begin_layout LyX-Code
21586 <<My scrap>>=
21587 \begin_inset Newline newline
21588 \end_inset
21589
21590   def some_function(args):
21591 \begin_inset Newline newline
21592 \end_inset
21593
21594     "This is the doc string for this function."
21595 \begin_inset Newline newline
21596 \end_inset
21597
21598     print "My args: ", args
21599 \end_layout
21600
21601 \begin_layout LyX-Code
21602 @ %def some_function
21603 \end_layout
21604
21605 \begin_layout Standard
21606 For an example of this usage and the resulting cross-reference output, look
21607  at the Literate python program in 
21608 \emph on
21609 LIBDIR/examples/listerrors.lyx
21610 \emph default
21611  which should make this all clear.
21612 \end_layout
21613
21614 \begin_layout Paragraph
21615 Generating the documentation
21616 \end_layout
21617
21618 \begin_layout Standard
21619 At this point you already have a new document file with a proper document
21620  class, and with some code and text on it.
21621  How do I print it? The answer is simple, you select 
21622 \family sans
21623 View\SpecialChar \menuseparator
21624 DVI,
21625 \family default
21626  etc.
21627  Just like you would do for a plain document.
21628  No special procedure is required.
21629 \end_layout
21630
21631 \begin_layout Standard
21632 To help orientate you, I will now explain what happens inside LyX:
21633 \end_layout
21634
21635 \begin_layout Enumerate
21636 When the 
21637 \family sans
21638 Update\SpecialChar \menuseparator
21639 DVI
21640 \family default
21641  menu option is chosen, a LaTeX file is generated.
21642  
21643 \end_layout
21644
21645 \begin_deeper
21646 \begin_layout Standard
21647 If the document is of any literate class the generated file will be named
21648  with an extension name defined by the 
21649 \begin_inset Quotes eld
21650 \end_inset
21651
21652 literate
21653 \begin_inset Quotes erd
21654 \end_inset
21655
21656  format (defined in the Preferences panel), otherwise the file will have
21657  the usual 
21658 \family typewriter
21659 .tex
21660 \family default
21661  extension.
21662 \end_layout
21663
21664 \end_deeper
21665 \begin_layout Enumerate
21666 Note that the only difference so far is in the name of the file, no special
21667  processing is required by LyX.
21668  Given that you formatted the code using the Scrap layout that, by itself,
21669  takes care of the business.
21670 \end_layout
21671
21672 \begin_layout Enumerate
21673 If the document is of any literate class LyX will then use the internal
21674  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21675 \begin_inset Foot
21676 status collapsed
21677
21678 \begin_layout Plain Layout
21679 The converters are defined in the 
21680 \family sans
21681 Tools\SpecialChar \menuseparator
21682 Preferences
21683 \family default
21684  panel, under the 
21685 \begin_inset Quotes eld
21686 \end_inset
21687
21688 Conversion
21689 \begin_inset Quotes erd
21690 \end_inset
21691
21692  tab.
21693  See section 
21694 \emph on
21695 Converters
21696 \emph default
21697  of the 
21698 \emph on
21699 Customization
21700 \emph default
21701  manual for general information about converters.
21702 \end_layout
21703
21704 \end_inset
21705
21706  to generate the LaTeX file.
21707 \end_layout
21708
21709 \begin_deeper
21710 \begin_layout Standard
21711 Otherwise it will just skip this step.
21712 \end_layout
21713
21714 \end_deeper
21715 \begin_layout Enumerate
21716 Finally, LaTeX is invoked and the regular post processing continues as in
21717  a plain document.
21718 \end_layout
21719
21720 \begin_layout Standard
21721 Independence from a particular 
21722 \begin_inset Quotes eld
21723 \end_inset
21724
21725 literate tool
21726 \begin_inset Quotes erd
21727 \end_inset
21728
21729  is easily achieved by changing the commands that are run by the various
21730  converters.
21731 \end_layout
21732
21733 \begin_layout Paragraph
21734 Generating the code
21735 \end_layout
21736
21737 \begin_layout Standard
21738 When the build menu option is chosen or the corresponding button in the
21739  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21740  Next, LyX invokes the 
21741 \family typewriter
21742 Noweb->Program
21743 \family default
21744  converter.
21745  This converter needs to be defined by the user and is not installed by
21746  default, though the Program format is.
21747  This converter (like any other converter) will have two parts:
21748 \end_layout
21749
21750 \begin_layout Enumerate
21751 The converter program itself.
21752  This program performs the conversion from the one format to the other (in
21753  this case, from the Noweb format to the Program pseudo-format).
21754 \end_layout
21755
21756 \begin_layout Enumerate
21757 The error log parser.
21758  This is a program whose sole purpose is to rewrite error messages in a
21759  format that LyX understands.
21760  This makes it possible for LyX to place error boxes in the right places
21761  in the file buffer.
21762 \end_layout
21763
21764 \begin_layout Standard
21765 The first part, the 
21766 \begin_inset Quotes eld
21767 \end_inset
21768
21769 Converter
21770 \begin_inset Quotes erd
21771 \end_inset
21772
21773  setting, should be set to 
21774 \begin_inset Quotes eld
21775 \end_inset
21776
21777
21778 \family typewriter
21779 build-script $$i
21780 \family default
21781
21782 \begin_inset Quotes erd
21783 \end_inset
21784
21785 .
21786  This basically means that LyX will call 
21787 \begin_inset Quotes eld
21788 \end_inset
21789
21790 build-script
21791 \begin_inset Quotes erd
21792 \end_inset
21793
21794  (a program or script) with the name of the Noweb file (normally a file
21795  in the LyX temp directory).
21796  
21797 \end_layout
21798
21799 \begin_layout Standard
21800 This is an implementation of 
21801 \begin_inset Quotes eld
21802 \end_inset
21803
21804 build-script
21805 \begin_inset Quotes erd
21806 \end_inset
21807
21808  that you can place in a directory on your path:
21809 \end_layout
21810
21811 \begin_layout LyX-Code
21812 #!/bin/sh
21813 \end_layout
21814
21815 \begin_layout LyX-Code
21816 #
21817 \end_layout
21818
21819 \begin_layout LyX-Code
21820 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21821 \end_layout
21822
21823 \begin_layout Standard
21824 The next part of the converter setting is the 
21825 \begin_inset Quotes eld
21826 \end_inset
21827
21828 Flags
21829 \begin_inset Quotes erd
21830 \end_inset
21831
21832  which is to be set to 
21833 \begin_inset Quotes eld
21834 \end_inset
21835
21836
21837 \family typewriter
21838 parselog=listerrors
21839 \family default
21840
21841 \begin_inset Quotes erd
21842 \end_inset
21843
21844 .
21845  This will run any errors that are generated by the 
21846 \begin_inset Quotes eld
21847 \end_inset
21848
21849 build-script
21850 \begin_inset Quotes erd
21851 \end_inset
21852
21853  process through the 
21854 \begin_inset Quotes eld
21855 \end_inset
21856
21857 listerrors
21858 \begin_inset Quotes erd
21859 \end_inset
21860
21861  program.
21862 \end_layout
21863
21864 \begin_layout Standard
21865 The converter code looks in 
21866 \emph on
21867 MYLYXDIR/scripts
21868 \emph default
21869  first, then in 
21870 \emph on
21871 LIBDIR/scripts
21872 \emph default
21873  then on the path for the 
21874 \begin_inset Quotes eld
21875 \end_inset
21876
21877 listerrors
21878 \begin_inset Quotes erd
21879 \end_inset
21880
21881  program.
21882 \end_layout
21883
21884 \begin_layout Standard
21885 The build will normally take place in LyX's temporary directory, so the
21886  files produced by the conversion will be in that directory.
21887  LyX will copy out what it regards as the `main' file, but the 
21888 \family typewriter
21889 Noweb->Program
21890 \family default
21891  conversion may produce several files, and so most of these would then be
21892  deleted when LyX was closed.
21893  The present solution is to use a `copier',
21894 \begin_inset Foot
21895 status collapsed
21896
21897 \begin_layout Plain Layout
21898 See section 
21899 \emph on
21900 Copiers
21901 \emph default
21902  of the 
21903 \emph on
21904 Customization
21905 \emph default
21906  manual for information on these.
21907 \end_layout
21908
21909 \end_inset
21910
21911  in this case, the 
21912 \family typewriter
21913 ext_copy.py
21914 \family default
21915  script in its default mode, so that the entire contents of the temporary
21916  directory is copied.
21917  More will get copied than is needed, to be sure, but nothing will be lost.
21918  If, however, you know what extensions the generated files will have, this
21919  can be improved by using the 
21920 \family typewriter
21921 -e
21922 \family default
21923  option to 
21924 \family typewriter
21925 ext_copy
21926 \family default
21927 .
21928  This option takes a comma-separated list of extensions to copy.
21929  So, for example, if the conversion will generate only files with the extensions
21930  
21931 \family typewriter
21932 .c
21933 \family default
21934  and 
21935 \family typewriter
21936 .h
21937 \family default
21938 , then the correct definition would be:
21939 \end_layout
21940
21941 \begin_layout LyX-Code
21942 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21943 \end_layout
21944
21945 \begin_layout Standard
21946 The result will be that only files with these two extensions will be copied
21947  out.
21948 \end_layout
21949
21950 \begin_layout Paragraph
21951 Build instructions in the document
21952 \end_layout
21953
21954 \begin_layout Standard
21955 The last piece of the integration between LyX and noweb is the 
21956 \begin_inset Quotes eld
21957 \end_inset
21958
21959 build-script
21960 \begin_inset Quotes erd
21961 \end_inset
21962
21963  scrap.
21964  Generally, the instructions for building your program should be embedded
21965  in a scrap of its own.
21966  The noweb-specific 
21967 \begin_inset Quotes eld
21968 \end_inset
21969
21970 build-script
21971 \begin_inset Quotes erd
21972 \end_inset
21973
21974  above uses the notangle command to look for this scrap (called 
21975 \begin_inset Quotes eld
21976 \end_inset
21977
21978 build-script
21979 \begin_inset Quotes erd
21980 \end_inset
21981
21982 ) and runs its contents through 
21983 \begin_inset Quotes eld
21984 \end_inset
21985
21986 sh
21987 \begin_inset Quotes erd
21988 \end_inset
21989
21990 .
21991 \end_layout
21992
21993 \begin_layout Standard
21994 Typically, such a scrap would look something like this:
21995 \end_layout
21996
21997 \begin_layout LyX-Code
21998 <<build-script>>=
21999 \begin_inset Newline newline
22000 \end_inset
22001
22002 #!/bin/sh
22003 \begin_inset Newline newline
22004 \end_inset
22005
22006
22007 \begin_inset Newline newline
22008 \end_inset
22009
22010 if [ -z "${NOWEB_SOURCE}" ]
22011 \begin_inset Newline newline
22012 \end_inset
22013
22014 then
22015 \begin_inset Newline newline
22016 \end_inset
22017
22018   NOWEB_SOURCE=myfile.nw
22019 \begin_inset Newline newline
22020 \end_inset
22021
22022 fi
22023 \begin_inset Newline newline
22024 \end_inset
22025
22026 [...
22027  code to extract files ...]
22028 \begin_inset Newline newline
22029 \end_inset
22030
22031 [...
22032  code to compile files ...]
22033 \begin_inset Newline newline
22034 \end_inset
22035
22036 @
22037 \end_layout
22038
22039 \begin_layout Standard
22040 Look in 
22041 \emph on
22042 LIBDIR/examples/listerrors.lyx
22043 \emph default
22044  or in 
22045 \emph on
22046 LIBDIR/examples/Literate.lyx
22047 \emph default
22048  which implement two versions of the 
22049 \begin_inset Quotes eld
22050 \end_inset
22051
22052 listerrors
22053 \begin_inset Quotes erd
22054 \end_inset
22055
22056  program for some illustrations of how all of these pieces go together or
22057  in 
22058 \emph on
22059 LIBDIR/examples/noweb2lyx.lyx.
22060
22061 \emph default
22062  Interestingly, these three files show off the language-indepence of the
22063  LyX literate programming support since they are written in Python, C and
22064  Perl respectively.
22065 \end_layout
22066
22067 \begin_layout Subsubsection
22068 Configuring LyX
22069 \end_layout
22070
22071 \begin_layout Standard
22072 All the Literate Programming support is configured by the 
22073 \family sans
22074 Tools\SpecialChar \menuseparator
22075 Preferences
22076 \family default
22077  panel in the 
22078 \begin_inset Quotes eld
22079 \end_inset
22080
22081 Conversion
22082 \begin_inset Quotes erd
22083 \end_inset
22084
22085  tab.
22086  The important parts are:
22087 \end_layout
22088
22089 \begin_layout Description
22090 the
22091 \begin_inset space ~
22092 \end_inset
22093
22094
22095 \begin_inset Quotes eld
22096 \end_inset
22097
22098 literate
22099 \begin_inset Quotes erd
22100 \end_inset
22101
22102
22103 \begin_inset space ~
22104 \end_inset
22105
22106 format Set up via the Formats tab, this is where the Noweb-specific pieces
22107  are set up.
22108  The 
22109 \family sans
22110 GUI Name
22111 \family default
22112  is set to 
22113 \family typewriter
22114 NoWeb
22115 \family default
22116 , the file extension is set to 
22117 \family typewriter
22118 .nw
22119 \family default
22120 .
22121  This tells LyX to create a file with a 
22122 \family typewriter
22123 .nw
22124 \family default
22125  extension in the first step of the conversion process.
22126 \end_layout
22127
22128 \begin_layout Description
22129 the
22130 \begin_inset space ~
22131 \end_inset
22132
22133
22134 \family sans
22135 Program
22136 \family default
22137
22138 \begin_inset space ~
22139 \end_inset
22140
22141 format This is an empty format whose sole purpose is to be the endpoint
22142  of a conversion (which then allows us to set up a converter for it).
22143 \end_layout
22144
22145 \begin_layout Description
22146
22147 \family sans
22148 NoWeb
22149 \family default
22150 ->
22151 \family sans
22152 LaTeX
22153 \family default
22154  This converter performs the 
22155 \begin_inset Quotes eld
22156 \end_inset
22157
22158 weaving
22159 \begin_inset Quotes erd
22160 \end_inset
22161
22162  of the literate document.
22163  For Noweb, it is set to 
22164 \begin_inset Quotes eld
22165 \end_inset
22166
22167
22168 \family typewriter
22169 noweave -delay -index $$i > $$o
22170 \family default
22171
22172 \begin_inset Quotes erd
22173 \end_inset
22174
22175
22176 \end_layout
22177
22178 \begin_layout Description
22179
22180 \family sans
22181 NoWeb
22182 \family default
22183 ->
22184 \family sans
22185 Program
22186 \family default
22187  This performs the 
22188 \begin_inset Quotes eld
22189 \end_inset
22190
22191 tangling step
22192 \begin_inset Quotes erd
22193 \end_inset
22194
22195 .
22196  As stated above, the Converter is set to 
22197 \begin_inset Quotes eld
22198 \end_inset
22199
22200
22201 \family typewriter
22202 build-script $$i
22203 \family default
22204
22205 \begin_inset Quotes erd
22206 \end_inset
22207
22208 , with Flags set to 
22209 \begin_inset Quotes eld
22210 \end_inset
22211
22212
22213 \family typewriter
22214 originaldir,parselog=listerrors
22215 \family default
22216
22217 \begin_inset Quotes erd
22218 \end_inset
22219
22220 .
22221 \end_layout
22222
22223 \begin_layout Subsubsection
22224 Debug extensions
22225 \end_layout
22226
22227 \begin_layout Standard
22228 There is also a new function implemented in the LyX server, the 
22229 \begin_inset Quotes eld
22230 \end_inset
22231
22232 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22233  
22234 \end_layout
22235
22236 \begin_layout Standard
22237 When debugging code with ddd/gdb, it is possible to invoke a text editor
22238  at the current execution position with a single key stroke.
22239  The default ddd configuration for that is shift-ctrl-V.
22240  It happens that you can define the editor command line invocation in ddd
22241  by accessing the 
22242 \family sans
22243 Edit\SpecialChar \menuseparator
22244 Preferences\SpecialChar \menuseparator
22245 Helpers
22246 \family default
22247  dialog and changing the "Edit Sources" entry.
22248 \end_layout
22249
22250 \begin_layout Standard
22251 I take advantage of the new created LyX server function and this ddd feature,
22252  and set 
22253 \begin_inset Quotes eld
22254 \end_inset
22255
22256 Edit Sources
22257 \begin_inset Quotes erd
22258 \end_inset
22259
22260  to:
22261 \end_layout
22262
22263 \begin_layout LyX-Code
22264 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22265 \end_layout
22266
22267 \begin_layout Standard
22268 With this, whenever you are using ddd and find a point in the program that
22269  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22270  ddd you forward this information to LyX through the LyX server and then
22271  the LyX window will show the same file with the cursor at the same position
22272  ddd was pointing to.
22273  No more guessing or long scrolling to locate a point in the program back
22274  from debugging !
22275 \end_layout
22276
22277 \begin_layout Standard
22278 Note however that you must enable the LyX server to get this feature working
22279  (it is disabled by default).
22280  You can enable it in 
22281 \family sans
22282 Preferences
22283 \family default
22284  (tabs 
22285 \family sans
22286 Inputs
22287 \family default
22288
22289 \family sans
22290 Paths
22291 \family default
22292 ) by entering in the 
22293 \family sans
22294 LyXserver pipe
22295 \family default
22296  a path like 
22297 \begin_inset Quotes eld
22298 \end_inset
22299
22300
22301 \family typewriter
22302 /home/<your-home-directory>/.lyx/lyxpipe
22303 \family default
22304
22305 \begin_inset Quotes erd
22306 \end_inset
22307
22308
22309 \end_layout
22310
22311 \begin_layout Standard
22312 Read the LyX server documentation in the 
22313 \emph on
22314 Customization Manual
22315 \emph default
22316  for further information.
22317 \end_layout
22318
22319 \begin_layout Subsubsection
22320 Toolbar extensions
22321 \end_layout
22322
22323 \begin_layout Standard
22324 There are six new buttons that can be added to your LyX toolbar.
22325  Five of these buttons are short cuts to layout styles: 
22326 \family sans
22327 Standard
22328 \family default
22329
22330 \family sans
22331 Section
22332 \family default
22333
22334 \family sans
22335 LaTeX
22336 \family default
22337
22338 \family sans
22339 LyX-Code
22340 \family default
22341 , and 
22342 \family sans
22343 Scrap
22344 \family default
22345 .
22346  The last one is a short cut to the 
22347 \begin_inset Quotes eld
22348 \end_inset
22349
22350 Build Program
22351 \begin_inset Quotes erd
22352 \end_inset
22353
22354  File menu entry.
22355  
22356 \end_layout
22357
22358 \begin_layout Standard
22359 LyX has a range of buttons that are available for tool bar customization.
22360  In my toolbar I like to combine the six short cuts above with two more:
22361  One for 
22362 \family sans
22363 View
22364 \family default
22365 \SpecialChar \menuseparator
22366
22367 \family sans
22368 Update
22369 \family default
22370 \SpecialChar \menuseparator
22371
22372 \family sans
22373 DVI
22374 \family default
22375  and the other for 
22376 \family sans
22377 View\SpecialChar \menuseparator
22378 DVI
22379 \family default
22380  File menu entries.
22381  Here is how it looks like:
22382 \end_layout
22383
22384 \begin_layout LyX-Code
22385 Toolbar
22386 \end_layout
22387
22388 \begin_layout LyX-Code
22389   Layouts
22390 \end_layout
22391
22392 \begin_layout LyX-Code
22393   Icon "layout Standard"
22394 \end_layout
22395
22396 \begin_layout LyX-Code
22397   Icon "layout Section"
22398 \end_layout
22399
22400 \begin_layout LyX-Code
22401   Icon "layout LaTeX"
22402 \end_layout
22403
22404 \begin_layout LyX-Code
22405   Icon "layout LyX-Code"
22406 \end_layout
22407
22408 \begin_layout LyX-Code
22409   Icon "layout Scrap"
22410 \end_layout
22411
22412 \begin_layout LyX-Code
22413   Separator
22414 \end_layout
22415
22416 \begin_layout LyX-Code
22417   Icon "buffer-view"
22418 \end_layout
22419
22420 \begin_layout LyX-Code
22421   Icon "buffer-typeset"
22422 \end_layout
22423
22424 \begin_layout LyX-Code
22425   Icon "build-program"
22426 \end_layout
22427
22428 \begin_layout LyX-Code
22429   Separator
22430 \end_layout
22431
22432 \begin_layout LyX-Code
22433 .
22434 \end_layout
22435
22436 \begin_layout LyX-Code
22437 .
22438 \end_layout
22439
22440 \begin_layout LyX-Code
22441 .
22442 \end_layout
22443
22444 \begin_layout LyX-Code
22445 End
22446 \end_layout
22447
22448 \begin_layout Subsubsection
22449 Colors customization
22450 \end_layout
22451
22452 \begin_layout Standard
22453 There are a number of colors in LyX that can be customized in 
22454 \family sans
22455 Preferences
22456 \family default
22457 .
22458  One of the things that bothers people is the LaTeX font color.
22459  The default color is red, since the scraps uses LaTeX font, and there is
22460  a lot of scraps in literate documents, you may get tired of seeing everything
22461  in red.
22462  You can change it by going to the tabs 
22463 \family sans
22464 Look&Feel
22465 \family default
22466
22467 \family sans
22468 Colors.
22469 \end_layout
22470
22471 \begin_layout Standard
22472 The next thing is the visible presence of the newline character in the screen.
22473  You can choose the color of this particular character and make it blend
22474  in the background.
22475  I recommend you choosing a color that is close to the background but not
22476  equal, that way you still can see it is there, but it is not bothering
22477  you anymore.
22478  
22479 \end_layout
22480
22481 \begin_layout Chapter
22482 Special features
22483 \end_layout
22484
22485 \begin_layout Standard
22486 You can do everything with LyX that you can do with LaTeX.
22487  However, LyX cannot support every LaTeX feature directly.
22488  But you can always use TeX Code.
22489  This chapter shows you some more special things you might want to use.
22490  For other special things you can do with figures, tables, floats, boxes
22491  and notes, have a look at the 
22492 \emph on
22493 EmbeddedObjects
22494 \emph default
22495  manual.
22496 \end_layout
22497
22498 \begin_layout Section
22499 Multiple Text Columns
22500 \end_layout
22501
22502 \begin_layout Standard
22503 This feature is independent of the option 
22504 \family sans
22505 Two-column document
22506 \family default
22507  in the document settings under 
22508 \family sans
22509 Text Layout
22510 \family default
22511 .
22512  If you want to have 2
22513 \begin_inset space ~
22514 \end_inset
22515
22516 columns for the whole document, it is recommended to use the 
22517 \family sans
22518 Two-column document
22519 \family default
22520  option.
22521  For all other cases use this feature.
22522 \end_layout
22523
22524 \begin_layout Standard
22525 To use multiple text columns in your document, you have to load the module
22526  
22527 \family sans
22528 Multiple Columns
22529 \family default
22530  (menu 
22531 \family sans
22532 Document\SpecialChar \menuseparator
22533 Settings\SpecialChar \menuseparator
22534 Modules
22535 \family default
22536 ) and must have the LaTeX-package 
22537 \series bold
22538 multicol
22539 \series default
22540
22541 \begin_inset Index idx
22542 status collapsed
22543
22544 \begin_layout Plain Layout
22545 LaTeX-packages ! multicol
22546 \end_layout
22547
22548 \end_inset
22549
22550  installed.
22551 \end_layout
22552
22553 \begin_layout Standard
22554 Footnotes within multiple columns will be placed at the bottom of the page
22555  and not under each column.
22556  Within the different columns you can use everything, with the limitation
22557  that for floats you need to use the float option 
22558 \family sans
22559 Span columns
22560 \family default
22561 .
22562 \end_layout
22563
22564 \begin_layout Subsection
22565 Basics
22566 \end_layout
22567
22568 \begin_layout Standard
22569 If you want to have 2 columns in your text, use the style 
22570 \family sans
22571 Begin Multiple Columns
22572 \family default
22573  where the columns should start.
22574  The content of the style is the number of the columns, so in this case
22575  use a 
22576 \begin_inset Quotes eld
22577 \end_inset
22578
22579 2
22580 \begin_inset Quotes erd
22581 \end_inset
22582
22583 .
22584  At the point where the columns should end use the style 
22585 \family sans
22586 End Multiple Columns
22587 \family default
22588  and keep it empty.
22589 \end_layout
22590
22591 \begin_layout Standard
22592 Here is an example:
22593 \end_layout
22594
22595 \begin_layout Begin Multiple Columns
22596 2
22597 \end_layout
22598
22599 \begin_layout Standard
22600 \noindent
22601
22602 \series bold
22603 \size small
22604 The Adventure of the Empty House
22605 \series default
22606
22607 \begin_inset Newline newline
22608 \end_inset
22609
22610 by 
22611 \noun on
22612 Sir Arthur Conan Doyle
22613 \end_layout
22614
22615 \begin_layout Standard
22616
22617 \size small
22618 It was in the spring of the year 1894 that all London was interested, and
22619  the fashionable world dismayed, by the murder of the Honourable Ronald
22620  Adair under most unusual and inexplicable circumstances.
22621  The public has already learned those particulars of the crime which came
22622  out in the police investigation, but a good deal was suppressed upon that
22623  occasion, since the case for the prosecution was so overwhelmingly strong
22624  that it was not necessary to bring forward all the facts.
22625  Only now, at the end of nearly ten years, am I allowed to supply those
22626  missing links which make up the whole of that remarkable chain.
22627  The crime was of interest in itself, but that interest was as nothing to
22628  me compared to the inconceivable sequel, which afforded me the greatest
22629  shock and surprise of any event in my adventurous life.
22630  Even now, after this long interval, I find myself thrilling as I think
22631  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22632 ty which utterly submerged my mind.
22633  Let me say to that public, which has shown some interest in those glimpses
22634  which I have occasionally given them of the thoughts and actions of a very
22635  remarkable man, that they are not to blame me if I have not shared my knowledge
22636  with them, for I should have considered it my first duty to do so, had
22637  I not been barred by a positive prohibition from his own lips, which was
22638  only withdrawn upon the third of last month.
22639 \end_layout
22640
22641 \begin_layout End Multiple Columns
22642
22643 \end_layout
22644
22645 \begin_layout Standard
22646 Here is an example with 3
22647 \begin_inset space ~
22648 \end_inset
22649
22650 columns:
22651 \end_layout
22652
22653 \begin_layout Begin Multiple Columns
22654 3
22655 \end_layout
22656
22657 \begin_layout Standard
22658
22659 \size footnotesize
22660 It can be imagined that my close intimacy with Sherlock Holmes had interested
22661  me deeply in crime, and that after his disappearance I never failed to
22662  read with care the various problems which came before the public.
22663  And I even attempted, more than once, for my own private satisfaction,
22664  to employ his methods in their solution, though with indifferent success.
22665  There was none, however, which appealed to me like this tragedy of Ronald
22666  Adair.
22667  As I read the evidence at the inquest, which led up to a verdict of willful
22668  murder against some person or persons unknown, I realized more clearly
22669  than I had ever done the loss which the community had sustained by the
22670  death of Sherlock Holmes.
22671  There were points about this strange business which would, I was sure,
22672  have specially appealed to him, and the efforts of the police would have
22673  been supplemented, or more probably anticipated, by the trained observation
22674  and the alert mind of the first criminal agent in Europe.
22675  All day, as I drove upon my round, I turned over the case in my mind and
22676  found no explanation which appeared to me to be adequate.
22677  At the risk of telling a twice-told tale, I will recapitulate the facts
22678  as they were known to the public at the conclusion of the inquest.
22679 \end_layout
22680
22681 \begin_layout End Multiple Columns
22682
22683 \end_layout
22684
22685 \begin_layout Standard
22686 You can have up to 10
22687 \begin_inset space ~
22688 \end_inset
22689
22690 columns if you want to, but that might not be very pleasant for the readers
22691  of your document.
22692 \end_layout
22693
22694 \begin_layout Standard
22695 \begin_inset Newpage newpage
22696 \end_inset
22697
22698
22699 \end_layout
22700
22701 \begin_layout Subsection
22702 Columns inside Columns
22703 \end_layout
22704
22705 \begin_layout Standard
22706 You can also have columns inside columns:
22707 \end_layout
22708
22709 \begin_layout Begin Multiple Columns
22710 2
22711 \end_layout
22712
22713 \begin_layout Standard
22714
22715 \size footnotesize
22716 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22717  at that time governor of one of the Australian colonies.
22718  Adair's mother had returned from Australia to undergo the operation for
22719  cataract, and she, her son Ronald, and her daughter Hilda were living together
22720  at 427 Park Lane.
22721 \end_layout
22722
22723 \begin_layout Begin Multiple Columns
22724 2
22725 \end_layout
22726
22727 \begin_layout Standard
22728
22729 \size footnotesize
22730 The youth moved in the best society–had, so far as was known, no enemies
22731  and no particular vices.
22732  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22733  had been broken off by mutual consent some months before, and there was
22734  no sign that it had left any very profound feeling behind it.
22735  For the rest {sic} the man's life moved in a narrow and conventional circle,
22736  for his habits were quiet and his nature unemotional.
22737  Yet it was upon this easy-going young aristocrat that death came, in most
22738  strange and unexpected form, between the hours of ten and eleven-twenty
22739  on the night of March 30, 1894.
22740 \end_layout
22741
22742 \begin_layout End Multiple Columns
22743
22744 \end_layout
22745
22746 \begin_layout Standard
22747
22748 \size footnotesize
22749 Ronald Adair was fond of cards–playing continually, but never for such stakes
22750  as would hurt him.
22751  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22752  It was shown that, after dinner on the day of his death, he had played
22753  a rubber of whist at the latter club.
22754  He had also played there in the afternoon.
22755
22756 \size default
22757  
22758 \size footnotesize
22759 The evidence of those who had played with him– Mr.
22760  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22761  and that there was a fairly equal fall of the cards.
22762  Adair might have lost five pounds, but not more.
22763  His fortune was a considerable one, and such a loss could not in any way
22764  affect him.
22765  He had played nearly every day at one club or other, but he was a cautious
22766  player, and usually rose a winner.
22767  It came out in evidence that, in partnership with Colonel Moran, he had
22768  actually won as much as four hundred and twenty pounds in a sitting, some
22769  weeks before, from Godfrey Milner and Lord Balmoral.
22770  So much for his recent history as it came out at the inquest.
22771 \end_layout
22772
22773 \begin_layout End Multiple Columns
22774
22775 \end_layout
22776
22777 \begin_layout Subsection
22778 Advanced Examples
22779 \end_layout
22780
22781 \begin_layout Standard
22782 The examples in this section show some more special features of multiple
22783  columns.
22784 \end_layout
22785
22786 \begin_layout Standard
22787 For more features of multiple columns, have a look at the documentation
22788  of the LaTeX-package 
22789 \series bold
22790 multicol
22791 \series default
22792
22793 \begin_inset Index idx
22794 status collapsed
22795
22796 \begin_layout Plain Layout
22797 LaTeX-packages ! multicol
22798 \end_layout
22799
22800 \end_inset
22801
22802
22803 \begin_inset CommandInset citation
22804 LatexCommand cite
22805 key "multicol"
22806
22807 \end_inset
22808
22809 .
22810 \end_layout
22811
22812 \begin_layout Subsubsection
22813 Preface
22814 \end_layout
22815
22816 \begin_layout Standard
22817 To add a preface text for multiple columns, add the command
22818 \end_layout
22819
22820 \begin_layout Standard
22821
22822 \series bold
22823 }[
22824 \end_layout
22825
22826 \begin_layout Standard
22827 as TeX Code behind the number of columns in the
22828 \family sans
22829  Begin Multiple Columns
22830 \family default
22831  style.
22832  behind the command write the text.
22833  At the end of the style use the command
22834 \end_layout
22835
22836 \begin_layout Standard
22837
22838 \series bold
22839 ]{
22840 \end_layout
22841
22842 \begin_layout Standard
22843 as TeX Code.
22844  An example with some preface text:
22845 \end_layout
22846
22847 \begin_layout Standard
22848 \begin_inset VSpace bigskip
22849 \end_inset
22850
22851
22852 \end_layout
22853
22854 \begin_layout Begin Multiple Columns
22855 2
22856 \begin_inset ERT
22857 status collapsed
22858
22859 \begin_layout Plain Layout
22860
22861 }[
22862 \end_layout
22863
22864 \end_inset
22865
22866 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22867
22868 \begin_inset ERT
22869 status collapsed
22870
22871 \begin_layout Plain Layout
22872
22873 ]{
22874 \end_layout
22875
22876 \end_inset
22877
22878
22879 \end_layout
22880
22881 \begin_layout Standard
22882
22883 \size small
22884 On the evening of the crime, he returned from the club exactly at ten.
22885  His mother and sister were out spending the evening with a relation.
22886  The servant deposed that she heard him enter the front room on the second
22887  floor, generally used as his sitting-room.
22888  She had lit a fire there, and as it smoked she had opened the window.
22889  No sound was heard from the room until eleven-twenty, the hour of the return
22890  of Lady Maynooth and her daughter.
22891  Desiring to say good-night, she attempted to enter her son's room.
22892  The door was locked on the inside, and no answer could be got to their
22893  cries and knocking.
22894  Help was obtained, and the door forced.
22895  The unfortunate young man was found lying near the table.
22896  His head had been horribly mutilated by an expanding revolver bullet, but
22897  no weapon of any sort was to be found in the room.
22898 \end_layout
22899
22900 \begin_layout End Multiple Columns
22901
22902 \end_layout
22903
22904 \begin_layout Standard
22905 You can also use a section heading as the preface if you use a section command
22906  as TeX Code behind the first TeX Code.
22907  For example the command
22908 \end_layout
22909
22910 \begin_layout Standard
22911
22912 \series bold
22913
22914 \backslash
22915 subsection{subsection title}
22916 \end_layout
22917
22918 \begin_layout Standard
22919 creates a subsection.
22920  In this example the preface is a subsubsection:
22921 \end_layout
22922
22923 \begin_layout Begin Multiple Columns
22924 2
22925 \begin_inset ERT
22926 status collapsed
22927
22928 \begin_layout Plain Layout
22929
22930 }[
22931 \end_layout
22932
22933 \end_inset
22934
22935
22936 \begin_inset ERT
22937 status collapsed
22938
22939 \begin_layout Plain Layout
22940
22941
22942 \backslash
22943 subsubsection{
22944 \end_layout
22945
22946 \end_inset
22947
22948 This is a subsubsection heading as a preface
22949 \begin_inset ERT
22950 status collapsed
22951
22952 \begin_layout Plain Layout
22953
22954 }
22955 \end_layout
22956
22957 \end_inset
22958
22959
22960 \begin_inset ERT
22961 status collapsed
22962
22963 \begin_layout Plain Layout
22964
22965 ]{
22966 \end_layout
22967
22968 \end_inset
22969
22970
22971 \end_layout
22972
22973 \begin_layout Standard
22974
22975 \size small
22976 A minute examination of the circumstances served only to make the case more
22977  complex.
22978  In the first place, no reason could be given why the young man should have
22979  fastened the door upon the inside.
22980  There was the possibility that the murderer had done this, and had afterwards
22981  escaped by the window.
22982  The drop was at least twenty feet, however, and a bed of crocuses in full
22983  bloom lay beneath.
22984  Neither the flowers nor the earth showed any sign of having been disturbed,
22985  nor were there any marks upon the narrow strip of grass which separated
22986  the house from the road.
22987  Apparently, therefore, it was the young man himself who had fastened the
22988  door.
22989  But how did he come by his death? No one could have climbed up to the window
22990  without leaving traces.
22991  Suppose a man had fired through the window, he would indeed be a remarkable
22992  shot who could with a revolver inflict so deadly a wound.
22993  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22994  a hundred yards of the house.
22995  No one had heard a shot.
22996 \end_layout
22997
22998 \begin_layout End Multiple Columns
22999
23000 \end_layout
23001
23002 \begin_layout Standard
23003 If there is less vertical space left on the page at the beginning of the
23004  multiple columns than needed for 6
23005 \begin_inset space ~
23006 \end_inset
23007
23008 text lines, a page break will be inserted before the multiple columns.
23009  Depending on the number of lines of the preface text, you might want to
23010  change this value.
23011  It is determined by inserting the command
23012 \end_layout
23013
23014 \begin_layout Standard
23015
23016 \series bold
23017 ][number
23018 \backslash
23019 baselineskip
23020 \end_layout
23021
23022 \begin_layout Standard
23023 as TeX Code behind the preface definition but before the final 
23024 \series bold
23025 ]{
23026 \series default
23027  command.
23028  
23029 \emph on
23030 number
23031 \emph default
23032  is hereby the number of text lines.
23033  In this example the space is set to 7
23034 \begin_inset space ~
23035 \end_inset
23036
23037 text lines:
23038 \end_layout
23039
23040 \begin_layout Begin Multiple Columns
23041 2
23042 \begin_inset ERT
23043 status collapsed
23044
23045 \begin_layout Plain Layout
23046
23047 }[
23048 \end_layout
23049
23050 \end_inset
23051
23052
23053 \begin_inset ERT
23054 status collapsed
23055
23056 \begin_layout Plain Layout
23057
23058
23059 \backslash
23060 subsubsection{
23061 \end_layout
23062
23063 \end_inset
23064
23065 This is the sectioning command
23066 \begin_inset Newline newline
23067 \end_inset
23068
23069 as a preface and
23070 \begin_inset Newline newline
23071 \end_inset
23072
23073 with multiple text lines
23074 \begin_inset ERT
23075 status collapsed
23076
23077 \begin_layout Plain Layout
23078
23079 }
23080 \end_layout
23081
23082 \end_inset
23083
23084
23085 \begin_inset ERT
23086 status collapsed
23087
23088 \begin_layout Plain Layout
23089
23090 ][7
23091 \backslash
23092 baselineskip
23093 \end_layout
23094
23095 \end_inset
23096
23097
23098 \begin_inset ERT
23099 status collapsed
23100
23101 \begin_layout Plain Layout
23102
23103 ]{
23104 \end_layout
23105
23106 \end_inset
23107
23108
23109 \end_layout
23110
23111 \begin_layout Standard
23112
23113 \size small
23114 On the evening of the crime, he returned from the club exactly at ten.
23115  His mother and sister were out spending the evening with a relation.
23116  The servant deposed that she heard him enter the front room on the second
23117  floor, generally used as his sitting-room.
23118  She had lit a fire there, and as it smoked she had opened the window.
23119  No sound was heard from the room until eleven-twenty, the hour of the return
23120  of Lady Maynooth and her daughter.
23121  Desiring to say good-night, she attempted to enter her son's room.
23122  The door was locked on the inside, and no answer could be got to their
23123  cries and knocking.
23124  Help was obtained, and the door forced.
23125  The unfortunate young man was found lying near the table.
23126  His head had been horribly mutilated by an expanding revolver bullet, but
23127  no weapon of any sort was to be found in the room.
23128 \end_layout
23129
23130 \begin_layout End Multiple Columns
23131
23132 \end_layout
23133
23134 \begin_layout Subsubsection
23135 Surrounding Space
23136 \end_layout
23137
23138 \begin_layout Standard
23139 The amount of space before and after multiple columns can be changed by
23140  changing the length 
23141 \series bold
23142
23143 \backslash
23144 multicolsep
23145 \series default
23146 .
23147  For example the command
23148 \end_layout
23149
23150 \begin_layout Standard
23151
23152 \series bold
23153
23154 \backslash
23155 setlength{
23156 \backslash
23157 multicolsep}{3cm}
23158 \end_layout
23159
23160 \begin_layout Standard
23161 in TeX Code changes its value to 3
23162 \begin_inset space \thinspace{}
23163 \end_inset
23164
23165 cm.
23166  The change must be made before the multiple columns' start.
23167  The predefined value is 13
23168 \begin_inset space \thinspace{}
23169 \end_inset
23170
23171 pt.
23172 \end_layout
23173
23174 \begin_layout Standard
23175 For this example 
23176 \series bold
23177
23178 \backslash
23179 multicolsep
23180 \series default
23181  was set to 2.5
23182 \begin_inset space \thinspace{}
23183 \end_inset
23184
23185 cm:
23186 \end_layout
23187
23188 \begin_layout Standard
23189 \begin_inset ERT
23190 status open
23191
23192 \begin_layout Plain Layout
23193
23194
23195 \backslash
23196 setlength{
23197 \backslash
23198 multicolsep}{2.5cm}
23199 \end_layout
23200
23201 \end_inset
23202
23203
23204 \end_layout
23205
23206 \begin_layout Begin Multiple Columns
23207 2
23208 \end_layout
23209
23210 \begin_layout Standard
23211
23212 \size small
23213 All day I turned these facts over in my mind, endeavouring to hit upon some
23214  theory which could reconcile them all, and to find that line of least resistanc
23215 e which my poor friend had declared to be the starting-point of every investigat
23216 ion.
23217  I confess that I made little progress.
23218  In the evening I strolled across the Park, and found myself about six o'clock
23219  at the Oxford Street end of Park Lane.
23220  A group of loafers upon the pavements, all staring up at a particular window,
23221  directed me to the house which I had come to see.
23222  A tall, thin man with coloured glasses, whom I strongly suspected of being
23223  a plain-clothes detective, was pointing out some theory of his own, while
23224  the others crowded round to listen to what he said.
23225  I got as near him as I could, but his observations seemed to me to be absurd,
23226  so I withdrew again in some disgust.
23227  As I did so I struck against an elderly, deformed man, who had been behind
23228  me, and I knocked down several books which he was carrying.
23229 \end_layout
23230
23231 \begin_layout End Multiple Columns
23232
23233 \end_layout
23234
23235 \begin_layout Standard
23236 \begin_inset Note Greyedout
23237 status open
23238
23239 \begin_layout Plain Layout
23240
23241 \series bold
23242 Note:
23243 \series default
23244  The values you set with 
23245 \series bold
23246
23247 \backslash
23248 setlength
23249 \series default
23250  will be used for all following multiple columns until to change them again.
23251 \end_layout
23252
23253 \end_inset
23254
23255
23256 \end_layout
23257
23258 \begin_layout Standard
23259 \begin_inset ERT
23260 status collapsed
23261
23262 \begin_layout Plain Layout
23263
23264
23265 \backslash
23266 setlength{
23267 \backslash
23268 multicolsep}{13pt}
23269 \end_layout
23270
23271 \end_inset
23272
23273
23274 \begin_inset Note Note
23275 status collapsed
23276
23277 \begin_layout Plain Layout
23278 go back to the default
23279 \end_layout
23280
23281 \end_inset
23282
23283
23284 \end_layout
23285
23286 \begin_layout Subsubsection
23287 Column Separation
23288 \end_layout
23289
23290 \begin_layout Standard
23291 The width of the columns is automatically calculated, but you can modify
23292  the space between the columns.
23293  This is done by changing the length 
23294 \series bold
23295
23296 \backslash
23297 columnsep
23298 \series default
23299 .
23300  Its predefined value is 10
23301 \begin_inset space \thinspace{}
23302 \end_inset
23303
23304 pt.
23305  Here is an example where 
23306 \series bold
23307
23308 \backslash
23309 columnsep
23310 \series default
23311  is set to 3
23312 \begin_inset space \thinspace{}
23313 \end_inset
23314
23315 cm:
23316 \end_layout
23317
23318 \begin_layout Standard
23319 \begin_inset ERT
23320 status open
23321
23322 \begin_layout Plain Layout
23323
23324
23325 \backslash
23326 setlength{
23327 \backslash
23328 columnsep}{3cm}
23329 \end_layout
23330
23331 \end_inset
23332
23333
23334 \end_layout
23335
23336 \begin_layout Begin Multiple Columns
23337 2
23338 \end_layout
23339
23340 \begin_layout Standard
23341
23342 \size small
23343 My observations of No.
23344 \begin_inset space \space{}
23345 \end_inset
23346
23347 427 Park Lane did little to clear up the problem in which I was interested.
23348  The house was separated from the street by a low wall and railing, the
23349  whole not more than five feet high.
23350  It was perfectly easy, therefore, for anyone to get into the garden, but
23351  the window was entirely inaccessible, since there was no water pipe or
23352  anything which could help the most active man to climb it.
23353  More puzzled than ever, I retraced my steps to Kensington.
23354  I had not been in my study five minutes when the maid entered to say that
23355  a person desired to see me.
23356  To my astonishment it was none other than my strange old book collector,
23357  his sharp, wizened face peering out from a frame of white hair, and his
23358  precious volumes, a dozen of them at least, wedged under his right arm.
23359 \end_layout
23360
23361 \begin_layout End Multiple Columns
23362
23363 \end_layout
23364
23365 \begin_layout Standard
23366 \begin_inset ERT
23367 status collapsed
23368
23369 \begin_layout Plain Layout
23370
23371
23372 \backslash
23373 setlength{
23374 \backslash
23375 columnsep}{10pt}
23376 \end_layout
23377
23378 \end_inset
23379
23380
23381 \begin_inset Note Note
23382 status collapsed
23383
23384 \begin_layout Plain Layout
23385 go back to the default
23386 \end_layout
23387
23388 \end_inset
23389
23390
23391 \end_layout
23392
23393 \begin_layout Subsubsection
23394 Vertical Lines
23395 \end_layout
23396
23397 \begin_layout Standard
23398 Between the columns a rule with a width of the length 
23399 \series bold
23400
23401 \backslash
23402 columnseprule
23403 \series default
23404  is placed.
23405  If this rule width is set to 0
23406 \begin_inset space \thinspace{}
23407 \end_inset
23408
23409 pt (this is the default), the rule is suppressed.
23410  In the following example, the line separating the columns is 2
23411 \begin_inset space \thinspace{}
23412 \end_inset
23413
23414 pt wide.
23415 \end_layout
23416
23417 \begin_layout Standard
23418 \begin_inset ERT
23419 status open
23420
23421 \begin_layout Plain Layout
23422
23423
23424 \backslash
23425 setlength{
23426 \backslash
23427 columnseprule}{2pt}
23428 \end_layout
23429
23430 \end_inset
23431
23432
23433 \end_layout
23434
23435 \begin_layout Begin Multiple Columns
23436 2
23437 \end_layout
23438
23439 \begin_layout Standard
23440
23441 \size small
23442 \begin_inset Quotes eld
23443 \end_inset
23444
23445 You're surprised to see me, sir,
23446 \begin_inset Quotes erd
23447 \end_inset
23448
23449  said he, in a strange, croaking voice.
23450 \end_layout
23451
23452 \begin_layout Standard
23453
23454 \size small
23455 I acknowledged that I was.
23456 \end_layout
23457
23458 \begin_layout Standard
23459
23460 \size small
23461 \begin_inset Quotes eld
23462 \end_inset
23463
23464 Well, I've a conscience, sir, and when I chanced to see you go into this
23465  house, as I came hobbling after you, I thought to myself, I'll just step
23466  in and see that kind gentleman, and tell him that if I was a bit gruff
23467  in my manner there was not any harm meant, and that I am much obliged to
23468  him for picking up my books.
23469 \begin_inset Quotes erd
23470 \end_inset
23471
23472
23473 \end_layout
23474
23475 \begin_layout Standard
23476
23477 \size small
23478 \begin_inset Quotes eld
23479 \end_inset
23480
23481 You make too much of a trifle,
23482 \begin_inset Quotes erd
23483 \end_inset
23484
23485  said I.
23486  
23487 \begin_inset Quotes eld
23488 \end_inset
23489
23490 May I ask how you knew who I was?
23491 \begin_inset Quotes erd
23492 \end_inset
23493
23494
23495 \end_layout
23496
23497 \begin_layout Standard
23498
23499 \size small
23500 \begin_inset Quotes eld
23501 \end_inset
23502
23503 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23504  you'll find my little bookshop at the corner of Church Street, and very
23505  happy to see you, I am sure.
23506  Maybe you collect yourself, sir.
23507  Here's 
23508 \noun on
23509 British
23510 \begin_inset space ~
23511 \end_inset
23512
23513 Birds
23514 \noun default
23515 , and 
23516 \noun on
23517 Catullus
23518 \noun default
23519 , and 
23520 \noun on
23521 The Holy War
23522 \noun default
23523 --a bargain, every one of them.
23524  With five volumes you could just fill that gap on that second shelf.
23525  It looks untidy, does it not, sir?
23526 \begin_inset Quotes erd
23527 \end_inset
23528
23529
23530 \end_layout
23531
23532 \begin_layout End Multiple Columns
23533
23534 \end_layout
23535
23536 \begin_layout Standard
23537 \begin_inset ERT
23538 status collapsed
23539
23540 \begin_layout Plain Layout
23541
23542
23543 \backslash
23544 setlength{
23545 \backslash
23546 columnseprule}{0pt}
23547 \end_layout
23548
23549 \end_inset
23550
23551
23552 \begin_inset Note Note
23553 status collapsed
23554
23555 \begin_layout Plain Layout
23556 go back to the default
23557 \end_layout
23558
23559 \end_inset
23560
23561
23562 \end_layout
23563
23564 \begin_layout Standard
23565 \begin_inset Newpage newpage
23566 \end_inset
23567
23568
23569 \end_layout
23570
23571 \begin_layout Section
23572 Non-standard Paragraph Shapes
23573 \end_layout
23574
23575 \begin_layout Standard
23576 \begin_inset ERT
23577 status collapsed
23578
23579 \begin_layout Plain Layout
23580
23581
23582 \backslash
23583 begin{sloppypar}
23584 \end_layout
23585
23586 \end_inset
23587
23588
23589 \end_layout
23590
23591 \begin_layout Standard
23592 \begin_inset ERT
23593 status collapsed
23594
23595 \begin_layout Plain Layout
23596
23597
23598 \backslash
23599 newdimen
23600 \backslash
23601 varunit 
23602 \end_layout
23603
23604 \begin_layout Plain Layout
23605
23606
23607 \backslash
23608 setlength{
23609 \backslash
23610 varunit}{4.5in}
23611 \end_layout
23612
23613 \end_inset
23614
23615
23616 \end_layout
23617
23618 \begin_layout Standard
23619 \noindent
23620 \begin_inset ERT
23621 status collapsed
23622
23623 \begin_layout Plain Layout
23624
23625
23626 \backslash
23627 parshape 19 0.45
23628 \backslash
23629 varunit 0.332
23630 \backslash
23631 varunit
23632 \end_layout
23633
23634 \begin_layout Plain Layout
23635
23636 0.40
23637 \backslash
23638 varunit 0.300
23639 \backslash
23640 varunit
23641 \end_layout
23642
23643 \begin_layout Plain Layout
23644
23645 0.35
23646 \backslash
23647 varunit 0.293
23648 \backslash
23649 varunit
23650 \end_layout
23651
23652 \begin_layout Plain Layout
23653
23654 0.30
23655 \backslash
23656 varunit 0.300
23657 \backslash
23658 varunit
23659 \end_layout
23660
23661 \begin_layout Plain Layout
23662
23663 0.25
23664 \backslash
23665 varunit 0.317
23666 \backslash
23667 varunit
23668 \end_layout
23669
23670 \begin_layout Plain Layout
23671
23672 0.20
23673 \backslash
23674 varunit 0.342
23675 \backslash
23676 varunit
23677 \end_layout
23678
23679 \begin_layout Plain Layout
23680
23681 0.15
23682 \backslash
23683 varunit 0.373
23684 \backslash
23685 varunit
23686 \end_layout
23687
23688 \begin_layout Plain Layout
23689
23690 0.10
23691 \backslash
23692 varunit 0.410
23693 \backslash
23694 varunit
23695 \end_layout
23696
23697 \begin_layout Plain Layout
23698
23699 0.05
23700 \backslash
23701 varunit 0.453
23702 \backslash
23703 varunit
23704 \end_layout
23705
23706 \begin_layout Plain Layout
23707
23708 0.00
23709 \backslash
23710 varunit 0.500
23711 \backslash
23712 varunit
23713 \end_layout
23714
23715 \begin_layout Plain Layout
23716
23717 0.05
23718 \backslash
23719 varunit 0.453
23720 \backslash
23721 varunit
23722 \end_layout
23723
23724 \begin_layout Plain Layout
23725
23726 0.10
23727 \backslash
23728 varunit 0.410
23729 \backslash
23730 varunit
23731 \end_layout
23732
23733 \begin_layout Plain Layout
23734
23735 0.15
23736 \backslash
23737 varunit 0.373
23738 \backslash
23739 varunit
23740 \end_layout
23741
23742 \begin_layout Plain Layout
23743
23744 0.20
23745 \backslash
23746 varunit 0.342
23747 \backslash
23748 varunit
23749 \end_layout
23750
23751 \begin_layout Plain Layout
23752
23753 0.25
23754 \backslash
23755 varunit 0.317
23756 \backslash
23757 varunit
23758 \end_layout
23759
23760 \begin_layout Plain Layout
23761
23762 0.30
23763 \backslash
23764 varunit 0.300
23765 \backslash
23766 varunit
23767 \end_layout
23768
23769 \begin_layout Plain Layout
23770
23771 0.35
23772 \backslash
23773 varunit 0.293
23774 \backslash
23775 varunit
23776 \end_layout
23777
23778 \begin_layout Plain Layout
23779
23780 0.40
23781 \backslash
23782 varunit 0.300
23783 \backslash
23784 varunit
23785 \end_layout
23786
23787 \begin_layout Plain Layout
23788
23789 0.45
23790 \backslash
23791 varunit 0.332
23792 \backslash
23793 varunit
23794 \end_layout
23795
23796 \begin_layout Plain Layout
23797
23798 \end_layout
23799
23800 \end_inset
23801
23802 There are times when the tyranny of rectangular paragraphs must be overthrown.
23803  In such situations, a call to the delightful plain TeX command 
23804 \family typewriter
23805
23806 \backslash
23807 parshape
23808 \family default
23809  is called for.
23810  As you can see, completely arbitrary shapes can be laid out with a suitable
23811  set of line length definitions.
23812  While this parshape may look a bit silly and useless, one could conceive
23813  of situations such as finely tuned dropped capitals, word wrapping around
23814  non-rectangular graphics, etc.
23815  which will benefit from such handcrafting.
23816 \end_layout
23817
23818 \begin_layout Standard
23819 \begin_inset VSpace bigskip
23820 \end_inset
23821
23822
23823 \end_layout
23824
23825 \begin_layout Standard
23826 The syntax is 
23827 \family typewriter
23828
23829 \backslash
23830 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23831  #nindent #nlength
23832 \family default
23833 , where 
23834 \family typewriter
23835 numlines
23836 \family default
23837  is the number of lines of text which define the paragraph.
23838  If there turn out to be fewer lines, the shape is truncated; if there are
23839  more, the excess lines have the same dimensions as the last line of the
23840  definition.
23841  The 
23842 \family typewriter
23843 #nindent
23844 \family default
23845  and 
23846 \family typewriter
23847 #nlength
23848 \family default
23849  entries specify the indentation of the line from the left margin, and the
23850  length of the line as measured from that point.
23851  The shape applies only to the current paragraph; everything is reset to
23852  normal for the next paragraph.
23853 \end_layout
23854
23855 \begin_layout Standard
23856 \begin_inset ERT
23857 status collapsed
23858
23859 \begin_layout Plain Layout
23860
23861
23862 \backslash
23863 end{sloppypar}
23864 \end_layout
23865
23866 \end_inset
23867
23868
23869 \end_layout
23870
23871 \begin_layout Bibliography
23872 \begin_inset CommandInset bibitem
23873 LatexCommand bibitem
23874 key "multicol"
23875
23876 \end_inset
23877
23878 Documentation of the LaTeX-package 
23879 \begin_inset CommandInset href
23880 LatexCommand href
23881 name "multicol"
23882 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23883
23884 \end_inset
23885
23886
23887 \begin_inset Index idx
23888 status collapsed
23889
23890 \begin_layout Plain Layout
23891 LaTeX-packages ! multicol
23892 \end_layout
23893
23894 \end_inset
23895
23896
23897 \end_layout
23898
23899 \end_body
23900 \end_document