]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Additional.lyx: update to latest fileformat and correct version number
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 418
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 \justification true
115 \use_refstyle 0
116 \notefontcolor #0000ff
117 \index Index
118 \shortcut idx
119 \color #008000
120 \end_index
121 \secnumdepth 3
122 \tocdepth 3
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
126 \papercolumns 1
127 \papersides 2
128 \paperpagestyle headings
129 \tracking_changes false
130 \output_changes false
131 \html_math_output 0
132 \html_css_as_file 0
133 \html_be_strict true
134 \end_header
135
136 \begin_body
137
138 \begin_layout Title
139 Additional LyX Features
140 \end_layout
141
142 \begin_layout Subtitle
143 Version 2.1.x
144 \end_layout
145
146 \begin_layout Author
147 by the LyX Team
148 \begin_inset Foot
149 status collapsed
150
151 \begin_layout Plain Layout
152 \noindent
153 Principal maintainer of this file is
154 \noun on
155  Richard Heck
156 \noun default
157 .
158  If you have comments or error corrections, please send them to the LyX
159  Documentation mailing list, 
160 \begin_inset Flex Code
161 status collapsed
162
163 \begin_layout Plain Layout
164 \noindent
165 <lyx-docs@lists.lyx.org>
166 \end_layout
167
168 \end_inset
169
170 .
171 \end_layout
172
173 \end_inset
174
175
176 \end_layout
177
178 \begin_layout Standard
179 \begin_inset CommandInset toc
180 LatexCommand tableofcontents
181
182 \end_inset
183
184
185 \end_layout
186
187 \begin_layout Chapter
188 Introduction
189 \end_layout
190
191 \begin_layout Standard
192 This manual is essentially Part II of the 
193 \emph on
194 User's Guide\SpecialChar \@.
195
196 \emph default
197  The reason for separating this document out is simple: the 
198 \emph on
199 User's Guide
200 \emph default
201  is already quite lengthy, and it contains information on all of the basic
202  features one needs to know in order to prepare most documents.
203  However, the LyX Team has worked to make LyX extensible through various
204  configuration files and external packages.
205  That means that if you want to support the Fizzwizzle LaTeX package, you
206  can create a layout file (or module) for it without having to alter LyX
207  itself.
208  We've already had contributions of several new features this way, and some
209  of them are documented here.
210  There are also some more `advanced' features, such as how to control the
211  presentation of bibliographies and how to work with multi-part documents,
212  that are not covered in the 
213 \emph on
214 User's Guide
215 \emph default
216  and are discussed here.
217 \end_layout
218
219 \begin_layout Standard
220 This manual also documents some special features, like fax support, version
221  control, and SGML support, which require additional software to work properly.
222  There is also a chapter on LyX's support for HTML.
223  And lastly, there's a chapter of LaTeX tools and tips, things you can use
224  to spruce up your documents by directly using the powerful features of
225  LaTeX.
226  After all, LyX 
227 \emph on
228 is
229 \emph default
230  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
231 \end_layout
232
233 \begin_layout Standard
234 If you haven't read the 
235 \emph on
236 Introduction
237 \emph default
238  yet, you are definitely in the wrong manual.
239  The 
240 \emph on
241 Introduction
242 \emph default
243  is the first place to go, since it describes the notation and format of
244  all of the manuals.
245  You should also be thoroughly familiar with the 
246 \emph on
247 User's Guide
248 \emph default
249  and all of the basic features of LyX before attempting to read this one.
250 \end_layout
251
252 \begin_layout Standard
253 Since many of the topics in this manual depend heavily on LyX's interaction
254  with LaTeX, this first chapter covers the inner workings of LyX and how
255  to direct LyX to generate exactly the LaTeX code you want.
256  It is obviously for more seasoned LyX users.
257 \end_layout
258
259 \begin_layout Chapter
260 LyX and LaTeX
261 \end_layout
262
263 \begin_layout Section
264 How LyX Uses LaTeX
265 \end_layout
266
267 \begin_layout Standard
268 This chapter is for both TeX-nicians and the LaTeX-curious.
269  In it, we'll explain how LyX and LaTeX work together to produce printable
270  output.
271  This is the only place in any of the manuals where we assume you know something
272  about LaTeX.
273 \end_layout
274
275 \begin_layout Standard
276 At one time, LyX was called a 
277 \begin_inset Quotes eld
278 \end_inset
279
280 WYSIWYM frontend to LaTeX,
281 \begin_inset Quotes erd
282 \end_inset
283
284  but that's no longer true.
285  There are frontends to LaTeX out there.
286 \begin_inset Foot
287 status collapsed
288
289 \begin_layout Plain Layout
290 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
291  There are also the LaTeX modes for vi and emacs, of course.
292 \end_layout
293
294 \end_inset
295
296  These are basically text editors with the ability to run LaTeX and mark
297  any errors in the file you're editing.
298  Although LyX 
299 \emph on
300 is
301 \emph default
302  an editor, and it 
303 \emph on
304 does
305 \emph default
306  run LaTeX, and it also indicates errors in the file, it also does much,
307  much more.
308  For one thing, you don't need to know LaTeX to use LyX effectively.
309  And LyX has added its own extensions to LaTeX.
310  Try the following sometime: select 
311 \begin_inset Flex MenuItem
312 status collapsed
313
314 \begin_layout Plain Layout
315 Export\SpecialChar \menuseparator
316 LaTeX
317 \end_layout
318
319 \end_inset
320
321  from the 
322 \begin_inset Flex MenuItem
323 status collapsed
324
325 \begin_layout Plain Layout
326 File
327 \end_layout
328
329 \end_inset
330
331  menu (or 
332 \begin_inset Flex MenuItem
333 status collapsed
334
335 \begin_layout Plain Layout
336 View\SpecialChar \menuseparator
337 Source
338 \end_layout
339
340 \end_inset
341
342 ), then look at the preamble of the resulting 
343 \begin_inset Flex Code
344 status collapsed
345
346 \begin_layout Plain Layout
347 .tex
348 \end_layout
349
350 \end_inset
351
352  file.
353  You'll notice a variety of new macros defined specifically by LyX.
354  These macros are defined automatically, according to the features you use
355  in the document.
356 \end_layout
357
358 \begin_layout Standard
359 There are several commands that automatically invoke LaTeX.
360  They are:
361 \end_layout
362
363 \begin_layout Itemize
364 \begin_inset Flex MenuItem
365 status collapsed
366
367 \begin_layout Plain Layout
368 View\SpecialChar \menuseparator
369 View
370 \end_layout
371
372 \end_inset
373
374
375 \end_layout
376
377 \begin_layout Itemize
378 \begin_inset Flex MenuItem
379 status collapsed
380
381 \begin_layout Plain Layout
382 View\SpecialChar \menuseparator
383 Update
384 \end_layout
385
386 \end_inset
387
388
389 \end_layout
390
391 \begin_layout Itemize
392 \begin_inset Flex MenuItem
393 status collapsed
394
395 \begin_layout Plain Layout
396 File\SpecialChar \menuseparator
397 Print
398 \end_layout
399
400 \end_inset
401
402
403 \end_layout
404
405 \begin_layout Itemize
406 \begin_inset Flex MenuItem
407 status collapsed
408
409 \begin_layout Plain Layout
410 File\SpecialChar \menuseparator
411 Fax
412 \end_layout
413
414 \end_inset
415
416
417 \end_layout
418
419 \begin_layout Standard
420 They will only invoke LaTeX if the file has changed since the last time
421  LaTeX was run.
422  
423 \end_layout
424
425 \begin_layout Standard
426 When LyX runs LaTeX on the file you're editing, it performs these steps:
427 \end_layout
428
429 \begin_layout Enumerate
430 Convert the document to LaTeX and save to a file with the extension 
431 \begin_inset Flex Code
432 status collapsed
433
434 \begin_layout Plain Layout
435 .tex
436 \end_layout
437
438 \end_inset
439
440  in place of 
441 \begin_inset Flex Code
442 status collapsed
443
444 \begin_layout Plain Layout
445 .lyx
446 \end_layout
447
448 \end_inset
449
450 .
451 \end_layout
452
453 \begin_layout Enumerate
454 Run LaTeX on the 
455 \begin_inset Flex Code
456 status collapsed
457
458 \begin_layout Plain Layout
459 .tex
460 \end_layout
461
462 \end_inset
463
464  file (maybe several times), and run any other commands (such as 
465 \begin_inset Flex Code
466 status collapsed
467
468 \begin_layout Plain Layout
469 bibtex
470 \end_layout
471
472 \end_inset
473
474  or 
475 \begin_inset Flex Code
476 status collapsed
477
478 \begin_layout Plain Layout
479 makeindex
480 \end_layout
481
482 \end_inset
483
484 ) needed to compile the LaTeX file.
485 \end_layout
486
487 \begin_layout Enumerate
488 If there are any errors, show the error log.
489 \end_layout
490
491 \begin_layout Standard
492 If you have run LaTeX using 
493 \begin_inset Flex MenuItem
494 status collapsed
495
496 \begin_layout Plain Layout
497 View
498 \bar under
499 \SpecialChar \menuseparator
500
501 \bar default
502 DVI
503 \end_layout
504
505 \end_inset
506
507 , LyX then runs a DVI viewer to display the DVI-file.
508  If you have used 
509 \begin_inset Flex MenuItem
510 status collapsed
511
512 \begin_layout Plain Layout
513 View
514 \bar under
515 \SpecialChar \menuseparator
516
517 \bar default
518 PostScript
519 \end_layout
520
521 \end_inset
522
523 , LyX performs further steps:
524 \end_layout
525
526 \begin_layout Itemize
527 Run 
528 \begin_inset Flex Code
529 status collapsed
530
531 \begin_layout Plain Layout
532 dvips
533 \end_layout
534
535 \end_inset
536
537  to convert the DVI file to PostScript.
538 \end_layout
539
540 \begin_layout Itemize
541 Run a PostScript viewer, such as 
542 \begin_inset Flex Code
543 status collapsed
544
545 \begin_layout Plain Layout
546 ghostview
547 \end_layout
548
549 \end_inset
550
551 , to display the PostScript file.
552 \end_layout
553
554 \begin_layout Standard
555 LyX does similar things when viewing, or exporting, other formats.
556 \end_layout
557
558 \begin_layout Section
559 Translating LaTeX files into LyX
560 \end_layout
561
562 \begin_layout Standard
563 You can import a LaTeX file into LyX by using the 
564 \begin_inset Flex MenuItem
565 status collapsed
566
567 \begin_layout Plain Layout
568 File\SpecialChar \menuseparator
569 Import\SpecialChar \menuseparator
570 LaTeX
571 \end_layout
572
573 \end_inset
574
575  command in LyX.
576  This will call a program named 
577 \begin_inset Flex Code
578 status collapsed
579
580 \begin_layout Plain Layout
581 tex2lyx
582 \end_layout
583
584 \end_inset
585
586  which will create a file 
587 \begin_inset Flex Code
588 status collapsed
589
590 \begin_layout Plain Layout
591 foo.lyx
592 \end_layout
593
594 \end_inset
595
596  from the file 
597 \begin_inset Flex Code
598 status collapsed
599
600 \begin_layout Plain Layout
601 foo.tex
602 \end_layout
603
604 \end_inset
605
606 .
607  LyX will then open that file.
608 \begin_inset Foot
609 status collapsed
610
611 \begin_layout Plain Layout
612 \begin_inset Flex Code
613 status collapsed
614
615 \begin_layout Plain Layout
616 tex2lyx
617 \end_layout
618
619 \end_inset
620
621  can also be run from the command line, of course.
622 \end_layout
623
624 \end_inset
625
626
627 \end_layout
628
629 \begin_layout Standard
630 \begin_inset Flex Code
631 status collapsed
632
633 \begin_layout Plain Layout
634 tex2lyx
635 \end_layout
636
637 \end_inset
638
639  will translate most legal LaTeX, but not everything.
640  It will put things it doesn't understand into TeX code, so after translating
641  a file with 
642 \begin_inset Flex Code
643 status collapsed
644
645 \begin_layout Plain Layout
646 tex2lyx
647 \end_layout
648
649 \end_inset
650
651 , you can look for TeX code and hand-edit it until it looks right.
652 \end_layout
653
654 \begin_layout Standard
655 If you don't know what TeX code is, read the next section.
656 \end_layout
657
658 \begin_layout Section
659 \begin_inset CommandInset label
660 LatexCommand label
661 name "sec:Inserting-TeX-Code"
662
663 \end_inset
664
665 Inserting TeX Code into LyX Documents 
666 \end_layout
667
668 \begin_layout Standard
669 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
670  You can always insert TeX code into any LyX document.
671  LyX cannot, and will never be able to, display every possible LaTeX construct.
672  If ever you need to insert LaTeX commands into your LyX document, you can
673  use the 
674 \begin_inset Flex Code
675 status collapsed
676
677 \begin_layout Plain Layout
678 TeX Code
679 \end_layout
680
681 \end_inset
682
683  box, which you can insert into your document with 
684 \begin_inset Flex MenuItem
685 status collapsed
686
687 \begin_layout Plain Layout
688 Insert\SpecialChar \menuseparator
689 TeX Code
690 \end_layout
691
692 \end_inset
693
694 .
695 \end_layout
696
697 \begin_layout Standard
698 Here's an example of inserting LaTeX commands in a LyX document.
699  The code looks like this:
700 \end_layout
701
702 \begin_layout LyX-Code
703
704 \backslash
705 begin{tabular}{ll}
706 \begin_inset Newline newline
707 \end_inset
708
709
710 \backslash
711 begin{minipage}{5cm}
712 \begin_inset Newline newline
713 \end_inset
714
715 This is an example for a minipage environment.
716  You 
717 \begin_inset Newline newline
718 \end_inset
719
720 can put nearly everything in it, even (non-floating) 
721 \begin_inset Newline newline
722 \end_inset
723
724 figures and tables.
725  
726 \begin_inset Newline newline
727 \end_inset
728
729
730 \backslash
731 end{minipage}
732 \begin_inset Newline newline
733 \end_inset
734
735 &
736 \begin_inset Newline newline
737 \end_inset
738
739
740 \backslash
741 begin{minipage}{5cm}
742 \begin_inset Newline newline
743 \end_inset
744
745
746 \backslash
747 begin{verbatim}
748 \begin_inset Newline newline
749 \end_inset
750
751
752 \backslash
753 begin{minipage}{5cm}
754 \begin_inset Newline newline
755 \end_inset
756
757 This ...
758  
759 \begin_inset Newline newline
760 \end_inset
761
762
763 \backslash
764 end{minipage}
765 \begin_inset Newline newline
766 \end_inset
767
768
769 \backslash
770 end{verbatim}
771 \begin_inset Newline newline
772 \end_inset
773
774
775 \backslash
776 end{minipage}
777 \begin_inset Newline newline
778 \end_inset
779
780
781 \backslash
782 end{tabular}
783 \end_layout
784
785 \begin_layout LyX-Code
786
787 \end_layout
788
789 \begin_layout Standard
790 The 
791 \begin_inset Flex Code
792 status collapsed
793
794 \begin_layout Plain Layout
795 TeX Code
796 \end_layout
797
798 \end_inset
799
800  box containing this text is directly after this paragraph.
801  Those of you reading the manual in LyX will only see the TeX code inset.
802  Those reading a printed version of the manuals will see the actual results:
803 \end_layout
804
805 \begin_layout Standard
806 \begin_inset ERT
807 status collapsed
808
809 \begin_layout Plain Layout
810
811
812 \backslash
813 begin{tabular}{ll}
814 \end_layout
815
816 \begin_layout Plain Layout
817
818
819 \backslash
820 begin{minipage}{5cm}
821 \end_layout
822
823 \begin_layout Plain Layout
824
825 This is an example for a minipage environment.
826  You can put nearly everything in it, even (non-floating) figures and tables.
827  
828 \end_layout
829
830 \begin_layout Plain Layout
831
832
833 \backslash
834 end{minipage}
835 \end_layout
836
837 \begin_layout Plain Layout
838
839 &
840 \end_layout
841
842 \begin_layout Plain Layout
843
844
845 \backslash
846 begin{minipage}{5cm}
847 \end_layout
848
849 \begin_layout Plain Layout
850
851
852 \backslash
853 begin{verbatim}
854 \end_layout
855
856 \begin_layout Plain Layout
857
858
859 \backslash
860 begin{minipage}{5cm}
861 \end_layout
862
863 \begin_layout Plain Layout
864
865 This ...
866  
867 \end_layout
868
869 \begin_layout Plain Layout
870
871
872 \backslash
873 end{minipage}
874 \end_layout
875
876 \begin_layout Plain Layout
877
878
879 \backslash
880 end{verbatim}
881 \end_layout
882
883 \begin_layout Plain Layout
884
885
886 \backslash
887 end{minipage}
888 \end_layout
889
890 \begin_layout Plain Layout
891
892
893 \backslash
894 end{tabular}
895 \end_layout
896
897 \end_inset
898
899
900 \end_layout
901
902 \begin_layout Standard
903 In addition to using TeX code, you can also create a separate file containing
904  some complex LaTeX structure and then use 
905 \begin_inset Flex MenuItem
906 status collapsed
907
908 \begin_layout Plain Layout
909 Insert\SpecialChar \menuseparator
910 Child
911 \begin_inset space ~
912 \end_inset
913
914 Document
915 \end_layout
916
917 \end_inset
918
919  to include your file (you should select the type 
920 \begin_inset Flex Code
921 status collapsed
922
923 \begin_layout Plain Layout
924 Input
925 \end_layout
926
927 \end_inset
928
929 ).
930  We recommend that you only do this if you have a 
931 \begin_inset Flex Code
932 status collapsed
933
934 \begin_layout Plain Layout
935 .tex
936 \end_layout
937
938 \end_inset
939
940  file which you 
941 \emph on
942 know
943 \emph default
944  works already.
945  Otherwise, you'll have a big job tracking down LaTeX errors.
946 \end_layout
947
948 \begin_layout Standard
949 There are a few last points to emphasize:
950 \end_layout
951
952 \begin_layout Itemize
953 LyX 
954 \emph on
955 does not
956 \emph default
957  check if your LaTeX code is correct.
958 \end_layout
959
960 \begin_layout Itemize
961 Beware reinventing the wheel.
962 \end_layout
963
964 \begin_layout Standard
965 On that last point, LyX does have quite a few features tucked into it, and
966  more are coming.
967  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
968  feature before you decide you have to do it by hand.
969  Moreover, there are numerous LaTeX packages out there to do all sorts of
970  things, from labels to envelopes to fancy multipage tables.
971  Check out 
972 \begin_inset CommandInset href
973 LatexCommand href
974 name "CTAN"
975 target "http://www.ctan.org/"
976
977 \end_inset
978
979  for details.
980 \end_layout
981
982 \begin_layout Standard
983 If you do need to do some wild and fancy things within your document, be
984  sure to check out a good LaTeX book for assistance.
985  There are a number of them listed in the bibliography of the 
986 \emph on
987 User's Guide
988 \emph default
989 .
990 \end_layout
991
992 \begin_layout Section
993 LyX and the LaTeX Preamble
994 \end_layout
995
996 \begin_layout Subsection
997 About the LaTeX Preamble
998 \end_layout
999
1000 \begin_layout Standard
1001 If you already know LaTeX, there is no need to explain here what the preamble
1002  is good for.
1003  If you don't, the following will give you some ideas—we recommend again
1004  that you consult a LaTeX book for further information.
1005  In any case, you should read the points below, because they explain what
1006  you can do and what you don't need to do in the LaTeX preamble of a LyX
1007  document.
1008 \end_layout
1009
1010 \begin_layout Standard
1011 The LaTeX preamble comes at the very beginning of a document, 
1012 \emph on
1013 before
1014 \emph default
1015  the text.
1016  It serves to:
1017 \end_layout
1018
1019 \begin_layout Itemize
1020 Declare the document class.
1021  
1022 \begin_inset Newline newline
1023 \end_inset
1024
1025 LyX already does this for you.
1026  If you're a seasoned LaTeX-nician, and you have a custom document class
1027  you want to use, check out the 
1028 \emph on
1029 Customization Manual
1030 \emph default
1031  for information on how to make LyX interface to it.
1032 \end_layout
1033
1034 \begin_layout Itemize
1035 Declare the usage of packages.
1036  
1037 \begin_inset Newline newline
1038 \end_inset
1039
1040 LaTeX packages provide special commands, which are only available within
1041  a document when the package has been declared in the preamble.
1042  For example, the package 
1043 \begin_inset Flex Code
1044 status collapsed
1045
1046 \begin_layout Plain Layout
1047 indentfirst
1048 \end_layout
1049
1050 \end_inset
1051
1052  forces all paragraphs to be indented.
1053  There are other packages for labels, envelopes, margins, etc.
1054  
1055 \end_layout
1056
1057 \begin_layout Itemize
1058 Set counters, variables, lengths and widths.
1059  
1060 \begin_inset Newline newline
1061 \end_inset
1062
1063 There are several LaTeX counters and variables which 
1064 \emph on
1065 must
1066 \emph default
1067  be set globally from within the preamble in order to have the desired effect.
1068  (There are variables which you can set and reset inside the document, too.)
1069  Margins are a good example of something which must be set in the preamble.
1070  Another example is the label format for lists.
1071  You can actually set these just about anywhere, but it's best to do it
1072  just once, inside the preamble.
1073 \end_layout
1074
1075 \begin_layout Itemize
1076 Declare user defined commands (with 
1077 \begin_inset Flex Code
1078 status collapsed
1079
1080 \begin_layout Plain Layout
1081
1082 \backslash
1083 newcommand
1084 \end_layout
1085
1086 \end_inset
1087
1088  or 
1089 \begin_inset Flex Code
1090 status collapsed
1091
1092 \begin_layout Plain Layout
1093
1094 \backslash
1095 renewcommand
1096 \end_layout
1097
1098 \end_inset
1099
1100 ).
1101 \begin_inset Newline newline
1102 \end_inset
1103
1104 These are abbreviations for LaTeX commands which appear very often inside
1105  a document.
1106  Although the preamble is a good place to declare such commands, they 
1107 \emph on
1108 can
1109 \emph default
1110  be declared anywhere (before they are used for the first time, of course).
1111  This can be useful if there is a lot of raw LaTeX code in your document,
1112  which normally should not be the case.
1113 \end_layout
1114
1115 \begin_layout Standard
1116 LyX adds its own set of definitions to the preamble of the 
1117 \begin_inset Flex Code
1118 status collapsed
1119
1120 \begin_layout Plain Layout
1121 .tex
1122 \end_layout
1123
1124 \end_inset
1125
1126  file it produces.
1127  This makes LaTeX files generated by LyX portable.
1128 \end_layout
1129
1130 \begin_layout Subsection
1131 Changing the Preamble
1132 \end_layout
1133
1134 \begin_layout Standard
1135 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1136  can't change them without patching LyX itself.
1137  You can, however, add your own stuff to the preamble by selecting 
1138 \begin_inset Flex MenuItem
1139 status collapsed
1140
1141 \begin_layout Plain Layout
1142 LaTeX
1143 \begin_inset space ~
1144 \end_inset
1145
1146 Preamble
1147 \end_layout
1148
1149 \end_inset
1150
1151  in the 
1152 \begin_inset Flex MenuItem
1153 status collapsed
1154
1155 \begin_layout Plain Layout
1156 Document\SpecialChar \menuseparator
1157 Settings
1158 \end_layout
1159
1160 \end_inset
1161
1162  dialog.
1163  LyX adds anything in the 
1164 \begin_inset Flex MenuItem
1165 status collapsed
1166
1167 \begin_layout Plain Layout
1168 Preamble
1169 \end_layout
1170
1171 \end_inset
1172
1173  dialog to its own built-in preamble.
1174  Before adding your own declarations in the preamble, you should make sure
1175  that LyX doesn't already support what you want to do.
1176  (Remember what we said about reinventing the wheel?) Also, 
1177 \emph on
1178 make sure your preamble code is correct
1179 \emph default
1180 .
1181  LyX doesn't check it for you.
1182  If there is an error, you're likely to get an error like 
1183 \begin_inset Quotes eld
1184 \end_inset
1185
1186
1187 \begin_inset Flex Code
1188 status collapsed
1189
1190 \begin_layout Plain Layout
1191 Missing 
1192 \backslash
1193 begin{document}
1194 \end_layout
1195
1196 \end_inset
1197
1198
1199 \begin_inset Quotes erd
1200 \end_inset
1201
1202 .
1203  If you see this error, check your preamble.
1204 \end_layout
1205
1206 \begin_layout Subsection
1207 Examples
1208 \end_layout
1209
1210 \begin_layout Standard
1211 Here are some examples of what you can add to a preamble, and what they
1212  do.
1213 \end_layout
1214
1215 \begin_layout Subsubsection
1216 Example #1: Offsets
1217 \end_layout
1218
1219 \begin_layout Standard
1220 There are two variables under LaTeX that control page position: 
1221 \begin_inset Flex Code
1222 status collapsed
1223
1224 \begin_layout Plain Layout
1225
1226 \backslash
1227 hoffset
1228 \end_layout
1229
1230 \end_inset
1231
1232  and 
1233 \begin_inset Flex Code
1234 status collapsed
1235
1236 \begin_layout Plain Layout
1237
1238 \backslash
1239 voffset
1240 \end_layout
1241
1242 \end_inset
1243
1244 .
1245  Their names should be self-explanatory.
1246  These variables are useful if you think for a moment about computer labels.
1247  Sometimes, the size of a print medium and the area of the medium that you
1248  can actually print on aren't the same.
1249  This is where 
1250 \begin_inset Flex Code
1251 status collapsed
1252
1253 \begin_layout Plain Layout
1254
1255 \backslash
1256 hoffset
1257 \end_layout
1258
1259 \end_inset
1260
1261  and 
1262 \begin_inset Flex Code
1263 status collapsed
1264
1265 \begin_layout Plain Layout
1266
1267 \backslash
1268 voffset
1269 \end_layout
1270
1271 \end_inset
1272
1273  come in.
1274 \end_layout
1275
1276 \begin_layout Standard
1277 The default values for 
1278 \begin_inset Flex Code
1279 status collapsed
1280
1281 \begin_layout Plain Layout
1282
1283 \backslash
1284 hoffset
1285 \end_layout
1286
1287 \end_inset
1288
1289  and 
1290 \begin_inset Flex Code
1291 status collapsed
1292
1293 \begin_layout Plain Layout
1294
1295 \backslash
1296 voffset
1297 \end_layout
1298
1299 \end_inset
1300
1301  are both 0
1302 \begin_inset space \thinspace{}
1303 \end_inset
1304
1305 points, i.
1306 \begin_inset space \thinspace{}
1307 \end_inset
1308
1309 e.
1310 \begin_inset space \space{}
1311 \end_inset
1312
1313 the page isn't shifted.
1314  Unfortunately, some DVI drivers always seem to shift the page.
1315  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1316  If you're using LyX on a system that you don't personally maintain, and
1317  your sysadmin is a doofus, 
1318 \begin_inset Flex Code
1319 status collapsed
1320
1321 \begin_layout Plain Layout
1322
1323 \backslash
1324 hoffset
1325 \end_layout
1326
1327 \end_inset
1328
1329  and 
1330 \begin_inset Flex Code
1331 status collapsed
1332
1333 \begin_layout Plain Layout
1334
1335 \backslash
1336 voffset
1337 \end_layout
1338
1339 \end_inset
1340
1341  can save the day.
1342  Suppose your left and top margins are always 0.5
1343 \begin_inset space \thinspace{}
1344 \end_inset
1345
1346 inches too big.
1347  You can add this to the preamble:
1348 \end_layout
1349
1350 \begin_layout LyX-Code
1351
1352 \backslash
1353 setlength{
1354 \backslash
1355 hoffset}{-0.5 in}
1356 \end_layout
1357
1358 \begin_layout LyX-Code
1359
1360 \backslash
1361 setlength{
1362 \backslash
1363 voffset}{-0.5 in}
1364 \end_layout
1365
1366 \begin_layout Standard
1367 and your margins should now be correct.
1368 \end_layout
1369
1370 \begin_layout Subsubsection
1371 Example #2: Labels
1372 \end_layout
1373
1374 \begin_layout Standard
1375 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1376  There's a rather nice package, available at your nearest CTAN archive,
1377  for printing sheets of labels: 
1378 \begin_inset Flex Code
1379 status collapsed
1380
1381 \begin_layout Plain Layout
1382 labels.sty
1383 \end_layout
1384
1385 \end_inset
1386
1387 .
1388  Now, your system may not have this package installed by default.
1389  We leave that up to you to check.
1390  You'll also want to read the documentation for it; we're not going to do
1391  that for you.
1392  Since this is an example, however, we'll give you an example of how you
1393  use this package.
1394 \end_layout
1395
1396 \begin_layout Standard
1397 First, make sure you're using the 
1398 \begin_inset Flex Code
1399 status collapsed
1400
1401 \begin_layout Plain Layout
1402 article
1403 \end_layout
1404
1405 \end_inset
1406
1407  document class.
1408  Next, you need to put the following in your preamble:
1409 \end_layout
1410
1411 \begin_layout LyX-Code
1412
1413 \backslash
1414 usepackage{labels}
1415 \end_layout
1416
1417 \begin_layout LyX-Code
1418
1419 \backslash
1420 LabelCols=3
1421 \end_layout
1422
1423 \begin_layout LyX-Code
1424
1425 \backslash
1426 LabelRows=7
1427 \end_layout
1428
1429 \begin_layout LyX-Code
1430
1431 \backslash
1432 LeftBorder=8mm
1433 \end_layout
1434
1435 \begin_layout LyX-Code
1436
1437 \backslash
1438 RightBorder=8mm
1439 \end_layout
1440
1441 \begin_layout LyX-Code
1442
1443 \backslash
1444 TopBorder=9mm
1445 \end_layout
1446
1447 \begin_layout LyX-Code
1448
1449 \backslash
1450 BottomBorder=2mm
1451 \end_layout
1452
1453 \begin_layout Standard
1454 This sets things up for Avery label sheets, stock #5360.
1455  You're now ready to print labels, but you'll need to insert LaTeX code,
1456  placing the commands 
1457 \begin_inset Flex Code
1458 status collapsed
1459
1460 \begin_layout Plain Layout
1461
1462 \backslash
1463 begin{labels}
1464 \end_layout
1465
1466 \end_inset
1467
1468  and 
1469 \begin_inset Flex Code
1470 status collapsed
1471
1472 \begin_layout Plain Layout
1473
1474 \backslash
1475 end{labels}
1476 \end_layout
1477
1478 \end_inset
1479
1480  around each label text.
1481  This and other special features of 
1482 \begin_inset Flex Code
1483 status collapsed
1484
1485 \begin_layout Plain Layout
1486 labels.sty
1487 \end_layout
1488
1489 \end_inset
1490
1491  are explained in its documentation.
1492 \end_layout
1493
1494 \begin_layout Standard
1495 Someday, someone may write a LyX layout file to support this package directly.
1496  Maybe that someone is you.
1497 \end_layout
1498
1499 \begin_layout Subsubsection
1500 Example #3: Paragraph Indentation
1501 \end_layout
1502
1503 \begin_layout Standard
1504 Americans are trained to indent the first line of 
1505 \emph on
1506 every
1507 \emph default
1508  paragraph.
1509  As with all of their other weird quirks, most Americans will whine and
1510  moan until they can have their way and indent the first line of all paragraphs.
1511  (Yes, we're joking.
1512  (We are?) 
1513 \emph on
1514 Yeah
1515 \emph default
1516 , we are.)
1517 \end_layout
1518
1519 \begin_layout Standard
1520 Of course, this behavior isn't standard typography.
1521  In books, you typically only indent the first line of a paragraph 
1522 \emph on
1523 if
1524 \emph default
1525  it follows another one.
1526  The idea behind indenting the first line of a paragraph is to distinguish
1527  neighboring paragraphs from one another.
1528  If there is no previous paragraph—for example, if it follows a figure or
1529  is the first paragraph in a section—then there is no need for indentation.
1530  
1531 \end_layout
1532
1533 \begin_layout Standard
1534 If you're a typical American (we're still joking!), though, you don't care
1535  about such esoteric things; you want your indentation! Add this to the
1536  preamble:
1537 \end_layout
1538
1539 \begin_layout LyX-Code
1540
1541 \backslash
1542 usepackage{indentfirst}
1543 \end_layout
1544
1545 \begin_layout Standard
1546 If your TeX distribution isn't braindead, you'll have this package, and
1547  all of your paragraphs will get the indentation the Founding Fathers intended
1548  they should have.
1549 \end_layout
1550
1551 \begin_layout Subsubsection
1552 Example #4: This Document
1553 \end_layout
1554
1555 \begin_layout Standard
1556 You can also check out the preamble of this document to get an idea of some
1557  of the advanced things you can do.
1558 \end_layout
1559
1560 \begin_layout Section
1561 LyX and LaTeX Errors
1562 \end_layout
1563
1564 \begin_layout Standard
1565 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1566  going.
1567  It then uses the logfile from the LaTeX run to do a post-mortem.
1568  After analyzing the logfile,LyX displays a dialog listing the errors.
1569  Clicking on any one of them will take you to the position in your LyX file
1570  where the error occurred.
1571 \begin_inset Foot
1572 status collapsed
1573
1574 \begin_layout Plain Layout
1575 Well, usually.
1576  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1577  right line.
1578  There are also cases where LaTeX reports the error on one line, but the
1579  actual error is earlier.
1580  This is not unlike forgetting a closing brace in a program: You'll get
1581  an error, but only later.
1582 \end_layout
1583
1584 \end_inset
1585
1586
1587 \end_layout
1588
1589 \begin_layout Standard
1590 Some folks also like to look at the log file directly: It is available from
1591  
1592 \begin_inset Flex MenuItem
1593 status collapsed
1594
1595 \begin_layout Plain Layout
1596 Document
1597 \bar under
1598 \SpecialChar \menuseparator
1599
1600 \bar default
1601 Latex
1602 \begin_inset space ~
1603 \end_inset
1604
1605 Log
1606 \end_layout
1607
1608 \end_inset
1609
1610 .
1611  There are some fairly common error messages and warnings.
1612  We'll cover those here.
1613  You should look at a good LaTeX book for a complete listing.
1614 \end_layout
1615
1616 \begin_layout Itemize
1617 \begin_inset Flex Code
1618 status collapsed
1619
1620 \begin_layout Plain Layout
1621 LaTeX Warning
1622 \end_layout
1623
1624 \end_inset
1625
1626
1627 \begin_inset Newline newline
1628 \end_inset
1629
1630 Anything beginning with these words is a warning message for the purpose
1631  of 
1632 \begin_inset Quotes eld
1633 \end_inset
1634
1635 debugging
1636 \begin_inset Quotes erd
1637 \end_inset
1638
1639  the LaTeX code itself.
1640  You'll get messages like this if you added or changed cross-references
1641  or bibliography entries, in which case, LaTeX is trying to tell you that
1642  you need to make another run.
1643  You can by-and-large ignore these.
1644 \end_layout
1645
1646 \begin_layout Itemize
1647 \begin_inset Flex Code
1648 status collapsed
1649
1650 \begin_layout Plain Layout
1651 LaTeX Font Warning
1652 \end_layout
1653
1654 \end_inset
1655
1656
1657 \begin_inset Newline newline
1658 \end_inset
1659
1660 Another warning message, this time about fonts which LaTeX couldn't find.
1661  The rest of the message will often say something about a replacement font
1662  that LaTeX used.
1663  You can safely ignore these, too.
1664 \end_layout
1665
1666 \begin_layout Itemize
1667 \begin_inset Flex Code
1668 status collapsed
1669
1670 \begin_layout Plain Layout
1671 Overfull 
1672 \backslash
1673 hbox
1674 \end_layout
1675
1676 \end_inset
1677
1678
1679 \begin_inset Newline newline
1680 \end_inset
1681
1682 LaTeX absolutely 
1683 \emph on
1684 loves
1685 \emph default
1686  to spew these out.
1687  They are warnings about lines that were too long and run past the right
1688  margin.
1689  Almost always, this is unnoticeable in the final output.
1690  (It can be just a point or two.) Or, only one or two characters extend past
1691  the margin.
1692  LaTeX seems to generate at least one of these messages for just about any
1693  document you write.
1694 \begin_inset Newline newline
1695 \end_inset
1696
1697 You can ignore these messages.
1698  Your eyes will tell you if there's a problem with something that's too
1699  wide; just look at the output.
1700 \begin_inset Foot
1701 status collapsed
1702
1703 \begin_layout Plain Layout
1704 You can also enable the `draft' option in 
1705 \begin_inset Flex MenuItem
1706 status collapsed
1707
1708 \begin_layout Plain Layout
1709 Document
1710 \bar under
1711 \SpecialChar \menuseparator
1712
1713 \bar default
1714 Settings
1715 \end_layout
1716
1717 \end_inset
1718
1719 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1720 \end_layout
1721
1722 \end_inset
1723
1724
1725 \end_layout
1726
1727 \begin_layout Itemize
1728 \begin_inset Flex Code
1729 status collapsed
1730
1731 \begin_layout Plain Layout
1732 Underfull 
1733 \backslash
1734 hbox
1735 \end_layout
1736
1737 \end_inset
1738
1739
1740 \begin_inset Newline newline
1741 \end_inset
1742
1743 Not quite as common as its cousin.
1744  LaTeX seems to like to print lines that are a bit too wide as opposed to
1745  ones that are a bit too narrow.
1746  We have no idea why.
1747 \end_layout
1748
1749 \begin_layout Itemize
1750 \begin_inset Flex Code
1751 status collapsed
1752
1753 \begin_layout Plain Layout
1754 Overfull 
1755 \backslash
1756 vbox
1757 \end_layout
1758
1759 \end_inset
1760
1761  and 
1762 \begin_inset Flex Code
1763 status collapsed
1764
1765 \begin_layout Plain Layout
1766 Underfull 
1767 \backslash
1768 vbox
1769 \end_layout
1770
1771 \end_inset
1772
1773
1774 \begin_inset Newline newline
1775 \end_inset
1776
1777 Warnings about troubles breaking the page.
1778  Once again, just look at the output.
1779  Your eyes will tell you where something has gone wrong.
1780 \end_layout
1781
1782 \begin_layout Itemize
1783 \begin_inset Flex Code
1784 status collapsed
1785
1786 \begin_layout Plain Layout
1787  LaTeX Error: File 
1788 \begin_inset Quotes els
1789 \end_inset
1790
1791 Xxxx
1792 \begin_inset Quotes ers
1793 \end_inset
1794
1795  not found
1796 \end_layout
1797
1798 \end_inset
1799
1800
1801 \begin_inset Newline newline
1802 \end_inset
1803
1804 The file 
1805 \begin_inset Quotes eld
1806 \end_inset
1807
1808 Xxxx
1809 \begin_inset Quotes erd
1810 \end_inset
1811
1812  isn't installed on this system.
1813  This usually appears because some package your document needs isn't installed.
1814  If you didn't touch the preamble or didn't use the 
1815 \begin_inset Flex Code
1816 status collapsed
1817
1818 \begin_layout Plain Layout
1819
1820 \backslash
1821 usepackage{}
1822 \end_layout
1823
1824 \end_inset
1825
1826  command, then one of the packages LyX tried to load is missing.
1827  Use 
1828 \begin_inset Flex MenuItem
1829 status collapsed
1830
1831 \begin_layout Plain Layout
1832 Help\SpecialChar \menuseparator
1833 LaTeX Configuration
1834 \end_layout
1835
1836 \end_inset
1837
1838  to get a list of packages that LyX knows about.
1839  This file is updated whenever you reconfigure LyX (using 
1840 \begin_inset Flex MenuItem
1841 status collapsed
1842
1843 \begin_layout Plain Layout
1844 Tools\SpecialChar \menuseparator
1845 Reconfigure
1846 \end_layout
1847
1848 \end_inset
1849
1850 ) and tells you which packages have been detected and what they do.
1851 \begin_inset Newline newline
1852 \end_inset
1853
1854 If you did use the 
1855 \begin_inset Flex Code
1856 status collapsed
1857
1858 \begin_layout Plain Layout
1859
1860 \backslash
1861 usepackage{}
1862 \end_layout
1863
1864 \end_inset
1865
1866  command and the package in question isn't installed, then you'll need to
1867  install it yourself.
1868 \end_layout
1869
1870 \begin_layout Itemize
1871 \begin_inset Flex Code
1872 status collapsed
1873
1874 \begin_layout Plain Layout
1875 LaTeX Error: Unknown option
1876 \end_layout
1877
1878 \end_inset
1879
1880
1881 \begin_inset Newline newline
1882 \end_inset
1883
1884 Error messages beginning with this are trying to tell you that you specified
1885  a bad or undefined option to a package.
1886  Check the package's documentation.
1887 \end_layout
1888
1889 \begin_layout Itemize
1890 \begin_inset Flex Code
1891 status collapsed
1892
1893 \begin_layout Plain Layout
1894 Undefined control sequence
1895 \end_layout
1896
1897 \end_inset
1898
1899
1900 \begin_inset Newline newline
1901 \end_inset
1902
1903 If you've inserted LaTeX code into your document, but made a typo, you'll
1904  get one of these.
1905  You may have forgotten to load a package.
1906  In any case, this error message usually means that you used an undefined
1907  command.
1908  
1909 \end_layout
1910
1911 \begin_layout Standard
1912 There are other error and warning messages.
1913  Some are self-explanatory.
1914  These are usually LaTeX messages.
1915  Others are downright cryptic.
1916  These are usually TeX error messages, and we really have 
1917 \emph on
1918 no clue
1919 \emph default
1920  what they mean or how to decipher them.
1921  No-one does.
1922 \end_layout
1923
1924 \begin_layout Standard
1925 There's a general sequence you should follow if you get error messages:
1926 \end_layout
1927
1928 \begin_layout Enumerate
1929 Look at the LaTeX code you inserted for typos.
1930 \end_layout
1931
1932 \begin_layout Enumerate
1933 If there are no typos, check that you used the command(s) correctly.
1934 \end_layout
1935
1936 \begin_layout Enumerate
1937 If you get a bunch of error boxes piled up at the very top of the document—and
1938  especially if you see a 
1939 \begin_inset Quotes eld
1940 \end_inset
1941
1942
1943 \begin_inset Flex Code
1944 status collapsed
1945
1946 \begin_layout Plain Layout
1947 Missing 
1948 \backslash
1949 begin{document}
1950 \end_layout
1951
1952 \end_inset
1953
1954
1955 \begin_inset Quotes erd
1956 \end_inset
1957
1958  error—it means that there are errors in the preamble.
1959  Start debugging your preamble.
1960 \end_layout
1961
1962 \begin_layout Enumerate
1963 If you didn't add anything to the preamble and didn't add any LaTeX code
1964  to the document, the first suspect is your LaTeX distribution itself.
1965  Check for missing packages and install them.
1966 \end_layout
1967
1968 \begin_layout Enumerate
1969 Okay, so there are no missing packages.
1970  Did you use any of the fine-tuning options in LyX? Specifically, did you
1971  
1972 \emph on
1973 misuse
1974 \emph default
1975  any of them, like trying to manually insert lots of 
1976 \begin_inset Flex Code
1977 status collapsed
1978
1979 \begin_layout Plain Layout
1980 Protected
1981 \begin_inset space ~
1982 \end_inset
1983
1984 Blanks
1985 \end_layout
1986
1987 \end_inset
1988
1989
1990 \begin_inset Flex Code
1991 status collapsed
1992
1993 \begin_layout Plain Layout
1994 Linebreaks
1995 \end_layout
1996
1997 \end_inset
1998
1999 , or 
2000 \begin_inset Flex Code
2001 status collapsed
2002
2003 \begin_layout Plain Layout
2004 Pagebreaks
2005 \end_layout
2006
2007 \end_inset
2008
2009 ? Did you try to kludge something together with these instead of using the
2010  appropriate paragraph environment?
2011 \end_layout
2012
2013 \begin_layout Enumerate
2014 All right, you didn't use any of the fine-tuning options, you played by
2015  the rules.
2016  Did you try to pull a fancy maneuver? Did you do something funky inside
2017  a table or an equation, like inserting a graphic into a table cell?
2018 \end_layout
2019
2020 \begin_layout Enumerate
2021 Do you have long sections of text where LaTeX cannot find a place to break
2022  a line? By default, LaTeX is rather strict about how much extra inter-word
2023  spacing it will add in order to break a line.
2024  Preferably, you should rework the paragraph to avoid the problem.
2025  If this isn't an option, you can wrap your text in 
2026 \begin_inset Flex Code
2027 status collapsed
2028
2029 \begin_layout Plain Layout
2030
2031 \backslash
2032 sloppypar
2033 \end_layout
2034
2035 \end_inset
2036
2037  to make LaTeX's line breaking more, well, sloppy.
2038 \end_layout
2039
2040 \begin_layout Enumerate
2041 Did you go overboard with the nesting? LyX (currently) doesn't check to
2042  make sure you're in the limits for nesting environments.
2043  If you nested a bunch of environments to the 
2044 \begin_inset Formula $17^{\mathrm{th}}$
2045 \end_inset
2046
2047  level, that's the problem.
2048  (The limit in LaTeX is five.)
2049 \end_layout
2050
2051 \begin_layout Enumerate
2052 Okay, you didn't get any error messages, but your output looks awful.
2053  If you have a table or figure that's too wide or long for the page, you
2054  need to:
2055 \end_layout
2056
2057 \begin_deeper
2058 \begin_layout Enumerate
2059 rescale the figure so it fits.
2060 \end_layout
2061
2062 \begin_layout Enumerate
2063 trim down the table so it fits.
2064 \end_layout
2065
2066 \end_deeper
2067 \begin_layout Enumerate
2068 If something else is wrong with the output, and you didn't try to pull anything
2069  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2070 \end_layout
2071
2072 \begin_layout Standard
2073 If all this doesn't help—well, then 
2074 \emph on
2075 perhaps
2076 \emph default
2077  you might have found a bug in LyX\SpecialChar \ldots{}
2078 .
2079 \end_layout
2080
2081 \begin_layout Chapter
2082 Supplemental Tools
2083 \end_layout
2084
2085 \begin_layout Section
2086 Customizing Bibliographies with BibTeX
2087 \end_layout
2088
2089 \begin_layout Standard
2090 The most basic information about how to use BibTeX with LyX is contained
2091  in the section 
2092 \emph on
2093 Bibliography databases (BibTeX)
2094 \emph default
2095  of the 
2096 \emph on
2097 User's Guide
2098 \emph default
2099 .
2100  The following subsections explain special bibliography features supported
2101  by LyX.
2102 \end_layout
2103
2104 \begin_layout Subsection
2105 Alternative Citation Styles
2106 \end_layout
2107
2108 \begin_layout Standard
2109 Standard BibTeX uses numbers (e.
2110 \begin_inset space \thinspace{}
2111 \end_inset
2112
2113 g.
2114 \begin_inset space \space{}
2115 \end_inset
2116
2117
2118 \begin_inset Quotes eld
2119 \end_inset
2120
2121 [12]
2122 \begin_inset Quotes erd
2123 \end_inset
2124
2125 ) to refer to a cited work.
2126  However, in many scientific disciplines, other citation styles are in use.
2127  The most common one is the author-year style (e.
2128 \begin_inset space \thinspace{}
2129 \end_inset
2130
2131 g.
2132 \begin_inset space \space{}
2133 \end_inset
2134
2135
2136 \begin_inset Quotes eld
2137 \end_inset
2138
2139 Knuth 1984a
2140 \begin_inset Quotes erd
2141 \end_inset
2142
2143 ).
2144  LyX supports two packages that provide this style, 
2145 \begin_inset Flex Code
2146 status collapsed
2147
2148 \begin_layout Plain Layout
2149 natbib
2150 \end_layout
2151
2152 \end_inset
2153
2154  and 
2155 \begin_inset Flex Code
2156 status collapsed
2157
2158 \begin_layout Plain Layout
2159 jurabib
2160 \end_layout
2161
2162 \end_inset
2163
2164 .
2165  Both packages have their pros and cons, which cannot be listed in detail.
2166  If you only want to have simple author-year (or author-numerical) style,
2167  or if you want to use one of the countless style files for 
2168 \begin_inset Flex Code
2169 status collapsed
2170
2171 \begin_layout Plain Layout
2172 natbib
2173 \end_layout
2174
2175 \end_inset
2176
2177 , than the established 
2178 \begin_inset Flex Code
2179 status collapsed
2180
2181 \begin_layout Plain Layout
2182 natbib
2183 \end_layout
2184
2185 \end_inset
2186
2187  package is probably your choice.
2188  If you need special features like short title references, ibidem etc., you
2189  might consider the 
2190 \begin_inset Flex Code
2191 status collapsed
2192
2193 \begin_layout Plain Layout
2194 jurabib
2195 \end_layout
2196
2197 \end_inset
2198
2199  package.
2200 \end_layout
2201
2202 \begin_layout Standard
2203 The handling of both packages in LyX is basically the same.
2204  Go to 
2205 \begin_inset Flex MenuItem
2206 status collapsed
2207
2208 \begin_layout Plain Layout
2209 Document\SpecialChar \menuseparator
2210 Settings
2211 \end_layout
2212
2213 \end_inset
2214
2215  and select under 
2216 \begin_inset Flex MenuItem
2217 status collapsed
2218
2219 \begin_layout Plain Layout
2220 Bibliography
2221 \end_layout
2222
2223 \end_inset
2224
2225  the option 
2226 \begin_inset Flex MenuItem
2227 status collapsed
2228
2229 \begin_layout Plain Layout
2230 Natbib
2231 \end_layout
2232
2233 \end_inset
2234
2235  or 
2236 \begin_inset Flex MenuItem
2237 status collapsed
2238
2239 \begin_layout Plain Layout
2240 Jurabib
2241 \end_layout
2242
2243 \end_inset
2244
2245 .
2246  With both packages, you will get some extra features in the citation dialog
2247  and you can select the style of the reference (
2248 \begin_inset Quotes eld
2249 \end_inset
2250
2251 Knuth 1984
2252 \begin_inset Quotes erd
2253 \end_inset
2254
2255
2256 \begin_inset Quotes eld
2257 \end_inset
2258
2259 Knuth (1984)
2260 \begin_inset Quotes erd
2261 \end_inset
2262
2263
2264 \begin_inset Quotes eld
2265 \end_inset
2266
2267 Knuth, 1984
2268 \begin_inset Quotes erd
2269 \end_inset
2270
2271
2272 \begin_inset Quotes eld
2273 \end_inset
2274
2275 1984
2276 \begin_inset Quotes erd
2277 \end_inset
2278
2279  etc.).
2280  Note that both packages need specifically designed style files.
2281  They both ship their own, but there are lots of additional style files,
2282  and there is even an interactive style file builder
2283 \begin_inset Foot
2284 status collapsed
2285
2286 \begin_layout Plain Layout
2287 See 
2288 \begin_inset Flex URL
2289 status open
2290
2291 \begin_layout Plain Layout
2292
2293 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2294 \end_layout
2295
2296 \end_inset
2297
2298
2299 \end_layout
2300
2301 \end_inset
2302
2303  for 
2304 \begin_inset Flex Code
2305 status collapsed
2306
2307 \begin_layout Plain Layout
2308 natbib
2309 \end_layout
2310
2311 \end_inset
2312
2313 .
2314 \end_layout
2315
2316 \begin_layout Subsection
2317 Sectioned Bibliographies
2318 \end_layout
2319
2320 \begin_layout Standard
2321 Sometimes you might need to divide your bibliography into several sections.
2322  If you are for instance a historian, the possibility to separate sources
2323  and scientific works is most likely a 
2324 \begin_inset Quotes eld
2325 \end_inset
2326
2327 must have
2328 \begin_inset Quotes erd
2329 \end_inset
2330
2331 .
2332  Unfortunately, BibTeX itself does not allow you to do this.
2333  But with the help of some LaTeX packages, BibTeX can be extended to fit
2334  your needs.
2335 \end_layout
2336
2337 \begin_layout Standard
2338 LyX provides native support for one of these packages, 
2339 \family typewriter
2340 bibtopic
2341 \family default
2342 .
2343 \begin_inset Foot
2344 status collapsed
2345
2346 \begin_layout Plain Layout
2347 Available from 
2348 \begin_inset Flex URL
2349 status open
2350
2351 \begin_layout Plain Layout
2352
2353 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2354 \end_layout
2355
2356 \end_inset
2357
2358
2359 \end_layout
2360
2361 \end_inset
2362
2363  The advantage of this package (compared to other packages like 
2364 \family typewriter
2365 multibib
2366 \family default
2367 ) is that you don't need to define new citation commands.
2368  Instead, you need to prepare different bibliographic databases which include
2369  the entries for the different sections of the bibliography.
2370  For example: If you want to divide your bibliography into the sections
2371  
2372 \begin_inset Quotes eld
2373 \end_inset
2374
2375 Sources
2376 \begin_inset Quotes erd
2377 \end_inset
2378
2379  and 
2380 \begin_inset Quotes eld
2381 \end_inset
2382
2383 Scientific works
2384 \begin_inset Quotes erd
2385 \end_inset
2386
2387 , you first need to create two bibliographic databases, e.
2388 \begin_inset space \thinspace{}
2389 \end_inset
2390
2391 g.
2392 \begin_inset space \space{}
2393 \end_inset
2394
2395
2396 \begin_inset Flex Code
2397 status collapsed
2398
2399 \begin_layout Plain Layout
2400 sources.bib
2401 \end_layout
2402
2403 \end_inset
2404
2405  and 
2406 \begin_inset Flex Code
2407 status collapsed
2408
2409 \begin_layout Plain Layout
2410 scientific.bib
2411 \end_layout
2412
2413 \end_inset
2414
2415 .
2416  
2417 \end_layout
2418
2419 \begin_layout Standard
2420 Go to 
2421 \begin_inset Flex MenuItem
2422 status collapsed
2423
2424 \begin_layout Plain Layout
2425 Document\SpecialChar \menuseparator
2426 Settings
2427 \end_layout
2428
2429 \end_inset
2430
2431  and check under 
2432 \begin_inset Flex MenuItem
2433 status collapsed
2434
2435 \begin_layout Plain Layout
2436 Bibliography
2437 \end_layout
2438
2439 \end_inset
2440
2441  the option 
2442 \begin_inset Flex MenuItem
2443 status collapsed
2444
2445 \begin_layout Plain Layout
2446 Sectioned bibliography
2447 \end_layout
2448
2449 \end_inset
2450
2451 .
2452  Now you can insert multiple BibTeX bibliographies, one for each section
2453  of your bibliography.
2454  Returning to our example: Insert the BibTeX bibliography 
2455 \begin_inset Flex Code
2456 status collapsed
2457
2458 \begin_layout Plain Layout
2459 sources.bib
2460 \end_layout
2461
2462 \end_inset
2463
2464  and a second one for the database 
2465 \begin_inset Flex Code
2466 status collapsed
2467
2468 \begin_layout Plain Layout
2469 scientific.bib
2470 \end_layout
2471
2472 \end_inset
2473
2474 .
2475  You are free to use the same or different styles for each section.
2476  Additionally, you can chose if the bibliography section should contain
2477  
2478 \begin_inset Quotes eld
2479 \end_inset
2480
2481 all cited references
2482 \begin_inset Quotes erd
2483 \end_inset
2484
2485  of the specified database(s) (which is the default), 
2486 \begin_inset Quotes eld
2487 \end_inset
2488
2489 all uncited references
2490 \begin_inset Quotes erd
2491 \end_inset
2492
2493  or even 
2494 \begin_inset Quotes eld
2495 \end_inset
2496
2497 all references
2498 \begin_inset Quotes erd
2499 \end_inset
2500
2501 .
2502  This might be useful if you would like to separate your bibliography into
2503  three sections: 
2504 \begin_inset Quotes eld
2505 \end_inset
2506
2507 Cited sources
2508 \begin_inset Quotes erd
2509 \end_inset
2510
2511
2512 \begin_inset Quotes eld
2513 \end_inset
2514
2515 Uncited sources
2516 \begin_inset Quotes erd
2517 \end_inset
2518
2519 , and 
2520 \begin_inset Quotes eld
2521 \end_inset
2522
2523 Scientific works
2524 \begin_inset Quotes erd
2525 \end_inset
2526
2527 .
2528  The titles for the sections can be added as ordinary sections or subsections.
2529  Since 
2530 \begin_inset Flex Code
2531 status collapsed
2532
2533 \begin_layout Plain Layout
2534 bibtopic
2535 \end_layout
2536
2537 \end_inset
2538
2539  removes the bibliography title, you have manually re-add that, too (as
2540  a chapter* or section*, for instance).
2541 \end_layout
2542
2543 \begin_layout Subsection
2544 Multiple Bibliographies
2545 \end_layout
2546
2547 \begin_layout Standard
2548 Multiple bibliographies, e.
2549 \begin_inset space \thinspace{}
2550 \end_inset
2551
2552 g.
2553 \begin_inset space \space{}
2554 \end_inset
2555
2556 a bibliography for each section or chapter of the document, are not supported
2557  by BibTeX itself.
2558  But the 
2559 \begin_inset Flex Code
2560 status collapsed
2561
2562 \begin_layout Plain Layout
2563 bibtopic
2564 \end_layout
2565
2566 \end_inset
2567
2568  package, which is used for the creation of sectioned bibliographies in
2569  LyX (see the previous section), provides an easy way to solve this task,
2570  if you are willing to use some 
2571 \begin_inset Flex MenuItem
2572 status collapsed
2573
2574 \begin_layout Plain Layout
2575 TeX Code
2576 \end_layout
2577
2578 \end_inset
2579
2580  (see section
2581 \begin_inset space ~
2582 \end_inset
2583
2584
2585 \begin_inset CommandInset ref
2586 LatexCommand ref
2587 reference "sec:Inserting-TeX-Code"
2588
2589 \end_inset
2590
2591 ).
2592 \begin_inset Foot
2593 status collapsed
2594
2595 \begin_layout Plain Layout
2596 An alternative approach is to use the 
2597 \begin_inset Flex Code
2598 status collapsed
2599
2600 \begin_layout Plain Layout
2601 chapterbib
2602 \end_layout
2603
2604 \end_inset
2605
2606  or 
2607 \begin_inset Flex Code
2608 status collapsed
2609
2610 \begin_layout Plain Layout
2611 bibunits
2612 \end_layout
2613
2614 \end_inset
2615
2616  package, respectively.
2617 \end_layout
2618
2619 \end_inset
2620
2621
2622 \end_layout
2623
2624 \begin_layout Standard
2625 First go to 
2626 \begin_inset Flex MenuItem
2627 status collapsed
2628
2629 \begin_layout Plain Layout
2630 Document\SpecialChar \menuseparator
2631 Settings
2632 \end_layout
2633
2634 \end_inset
2635
2636  and under 
2637 \begin_inset Flex MenuItem
2638 status collapsed
2639
2640 \begin_layout Plain Layout
2641 Bibliography
2642 \end_layout
2643
2644 \end_inset
2645
2646  check 
2647 \begin_inset Flex MenuItem
2648 status collapsed
2649
2650 \begin_layout Plain Layout
2651 Sectioned bibliography
2652 \end_layout
2653
2654 \end_inset
2655
2656 .
2657  In the document, you have to enclose the sections, which shall contain
2658  their own bibliography (including the BibTeX bibliography itself), between
2659  
2660 \begin_inset Flex Code
2661 status collapsed
2662
2663 \begin_layout Plain Layout
2664
2665 \backslash
2666 begin{btUnit}
2667 \end_layout
2668
2669 \end_inset
2670
2671  and 
2672 \begin_inset Flex Code
2673 status collapsed
2674
2675 \begin_layout Plain Layout
2676
2677 \backslash
2678 end{btUnit}
2679 \end_layout
2680
2681 \end_inset
2682
2683  (those commands have to be inserted as TeX code).
2684  The bibliography will contain all references which have been cited in the
2685  current 
2686 \begin_inset Flex Code
2687 status collapsed
2688
2689 \begin_layout Plain Layout
2690 btUnit
2691 \end_layout
2692
2693 \end_inset
2694
2695 .
2696  
2697 \series bold
2698 Note:
2699 \series default
2700  If you are using this approach, then every citation reference has to be
2701  inside some 
2702 \begin_inset Flex Code
2703 status collapsed
2704
2705 \begin_layout Plain Layout
2706 btUnit
2707 \end_layout
2708
2709 \end_inset
2710
2711 .
2712  Also, the 
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 s cannot be nested.
2723 \end_layout
2724
2725 \begin_layout Section
2726 Multipart Documents
2727 \end_layout
2728
2729 \begin_layout Subsection
2730 General Operation
2731 \end_layout
2732
2733 \begin_layout Standard
2734 When you are working on a large file with many sections, it is often convenient
2735  to break up the document into several files, or perhaps you have something
2736  where a table may change from time to time, but the preceding text does
2737  not.
2738  In these cases, you should seriously consider using multipart documents.
2739  For example, scientific papers often have five major sections: the introduction
2740 , observations, results, discussion, and conclusion.
2741  Each of these could be its own separate LyX file, with one 
2742 \begin_inset Quotes eld
2743 \end_inset
2744
2745 master
2746 \begin_inset Quotes erd
2747 \end_inset
2748
2749  file which contains the title, authors, abstract, references, etc., plus
2750  the five included files.
2751  It is important to note that each of these files is a full LyX file which
2752  can be formatted and printed on its own, as well as included in a master
2753  file.
2754  Each of these files must have the same document class, however—don't attempt
2755  to mix book classes with article classes.
2756  You may also include LaTeX files; however, these files must not have their
2757  own preamble (i.
2758 \begin_inset space \thinspace{}
2759 \end_inset
2760
2761 g.
2762 \begin_inset space \space{}
2763 \end_inset
2764
2765 everything up to and including the 
2766 \begin_inset Flex Code
2767 status collapsed
2768
2769 \begin_layout Plain Layout
2770
2771 \backslash
2772 begin{document}
2773 \end_layout
2774
2775 \end_inset
2776
2777  line as well as the 
2778 \begin_inset Flex Code
2779 status collapsed
2780
2781 \begin_layout Plain Layout
2782
2783 \backslash
2784 end{document}
2785 \end_layout
2786
2787 \end_inset
2788
2789  line must be deleted) or else errors will be generated when you try to
2790  make a DVI file.
2791 \end_layout
2792
2793 \begin_layout Standard
2794 LyX allows you to include files quite easily with 
2795 \begin_inset Flex MenuItem
2796 status collapsed
2797
2798 \begin_layout Plain Layout
2799 Insert\SpecialChar \menuseparator
2800 ChiId
2801 \begin_inset space ~
2802 \end_inset
2803
2804 Document
2805 \end_layout
2806
2807 \end_inset
2808
2809 .
2810  When you click on this selection a small box is inserted into the file
2811  at the current cursor location.
2812  Clicking on the box raises a dialog which allows you to select the file
2813  to be included, and the method of its inclusion.
2814  
2815 \end_layout
2816
2817 \begin_layout Standard
2818 The file selection box should by now be obvious.
2819  The three inclusion methods are 
2820 \begin_inset Quotes eld
2821 \end_inset
2822
2823 include
2824 \begin_inset Quotes erd
2825 \end_inset
2826
2827
2828 \begin_inset Quotes eld
2829 \end_inset
2830
2831 input
2832 \begin_inset Quotes erd
2833 \end_inset
2834
2835 , and 
2836 \begin_inset Quotes eld
2837 \end_inset
2838
2839 verbatim
2840 \begin_inset Quotes erd
2841 \end_inset
2842
2843 .
2844  The difference between 
2845 \begin_inset Quotes eld
2846 \end_inset
2847
2848 include
2849 \begin_inset Quotes erd
2850 \end_inset
2851
2852  and 
2853 \begin_inset Quotes eld
2854 \end_inset
2855
2856 input
2857 \begin_inset Quotes erd
2858 \end_inset
2859
2860  is really only meaningful to LaTeXperts, but the practical difference is
2861  that files which are 
2862 \begin_inset Quotes eld
2863 \end_inset
2864
2865 included
2866 \begin_inset Quotes erd
2867 \end_inset
2868
2869  are typeset beginning on a new page, while files which are 
2870 \begin_inset Quotes eld
2871 \end_inset
2872
2873 inputted
2874 \begin_inset Quotes erd
2875 \end_inset
2876
2877  are typeset starting on the current page.
2878 \end_layout
2879
2880 \begin_layout Standard
2881 Generally, the master file is converted into a full LaTeX file before typesettin
2882 g, while the included files are converted to LaTeX files which do not have
2883  all the preamble information.
2884 \end_layout
2885
2886 \begin_layout Standard
2887
2888 \begin_inset Quotes eld
2889 \end_inset
2890
2891 verbatim
2892 \begin_inset Quotes erd
2893 \end_inset
2894
2895  included file allows you to include a file typeset exactly as it appears
2896  in the file, i.
2897 \begin_inset space \thinspace{}
2898 \end_inset
2899
2900 g.
2901 \begin_inset space \space{}
2902 \end_inset
2903
2904 in 
2905 \begin_inset Flex Code
2906 status collapsed
2907
2908 \begin_layout Plain Layout
2909 verbatim
2910 \end_layout
2911
2912 \end_inset
2913
2914  mode, with the characters set in a fixed-width typewriter font.
2915  Normally, spaces in this file are invisible, though two consecutive spaces
2916  are conserved, unlike LyX's normal treatment of spaces.
2917  However, setting the 
2918 \begin_inset Flex MenuItem
2919 status collapsed
2920
2921 \begin_layout Plain Layout
2922 Mark
2923 \begin_inset space ~
2924 \end_inset
2925
2926 spaces
2927 \begin_inset space ~
2928 \end_inset
2929
2930 in
2931 \begin_inset space ~
2932 \end_inset
2933
2934 output
2935 \end_layout
2936
2937 \end_inset
2938
2939  checkbox typesets a mark to unambiguously define the presence of a space.
2940  
2941 \end_layout
2942
2943 \begin_layout Subsection
2944 Cross-References Between Files
2945 \end_layout
2946
2947 \begin_layout Standard
2948 \begin_inset Box Shadowbox
2949 position "t"
2950 hor_pos "c"
2951 has_inner_box 1
2952 inner_pos "t"
2953 use_parbox 0
2954 use_makebox 0
2955 width "100col%"
2956 special "none"
2957 height "1in"
2958 height_special "totalheight"
2959 status open
2960
2961 \begin_layout Plain Layout
2962 This section is somewhat out of date.
2963  Need to describe default master documents and how children are opened when
2964  the master is.
2965  [[FIXME]]
2966 \end_layout
2967
2968 \end_inset
2969
2970
2971 \end_layout
2972
2973 \begin_layout Standard
2974 It is possible to set up cross-references between the different files.
2975  First, open all the files in question: let's call them A and B in a two
2976  file example, where B is included in A.
2977  Let's say you insert a label in A, then want to reference it in B.
2978  Open the cross-reference dialog in whilst in document B, and you can select
2979  the 
2980 \begin_inset Quotes eld
2981 \end_inset
2982
2983 buffer
2984 \begin_inset Quotes erd
2985 \end_inset
2986
2987  to use.
2988 \end_layout
2989
2990 \begin_layout Subsection
2991 Bibliography Lists in all Subdocuments
2992 \end_layout
2993
2994 \begin_layout Standard
2995 \begin_inset Box Frameless
2996 position "t"
2997 hor_pos "c"
2998 has_inner_box 1
2999 inner_pos "t"
3000 use_parbox 0
3001 use_makebox 0
3002 width "100col%"
3003 special "none"
3004 height "1in"
3005 height_special "totalheight"
3006 status open
3007
3008 \begin_layout Plain Layout
3009 This section also needs updating.
3010  There is now material about this on the wiki, and it could be copied here.
3011 \end_layout
3012
3013 \end_inset
3014
3015
3016 \end_layout
3017
3018 \begin_layout Standard
3019 Copy the bibliography list with all entries to all subdocuments and transform
3020  them to a comment.
3021  This way LyX will find the 
3022 \begin_inset Flex Code
3023 status collapsed
3024
3025 \begin_layout Plain Layout
3026 .bib
3027 \end_layout
3028
3029 \end_inset
3030
3031 -files and you can easily insert references without making the bibliography
3032  list visible.
3033 \end_layout
3034
3035 \begin_layout Standard
3036 As the bibliography list is in a comment, LaTeX won't use use it and the
3037  references will look like this: [?], instead of like this: [1].
3038  One solution is to use the LaTeX-package 
3039 \begin_inset Flex Code
3040 status collapsed
3041
3042 \begin_layout Plain Layout
3043 comment
3044 \end_layout
3045
3046 \end_inset
3047
3048  that will only include comments by processing the files separately.
3049  To do this, add in the LaTeX preamble of every subdocument the following:
3050 \end_layout
3051
3052 \begin_layout LyX-Code
3053
3054 \backslash
3055 usepackage{comment}
3056 \end_layout
3057
3058 \begin_layout LyX-Code
3059
3060 \backslash
3061 includecomment{comment}
3062 \end_layout
3063
3064 \begin_layout Standard
3065 See also 
3066 \begin_inset Flex URL
3067 status collapsed
3068
3069 \begin_layout Plain Layout
3070
3071 http://wiki.lyx.org/FAQ/Unsorted#toc31
3072 \end_layout
3073
3074 \end_inset
3075
3076 .
3077 \end_layout
3078
3079 \begin_layout Section
3080 LyX Archives
3081 \end_layout
3082
3083 \begin_layout Standard
3084 Users sometimes need to be able to 
3085 \begin_inset Quotes eld
3086 \end_inset
3087
3088 bundle
3089 \begin_inset Quotes erd
3090 \end_inset
3091
3092  a LyX file together with all the images (and other files) on which it depends,
3093  either for sending to a publisher or for sharing with a co-author.
3094  LyX 2.0 includes a Python script (
3095 \begin_inset Flex Code
3096 status collapsed
3097
3098 \begin_layout Plain Layout
3099 lyxpak.py
3100 \end_layout
3101
3102 \end_inset
3103
3104 ) that automates this process.
3105  To use it, you must have either the 
3106 \begin_inset Flex Code
3107 status collapsed
3108
3109 \begin_layout Plain Layout
3110 zipfile
3111 \end_layout
3112
3113 \end_inset
3114
3115  or 
3116 \begin_inset Flex Code
3117 status collapsed
3118
3119 \begin_layout Plain Layout
3120 tarfile
3121 \end_layout
3122
3123 \end_inset
3124
3125  python modules installed on your system.
3126  By default, the script prefers the 
3127 \begin_inset Flex Code
3128 status collapsed
3129
3130 \begin_layout Plain Layout
3131 gzip
3132 \end_layout
3133
3134 \end_inset
3135
3136 -compressed 
3137 \begin_inset Flex Code
3138 status collapsed
3139
3140 \begin_layout Plain Layout
3141 tar
3142 \end_layout
3143
3144 \end_inset
3145
3146  format on Unix-like systems and the 
3147 \begin_inset Flex Code
3148 status collapsed
3149
3150 \begin_layout Plain Layout
3151 zip
3152 \end_layout
3153
3154 \end_inset
3155
3156  format on Windows.
3157 \end_layout
3158
3159 \begin_layout Standard
3160 LyX's configuration process will set the script up to export a `LyX Archive',
3161  and this format will then be available under 
3162 \begin_inset Flex Code
3163 status collapsed
3164
3165 \begin_layout Plain Layout
3166 File\SpecialChar \menuseparator
3167 Export
3168 \end_layout
3169
3170 \end_inset
3171
3172 .
3173 \end_layout
3174
3175 \begin_layout Standard
3176 Independently of the platform, the generation of a particular archive format
3177  can be forced by adding either the 
3178 \begin_inset Flex Code
3179 status collapsed
3180
3181 \begin_layout Plain Layout
3182 -t
3183 \end_layout
3184
3185 \end_inset
3186
3187  (for the 
3188 \begin_inset Flex Code
3189 status collapsed
3190
3191 \begin_layout Plain Layout
3192 tar
3193 \end_layout
3194
3195 \end_inset
3196
3197  format) or 
3198 \begin_inset Flex Code
3199 status collapsed
3200
3201 \begin_layout Plain Layout
3202 -z
3203 \end_layout
3204
3205 \end_inset
3206
3207  (for the 
3208 \begin_inset Flex Code
3209 status collapsed
3210
3211 \begin_layout Plain Layout
3212 zip
3213 \end_layout
3214
3215 \end_inset
3216
3217  format) switch to the 
3218 \begin_inset Flex Code
3219 status collapsed
3220
3221 \begin_layout Plain Layout
3222 LyX\SpecialChar \menuseparator
3223 LyX Archive
3224 \end_layout
3225
3226 \end_inset
3227
3228  converter in 
3229 \begin_inset Flex Code
3230 status collapsed
3231
3232 \begin_layout Plain Layout
3233 Tools\SpecialChar \menuseparator
3234 Preferences\SpecialChar \menuseparator
3235 File Handling\SpecialChar \menuseparator
3236 Converters
3237 \end_layout
3238
3239 \end_inset
3240
3241 .
3242  (Make sure you add the switch after the script name, not before it.)
3243 \end_layout
3244
3245 \begin_layout Section
3246 Fancy Headers and Footers
3247 \end_layout
3248
3249 \begin_layout Standard
3250 The default page layout is rather plain; for an 
3251 \begin_inset Flex Code
3252 status collapsed
3253
3254 \begin_layout Plain Layout
3255 article
3256 \end_layout
3257
3258 \end_inset
3259
3260  document class, all you get is a centered page number at the bottom of
3261  the page.
3262  This document uses KOMA-script's book class, so it appears to be a bit
3263  fancier.
3264  But to really put on a show, you need to set the document page style to
3265  
3266 \begin_inset Quotes eld
3267 \end_inset
3268
3269 fancy
3270 \begin_inset Quotes erd
3271 \end_inset
3272
3273 , as mentioned in the 
3274 \emph on
3275 User Guide
3276 \emph default
3277 .
3278  This section describes the LaTeX code you need to insert in your LaTeX
3279  preamble in order to get the desired effects.
3280 \end_layout
3281
3282 \begin_layout Standard
3283 For more information on fancy headers, see the 
3284 \begin_inset Flex Code
3285 status collapsed
3286
3287 \begin_layout Plain Layout
3288 fancyhdr
3289 \end_layout
3290
3291 \end_inset
3292
3293  package documentation.
3294  (
3295 \begin_inset Flex URL
3296 status collapsed
3297
3298 \begin_layout Plain Layout
3299
3300 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3301 \end_layout
3302
3303 \end_inset
3304
3305 )
3306 \end_layout
3307
3308 \begin_layout Standard
3309 The page header is divided into three fields, not surprisingly labeled 
3310 \begin_inset Quotes eld
3311 \end_inset
3312
3313 left
3314 \begin_inset Quotes erd
3315 \end_inset
3316
3317
3318 \begin_inset Quotes eld
3319 \end_inset
3320
3321 center
3322 \begin_inset Quotes erd
3323 \end_inset
3324
3325 , and 
3326 \begin_inset Quotes eld
3327 \end_inset
3328
3329 right
3330 \begin_inset Quotes erd
3331 \end_inset
3332
3333 .
3334  The footer is also divided into these three fields.
3335  The LaTeX commands to set these fields in the simplest manner are 
3336 \begin_inset Flex Code
3337 status collapsed
3338
3339 \begin_layout Plain Layout
3340
3341 \backslash
3342 lhead
3343 \end_layout
3344
3345 \end_inset
3346
3347
3348 \begin_inset Flex Code
3349 status collapsed
3350
3351 \begin_layout Plain Layout
3352
3353 \backslash
3354 chead
3355 \end_layout
3356
3357 \end_inset
3358
3359
3360 \begin_inset Flex Code
3361 status collapsed
3362
3363 \begin_layout Plain Layout
3364
3365 \backslash
3366 rhead
3367 \end_layout
3368
3369 \end_inset
3370
3371
3372 \begin_inset Flex Code
3373 status collapsed
3374
3375 \begin_layout Plain Layout
3376
3377 \backslash
3378 lfoot
3379 \end_layout
3380
3381 \end_inset
3382
3383 , etc.
3384  Suppose you wish to put your name in the upper left hand corner of each
3385  page.
3386  Simply insert the following command in the preamble: 
3387 \end_layout
3388
3389 \begin_layout Standard
3390
3391 \family typewriter
3392
3393 \backslash
3394 lhead{John Q.
3395  DocWriter}
3396 \end_layout
3397
3398 \begin_layout Standard
3399 You will now see your name in the upper left.
3400  If a field has a default entry that you would like to get rid of (often
3401  the page number appears in the central footer, simply include a command
3402  with a blank argument, e.
3403 \begin_inset space \thinspace{}
3404 \end_inset
3405
3406 g.:
3407 \end_layout
3408
3409 \begin_layout Standard
3410
3411 \family typewriter
3412
3413 \backslash
3414 cfoot{}
3415 \end_layout
3416
3417 \begin_layout Standard
3418 Let's get really fancy: lets put the section number with the word 
3419 \begin_inset Quotes eld
3420 \end_inset
3421
3422 Section
3423 \begin_inset Quotes erd
3424 \end_inset
3425
3426  (e.
3427 \begin_inset space \thinspace{}
3428 \end_inset
3429
3430 g.
3431 \begin_inset space \space{}
3432 \end_inset
3433
3434 Section 3) in the upper left, the page number (e.
3435 \begin_inset space \thinspace{}
3436 \end_inset
3437
3438 g.
3439 \begin_inset space \space{}
3440 \end_inset
3441
3442 Page 4) in the upper right, your name in the lower left, and the date in
3443  the lower right.
3444  The following commands should now appear in the preamble:
3445 \end_layout
3446
3447 \begin_layout Standard
3448
3449 \family typewriter
3450
3451 \backslash
3452 lhead{Section 
3453 \backslash
3454 thesection}
3455 \end_layout
3456
3457 \begin_layout Standard
3458
3459 \family typewriter
3460
3461 \backslash
3462 chead{}
3463 \end_layout
3464
3465 \begin_layout Standard
3466
3467 \family typewriter
3468
3469 \backslash
3470 rhead{Page 
3471 \backslash
3472 thepage}
3473 \end_layout
3474
3475 \begin_layout Standard
3476
3477 \family typewriter
3478
3479 \backslash
3480 lfoot{John Q.
3481  DocWriter}
3482 \end_layout
3483
3484 \begin_layout Standard
3485
3486 \family typewriter
3487
3488 \backslash
3489 cfoot{}
3490 \end_layout
3491
3492 \begin_layout Standard
3493
3494 \family typewriter
3495
3496 \backslash
3497 rfoot{
3498 \backslash
3499 today}
3500 \end_layout
3501
3502 \begin_layout Standard
3503 The commands 
3504 \begin_inset Flex Code
3505 status collapsed
3506
3507 \begin_layout Plain Layout
3508
3509 \backslash
3510 thesection
3511 \end_layout
3512
3513 \end_inset
3514
3515  and 
3516 \begin_inset Flex Code
3517 status collapsed
3518
3519 \begin_layout Plain Layout
3520
3521 \backslash
3522 thepage
3523 \end_layout
3524
3525 \end_inset
3526
3527  access LaTeX's section and page counters, and so print out the current
3528  section and page numbers.
3529  
3530 \begin_inset Flex Code
3531 status collapsed
3532
3533 \begin_layout Plain Layout
3534
3535 \backslash
3536 today
3537 \end_layout
3538
3539 \end_inset
3540
3541  simply prints out today's date.
3542 \end_layout
3543
3544 \begin_layout Standard
3545 The thicknesses of the horizontal rules drawn beneath the header and above
3546  the footer can also be modified.
3547  If you don't want one of the rules, set its thickness to 0.
3548  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3549  Use commands
3550 \family typewriter
3551  
3552 \family default
3553 like 
3554 \begin_inset Flex Code
3555 status collapsed
3556
3557 \begin_layout Plain Layout
3558
3559 \backslash
3560 renewcommand{
3561 \backslash
3562 headrulewidth}{0.4pt}
3563 \end_layout
3564
3565 \end_inset
3566
3567  and 
3568 \begin_inset Flex Code
3569 status collapsed
3570
3571 \begin_layout Plain Layout
3572
3573 \backslash
3574 renewcommand{
3575 \backslash
3576 footrulewidth}{0.4pt}
3577 \end_layout
3578
3579 \end_inset
3580
3581  to set the thicknesses.
3582 \end_layout
3583
3584 \begin_layout Standard
3585 You can switch the header/footer settings on and off for individual pages
3586  using commands like 
3587 \begin_inset Flex Code
3588 status collapsed
3589
3590 \begin_layout Plain Layout
3591
3592 \backslash
3593 thispagestyle{empty}
3594 \end_layout
3595
3596 \end_inset
3597
3598
3599 \begin_inset Flex Code
3600 status collapsed
3601
3602 \begin_layout Plain Layout
3603
3604 \backslash
3605 thispagestyle{plain}
3606 \end_layout
3607
3608 \end_inset
3609
3610 , and 
3611 \begin_inset Flex Code
3612 status collapsed
3613
3614 \begin_layout Plain Layout
3615
3616 \backslash
3617 thispagestyle{fancy}
3618 \end_layout
3619
3620 \end_inset
3621
3622 .
3623  Simply insert them in the text on the page you want changed and mark them
3624  as TeX code.
3625  In fact, title pages are marked as plain by default, while following pages
3626  are marked fancy when using the global fancy setting.
3627 \end_layout
3628
3629 \begin_layout Standard
3630 As a final example, it is possible to include an image in the header or
3631  footer.
3632  Suppose you want to put a company logo in the upper lefthand corner.
3633  You might try something like
3634 \end_layout
3635
3636 \begin_layout Standard
3637
3638 \family typewriter
3639
3640 \backslash
3641 lhead{
3642 \backslash
3643 resizebox{1in}{!}{
3644 \backslash
3645 includegraphics{logo.eps}}}
3646 \end_layout
3647
3648 \begin_layout Standard
3649 \noindent
3650 (you may need to preface this with 
3651 \begin_inset Flex Code
3652 status collapsed
3653
3654 \begin_layout Plain Layout
3655 \noindent
3656
3657 \backslash
3658 usepackage{graphics}
3659 \end_layout
3660
3661 \end_inset
3662
3663  if you don't include graphics elsewhere in your document).
3664 \end_layout
3665
3666 \begin_layout Section
3667 Itemize Bullet Selection
3668 \begin_inset CommandInset label
3669 LatexCommand label
3670 name "sec:bullet"
3671
3672 \end_inset
3673
3674
3675 \end_layout
3676
3677 \begin_layout Standard
3678 by
3679 \noun on
3680  Allan Rae
3681 \end_layout
3682
3683 \begin_layout Subsection
3684 Introduction
3685 \end_layout
3686
3687 \begin_layout Standard
3688 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3689  Using this dialog you can easily specify what bullet shape to use at each
3690  level of an itemized list.
3691  These settings are document-wide so you won't be able to specify different
3692  sets of bullets for different paragraphs.
3693 \begin_inset Foot
3694 status collapsed
3695
3696 \begin_layout Plain Layout
3697 Well, actually you can but you'll have to do it by hand.
3698 \end_layout
3699
3700 \end_inset
3701
3702
3703 \end_layout
3704
3705 \begin_layout Subsection
3706 How it looks
3707 \end_layout
3708
3709 \begin_layout Standard
3710 Open the dialog by selecting the 
3711 \begin_inset Flex MenuItem
3712 status collapsed
3713
3714 \begin_layout Plain Layout
3715 Document\SpecialChar \menuseparator
3716 Settings
3717 \end_layout
3718
3719 \end_inset
3720
3721  menu item and then select the 
3722 \begin_inset Flex MenuItem
3723 status collapsed
3724
3725 \begin_layout Plain Layout
3726 Bullets
3727 \end_layout
3728
3729 \end_inset
3730
3731  tab.
3732 \end_layout
3733
3734 \begin_layout Standard
3735 The dialog provides you with a table of bullet shapes.
3736  A column of buttons on the left of the table provides access to the six
3737  different panels of bullet shapes.
3738  The row of buttons across the top is used to select which bullet depth
3739  you are changing.
3740  A text entry under the table shows the currently selected bullet shape's
3741  LaTeX equivalent and this can be edited if desired.
3742  If you do modify the text you will also need to specify any needed packages
3743  in the LaTeX preamble.
3744 \end_layout
3745
3746 \begin_layout Standard
3747 The six panels are divided up by the packages they require.
3748  The following table shows the mappings from button name to LaTeX packages.
3749 \end_layout
3750
3751 \begin_layout Standard
3752 \align center
3753 \begin_inset Tabular
3754 <lyxtabular version="3" rows="7" columns="2">
3755 <features tabularvalignment="middle">
3756 <column alignment="center" valignment="top" width="0pt">
3757 <column alignment="center" valignment="top" width="0pt">
3758 <row>
3759 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3760 \begin_inset Text
3761
3762 \begin_layout Plain Layout
3763
3764 \family roman
3765 \series medium
3766 \shape up
3767 \size normal
3768 \emph off
3769 \bar no
3770 \noun off
3771 \color none
3772 Button
3773 \end_layout
3774
3775 \end_inset
3776 </cell>
3777 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3778 \begin_inset Text
3779
3780 \begin_layout Plain Layout
3781
3782 \family roman
3783 \series medium
3784 \shape up
3785 \size normal
3786 \emph off
3787 \bar no
3788 \noun off
3789 \color none
3790 Packages Required
3791 \end_layout
3792
3793 \end_inset
3794 </cell>
3795 </row>
3796 <row>
3797 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3798 \begin_inset Text
3799
3800 \begin_layout Plain Layout
3801
3802 \family sans
3803 \series medium
3804 \shape up
3805 \size normal
3806 \emph off
3807 \bar no
3808 \noun off
3809 \color none
3810 Standard
3811 \end_layout
3812
3813 \end_inset
3814 </cell>
3815 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3816 \begin_inset Text
3817
3818 \begin_layout Plain Layout
3819
3820 \series medium
3821 \shape up
3822 \size normal
3823 \emph off
3824 \bar no
3825 \noun off
3826 \color none
3827 base LaTeX
3828 \end_layout
3829
3830 \end_inset
3831 </cell>
3832 </row>
3833 <row>
3834 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3835 \begin_inset Text
3836
3837 \begin_layout Plain Layout
3838
3839 \family sans
3840 \series medium
3841 \shape up
3842 \size normal
3843 \emph off
3844 \bar no
3845 \noun off
3846 \color none
3847 Maths
3848 \end_layout
3849
3850 \end_inset
3851 </cell>
3852 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3853 \begin_inset Text
3854
3855 \begin_layout Plain Layout
3856
3857 \family typewriter
3858 \series medium
3859 \shape up
3860 \size normal
3861 \emph off
3862 \bar no
3863 \noun off
3864 \color none
3865 amssymb.sty
3866 \end_layout
3867
3868 \end_inset
3869 </cell>
3870 </row>
3871 <row>
3872 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3873 \begin_inset Text
3874
3875 \begin_layout Plain Layout
3876
3877 \family sans
3878 \series medium
3879 \shape up
3880 \size normal
3881 \emph off
3882 \bar no
3883 \noun off
3884 \color none
3885 Ding1
3886 \end_layout
3887
3888 \end_inset
3889 </cell>
3890 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3891 \begin_inset Text
3892
3893 \begin_layout Plain Layout
3894
3895 \family typewriter
3896 \series medium
3897 \shape up
3898 \size normal
3899 \emph off
3900 \bar no
3901 \noun off
3902 \color none
3903 pifont.sty
3904 \end_layout
3905
3906 \end_inset
3907 </cell>
3908 </row>
3909 <row>
3910 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3911 \begin_inset Text
3912
3913 \begin_layout Plain Layout
3914
3915 \family sans
3916 \series medium
3917 \shape up
3918 \size normal
3919 \emph off
3920 \bar no
3921 \noun off
3922 \color none
3923 Ding2
3924 \end_layout
3925
3926 \end_inset
3927 </cell>
3928 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3929 \begin_inset Text
3930
3931 \begin_layout Plain Layout
3932
3933 \family typewriter
3934 \series medium
3935 \shape up
3936 \size normal
3937 \emph off
3938 \bar no
3939 \noun off
3940 \color none
3941 pifont.sty
3942 \end_layout
3943
3944 \end_inset
3945 </cell>
3946 </row>
3947 <row>
3948 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3949 \begin_inset Text
3950
3951 \begin_layout Plain Layout
3952
3953 \family sans
3954 \series medium
3955 \shape up
3956 \size normal
3957 \emph off
3958 \bar no
3959 \noun off
3960 \color none
3961 Ding3
3962 \end_layout
3963
3964 \end_inset
3965 </cell>
3966 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3967 \begin_inset Text
3968
3969 \begin_layout Plain Layout
3970
3971 \family typewriter
3972 \series medium
3973 \shape up
3974 \size normal
3975 \emph off
3976 \bar no
3977 \noun off
3978 \color none
3979 pifont.sty
3980 \end_layout
3981
3982 \end_inset
3983 </cell>
3984 </row>
3985 <row>
3986 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3987 \begin_inset Text
3988
3989 \begin_layout Plain Layout
3990
3991 \family sans
3992 \series medium
3993 \shape up
3994 \size normal
3995 \emph off
3996 \bar no
3997 \noun off
3998 \color none
3999 Ding4
4000 \end_layout
4001
4002 \end_inset
4003 </cell>
4004 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4005 \begin_inset Text
4006
4007 \begin_layout Plain Layout
4008
4009 \family typewriter
4010 \series medium
4011 \shape up
4012 \size normal
4013 \emph off
4014 \bar no
4015 \noun off
4016 \color none
4017 pifont.sty
4018 \end_layout
4019
4020 \end_inset
4021 </cell>
4022 </row>
4023 </lyxtabular>
4024
4025 \end_inset
4026
4027
4028 \end_layout
4029
4030 \begin_layout Standard
4031 LyX doesn't stop you using bullets from packages you don't have.
4032  If you get errors from LaTeX when you try to view or print the file, then
4033  it is likely you are missing a package.
4034 \begin_inset Foot
4035 status collapsed
4036
4037 \begin_layout Plain Layout
4038 LyX doesn't restrict your use since you may be editing locally and exporting
4039  elsewhere.
4040 \end_layout
4041
4042 \end_inset
4043
4044
4045 \end_layout
4046
4047 \begin_layout Subsection
4048 How to use it
4049 \end_layout
4050
4051 \begin_layout Standard
4052 Select which bullet depth you want to change then select the bullet shape
4053  and size.
4054  Any changes will not be visible in LyX, but are visible when viewing the
4055  document.
4056 \end_layout
4057
4058 \begin_layout Standard
4059 You can reset a bullet shape to the default simply by clicking your right
4060  mouse button on the appropriate bullet depth button.
4061 \begin_inset Foot
4062 status collapsed
4063
4064 \begin_layout Plain Layout
4065 If you 
4066 \emph on
4067 really
4068 \emph default
4069  want to have multiple sets of paragraphs with different sets of bullets
4070  in each, then you're going to have to get your hands dirty with TeX code.
4071  The bullet selection dialog can help though because it provides you with
4072  the LaTeX code for a wide range of bullet shapes.
4073  To make your own custom paragraphs you have the following options:
4074 \end_layout
4075
4076 \begin_layout Plain Layout
4077 \begin_inset ERT
4078 status open
4079
4080 \begin_layout Plain Layout
4081
4082
4083 \backslash
4084 let
4085 \backslash
4086 savelabelitemi=
4087 \backslash
4088 labelitemi
4089 \end_layout
4090
4091 \end_inset
4092
4093
4094 \end_layout
4095
4096 \begin_layout Plain Layout
4097 \begin_inset ERT
4098 status open
4099
4100 \begin_layout Plain Layout
4101
4102
4103 \backslash
4104 renewcommand
4105 \backslash
4106 labelitemi[0]{
4107 \backslash
4108 small
4109 \backslash
4110 (
4111 \backslash
4112 sharp
4113 \backslash
4114 )}
4115 \end_layout
4116
4117 \end_inset
4118
4119
4120 \end_layout
4121
4122 \begin_layout Itemize
4123 Use the LaTeX command 
4124 \begin_inset Flex Code
4125 status collapsed
4126
4127 \begin_layout Plain Layout
4128
4129 \backslash
4130 renewcommand{}{}
4131 \end_layout
4132
4133 \end_inset
4134
4135  to specify a new bullet shape for a given depth.
4136  You'll also need to save the current bullet shape so you can restore it
4137  again afterwards.
4138  In this itemized list the following LaTeX code was used to change the bullet
4139  used for the first depth.
4140 \end_layout
4141
4142 \begin_deeper
4143 \begin_layout LyX-Code
4144
4145 \backslash
4146 let
4147 \backslash
4148 savelabelitemi=
4149 \backslash
4150 labelitemi 
4151 \end_layout
4152
4153 \begin_layout LyX-Code
4154
4155 \backslash
4156 renewcommand
4157 \backslash
4158 labelitemi[0]{
4159 \backslash
4160 small
4161 \backslash
4162 (
4163 \backslash
4164 sharp
4165 \backslash
4166 )}
4167 \end_layout
4168
4169 \end_deeper
4170 \begin_layout Itemize
4171 Note that the itemize depth is specified in Roman numerals as part of the
4172  
4173 \family typewriter
4174
4175 \backslash
4176 labelitem
4177 \family default
4178  command.
4179 \end_layout
4180
4181 \begin_layout Itemize
4182 \begin_inset ERT
4183 status open
4184
4185 \begin_layout Plain Layout
4186
4187 [
4188 \backslash
4189 (
4190 \backslash
4191 star
4192 \backslash
4193 )]
4194 \end_layout
4195
4196 \end_inset
4197
4198  Specify each individual entry by starting each item with the bullet shape
4199  enclosed in square brackets and set as 
4200 \begin_inset Flex MenuItem
4201 status collapsed
4202
4203 \begin_layout Plain Layout
4204 TeX Code
4205 \end_layout
4206
4207 \end_inset
4208
4209 .
4210  For example, this item was started with 
4211 \begin_inset Flex Code
4212 status collapsed
4213
4214 \begin_layout Plain Layout
4215 [
4216 \backslash
4217 (
4218 \backslash
4219 star
4220 \backslash
4221 )]
4222 \end_layout
4223
4224 \end_inset
4225
4226 .
4227 \end_layout
4228
4229 \begin_layout Plain Layout
4230 \begin_inset ERT
4231 status open
4232
4233 \begin_layout Plain Layout
4234
4235
4236 \backslash
4237 renewcommand
4238 \backslash
4239 labelitemi[0]{
4240 \backslash
4241 savelabelitemi}
4242 \end_layout
4243
4244 \end_inset
4245
4246
4247 \end_layout
4248
4249 \begin_layout Plain Layout
4250 You'll also need to revert the labelitem back to its previous setting for
4251  the global bullet shape settings to remain in effect.
4252  The way used here was:
4253 \end_layout
4254
4255 \begin_layout LyX-Code
4256
4257 \backslash
4258 renewcommand
4259 \backslash
4260 labelitemi[0]{
4261 \backslash
4262 savelabelitemi}
4263 \end_layout
4264
4265 \end_inset
4266
4267
4268 \end_layout
4269
4270 \begin_layout Chapter
4271 LyX and the World Wide Web
4272 \end_layout
4273
4274 \begin_layout Standard
4275 LyX has long supported the export of documents to various web-friendly formats,
4276  such as HTML.
4277  Before verson 2.0, however, HTML export was always accomplished by the use
4278  of external converters.
4279 \begin_inset Foot
4280 status collapsed
4281
4282 \begin_layout Plain Layout
4283 For details on the use of external converters with LyX, see the 
4284 \emph on
4285 Converters
4286 \emph default
4287  section of the Customization manual.
4288 \end_layout
4289
4290 \end_inset
4291
4292  These fall into two large groups: there are converters that use LaTeX as
4293  an intermediate format, such as 
4294 \begin_inset Flex Code
4295 status collapsed
4296
4297 \begin_layout Plain Layout
4298 htlatex
4299 \end_layout
4300
4301 \end_inset
4302
4303
4304 \begin_inset Flex Code
4305 status collapsed
4306
4307 \begin_layout Plain Layout
4308 html2latex
4309 \end_layout
4310
4311 \end_inset
4312
4313 , and 
4314 \begin_inset Flex Code
4315 status collapsed
4316
4317 \begin_layout Plain Layout
4318 plastex
4319 \end_layout
4320
4321 \end_inset
4322
4323 , relying upon LyX to produce the LaTeX; and there is a converter that works
4324  directly on LyX files, 
4325 \begin_inset Flex Code
4326 status collapsed
4327
4328 \begin_layout Plain Layout
4329 eLyXer
4330 \end_layout
4331
4332 \end_inset
4333
4334 .
4335  All of these have different advantages and disadvantages.
4336  
4337 \end_layout
4338
4339 \begin_layout Standard
4340 The LaTeX-based converters have the advantage that, in principle, they know
4341  everything about the exported document that LaTeX does.
4342  Such converters do not care, for example, if a certain block of code was
4343  produced by LyX or was Evil Red Text.
4344  These converters know about 
4345 \begin_inset Flex Code
4346 status collapsed
4347
4348 \begin_layout Plain Layout
4349 aux
4350 \end_layout
4351
4352 \end_inset
4353
4354  files, counters, and references, and can often make use of the 
4355 \begin_inset Flex Code
4356 status collapsed
4357
4358 \begin_layout Plain Layout
4359 bbl
4360 \end_layout
4361
4362 \end_inset
4363
4364  files generated by BibTeX.
4365  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4366  said that only TeX itself understands TeX---and LaTeX-based converters
4367  will often choke on what seem to be quite simple constructs; complex ones
4368  can throw them completely, and as of this writing, for example, the 
4369 \emph on
4370 Embedded Objects
4371 \emph default
4372  manual will not export with 
4373 \begin_inset Flex Code
4374 status collapsed
4375
4376 \begin_layout Plain Layout
4377 htlatex
4378 \end_layout
4379
4380 \end_inset
4381
4382 , though the others will.
4383  The other issue concerns how math is handled.
4384  These converters typically convert the formulae into little pictures that
4385  are then linked from the HTML document.
4386  Since these are actually generated by LaTeX, they are accurate.
4387  But they do not scale well, and just getting them to look as if they are
4388  actually meant to be in your document---so that the font sizes seem to
4389  be roughly the same---can be a challenge.
4390 \end_layout
4391
4392 \begin_layout Standard
4393 Alex Fernandez's 
4394 \begin_inset Flex Code
4395 status collapsed
4396
4397 \begin_layout Plain Layout
4398 eLyXer
4399 \end_layout
4400
4401 \end_inset
4402
4403  (
4404 \begin_inset CommandInset href
4405 LatexCommand href
4406 name "http://elyxer.nongnu.org/"
4407 target "http://elyxer.nongnu.org/"
4408
4409 \end_inset
4410
4411 ) solves some of these problems.
4412  In particular, the formulae it produces scale perfectly, since it renders
4413  math using a combination of HTML and CSS rather than converting the formulae
4414  to images.
4415  But even moderately complex formula are rendered less well than with 
4416 \begin_inset Flex Code
4417 status collapsed
4418
4419 \begin_layout Plain Layout
4420 htlatex
4421 \end_layout
4422
4423 \end_inset
4424
4425 ; this reflects the limitations of HTML.
4426 \begin_inset Foot
4427 status collapsed
4428
4429 \begin_layout Plain Layout
4430 That said, 
4431 \begin_inset Flex Code
4432 status collapsed
4433
4434 \begin_layout Plain Layout
4435 eLyXer
4436 \end_layout
4437
4438 \end_inset
4439
4440  can also use jsMath and MathJax for equations, but this setting is only
4441  available globally and requires one to have access to a server that runs
4442  the backend.
4443 \end_layout
4444
4445 \end_inset
4446
4447  More importantly (as of version 1.1.1, at least), 
4448 \begin_inset Flex Code
4449 status collapsed
4450
4451 \begin_layout Plain Layout
4452 eLyXer
4453 \end_layout
4454
4455 \end_inset
4456
4457  has limited support for math macros and no support for user-defined paragraph
4458  or character styles.
4459  These limitations make 
4460 \begin_inset Flex Code
4461 status collapsed
4462
4463 \begin_layout Plain Layout
4464 eLyXer
4465 \end_layout
4466
4467 \end_inset
4468
4469  unsuitable for many of the documents LyX users produce.
4470  In principle, of course, these problems could be solved, but the LyX developers
4471  have decided to follow a different path and have made LyX itself capable
4472  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4473  plaintext.
4474 \end_layout
4475
4476 \begin_layout Standard
4477 As of this writing, XHTML output remains under development and should probably
4478  be regarded as 
4479 \begin_inset Quotes eld
4480 \end_inset
4481
4482 experimental
4483 \begin_inset Quotes erd
4484 \end_inset
4485
4486 .
4487 \begin_inset Foot
4488 status collapsed
4489
4490 \begin_layout Plain Layout
4491 The file 
4492 \begin_inset Flex Code
4493 status collapsed
4494
4495 \begin_layout Plain Layout
4496 development/HTML.notes
4497 \end_layout
4498
4499 \end_inset
4500
4501 , which can be found in the LyX source tree or 
4502 \begin_inset CommandInset href
4503 LatexCommand href
4504 name "accessed online"
4505 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4506
4507 \end_inset
4508
4509 , usually contains up-to-date information about the state of XHTML output.
4510  See also the list of XHTML bugs on 
4511 \begin_inset CommandInset href
4512 LatexCommand href
4513 name "the bug tracker"
4514 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"
4515
4516 \end_inset
4517
4518 .
4519 \end_layout
4520
4521 \end_inset
4522
4523  Still, the developers have chosen this approach because it has several
4524  potential advantages over the other two.
4525 \end_layout
4526
4527 \begin_layout Standard
4528 These advantages are primarily due to the fact that the XHTML output routines,
4529  since they are part of LyX, know everything LyX knows about the document
4530  being exported.
4531 \begin_inset Foot
4532 status collapsed
4533
4534 \begin_layout Plain Layout
4535 Another advantage is that, since these routines are internal to LyX, they
4536  are immune to changes in LyX's file format, or to changes in the semantics
4537  of existing insets.
4538 \end_layout
4539
4540 \end_inset
4541
4542  So they know about the table of contents (as displayed in the outline),
4543  about the counters associated with different paragraph styles, and about
4544  user-defined styles.
4545  The XHTML output routines know what LyX knows about internationalization,
4546  too, so they will output 
4547 \begin_inset Quotes eld
4548 \end_inset
4549
4550 Chapter 1
4551 \begin_inset Quotes erd
4552 \end_inset
4553
4554  or 
4555 \begin_inset Quotes eld
4556 \end_inset
4557
4558
4559 \lang ngerman
4560 Kapitel
4561 \lang english
4562  1
4563 \begin_inset Quotes erd
4564 \end_inset
4565
4566 , depending upon the language in effect at the time.
4567  
4568 \end_layout
4569
4570 \begin_layout Standard
4571 Quite generally, the output routines know what LyX knows about document
4572  layout, that is, about how the document is to be rendered on screen.
4573  We use this information when we output the document as XHTML.
4574  In particular, LyX 
4575 \emph on
4576 automatically
4577 \emph default
4578  generates CSS style information corresponding to the layout information
4579  it uses to render the document on screen: if section headings are supposed
4580  to be sans-serif and bold as seen in LyX, then (by default) they will be
4581  sans-serif and bold when viewed in a web browser, too.
4582  And this is true not just for pre-defined styles, like Section, but for
4583  any style, including user-defined styles.
4584  Indeed, the XHTML output routines make no distinction between user-defined
4585  paragraph and character styles and LyX's own pre-defined styles: in each
4586  case, everything LyX knows about the styles is contained in the layout
4587  files.
4588  And much the same is true as regards pre-defined textual insets, such as
4589  footnotes, and various custom insets.
4590  
4591 \end_layout
4592
4593 \begin_layout Standard
4594 The result is that XHTML output can be customized and extended in exactly
4595  the same way LaTeX output can be customized and extended: through layout
4596  files and modules.
4597  See chapter five of the 
4598 \emph on
4599 Customization 
4600 \emph default
4601 manual for the details.
4602 \end_layout
4603
4604 \begin_layout Standard
4605 The remainder of this chapter contains more detailed information on XHTML
4606  output, its limitations, and ways to work around those limitations.
4607 \end_layout
4608
4609 \begin_layout Section
4610 Math Output in XHTML
4611 \end_layout
4612
4613 \begin_layout Standard
4614 LyX offers four choices for how math is rendered.
4615  These have various advantages and disadvantages:
4616 \end_layout
4617
4618 \begin_layout Itemize
4619 MathML
4620 \begin_inset Newline newline
4621 \end_inset
4622
4623 MathML is a dialect of XML designed specifically for mathematics on the
4624  web, and it typically renders very well in browsers that support it.
4625  The disadvantage is that not all browsers support MathML, and support is
4626  not complete even in the Gecko-based browsers, such as Firefox.
4627 \begin_inset Newline newline
4628 \end_inset
4629
4630 If LyX is unable to render a formula as MathML---for example, if the formula
4631  uses the 
4632 \begin_inset Flex Code
4633 status collapsed
4634
4635 \begin_layout Plain Layout
4636 xymatrix
4637 \end_layout
4638
4639 \end_inset
4640
4641  package or ERT---then it will instead output the formula as an image.
4642  
4643 \end_layout
4644
4645 \begin_layout Itemize
4646 HTML
4647 \begin_inset Newline newline
4648 \end_inset
4649
4650 As mentioned above, 
4651 \begin_inset Flex Code
4652 status collapsed
4653
4654 \begin_layout Plain Layout
4655 elyxer
4656 \end_layout
4657
4658 \end_inset
4659
4660  outputs math as HTML, styled by CSS.
4661 \begin_inset Foot
4662 status collapsed
4663
4664 \begin_layout Plain Layout
4665 LyX has borrowed some of the CSS for its HTML output from 
4666 \begin_inset Flex Code
4667 status collapsed
4668
4669 \begin_layout Plain Layout
4670 elyxer
4671 \end_layout
4672
4673 \end_inset
4674
4675 .
4676 \end_layout
4677
4678 \end_inset
4679
4680  For simple formulae, this can work quite well, though with more complicated
4681  formulae it tends to break down.
4682  Still, this method has the advantage that it is very widely supported and
4683  so it may be appropriate for documents that contain only a little, fairly
4684  simple math.
4685 \begin_inset Newline newline
4686 \end_inset
4687
4688 If Lyx is unable to render a formula as HTML---for example, if the formula
4689  uses the 
4690 \begin_inset Flex Code
4691 status collapsed
4692
4693 \begin_layout Plain Layout
4694 xymatrix
4695 \end_layout
4696
4697 \end_inset
4698
4699  package or ERT---then it will instead output the formula as an image.
4700  
4701 \end_layout
4702
4703 \begin_layout Itemize
4704 Images
4705 \begin_inset Newline newline
4706 \end_inset
4707
4708 Like 
4709 \begin_inset Flex Code
4710 status collapsed
4711
4712 \begin_layout Plain Layout
4713 htlatex
4714 \end_layout
4715
4716 \end_inset
4717
4718 , LyX will output formulae as images, the very same images, in fact, that
4719  are used for instant preview.
4720 \begin_inset Foot
4721 status collapsed
4722
4723 \begin_layout Plain Layout
4724 Instant preview does 
4725 \emph on
4726 not 
4727 \emph default
4728 have to be on for images to be output, however.
4729 \end_layout
4730
4731 \end_inset
4732
4733  The advantage to this method is that the images are simply generated by
4734  LaTeX, so they are very accurate.
4735  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4736  so they do not scale terribly well, and one cannot copy them, etc.
4737  (As of this writing, there are also problems about equation numbering.
4738  See 
4739 \begin_inset CommandInset href
4740 LatexCommand href
4741 name "bug 6894"
4742 target "http://www.lyx.org/trac/ticket/6894"
4743
4744 \end_inset
4745
4746 .)
4747 \begin_inset Newline newline
4748 \end_inset
4749
4750 The size of the images can be controlled by setting the 
4751 \begin_inset Quotes eld
4752 \end_inset
4753
4754 Math Images Scaling
4755 \begin_inset Quotes erd
4756 \end_inset
4757
4758  parameter under 
4759 \begin_inset Flex MenuItem
4760 status collapsed
4761
4762 \begin_layout Plain Layout
4763 Document\SpecialChar \menuseparator
4764 Settings\SpecialChar \menuseparator
4765 Output
4766 \end_layout
4767
4768 \end_inset
4769
4770 .
4771 \begin_inset Foot
4772 status collapsed
4773
4774 \begin_layout Plain Layout
4775 For those who want to know, this controls the resolution of the image in
4776  dots per inch and is based upon a default of 75 dpi.
4777 \end_layout
4778
4779 \end_inset
4780
4781
4782 \begin_inset Newline newline
4783 \end_inset
4784
4785 If LyX for some reason fails to create an image for a formula (e.g., if a
4786  required LaTeX package is not installed), then it will fall back to outputing
4787  the raw LaTeX.
4788 \end_layout
4789
4790 \begin_layout Itemize
4791 LaTeX
4792 \begin_inset Newline newline
4793 \end_inset
4794
4795 Finally, LyX will happily output math as LaTeX.
4796  As well as being the output of last resort, this method can be used with
4797  such tools as 
4798 \begin_inset CommandInset href
4799 LatexCommand href
4800 name "jsMath"
4801 target "http://www.math.union.edu/~dpvc/jsMath/"
4802
4803 \end_inset
4804
4805 , which uses JavaScript to render LaTeX embedded in HTML documents.
4806  LyX wraps the LaTeX in either a 
4807 \begin_inset Flex Code
4808 status collapsed
4809
4810 \begin_layout Plain Layout
4811 span
4812 \end_layout
4813
4814 \end_inset
4815
4816  (for inline formulas) or 
4817 \begin_inset Flex Code
4818 status collapsed
4819
4820 \begin_layout Plain Layout
4821 div
4822 \end_layout
4823
4824 \end_inset
4825
4826  (for displayed formulas) with 
4827 \begin_inset Flex Code
4828 status collapsed
4829
4830 \begin_layout Plain Layout
4831 class='math'
4832 \end_layout
4833
4834 \end_inset
4835
4836 , as is required for jsMath.
4837 \end_layout
4838
4839 \begin_layout Standard
4840 One of these output methods must be selected under 
4841 \begin_inset Flex MenuItem
4842 status collapsed
4843
4844 \begin_layout Plain Layout
4845 Document\SpecialChar \menuseparator
4846 Settings\SpecialChar \menuseparator
4847 Output
4848 \end_layout
4849
4850 \end_inset
4851
4852 .
4853  By default, LyX outputs MathML.
4854  This is a document-wide setting, therefore.
4855 \end_layout
4856
4857 \begin_layout Standard
4858 Eventually, LyX will offer the user the option to select an alternate output
4859  method for a particular inset, say, one that isn't being rendered very
4860  well by MathML.
4861 \begin_inset Foot
4862 status collapsed
4863
4864 \begin_layout Plain Layout
4865 That said, since LyX falls back to images if the inset contains ERT, then
4866  one can force output as an image by putting some harmless ERT into the
4867  math, for example: 
4868 \begin_inset Formula $a=b\relax$
4869 \end_inset
4870
4871 .
4872 \end_layout
4873
4874 \end_inset
4875
4876
4877 \end_layout
4878
4879 \begin_layout Section
4880 Bibliography and Citations
4881 \end_layout
4882
4883 \begin_layout Standard
4884 XHTML output fully supports bibliographies and citations.
4885  
4886 \end_layout
4887
4888 \begin_layout Standard
4889 Citation labels are generated by the same machinery that generates LyX's
4890  on-screen labels, so the labels will look in the output much as they do
4891  in LyX, though better.
4892  If you are using numerical citations, then LyX will output numerical labels,
4893  such as [1] or [17], rather than simply showing the citation key in square
4894  brackets, as it does on-screen.
4895  If you are using author-year citations, then LyX will add lowercase letters
4896  to the years, just as BibTeX does, if it finds more than one citation for
4897  a given author-year combination.
4898  The labels will be printed with the bibliography entries.
4899  Note that there is, at present, no way to customize the appearance of the
4900  labels, for example, to choose between square brackets and parentheses.
4901 \end_layout
4902
4903 \begin_layout Standard
4904 Bibliography output is handled by the same machinery that handles the presentati
4905 on of reference information in the citation dialog, so you will see in the
4906  XHTML output pretty much what you would see if you were to look at a given
4907  entry in the citation dialog.
4908  The formatting can be customized in your layout file or, preferably, in
4909  a module.
4910  See the 
4911 \emph on
4912 Customization
4913 \emph default
4914  manual for the details.
4915 \end_layout
4916
4917 \begin_layout Standard
4918 The main defect at present is that cross-referenced information is printed
4919  with every entry with which it is associated.
4920  So you can see things like this:
4921 \end_layout
4922
4923 \begin_layout Quote
4924 Jason Stanley, 
4925 \begin_inset Quotes eld
4926 \end_inset
4927
4928 Context and Logical Form
4929 \begin_inset Quotes erd
4930 \end_inset
4931
4932 , in 
4933 \emph on
4934 Language in Context: Selected Essays
4935 \emph default
4936  (Oxford: Oxford University Press, 2007), pp.
4937  30--68.
4938 \end_layout
4939
4940 \begin_layout Quote
4941 Jason Stanley, 
4942 \begin_inset Quotes eld
4943 \end_inset
4944
4945 Semantics in Context
4946 \begin_inset Quotes erd
4947 \end_inset
4948
4949 , in 
4950 \emph on
4951 Language in Context: Selected Essays
4952 \emph default
4953  (Oxford: Oxford University Press, 2007), pp.
4954  201--30.
4955 \end_layout
4956
4957 \begin_layout Standard
4958 This should be fixed before long.
4959 \end_layout
4960
4961 \begin_layout Standard
4962 There is no support at present for sectioned bibliographies.
4963  If you have multiple bibliographies, then LyX will print the same bibliography
4964  over and over.
4965 \end_layout
4966
4967 \begin_layout Section
4968 Indexes
4969 \end_layout
4970
4971 \begin_layout Standard
4972 LyX will happily export indexes as XHTML, but with certain limitations at
4973  the moment.
4974 \end_layout
4975
4976 \begin_layout Standard
4977 Index export will be most reliable when you do not attempt to use the fancy
4978  constructs that are described in the section on indexes in the 
4979 \emph on
4980 User's Guide
4981 \emph default
4982 .
4983 \begin_inset Foot
4984 status collapsed
4985
4986 \begin_layout Plain Layout
4987 The main issue here is that LyX itself does not really handle these.
4988  It just lets you enter what you would have to enter in raw LaTeX.
4989 \end_layout
4990
4991 \end_inset
4992
4993  We'll describe how they are handled using the subsection headings from
4994  that section.
4995 \end_layout
4996
4997 \begin_layout Itemize
4998 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4999  these, but the entries must be separated by 
5000 \begin_inset Quotes eld
5001 \end_inset
5002
5003  ! 
5004 \begin_inset Quotes erd
5005 \end_inset
5006
5007 , that is, there must be spaces around the exclamation point.
5008  This is because it is otherwise too difficult to check for escaped exclamation
5009  points, ones in math, and so forth.
5010 \end_layout
5011
5012 \begin_layout Itemize
5013 Page Ranges: There is no support at all for page ranges, since these make
5014  no sense with XHMTL.
5015  Instead, you will just get two index entries, one at either end.
5016 \end_layout
5017
5018 \begin_layout Itemize
5019 Cross-referencing: There is no support for cross-referencing.
5020  If LyX finds an entry containing the 
5021 \begin_inset Quotes eld
5022 \end_inset
5023
5024 |see\SpecialChar \ldots{}
5025
5026 \begin_inset Quotes erd
5027 \end_inset
5028
5029  construct, it is just dropped, and the rest is treated as an ordinary index
5030  entry.
5031 \end_layout
5032
5033 \begin_layout Itemize
5034 Index Entry Order: LyX does support attempts to fix the sorting order.
5035  It will take what is before the first `@' it finds and use that for sorting,
5036  taking what follows the first `@' to be the actual entry.
5037  At present, LyX does not check for escaped `@', so do not try to index
5038  email addresses.
5039 \end_layout
5040
5041 \begin_layout Itemize
5042 Index Entry Layout: You can format entries by using the text style dialog,
5043  or by using any other method available within LyX itself.
5044  There is no support for constructs like: 
5045 \begin_inset Quotes eld
5046 \end_inset
5047
5048 entry|textbf
5049 \begin_inset Quotes erd
5050 \end_inset
5051
5052 .
5053  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5054  and everything that follows it.
5055 \end_layout
5056
5057 \begin_layout Itemize
5058 Multiple Indexes: There is no support for multiple indexes.
5059  Rather, all index entries will be printed as one large index.
5060  To avoid our printing several versions of the index, we print only the
5061  main index, so make sure you have one.
5062 \end_layout
5063
5064 \begin_layout Section
5065 Nomenclature and Glossary
5066 \end_layout
5067
5068 \begin_layout Standard
5069 There is at present no support for glossaries.
5070  Adding it would be fairly trivial, and welcome.
5071 \end_layout
5072
5073 \begin_layout Chapter
5074 The LyX Server
5075 \end_layout
5076
5077 \begin_layout Section
5078 Introduction
5079 \end_layout
5080
5081 \begin_layout Standard
5082 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5083  and retrieve information about the LyX internal state.
5084  This is only intended for advanced users, but they should find it useful.
5085  It is by writing to the LyX server, for example, that bibliography managers,
5086  such as JabRef, are able to 
5087 \begin_inset Quotes eld
5088 \end_inset
5089
5090 push
5091 \begin_inset Quotes erd
5092 \end_inset
5093
5094  citations to LyX.
5095 \end_layout
5096
5097 \begin_layout Section
5098 Starting the LyX Server
5099 \end_layout
5100
5101 \begin_layout Standard
5102 The LyX server works through the use of a pair of named pipes.
5103  These are usually located in 
5104 \begin_inset Flex Code
5105 status collapsed
5106
5107 \begin_layout Plain Layout
5108 UserDir
5109 \end_layout
5110
5111 \end_inset
5112
5113 , (except on Windows, where 
5114 \emph on
5115 local
5116 \emph default
5117  named pipes are special objects located in 
5118 \begin_inset Flex Code
5119 status collapsed
5120
5121 \begin_layout Plain Layout
5122
5123 \backslash
5124
5125 \backslash
5126 .
5127 \backslash
5128 pipe
5129 \end_layout
5130
5131 \end_inset
5132
5133 ) and have the names 
5134 \begin_inset Quotes eld
5135 \end_inset
5136
5137
5138 \begin_inset Flex Code
5139 status collapsed
5140
5141 \begin_layout Plain Layout
5142 lyxpipe.in
5143 \end_layout
5144
5145 \end_inset
5146
5147
5148 \begin_inset Quotes erd
5149 \end_inset
5150
5151  and 
5152 \begin_inset Quotes eld
5153 \end_inset
5154
5155
5156 \begin_inset Flex Code
5157 status collapsed
5158
5159 \begin_layout Plain Layout
5160 lyxpipe.out
5161 \end_layout
5162
5163 \end_inset
5164
5165
5166 \begin_inset Quotes erd
5167 \end_inset
5168
5169 .
5170  External programs write into 
5171 \begin_inset Flex Code
5172 status collapsed
5173
5174 \begin_layout Plain Layout
5175 lyxpipe.in
5176 \end_layout
5177
5178 \end_inset
5179
5180  and read back data from 
5181 \begin_inset Flex Code
5182 status collapsed
5183
5184 \begin_layout Plain Layout
5185 lyxpipe.out
5186 \end_layout
5187
5188 \end_inset
5189
5190 .
5191  The stem of the pipe names can be defined in the 
5192 \begin_inset Flex MenuItem
5193 status collapsed
5194
5195 \begin_layout Plain Layout
5196 Tools\SpecialChar \menuseparator
5197 Preferences
5198 \end_layout
5199
5200 \end_inset
5201
5202  dialog, for example 
5203 \begin_inset Flex Code
5204 status collapsed
5205
5206 \begin_layout Plain Layout
5207 "/home/myhome/lyxpipe"
5208 \end_layout
5209
5210 \end_inset
5211
5212 , or 
5213 \begin_inset Flex Code
5214 status collapsed
5215
5216 \begin_layout Plain Layout
5217 "
5218 \backslash
5219
5220 \backslash
5221 .
5222 \backslash
5223 pipe
5224 \backslash
5225 lyxpipe"
5226 \end_layout
5227
5228 \end_inset
5229
5230  on Windows (but any working path can be used).
5231  You 
5232 \emph on
5233 must
5234 \emph default
5235  configure this manually in order for the server to start.
5236 \end_layout
5237
5238 \begin_layout Standard
5239 LyX will add the '
5240 \begin_inset Flex Code
5241 status collapsed
5242
5243 \begin_layout Plain Layout
5244 .in
5245 \end_layout
5246
5247 \end_inset
5248
5249 ' and '
5250 \begin_inset Flex Code
5251 status collapsed
5252
5253 \begin_layout Plain Layout
5254 .out
5255 \end_layout
5256
5257 \end_inset
5258
5259 ' to create the pipes.
5260  If one of the pipes already exists, LyX will assume that another LyX process
5261  is already running and will not start the server.
5262  On POSIX (Unix like) systems, if for some other reason, an unused 
5263 \begin_inset Quotes eld
5264 \end_inset
5265
5266 stale
5267 \begin_inset Quotes erd
5268 \end_inset
5269
5270  pipe is left in existence when LyX closes, then LyX will try to delete
5271  it.
5272  If this fails for some reason, you will need to delete the pipes manually
5273  and then restart LyX.
5274  On Windows, pipes are deleted by the OS on program termination or crash,
5275  so 
5276 \begin_inset Quotes eld
5277 \end_inset
5278
5279 stale
5280 \begin_inset Quotes erd
5281 \end_inset
5282
5283  pipes should not be possible.
5284 \end_layout
5285
5286 \begin_layout Standard
5287 To have several LyX processes with servers at the same time, you have to
5288  use different configurations, perhaps by using separate user directories,
5289  each with its own 
5290 \begin_inset Flex Code
5291 status collapsed
5292
5293 \begin_layout Plain Layout
5294 preferences
5295 \end_layout
5296
5297 \end_inset
5298
5299  file, for each process.
5300 \end_layout
5301
5302 \begin_layout Standard
5303 If you are developing a client program, you might find it useful to enable
5304  debugging information from the LyX server.
5305  Do this by starting LyX as 
5306 \begin_inset Flex Code
5307 status collapsed
5308
5309 \begin_layout Plain Layout
5310 lyx -dbg lyxserver
5311 \end_layout
5312
5313 \end_inset
5314
5315 .
5316 \end_layout
5317
5318 \begin_layout Standard
5319 You can find a complete example client written in C in the source distribution
5320  as 
5321 \begin_inset Flex Code
5322 status collapsed
5323
5324 \begin_layout Plain Layout
5325 development/lyxserver/server_monitor.c
5326 \end_layout
5327
5328 \end_inset
5329
5330 .
5331 \end_layout
5332
5333 \begin_layout Standard
5334 Another useful tool is command-line based client you will find in 
5335 \begin_inset Flex Code
5336 status collapsed
5337
5338 \begin_layout Plain Layout
5339 src/client/lyxclient
5340 \end_layout
5341
5342 \end_inset
5343
5344 .
5345 \end_layout
5346
5347 \begin_layout Section
5348 Normal communication
5349 \end_layout
5350
5351 \begin_layout Standard
5352 To issue a LyX call, the client writes a line of ASCII text into the input
5353  pipe.
5354  This line has the following format:
5355 \end_layout
5356
5357 \begin_layout Quote
5358 LYXCMD:
5359 \emph on
5360 clientname
5361 \emph default
5362 :
5363 \emph on
5364 function
5365 \emph default
5366 :
5367 \emph on
5368 argument
5369 \end_layout
5370
5371 \begin_layout Description
5372 clientname is a name that the client can choose arbitrarily.
5373  Its only use is that LyX will echo it if it sends an answer—so a client
5374  can dispatch results from different requesters.
5375 \end_layout
5376
5377 \begin_layout Description
5378 function is the function you want LyX to perform.
5379  It is the same as the commands you'd use in the minibuffer.
5380 \end_layout
5381
5382 \begin_layout Description
5383 argument is an optional argument which is meaningful only to some functions
5384  (for instance, the 
5385 \begin_inset Quotes eld
5386 \end_inset
5387
5388 self-insert
5389 \begin_inset Quotes erd
5390 \end_inset
5391
5392  LFUN will insert the argument as text at the cursor position).
5393 \end_layout
5394
5395 \begin_layout Standard
5396 The answer from LyX will arrive in the output pipe and be of the form
5397 \end_layout
5398
5399 \begin_layout Quote
5400 INFO:
5401 \emph on
5402 clientname
5403 \emph default
5404 :
5405 \emph on
5406 function
5407 \emph default
5408 :
5409 \emph on
5410 data
5411 \end_layout
5412
5413 \begin_layout Standard
5414 where 
5415 \emph on
5416 clientname
5417 \emph default
5418  and 
5419 \emph on
5420 function
5421 \emph default
5422  are just echoed from the command request, while 
5423 \emph on
5424 data
5425 \emph default
5426  is more or less useful information filled according to how the command
5427  execution worked out.
5428  Some commands, such as 
5429 \begin_inset Quotes eld
5430 \end_inset
5431
5432 font-state
5433 \begin_inset Quotes erd
5434 \end_inset
5435
5436 , will return information about the internal state of LyX, while other will
5437  return an empty data-response.
5438  This means that the command execution went fine.
5439 \end_layout
5440
5441 \begin_layout Standard
5442 In case of errors, the response from LyX will have this form
5443 \end_layout
5444
5445 \begin_layout Quote
5446 ERROR:
5447 \emph on
5448 clientname
5449 \emph default
5450 :
5451 \emph on
5452 function
5453 \emph default
5454 :
5455 \emph on
5456 error message
5457 \end_layout
5458
5459 \begin_layout Standard
5460 where the 
5461 \emph on
5462 error message
5463 \emph default
5464  should contain an explanation of why the command failed.
5465 \end_layout
5466
5467 \begin_layout Standard
5468 Examples:
5469 \end_layout
5470
5471 \begin_layout LyX-Code
5472 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5473 \begin_inset Newline newline
5474 \end_inset
5475
5476 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5477 \begin_inset Newline newline
5478 \end_inset
5479
5480 read a <~/.lyxpipe.out
5481 \begin_inset Newline newline
5482 \end_inset
5483
5484 echo $a
5485 \end_layout
5486
5487 \begin_layout Section
5488 Notification
5489 \end_layout
5490
5491 \begin_layout Standard
5492 LyX can notify clients of events going on asynchronously.
5493  Currently it will only do this if the user binds a key sequence with the
5494  function 
5495 \begin_inset Quotes eld
5496 \end_inset
5497
5498 notify
5499 \begin_inset Quotes erd
5500 \end_inset
5501
5502 .
5503  The format of the string LyX sends is as follows:
5504 \end_layout
5505
5506 \begin_layout Quote
5507 \begin_inset Flex Code
5508 status collapsed
5509
5510 \begin_layout Plain Layout
5511 NOTIFY:
5512 \end_layout
5513
5514 \end_inset
5515
5516
5517 \emph on
5518 key-sequence
5519 \end_layout
5520
5521 \begin_layout Standard
5522 where 
5523 \emph on
5524 key-sequence
5525 \emph default
5526  is the printed representation of the key sequence that was actually typed
5527  by the user.
5528 \end_layout
5529
5530 \begin_layout Standard
5531 This mechanism can be used to extend LyX's command set and implement macros.
5532  Bind some key sequence to 
5533 \begin_inset Quotes eld
5534 \end_inset
5535
5536 notify
5537 \begin_inset Quotes erd
5538 \end_inset
5539
5540 .
5541  Then start a client that listens on the output pipe, dispatches the command
5542  according to the sequence, and starts a function that may use LyX calls
5543  and LyX requests to issue a command or a series of commands to LyX.
5544 \end_layout
5545
5546 \begin_layout Section
5547 The simple LyX Server Protocol
5548 \end_layout
5549
5550 \begin_layout Standard
5551 LyX implements a simple protocol that can be used for session management.
5552  All messages are of the form
5553 \end_layout
5554
5555 \begin_layout Quote
5556 LYXSRV:
5557 \emph on
5558 clientname
5559 \emph default
5560 :
5561 \emph on
5562 protocol message
5563 \end_layout
5564
5565 \begin_layout Standard
5566 where 
5567 \emph on
5568 protocol message
5569 \emph default
5570  can be 
5571 \begin_inset Quotes eld
5572 \end_inset
5573
5574 hello
5575 \begin_inset Quotes erd
5576 \end_inset
5577
5578  or 
5579 \begin_inset Quotes eld
5580 \end_inset
5581
5582 bye
5583 \begin_inset Quotes erd
5584 \end_inset
5585
5586 .
5587  If 
5588 \begin_inset Quotes eld
5589 \end_inset
5590
5591 hello
5592 \begin_inset Quotes erd
5593 \end_inset
5594
5595  is received from a client, LyX will report back to inform the client that
5596  it's listening to it's messages, while 
5597 \begin_inset Quotes eld
5598 \end_inset
5599
5600 bye
5601 \begin_inset Quotes erd
5602 \end_inset
5603
5604  sent from LyX will inform clients that LyX is closing.
5605 \end_layout
5606
5607 \begin_layout Section
5608 Reverse DVI/PDF search
5609 \end_layout
5610
5611 \begin_layout Standard
5612 Some DVI/PDF viewers
5613 \begin_inset Foot
5614 status collapsed
5615
5616 \begin_layout Plain Layout
5617 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5618  Skim on Mac OSX and SumatraPDF on Windows.
5619 \end_layout
5620
5621 \end_inset
5622
5623  provide 
5624 \emph on
5625 reverse search
5626 \emph default
5627  facility (also called 
5628 \emph on
5629 inverse search
5630 \emph default
5631 ).
5632  This means that you can tell LyX to put the cursor to a specific line in
5633  the document by clicking at the respective position in the DVI/PDF output.
5634  To achieve this, the viewer must be able to communicate with LyX.
5635  This is done via the LyX server either by using the named pipe (
5636 \emph on
5637 lyxpipe
5638 \emph default
5639 ), or the UNIX domain socket (
5640 \emph on
5641 lyxsocket
5642 \emph default
5643 ) that LyX creates in its temporary directory (this is the way the 
5644 \begin_inset Flex Code
5645 status collapsed
5646
5647 \begin_layout Plain Layout
5648 lyxclient
5649 \end_layout
5650
5651 \end_inset
5652
5653  program communicates with LyX).
5654  In some cases, you need a helper script that mediates between the viewer
5655  and LyX, in others, the viewer can communicate with LyX directly.
5656  This depends on the selected viewer and on your operating system.
5657  The same applies to the way viewers need to be configured and the way the
5658  reverse search is actually performed.
5659  In what follows, we will thus describe how to setup reverse search for
5660  specific viewers.
5661  Before we turn to this, though, we will explain what needs to be done generally
5662  to enable reverse search in the DVI/PDF output.
5663 \end_layout
5664
5665 \begin_layout Subsection
5666 Automatic setup
5667 \begin_inset CommandInset label
5668 LatexCommand label
5669 name "sub:rev-search"
5670
5671 \end_inset
5672
5673
5674 \end_layout
5675
5676 \begin_layout Standard
5677 In most cases LyX will do the work for you by enabling the option 
5678 \begin_inset Flex MenuItem
5679 status collapsed
5680
5681 \begin_layout Plain Layout
5682 Synchronize with Output
5683 \end_layout
5684
5685 \end_inset
5686
5687  in the menu 
5688 \begin_inset Flex MenuItem
5689 status collapsed
5690
5691 \begin_layout Plain Layout
5692 Document\SpecialChar \menuseparator
5693 Settings\SpecialChar \menuseparator
5694 Output
5695 \end_layout
5696
5697 \end_inset
5698
5699 .
5700  In such a case LyX will automatically insert the necessary SyncTeX macro
5701  (for PDF) or load the srcltx package (for DVI) respectively.
5702  This option can be easily reached also on 
5703 \begin_inset Flex Code
5704 status collapsed
5705
5706 \begin_layout Plain Layout
5707 View/Update
5708 \end_layout
5709
5710 \end_inset
5711
5712  Toolbar.
5713 \end_layout
5714
5715 \begin_layout Standard
5716 If you need a different setting, you can select or input a custom macro
5717  from the drop down box just below 
5718 \begin_inset Flex MenuItem
5719 status collapsed
5720
5721 \begin_layout Plain Layout
5722 Document\SpecialChar \menuseparator
5723 Settings\SpecialChar \menuseparator
5724 Output\SpecialChar \menuseparator
5725 Synchronize with Output
5726 \end_layout
5727
5728 \end_inset
5729
5730 .
5731 \end_layout
5732
5733 \begin_layout Standard
5734 Note that the method 
5735 \begin_inset Flex Code
5736 status collapsed
5737
5738 \begin_layout Plain Layout
5739
5740 \backslash
5741 synctex=1
5742 \end_layout
5743
5744 \end_inset
5745
5746  enables gzip compression.
5747  If your viewer does not support it, you should instead use 
5748 \begin_inset Flex Code
5749 status collapsed
5750
5751 \begin_layout Plain Layout
5752
5753 \backslash
5754 synctex=-1
5755 \end_layout
5756
5757 \end_inset
5758
5759 .
5760 \end_layout
5761
5762 \begin_layout Standard
5763 Please aöso note that including the 
5764 \begin_inset Flex Code
5765 status collapsed
5766
5767 \begin_layout Plain Layout
5768 srcltx
5769 \end_layout
5770
5771 \end_inset
5772
5773  package or 
5774 \begin_inset Flex Code
5775 status collapsed
5776
5777 \begin_layout Plain Layout
5778 src-specials
5779 \end_layout
5780
5781 \end_inset
5782
5783  sometimes has an undesired impact on the typesetting.
5784  Thus, you should switch output synchronization off for the final typesetting
5785  if you use the 
5786 \begin_inset Flex Code
5787 status collapsed
5788
5789 \begin_layout Plain Layout
5790 srcltx
5791 \end_layout
5792
5793 \end_inset
5794
5795  package or 
5796 \begin_inset Flex Code
5797 status collapsed
5798
5799 \begin_layout Plain Layout
5800 src-specials
5801 \end_layout
5802
5803 \end_inset
5804
5805 .
5806  
5807 \end_layout
5808
5809 \begin_layout Standard
5810 In case you need some more special settings that are not covered by the
5811  automatic settings, read the next section about how to set up output synchroniz
5812 ation manually.
5813  If the automatic setup suits your needs, you can readily jump to section
5814 \begin_inset space ~
5815 \end_inset
5816
5817
5818 \begin_inset CommandInset ref
5819 LatexCommand ref
5820 reference "sub:configuring-viewers"
5821
5822 \end_inset
5823
5824 , where the necessary configuration steps in your viewer -- needed both
5825  with the automatic and the manual setup -- are described.
5826 \end_layout
5827
5828 \begin_layout Subsection
5829 Manual setup
5830 \end_layout
5831
5832 \begin_layout Standard
5833 LaTeX provides several different methods for reverse search.
5834  Some are built-in in the 
5835 \begin_inset Flex Code
5836 status collapsed
5837
5838 \begin_layout Plain Layout
5839 latex/pdflatex
5840 \end_layout
5841
5842 \end_inset
5843
5844  program, some are provided by external packages.
5845  Your choice depends on whether your LaTeX distribution already provides
5846  a given method (the built-in methods are rather new) and whether your viewer
5847  can cope with it.
5848  The available methods are described in the following.
5849 \end_layout
5850
5851 \begin_layout Subsubsection*
5852 Built-in DVI-search via src-specials (DVI only) 
5853 \end_layout
5854
5855 \begin_layout Standard
5856 This method provides the DVI file with the necessary information for reverse
5857  search.
5858  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5859  distribution should include it), and it works reliably.
5860  To enable it, change the 
5861 \begin_inset Flex MenuItem
5862 status collapsed
5863
5864 \begin_layout Plain Layout
5865 LaT
5866 \begin_inset ERT
5867 status collapsed
5868
5869 \begin_layout Plain Layout
5870
5871 {}
5872 \end_layout
5873
5874 \end_inset
5875
5876 eX (plain)->DVI
5877 \end_layout
5878
5879 \end_inset
5880
5881  or 
5882 \begin_inset Flex MenuItem
5883 status collapsed
5884
5885 \begin_layout Plain Layout
5886 LaT
5887 \begin_inset ERT
5888 status collapsed
5889
5890 \begin_layout Plain Layout
5891
5892 {}
5893 \end_layout
5894
5895 \end_inset
5896
5897 eX (plain)->DraftDVI
5898 \end_layout
5899
5900 \end_inset
5901
5902  converter in 
5903 \begin_inset Flex MenuItem
5904 status collapsed
5905
5906 \begin_layout Plain Layout
5907 Preferences\SpecialChar \menuseparator
5908 File Handling\SpecialChar \menuseparator
5909 Converters
5910 \end_layout
5911
5912 \end_inset
5913
5914  to 
5915 \begin_inset Flex Code
5916 status collapsed
5917
5918 \begin_layout Plain Layout
5919 latex -src-specials $$i
5920 \end_layout
5921
5922 \end_inset
5923
5924 .
5925  If this doesn't work, check if your TeX engine needs different options
5926  (the syntax might differ in some distributions).
5927 \end_layout
5928
5929 \begin_layout Subsubsection*
5930 External Packages (PDFSync and scrltx) 
5931 \end_layout
5932
5933 \begin_layout Standard
5934 The packages 
5935 \emph on
5936 pdfsync
5937 \emph default
5938  and 
5939 \emph on
5940 scrltx
5941 \emph default
5942  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5943  respectively.
5944  In order to enable it, load the packages in the LyX preamble: 
5945 \end_layout
5946
5947 \begin_layout Itemize
5948 \begin_inset Flex Code
5949 status collapsed
5950
5951 \begin_layout Plain Layout
5952
5953 \backslash
5954 usepackage{pdfsync}
5955 \end_layout
5956
5957 \end_inset
5958
5959  for reverse PDF search,
5960 \end_layout
5961
5962 \begin_layout Itemize
5963 \begin_inset Flex Code
5964 status collapsed
5965
5966 \begin_layout Plain Layout
5967
5968 \backslash
5969 usepackage[active]{srcltx}
5970 \end_layout
5971
5972 \end_inset
5973
5974  for reverse DVI search.
5975 \end_layout
5976
5977 \begin_layout Standard
5978 If you want to be able to perform both DVI and PDF reverse searches, you
5979  can also insert in the preamble the following lines
5980 \end_layout
5981
5982 \begin_layout LyX-Code
5983
5984 \backslash
5985 usepackage{ifpdf}
5986 \begin_inset Newline newline
5987 \end_inset
5988
5989
5990 \backslash
5991 ifpdf
5992 \begin_inset Newline newline
5993 \end_inset
5994
5995   
5996 \backslash
5997 usepackage{pdfsync}
5998 \begin_inset Newline newline
5999 \end_inset
6000
6001
6002 \backslash
6003 else
6004 \begin_inset Newline newline
6005 \end_inset
6006
6007   
6008 \backslash
6009 usepackage[active]{srcltx}
6010 \begin_inset Newline newline
6011 \end_inset
6012
6013
6014 \backslash
6015 fi
6016 \end_layout
6017
6018 \begin_layout Standard
6019 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6020  right package will be used.
6021 \end_layout
6022
6023 \begin_layout Standard
6024 Note that PDFSync might affect the output layout of your document.
6025  It is therefore advised to disable PDFsync for final documents.
6026 \end_layout
6027
6028 \begin_layout Subsubsection*
6029 Built-in reverse search via SyncTeX (DVI and PDF) 
6030 \end_layout
6031
6032 \begin_layout Standard
6033 Recent versions of 
6034 \begin_inset Flex Code
6035 status collapsed
6036
6037 \begin_layout Plain Layout
6038 (pdf)latex
6039 \end_layout
6040
6041 \end_inset
6042
6043  have built-in support for both PDF and DVI reverse search.
6044  This so-called 
6045 \emph on
6046 SyncTeX
6047 \emph default
6048  facility is basically the result of the integration of the PDFSync package
6049  to the pdftex program and its merge with the 
6050 \emph on
6051 scr-specials
6052 \emph default
6053  approach.
6054  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6055  to use it.
6056  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6057  already provide SyncTeX support.
6058 \end_layout
6059
6060 \begin_layout Standard
6061 To enable SyncTeX for DVI output, change the 
6062 \begin_inset Flex MenuItem
6063 status collapsed
6064
6065 \begin_layout Plain Layout
6066 LaT
6067 \begin_inset ERT
6068 status collapsed
6069
6070 \begin_layout Plain Layout
6071
6072 {}
6073 \end_layout
6074
6075 \end_inset
6076
6077 eX (plain) -> DVI
6078 \end_layout
6079
6080 \end_inset
6081
6082  or 
6083 \begin_inset Flex MenuItem
6084 status collapsed
6085
6086 \begin_layout Plain Layout
6087 LaT
6088 \begin_inset ERT
6089 status collapsed
6090
6091 \begin_layout Plain Layout
6092
6093 {}
6094 \end_layout
6095
6096 \end_inset
6097
6098 eX (plain) -> DraftDVI
6099 \end_layout
6100
6101 \end_inset
6102
6103  converter in 
6104 \begin_inset Flex MenuItem
6105 status collapsed
6106
6107 \begin_layout Plain Layout
6108 Preferences\SpecialChar \menuseparator
6109 File Handling\SpecialChar \menuseparator
6110 Converters
6111 \end_layout
6112
6113 \end_inset
6114
6115  to 
6116 \begin_inset Flex Code
6117 status collapsed
6118
6119 \begin_layout Plain Layout
6120 latex -synctex=1 $$i
6121 \end_layout
6122
6123 \end_inset
6124
6125 , and for PDF output, change the 
6126 \begin_inset Flex MenuItem
6127 status collapsed
6128
6129 \begin_layout Plain Layout
6130 LaT
6131 \begin_inset ERT
6132 status collapsed
6133
6134 \begin_layout Plain Layout
6135
6136 {}
6137 \end_layout
6138
6139 \end_inset
6140
6141 eX (pdflatex) -> PDF (pdflatex)
6142 \end_layout
6143
6144 \end_inset
6145
6146  or converter to 
6147 \begin_inset Flex Code
6148 status collapsed
6149
6150 \begin_layout Plain Layout
6151 pdflatex -synctex=1 $$i
6152 \end_layout
6153
6154 \end_inset
6155
6156 .
6157  Check the documentation of your viewer whether the viewer needs to be configure
6158 d for the use with SyncTeX.
6159 \begin_inset Foot
6160 status collapsed
6161
6162 \begin_layout Plain Layout
6163 Note that the option 
6164 \begin_inset Flex Code
6165 status collapsed
6166
6167 \begin_layout Plain Layout
6168 -synctex=1
6169 \end_layout
6170
6171 \end_inset
6172
6173  option enables gzip compression.
6174  If your viewer does not support it, you should instead use 
6175 \begin_inset Flex Code
6176 status collapsed
6177
6178 \begin_layout Plain Layout
6179 -synctex=-1
6180 \end_layout
6181
6182 \end_inset
6183
6184 .
6185 \end_layout
6186
6187 \end_inset
6188
6189
6190 \end_layout
6191
6192 \begin_layout Subsection
6193 Configuring and using specific viewers
6194 \begin_inset CommandInset label
6195 LatexCommand label
6196 name "sub:configuring-viewers"
6197
6198 \end_inset
6199
6200
6201 \end_layout
6202
6203 \begin_layout Subsubsection*
6204 Xdvi (all platforms)
6205 \end_layout
6206
6207 \begin_layout Standard
6208 If you use 
6209 \begin_inset Flex Code
6210 status collapsed
6211
6212 \begin_layout Plain Layout
6213 xdvi
6214 \end_layout
6215
6216 \end_inset
6217
6218 , you don't need to do anything else for performing a reverse DVI search,
6219  as LyX already provides the necessary hooks for automatically using the
6220  
6221 \begin_inset Flex Code
6222 status collapsed
6223
6224 \begin_layout Plain Layout
6225 lyxclient
6226 \end_layout
6227
6228 \end_inset
6229
6230  program.
6231  Just setup your document as described above (reverse search is triggered
6232  by Ctrl-click or Alt-click on Mac OSX, respectively).
6233 \end_layout
6234
6235 \begin_layout Standard
6236 However, if for whatever reason you want to use the named pipe instead of
6237  the socket for communicating with LyX, simply change the DVI viewer in
6238  
6239 \begin_inset Flex MenuItem
6240 status collapsed
6241
6242 \begin_layout Plain Layout
6243 Preferences\SpecialChar \menuseparator
6244 File Handling\SpecialChar \menuseparator
6245 File formats
6246 \end_layout
6247
6248 \end_inset
6249
6250  to
6251 \begin_inset Foot
6252 status collapsed
6253
6254 \begin_layout Plain Layout
6255 On Mac OSX you have to use 
6256 \begin_inset Flex Code
6257 status collapsed
6258
6259 \begin_layout Plain Layout
6260 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6261 \end_layout
6262
6263 \end_inset
6264
6265
6266 \end_layout
6267
6268 \end_inset
6269
6270  
6271 \begin_inset Flex Code
6272 status collapsed
6273
6274 \begin_layout Plain Layout
6275 xdvi -editor 'lyxeditor.sh %f %l'
6276 \end_layout
6277
6278 \end_inset
6279
6280 , where 
6281 \begin_inset Flex Code
6282 status collapsed
6283
6284 \begin_layout Plain Layout
6285 lyxeditor.sh
6286 \end_layout
6287
6288 \end_inset
6289
6290  is a suitable script.
6291  For example, a minimal shell script is the following one:
6292 \end_layout
6293
6294 \begin_layout LyX-Code
6295 #!/bin/sh
6296 \begin_inset Newline newline
6297 \end_inset
6298
6299 LYXPIPE="/path/to/lyxpipe"
6300 \begin_inset Newline newline
6301 \end_inset
6302
6303 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6304 \begin_inset Newline newline
6305 \end_inset
6306
6307 echo "$COMMAND" > "${LYXPIPE}".in || exit
6308 \begin_inset Newline newline
6309 \end_inset
6310
6311 read < "${LYXPIPE}".out || exit
6312 \end_layout
6313
6314 \begin_layout Standard
6315 where 
6316 \begin_inset Flex Code
6317 status collapsed
6318
6319 \begin_layout Plain Layout
6320 /path/to/lyxpipe
6321 \end_layout
6322
6323 \end_inset
6324
6325  is the Ly
6326 \begin_inset ERT
6327 status collapsed
6328
6329 \begin_layout Plain Layout
6330
6331 {}
6332 \end_layout
6333
6334 \end_inset
6335
6336 XServer pipe path specified in 
6337 \begin_inset Flex MenuItem
6338 status collapsed
6339
6340 \begin_layout Plain Layout
6341 Preferences\SpecialChar \menuseparator
6342 Paths
6343 \end_layout
6344
6345 \end_inset
6346
6347 .
6348 \begin_inset Foot
6349 status collapsed
6350
6351 \begin_layout Plain Layout
6352 In the 
6353 \begin_inset Flex Code
6354 status collapsed
6355
6356 \begin_layout Plain Layout
6357 development/tools
6358 \end_layout
6359
6360 \end_inset
6361
6362  folder of a source distribution you can find a 
6363 \begin_inset Flex Code
6364 status collapsed
6365
6366 \begin_layout Plain Layout
6367 lyxeditor
6368 \end_layout
6369
6370 \end_inset
6371
6372  script which is able to locate the 
6373 \emph on
6374 lyxpipe
6375 \emph default
6376  based on your preferences.
6377 \end_layout
6378
6379 \end_inset
6380
6381
6382 \end_layout
6383
6384 \begin_layout Subsubsection*
6385 MacDviX (Mac OSX)
6386 \end_layout
6387
6388 \begin_layout Standard
6389 At the end of 
6390 \begin_inset Flex Code
6391 status collapsed
6392
6393 \begin_layout Plain Layout
6394 /Applications/MacDviX_Folder/calleditor.script
6395 \end_layout
6396
6397 \end_inset
6398
6399 , add the following lines:
6400 \end_layout
6401
6402 \begin_layout LyX-Code
6403 /Applications/Ly
6404 \begin_inset ERT
6405 status collapsed
6406
6407 \begin_layout Plain Layout
6408
6409 {}
6410 \end_layout
6411
6412 \end_inset
6413
6414 X.app/Contents/MacOS/lyxeditor "$2" $1
6415 \begin_inset Newline newline
6416 \end_inset
6417
6418 exit 1
6419 \end_layout
6420
6421 \begin_layout Standard
6422 Modify the lines accordingly if you install LyX somewhere else than in the
6423  Applications folder.
6424 \end_layout
6425
6426 \begin_layout Standard
6427 Reverse search is triggered by Alt-click (OPTION-click).
6428 \end_layout
6429
6430 \begin_layout Subsubsection*
6431 Skim (Mac OSX)
6432 \end_layout
6433
6434 \begin_layout Standard
6435 Enter 
6436 \begin_inset Flex Code
6437 status collapsed
6438
6439 \begin_layout Plain Layout
6440 open -a Skim.app $$i
6441 \end_layout
6442
6443 \end_inset
6444
6445  to the viewer setting in 
6446 \begin_inset Flex MenuItem
6447 status collapsed
6448
6449 \begin_layout Plain Layout
6450 Preferences\SpecialChar \menuseparator
6451 File Handling\SpecialChar \menuseparator
6452 File formats\SpecialChar \menuseparator
6453 PDF (pdflatex)
6454 \end_layout
6455
6456 \end_inset
6457
6458 , and then in 
6459 \begin_inset Flex MenuItem
6460 status collapsed
6461
6462 \begin_layout Plain Layout
6463 Skim\SpecialChar \menuseparator
6464 Preferences\SpecialChar \menuseparator
6465 Sync
6466 \end_layout
6467
6468 \end_inset
6469
6470  select Ly
6471 \begin_inset ERT
6472 status collapsed
6473
6474 \begin_layout Plain Layout
6475
6476 {}
6477 \end_layout
6478
6479 \end_inset
6480
6481 X.
6482 \end_layout
6483
6484 \begin_layout Standard
6485 Reverse search is triggered by COMMAND-SHIFT-click
6486 \end_layout
6487
6488 \begin_layout Subsubsection*
6489 Okular (KDE)
6490 \end_layout
6491
6492 \begin_layout Standard
6493 Go to 
6494 \begin_inset Flex MenuItem
6495 status collapsed
6496
6497 \begin_layout Plain Layout
6498 Settings\SpecialChar \menuseparator
6499 Configure Okular\SpecialChar \ldots{}
6500 \SpecialChar \menuseparator
6501 Editor
6502 \end_layout
6503
6504 \end_inset
6505
6506 , select 
6507 \begin_inset Quotes eld
6508 \end_inset
6509
6510 Custom Text Editor
6511 \begin_inset Quotes erd
6512 \end_inset
6513
6514  and add the command 
6515 \begin_inset Flex Code
6516 status collapsed
6517
6518 \begin_layout Plain Layout
6519 lyxclient -g %f %l
6520 \end_layout
6521
6522 \end_inset
6523
6524 .
6525 \end_layout
6526
6527 \begin_layout Standard
6528 Reverse search is triggered by SHIFT-click.
6529 \end_layout
6530
6531 \begin_layout Subsubsection*
6532 YAP (Windows)
6533 \end_layout
6534
6535 \begin_layout Standard
6536 Launch yap, choose its 
6537 \begin_inset Flex MenuItem
6538 status collapsed
6539
6540 \begin_layout Plain Layout
6541 View\SpecialChar \menuseparator
6542 Options
6543 \end_layout
6544
6545 \end_inset
6546
6547  menu and select the 
6548 \begin_inset Quotes eld
6549 \end_inset
6550
6551 Inverse DVI Search
6552 \begin_inset Quotes erd
6553 \end_inset
6554
6555  tab.
6556  Click on the 
6557 \begin_inset Quotes eld
6558 \end_inset
6559
6560 New\SpecialChar \ldots{}
6561
6562 \begin_inset Quotes erd
6563 \end_inset
6564
6565  button and, in the window that opens, enter 
6566 \begin_inset Quotes eld
6567 \end_inset
6568
6569 LyX Editor
6570 \begin_inset Quotes erd
6571 \end_inset
6572
6573  (or any other name you like) in the 
6574 \begin_inset Quotes eld
6575 \end_inset
6576
6577 Name:
6578 \begin_inset Quotes erd
6579 \end_inset
6580
6581  field.
6582  Now click on the button labeled 
6583 \begin_inset Quotes eld
6584 \end_inset
6585
6586 \SpecialChar \ldots{}
6587
6588 \begin_inset Quotes erd
6589 \end_inset
6590
6591  to open a file dialog and navigate to the directory containing the batch
6592  file 
6593 \begin_inset Flex Code
6594 status collapsed
6595
6596 \begin_layout Plain Layout
6597 lyxeditor.bat
6598 \end_layout
6599
6600 \end_inset
6601
6602  (see below).
6603  Select 
6604 \begin_inset Flex Code
6605 status collapsed
6606
6607 \begin_layout Plain Layout
6608 lyxeditor.bat
6609 \end_layout
6610
6611 \end_inset
6612
6613  and then specify the program arguments as 
6614 \begin_inset Flex Code
6615 status collapsed
6616
6617 \begin_layout Plain Layout
6618 %f %l
6619 \end_layout
6620
6621 \end_inset
6622
6623 .
6624  The 
6625 \begin_inset Flex Code
6626 status collapsed
6627
6628 \begin_layout Plain Layout
6629 lyxeditor.bat
6630 \end_layout
6631
6632 \end_inset
6633
6634  wrapper is used for communicating with LyX through the 
6635 \emph on
6636 lyxpipe
6637 \emph default
6638  and is as follows:
6639 \end_layout
6640
6641 \begin_layout LyX-Code
6642 @echo off
6643 \begin_inset Newline newline
6644 \end_inset
6645
6646 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6647 \backslash
6648
6649 \backslash
6650 .
6651 \backslash
6652 pipe
6653 \backslash
6654 lyxpipe.in
6655 \begin_inset Newline newline
6656 \end_inset
6657
6658 type 
6659 \backslash
6660
6661 \backslash
6662 .
6663 \backslash
6664 pipe
6665 \backslash
6666 lyxpipe.out
6667 \end_layout
6668
6669 \begin_layout Standard
6670 Make sure that the LyXServer pipe path you specified in LyX is 
6671 \begin_inset Flex Code
6672 status collapsed
6673
6674 \begin_layout Plain Layout
6675
6676 \backslash
6677
6678 \backslash
6679 .
6680 \backslash
6681 pipe
6682 \backslash
6683 lyxpipe
6684 \end_layout
6685
6686 \end_inset
6687
6688 , otherwise change the 
6689 \begin_inset Flex Code
6690 status collapsed
6691
6692 \begin_layout Plain Layout
6693 lyxeditor.bat
6694 \end_layout
6695
6696 \end_inset
6697
6698  wrapper accordingly.
6699 \end_layout
6700
6701 \begin_layout Standard
6702 In yap, reverse search is triggered by double-click.
6703 \end_layout
6704
6705 \begin_layout Subsubsection*
6706 SumatraPDF (Windows)
6707 \end_layout
6708
6709 \begin_layout Standard
6710 In order to use SumatraPDF for inverse search, enter 
6711 \begin_inset Flex Code
6712 status collapsed
6713
6714 \begin_layout Plain Layout
6715 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6716 \end_layout
6717
6718 \end_inset
6719
6720  in the viewer setting in 
6721 \begin_inset Flex MenuItem
6722 status collapsed
6723
6724 \begin_layout Plain Layout
6725 Preferences\SpecialChar \menuseparator
6726 File Handling\SpecialChar \menuseparator
6727 File formats\SpecialChar \menuseparator
6728 PDF (pdflatex)
6729 \end_layout
6730
6731 \end_inset
6732
6733 , where 
6734 \begin_inset Flex Code
6735 status collapsed
6736
6737 \begin_layout Plain Layout
6738 lyxeditor.bat
6739 \end_layout
6740
6741 \end_inset
6742
6743  is the previous wrapper.
6744  If SumatraPDF.exe is not in your command PATH, use its full file name.
6745 \end_layout
6746
6747 \begin_layout Standard
6748 Reverse search is triggered by double-click.
6749 \end_layout
6750
6751 \begin_layout Subsubsection*
6752 YAP (Cygwin)
6753 \end_layout
6754
6755 \begin_layout Standard
6756 First of all, make sure that yap is your default DVI viewer in the Windows
6757  environment, then launch it, choose its 
6758 \begin_inset Flex MenuItem
6759 status collapsed
6760
6761 \begin_layout Plain Layout
6762 View\SpecialChar \menuseparator
6763 Options
6764 \end_layout
6765
6766 \end_inset
6767
6768  menu and select the 
6769 \begin_inset Quotes eld
6770 \end_inset
6771
6772 Inverse DVI Search
6773 \begin_inset Quotes erd
6774 \end_inset
6775
6776  tab.
6777  Click on the 
6778 \begin_inset Quotes eld
6779 \end_inset
6780
6781 New\SpecialChar \ldots{}
6782
6783 \begin_inset Quotes erd
6784 \end_inset
6785
6786  button and, in the window that opens, enter 
6787 \begin_inset Quotes eld
6788 \end_inset
6789
6790 LyX Editor
6791 \begin_inset Quotes erd
6792 \end_inset
6793
6794  (or any other name you like) in the 
6795 \begin_inset Quotes eld
6796 \end_inset
6797
6798 Name:
6799 \begin_inset Quotes erd
6800 \end_inset
6801
6802  field.
6803  Now click on the button labeled 
6804 \begin_inset Quotes eld
6805 \end_inset
6806
6807 \SpecialChar \ldots{}
6808
6809 \begin_inset Quotes erd
6810 \end_inset
6811
6812  to open a file dialog and navigate to the directory containing the 
6813 \begin_inset Flex Code
6814 status collapsed
6815
6816 \begin_layout Plain Layout
6817 lyxeditor.exe
6818 \end_layout
6819
6820 \end_inset
6821
6822  program (which is installed by default on Cygwin along with the LyX executable).
6823  Select 
6824 \begin_inset Flex Code
6825 status collapsed
6826
6827 \begin_layout Plain Layout
6828 lyxeditor.exe
6829 \end_layout
6830
6831 \end_inset
6832
6833  and then specify the program arguments as 
6834 \begin_inset Flex Code
6835 status collapsed
6836
6837 \begin_layout Plain Layout
6838 -g %f %l
6839 \end_layout
6840
6841 \end_inset
6842
6843 .
6844  In this way, you will be using the 
6845 \emph on
6846 lyxsocket
6847 \emph default
6848  for communicating with LyX.
6849  If, for whatever reason, you want to use the 
6850 \emph on
6851 lyxpipe
6852 \emph default
6853 , omit the 
6854 \begin_inset Flex Code
6855 status collapsed
6856
6857 \begin_layout Plain Layout
6858 -g
6859 \end_layout
6860
6861 \end_inset
6862
6863  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6864 \end_layout
6865
6866 \begin_layout Standard
6867 In yap, reverse search is triggered by double-click.
6868 \end_layout
6869
6870 \begin_layout Subsubsection*
6871 SumatraPDF (Cygwin)
6872 \end_layout
6873
6874 \begin_layout Standard
6875 In order to use SumatraPDF for inverse search, enter 
6876 \begin_inset Flex Code
6877 status collapsed
6878
6879 \begin_layout Plain Layout
6880 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6881 \end_layout
6882
6883 \end_inset
6884
6885  in the viewer setting in 
6886 \begin_inset Flex MenuItem
6887 status collapsed
6888
6889 \begin_layout Plain Layout
6890 Preferences\SpecialChar \menuseparator
6891 File Handling\SpecialChar \menuseparator
6892 File formats\SpecialChar \menuseparator
6893 PDF (pdflatex)
6894 \end_layout
6895
6896 \end_inset
6897
6898 .
6899  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6900  The 
6901 \begin_inset Flex Code
6902 status collapsed
6903
6904 \begin_layout Plain Layout
6905 -g
6906 \end_layout
6907
6908 \end_inset
6909
6910  enables communication via the 
6911 \emph on
6912 lyxsocket
6913 \emph default
6914 .
6915  Again, omit the 
6916 \begin_inset Flex Code
6917 status collapsed
6918
6919 \begin_layout Plain Layout
6920 -g
6921 \end_layout
6922
6923 \end_inset
6924
6925  option if you want to use the 
6926 \emph on
6927 lyxpipe
6928 \emph default
6929 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6930 \end_layout
6931
6932 \begin_layout Standard
6933 Reverse search is triggered by double-click.
6934 \end_layout
6935
6936 \begin_layout Section
6937 Forward search
6938 \end_layout
6939
6940 \begin_layout Standard
6941 Forward search is, as the name implies, in a sense the 
6942 \begin_inset Quotes eld
6943 \end_inset
6944
6945 opposite
6946 \begin_inset Quotes erd
6947 \end_inset
6948
6949  to reverse search.
6950  It allows you to let the viewer jump to a given position from within LyX.
6951  If forward search is set up (as described in what follows), you can put
6952  the cursor anywhere in your LyX document, and hit 
6953 \begin_inset Flex MenuItem
6954 status collapsed
6955
6956 \begin_layout Plain Layout
6957 Navigate\SpecialChar \menuseparator
6958 Forward search
6959 \end_layout
6960
6961 \end_inset
6962
6963  (or select 
6964 \begin_inset Flex MenuItem
6965 status collapsed
6966
6967 \begin_layout Plain Layout
6968 Forward search
6969 \end_layout
6970
6971 \end_inset
6972
6973  in the context menu via right mouse click), and then the viewer will jump
6974  to that position as well.
6975  This implies, of course, that your viewer supports this function.
6976 \end_layout
6977
6978 \begin_layout Standard
6979 To make forward search possible, you first need to provide the generated
6980  output PDF/DVI file with additional information about the TeX sources.
6981  This can be done via the methods described in the section 
6982 \begin_inset CommandInset ref
6983 LatexCommand ref
6984 reference "sub:rev-search"
6985
6986 \end_inset
6987
6988 .
6989 \end_layout
6990
6991 \begin_layout Standard
6992 Additionally, you need to configure LyX for using your viewers in 
6993 \begin_inset Flex MenuItem
6994 status collapsed
6995
6996 \begin_layout Plain Layout
6997 Tools\SpecialChar \menuseparator
6998 Preferences\SpecialChar \menuseparator
6999 Output\SpecialChar \menuseparator
7000 General
7001 \end_layout
7002
7003 \end_inset
7004
7005 .
7006  We provide a range of tested configurations for some viewers, which you
7007  can select from the drop down list.
7008  If none of these configurations suits you, you have to find out and enter
7009  a suitable configuration yourself.
7010  The definition syntax uses the following placeholders:
7011 \end_layout
7012
7013 \begin_layout Itemize
7014 \noindent
7015 \begin_inset Flex Code
7016 status collapsed
7017
7018 \begin_layout Plain Layout
7019 $$n
7020 \end_layout
7021
7022 \end_inset
7023
7024 : row number
7025 \end_layout
7026
7027 \begin_layout Itemize
7028 \noindent
7029 \begin_inset Flex Code
7030 status collapsed
7031
7032 \begin_layout Plain Layout
7033 $$t
7034 \end_layout
7035
7036 \end_inset
7037
7038 : name of the (temporary) exported .tex file
7039 \end_layout
7040
7041 \begin_layout Itemize
7042 \noindent
7043 \begin_inset Flex Code
7044 status collapsed
7045
7046 \begin_layout Plain Layout
7047 $$o
7048 \end_layout
7049
7050 \end_inset
7051
7052 : name of the exported output file (either dvi or pdf, depending on which
7053  one exists in the temporary directory)
7054 \end_layout
7055
7056 \begin_layout Standard
7057 Note that only some of the viewers provide full forward search functionality,
7058  among them yap, xdvi, okular and Sumatra PDF.
7059 \begin_inset Foot
7060 status collapsed
7061
7062 \begin_layout Plain Layout
7063 For Sumatra CMCDDE is needed --- downloadable from 
7064 \begin_inset CommandInset href
7065 LatexCommand href
7066 target "http://www.istri.fr/zip/CMCDDE.zip"
7067
7068 \end_inset
7069
7070
7071 \end_layout
7072
7073 \end_inset
7074
7075  While many of the widespread PDF viewers (most notably Adobe Reader) do
7076  not support forward search at all, some other viewers -- e.
7077 \begin_inset space \thinspace{}
7078 \end_inset
7079
7080 g.
7081  evince and xpdf -- allow at least to reload the document and jump to a
7082  specific page of the file, so you can at least navigate 
7083 \begin_inset Quotes eld
7084 \end_inset
7085
7086 near
7087 \begin_inset Quotes erd
7088 \end_inset
7089
7090 .
7091  These latter functionality is provided by an external call of synctex (see
7092  the predefined example configurations).
7093  
7094 \end_layout
7095
7096 \begin_layout Standard
7097 Forward search works both with DVI and PDF output.
7098  LyX simply checks which preview format you have used before (i.
7099 \begin_inset space \thinspace{}
7100 \end_inset
7101
7102 e., which format is already there in the temporary directory) and chooses
7103  the appropriate configuration for the respective format.
7104 \end_layout
7105
7106 \begin_layout Chapter
7107 Special Document Classes
7108 \end_layout
7109
7110 \begin_layout Section
7111 A&A Paper
7112 \end_layout
7113
7114 \begin_layout Standard
7115 by 
7116 \noun on
7117 Peter Sütterlin
7118 \end_layout
7119
7120 \begin_layout Subsection
7121 Introduction
7122 \end_layout
7123
7124 \begin_layout Standard
7125 This section describes how LyX can be used to write articles for submission
7126  to the scientific journal 
7127 \emph on
7128 Astronomy and Astrophysics
7129 \emph default
7130  (www.edpsciences.fr/aa/ 
7131 \begin_inset Flex URL
7132 status collapsed
7133
7134 \begin_layout Plain Layout
7135
7136 http://www.edpsciences.fr/aa/
7137 \end_layout
7138
7139 \end_inset
7140
7141 ) using Version 5.01 of the document class 
7142 \family typewriter
7143 aa.cls
7144 \family default
7145 .
7146  This package can be downloaded from the ftp site
7147 \end_layout
7148
7149 \begin_layout Standard
7150 \begin_inset VSpace medskip
7151 \end_inset
7152
7153
7154 \end_layout
7155
7156 \begin_layout Standard
7157 \align center
7158 \begin_inset Flex URL
7159 status collapsed
7160
7161 \begin_layout Plain Layout
7162
7163 ftp://ftp.edpsciences.org/pub/aa/readme.html
7164 \end_layout
7165
7166 \end_inset
7167
7168
7169 \end_layout
7170
7171 \begin_layout Standard
7172 \begin_inset VSpace medskip
7173 \end_inset
7174
7175
7176 \end_layout
7177
7178 \begin_layout Standard
7179 A manual comes together with that package, and this text is not meant to
7180  replace the original manual but is merely a short guide in how to realize
7181  the correct form of your paper.
7182  
7183 \end_layout
7184
7185 \begin_layout Standard
7186 Please note that the publisher of the journal was changed from Springer
7187  to EDP Sciences starting January 1, 2001.
7188  That change involved also some slight changes to the style files, namely
7189  the removal of the thesaurus command.
7190  The LyX class aa supports the newest version of these style files, V 5.01.
7191  If you have an older version installed, please upgrade.
7192  For compatibility, the old (version 4) layout has been kept as 
7193 \family sans
7194 article (A&A V4)
7195 \family default
7196 .
7197  Please refer to the comments in 
7198 \family typewriter
7199 LyXDir/layouts/aapaper.layout
7200 \family default
7201 .
7202 \end_layout
7203
7204 \begin_layout Subsection
7205 Getting started
7206 \end_layout
7207
7208 \begin_layout Standard
7209 It is recommended you start from the example template distributed with LyX.
7210  If you are not using a template, note the following settings:
7211 \end_layout
7212
7213 \begin_layout Itemize
7214 Select 
7215 \family sans
7216 article (A&A)
7217 \family default
7218  in the 
7219 \family sans
7220 Document\SpecialChar \menuseparator
7221 Settings
7222 \family default
7223  dialog (OK, that one was obvious).
7224 \end_layout
7225
7226 \begin_layout Itemize
7227 Don't change the option 
7228 \family sans
7229 Page
7230 \begin_inset space ~
7231 \end_inset
7232
7233 style
7234 \family default
7235 : Leave it set to 
7236 \family sans
7237 default
7238 \family default
7239 .
7240  The whole layout is done by the macros, you shouldn't change anything.
7241 \end_layout
7242
7243 \begin_layout Subsection
7244 The header block
7245 \end_layout
7246
7247 \begin_layout Standard
7248 First thing to enter is the header information.
7249  It consists of seven entries, of which some are optional.
7250  They are
7251 \end_layout
7252
7253 \begin_layout Itemize
7254
7255 \family sans
7256 Title
7257 \family default
7258 : [required] 
7259 \end_layout
7260
7261 \begin_layout Itemize
7262
7263 \family sans
7264 Subtitle
7265 \family default
7266 : [optional] 
7267 \end_layout
7268
7269 \begin_layout Itemize
7270
7271 \family sans
7272 Author
7273 \family default
7274 : [required]
7275 \end_layout
7276
7277 \begin_layout Itemize
7278
7279 \family sans
7280 Address
7281 \family default
7282 : [required]
7283 \end_layout
7284
7285 \begin_layout Itemize
7286
7287 \family sans
7288 Offprints
7289 \family default
7290 : [optional] if more than one author: whom to contact for offprint requests.
7291 \end_layout
7292
7293 \begin_layout Itemize
7294
7295 \family sans
7296 Mail
7297 \family default
7298 : [optional] mail address for contacts.
7299 \end_layout
7300
7301 \begin_layout Itemize
7302
7303 \family sans
7304 Date
7305 \family default
7306 : [required].
7307  Suggested format is 
7308 \family typewriter
7309 Received: <date>; Accepted <date> 
7310 \end_layout
7311
7312 \begin_layout Standard
7313 There is no need to issue the 
7314 \family typewriter
7315
7316 \backslash
7317 maketitle
7318 \family default
7319  command, this is done automatically by LyX when the header is finished.
7320  Although the order of the single header entries doesn't matter it is advised
7321  to keep the above sequence, just to get the best optics and meets the layout
7322  of the real document.
7323 \end_layout
7324
7325 \begin_layout Standard
7326 If you want to place footnotes in the header block, e.
7327 \begin_inset space \thinspace{}
7328 \end_inset
7329
7330 g.
7331 \begin_inset space \space{}
7332 \end_inset
7333
7334 to state your present address, just use the standard footnote via the menu
7335  
7336 \family sans
7337 Insert\SpecialChar \menuseparator
7338 Footnote.
7339
7340 \family default
7341  LyX will automagically use the term 
7342 \family typewriter
7343
7344 \backslash
7345 thanks{}
7346 \family default
7347  in that case.
7348 \end_layout
7349
7350 \begin_layout Standard
7351 In addition to these topics, the macros use three additional LaTeX commands
7352  that have no counterpart in LyX:
7353 \end_layout
7354
7355 \begin_layout Itemize
7356
7357 \family typewriter
7358
7359 \backslash
7360 and
7361 \family default
7362  to separate different names for more than one author and institute, respectivel
7363 y.
7364 \end_layout
7365
7366 \begin_layout Itemize
7367
7368 \family typewriter
7369
7370 \backslash
7371 inst{<nr>}
7372 \family default
7373 to mark corresponding author/institute pairs.
7374  The institutes are numbered sequentially as they appear in the 
7375 \family sans
7376 Address
7377 \family default
7378  field, so you have to put a marker to each author.
7379 \end_layout
7380
7381 \begin_layout Itemize
7382
7383 \family typewriter
7384
7385 \backslash
7386 email{address}
7387 \family default
7388  to supply an email address for fast contact.
7389 \end_layout
7390
7391 \begin_layout Standard
7392 In all cases, the appropriate command has to be entered in LyX and marked
7393  as LaTeX code.
7394  See the examples.
7395  
7396 \end_layout
7397
7398 \begin_layout Subsection
7399 The abstract
7400 \end_layout
7401
7402 \begin_layout Standard
7403 The abstract should immediately follow the header block.
7404  With version 5 the abstract environment was changed to a command, and there
7405  is now a resctriction to only one paragraph.
7406  In addition, it should contain an entry with the keywords.
7407  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7408  command 
7409 \family typewriter
7410
7411 \backslash
7412 keywords{}
7413 \family default
7414  by hand and mark it as LaTeX code.
7415  Refer to the example paper.
7416 \end_layout
7417
7418 \begin_layout Subsection
7419 Supported environments
7420 \end_layout
7421
7422 \begin_layout Standard
7423 The A&A paper layout supports the following environments for structuring
7424  your text:
7425 \end_layout
7426
7427 \begin_layout Itemize
7428
7429 \family sans
7430 Standard
7431 \end_layout
7432
7433 \begin_layout Itemize
7434
7435 \family sans
7436 Section
7437 \end_layout
7438
7439 \begin_layout Itemize
7440
7441 \family sans
7442 Subsection
7443 \end_layout
7444
7445 \begin_layout Itemize
7446
7447 \family sans
7448 Subsubsection
7449 \end_layout
7450
7451 \begin_layout Itemize
7452
7453 \family sans
7454 Itemize
7455 \end_layout
7456
7457 \begin_layout Itemize
7458
7459 \family sans
7460 Enumerate
7461 \end_layout
7462
7463 \begin_layout Itemize
7464
7465 \family sans
7466 Description
7467 \end_layout
7468
7469 \begin_layout Itemize
7470
7471 \family sans
7472 Caption
7473 \end_layout
7474
7475 \begin_layout Itemize
7476
7477 \family sans
7478 Abstract
7479 \end_layout
7480
7481 \begin_layout Itemize
7482
7483 \family sans
7484 Acknowledgment
7485 \end_layout
7486
7487 \begin_layout Itemize
7488
7489 \family sans
7490 Bibliography
7491 \end_layout
7492
7493 \begin_layout Itemize
7494
7495 \family sans
7496 LaTeX
7497 \end_layout
7498
7499 \begin_layout Subsection
7500 Commands not supported by LyX
7501 \end_layout
7502
7503 \begin_layout Standard
7504 Some commands are not yet supported by the 
7505 \family sans
7506 paper (A&A)
7507 \family default
7508  layout for LyX.
7509  Some have already been mentioned.
7510  For the sake of completeness, they are listed all together here:
7511 \end_layout
7512
7513 \begin_layout Itemize
7514
7515 \family typewriter
7516
7517 \backslash
7518 and
7519 \end_layout
7520
7521 \begin_layout Itemize
7522
7523 \family typewriter
7524
7525 \backslash
7526 email
7527 \end_layout
7528
7529 \begin_layout Itemize
7530
7531 \family typewriter
7532
7533 \backslash
7534 appendix
7535 \end_layout
7536
7537 \begin_layout Itemize
7538
7539 \family typewriter
7540
7541 \backslash
7542 authorrunning
7543 \end_layout
7544
7545 \begin_layout Itemize
7546
7547 \family typewriter
7548
7549 \backslash
7550 inst{}
7551 \end_layout
7552
7553 \begin_layout Itemize
7554
7555 \family typewriter
7556
7557 \backslash
7558 keywords{}
7559 \end_layout
7560
7561 \begin_layout Itemize
7562
7563 \family typewriter
7564
7565 \backslash
7566 object{}
7567 \end_layout
7568
7569 \begin_layout Itemize
7570
7571 \family typewriter
7572
7573 \backslash
7574 titlerunning{}
7575 \end_layout
7576
7577 \begin_layout Standard
7578 If you want to use any of these commands, you have to enter them yourself.
7579  
7580 \series bold
7581 Do not forget to mark them as LaTeX code!
7582 \end_layout
7583
7584 \begin_layout Subsection
7585 Figure and Table Floats
7586 \end_layout
7587
7588 \begin_layout Standard
7589 LyX provides support for the necessary float environments 
7590 \family sans
7591 figure, figure*, table
7592 \family default
7593  and 
7594 \family sans
7595 table*
7596 \family default
7597 , therefore we won't tell much about it here.
7598  Refer to the 
7599 \emph on
7600 User's
7601 \begin_inset space ~
7602 \end_inset
7603
7604 Guide
7605 \emph default
7606 .
7607  Just remember that tables should be left-aligned.
7608  For that, select the table and change the alignment in 
7609 \family sans
7610 Edit\SpecialChar \menuseparator
7611 Paragraph
7612 \begin_inset space ~
7613 \end_inset
7614
7615 Settings.
7616 \end_layout
7617
7618 \begin_layout Standard
7619 There is only one special thing: the figures with caption besides the figure.
7620  To create such a figure, you have to do the following:
7621 \end_layout
7622
7623 \begin_layout Enumerate
7624 Create a wide figure float: 
7625 \family sans
7626 Insert\SpecialChar \menuseparator
7627 Float\SpecialChar \menuseparator
7628 Figure
7629 \family default
7630 , then right click in the figure and select 
7631 \family sans
7632 \bar under
7633 S
7634 \bar default
7635 pan
7636 \begin_inset space ~
7637 \end_inset
7638
7639 columns
7640 \family default
7641 .
7642 \end_layout
7643
7644 \begin_layout Enumerate
7645 Enter your caption text.
7646 \end_layout
7647
7648 \begin_layout Enumerate
7649 Press 
7650 \family sans
7651 Return
7652 \family default
7653  to move the cursor above the caption.
7654 \end_layout
7655
7656 \begin_layout Enumerate
7657 Insert your figure
7658 \end_layout
7659
7660 \begin_layout Enumerate
7661 Position the cursor behind the figure and insert a horizontal fill: 
7662 \family sans
7663 Insert\SpecialChar \menuseparator
7664 Special
7665 \begin_inset space ~
7666 \end_inset
7667
7668 Character\SpecialChar \menuseparator
7669 Horizontal
7670 \begin_inset space ~
7671 \end_inset
7672
7673 Fill
7674 \family default
7675 .
7676 \end_layout
7677
7678 \begin_layout Enumerate
7679 Switch to LaTeX mode: 
7680 \family sans
7681 M-c
7682 \begin_inset space ~
7683 \end_inset
7684
7685 t
7686 \family default
7687 .
7688 \end_layout
7689
7690 \begin_layout Enumerate
7691 Enter 
7692 \family typewriter
7693
7694 \backslash
7695 parbox[b]{55mm}{
7696 \family default
7697 .
7698  
7699 \series bold
7700 Do not close the brace!
7701 \end_layout
7702
7703 \begin_layout Enumerate
7704 Position the cursor behind the caption text, switch to LaTeX mode and insert
7705  the closing brace: 
7706 \family sans
7707 M-c
7708 \begin_inset space ~
7709 \end_inset
7710
7711 t
7712 \family default
7713  
7714 \family typewriter
7715 }
7716 \family default
7717 .
7718 \end_layout
7719
7720 \begin_layout Standard
7721 Also, refer to the figures in the example paper.
7722 \end_layout
7723
7724 \begin_layout Subsection
7725 Referee layout
7726 \end_layout
7727
7728 \begin_layout Standard
7729 For submission, the paper has to be formated in a special double-spacing
7730  layout.
7731  For this purpose, you have to give the option 
7732 \family typewriter
7733 referee
7734 \family default
7735  to the documentclass.
7736  This must be done using the extra class options field in the 
7737 \family sans
7738 Document\SpecialChar \menuseparator
7739 Settings
7740 \family default
7741  dialog.
7742  Just enter the string 
7743 \family typewriter
7744 referee
7745 \family default
7746  there.
7747 \end_layout
7748
7749 \begin_layout Subsection
7750 The example paper
7751 \end_layout
7752
7753 \begin_layout Standard
7754 The 
7755 \family sans
7756 Examples
7757 \family default
7758  directory contains an example paper written with LyX.
7759  It is the example paper from the original macro package, translated to
7760  LyX.
7761  Use it for inspiration, and compare the original LaTeX code with LyX way
7762  of writing.
7763 \end_layout
7764
7765 \begin_layout Section
7766 AASTeX
7767 \end_layout
7768
7769 \begin_layout Standard
7770 by 
7771 \noun on
7772 Mike Ressler
7773 \end_layout
7774
7775 \begin_layout Subsection
7776 Introduction
7777 \end_layout
7778
7779 \begin_layout Standard
7780 AASTeX is a set of macros produced by the American Astronomical Society
7781  to facilitate electronic manuscript submission to the three journals they
7782  publish: the Astrophysical Journal (including the Letters and Supplement),
7783  the Astronomical Journal, and the Publications of the Astronomical Society
7784  of the Pacific.
7785  LyX has proven to be an excellent tool for generating these documents,
7786  especially given its equation, citation, and figure handling capabilities.
7787  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7788  is the version described here, or higher.
7789  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7790  incompatible with LyX.
7791  The AASTeX package may be downloaded from the AASTeX Web site
7792 \end_layout
7793
7794 \begin_layout Standard
7795 \begin_inset VSpace medskip
7796 \end_inset
7797
7798
7799 \end_layout
7800
7801 \begin_layout Standard
7802 \align center
7803 \begin_inset Flex URL
7804 status collapsed
7805
7806 \begin_layout Plain Layout
7807
7808 http://www.journals.uchicago.edu/AAS/AASTeX
7809 \end_layout
7810
7811 \end_inset
7812
7813
7814 \end_layout
7815
7816 \begin_layout Standard
7817 \begin_inset VSpace medskip
7818 \end_inset
7819
7820
7821 \end_layout
7822
7823 \begin_layout Standard
7824 A complete user guide is contained in that package and you should familiarize
7825  yourself with it thoroughly before embarking on writing a paper in LyX.
7826  LyX will not reduce the need to figure out all the AASTeX commands, it
7827  will only reduce the drudgery of typing everything in.
7828  It is your responsibility to ensure that the final exported LaTeX document
7829  conforms completely to the requirements of the journal to which you are
7830  submitting your paper.
7831 \end_layout
7832
7833 \begin_layout Subsection
7834 Starting a New Paper
7835 \end_layout
7836
7837 \begin_layout Standard
7838 I strongly suggest that you start with the AASTeX template file.
7839  Click on 
7840 \family sans
7841 File\SpecialChar \menuseparator
7842 New from
7843 \family default
7844  
7845 \family sans
7846 Template
7847 \family default
7848 , enter the new file name, then choose the 
7849 \family typewriter
7850 aastex.lyx
7851 \family default
7852  template.
7853  This will show the most common fields found in a manuscript.
7854  Simply overwrite the existing text (including the brackets, 
7855 \family typewriter
7856 <>
7857 \family default
7858 ) with the correct information.
7859  Many of the AASTeX commands and environments can be implemented directly
7860  in LyX, but some cannot: most noticeably 
7861 \family typewriter
7862
7863 \backslash
7864 altaffilmark
7865 \family default
7866  and 
7867 \family typewriter
7868
7869 \backslash
7870 altaffiltext
7871 \family default
7872 , which should stick out like a sore thumb if you actually just opened the
7873  template file.
7874  For commands such as these, the LaTeX code must be entered directly and
7875  marked as such.
7876  Such commands are referred to as TeX code, or Evil Red Text.
7877  I tried to minimize the amount of TeX code needed in an AASTeX document,
7878  but there is still a bit more required than any of us would like.
7879 \end_layout
7880
7881 \begin_layout Subsection
7882 Finishing Your Paper
7883 \end_layout
7884
7885 \begin_layout Standard
7886 When the paper is finished to your satisfaction and previews/prints correctly,
7887  there are a few 
7888 \begin_inset Quotes eld
7889 \end_inset
7890
7891 postprocessing
7892 \begin_inset Quotes erd
7893 \end_inset
7894
7895  actions which need to be done before you submit it to the journals.
7896  
7897 \end_layout
7898
7899 \begin_layout Enumerate
7900 Export your paper as a LaTeX file (
7901 \family sans
7902 File\SpecialChar \menuseparator
7903 Export\SpecialChar \menuseparator
7904 LaTeX
7905 \family default
7906 ).
7907  
7908 \end_layout
7909
7910 \begin_layout Enumerate
7911 Edit the resulting 
7912 \family typewriter
7913 .tex
7914 \family default
7915  file with your favorite text editor
7916 \end_layout
7917
7918 \begin_deeper
7919 \begin_layout Enumerate
7920 remove the comment lines before the 
7921 \family typewriter
7922
7923 \backslash
7924 documentclass
7925 \family default
7926  command
7927 \end_layout
7928
7929 \begin_layout Enumerate
7930 remove the 
7931 \family typewriter
7932
7933 \backslash
7934 usepackage...{fontenc}
7935 \family default
7936  line if it appears (usually just after 
7937 \family typewriter
7938
7939 \backslash
7940 documentclass
7941 \family default
7942 }; also remove the 
7943 \family typewriter
7944
7945 \backslash
7946 secnumdepth
7947 \family default
7948  line if it appears.
7949 \end_layout
7950
7951 \begin_layout Enumerate
7952 remove everything between (and including) the 
7953 \family typewriter
7954
7955 \backslash
7956 makeatletter
7957 \family default
7958  and 
7959 \family typewriter
7960
7961 \backslash
7962 makeatother
7963 \family default
7964  commands, except for any commands you specifically put into the LaTeX preamble
7965  (which should appear immediately after the 
7966 \begin_inset Quotes eld
7967 \end_inset
7968
7969 User specified LaTeX commands
7970 \begin_inset Quotes erd
7971 \end_inset
7972
7973  comment in the 
7974 \family typewriter
7975 .tex
7976 \family default
7977  file).
7978 \end_layout
7979
7980 \end_deeper
7981 \begin_layout Enumerate
7982 Run the resulting file through LaTeX to make sure it still processes correctly.
7983 \end_layout
7984
7985 \begin_layout Enumerate
7986 Reread the journal requirements to make sure your filenames and formats
7987  are correct.
7988 \end_layout
7989
7990 \begin_layout Enumerate
7991 Submit it.
7992 \end_layout
7993
7994 \begin_layout Subsection
7995 Comments On Specific Commands
7996 \end_layout
7997
7998 \begin_layout Standard
7999 I will not describe the detailed usage of the individual AASTeX commands:
8000  the AASTeX User Guide (
8001 \family typewriter
8002 aasguide.tex
8003 \family default
8004 ) gives a good description of each.
8005  Thus it's probably easiest for me to go down the list as found in the guide
8006  and offer comments where necessary.
8007  So let's begin \SpecialChar \ldots{}
8008
8009 \end_layout
8010
8011 \begin_layout Subsubsection
8012 Things that work as expected
8013 \end_layout
8014
8015 \begin_layout Standard
8016 Because they work as you might expect, I simply list them and the section
8017  they are found in: 
8018 \family typewriter
8019
8020 \backslash
8021 documentclass
8022 \family default
8023  (2.1.1), 
8024 \family typewriter
8025
8026 \backslash
8027 begin{document}
8028 \family default
8029  (2.2), 
8030 \family typewriter
8031
8032 \backslash
8033 title
8034 \family default
8035  (2.3), 
8036 \family typewriter
8037
8038 \backslash
8039 author
8040 \family default
8041  (2.3), 
8042 \family typewriter
8043
8044 \backslash
8045 affil
8046 \family default
8047  (2.3), 
8048 \family typewriter
8049
8050 \backslash
8051 abstract
8052 \family default
8053  (2.4), 
8054 \family typewriter
8055
8056 \backslash
8057 keywords
8058 \family default
8059  (2.5), 
8060 \family typewriter
8061
8062 \backslash
8063 section
8064 \family default
8065  (2.7), 
8066 \family typewriter
8067
8068 \backslash
8069 subsection
8070 \family default
8071  (2.7), 
8072 \family typewriter
8073
8074 \backslash
8075 subsubsection
8076 \family default
8077  (2.7), 
8078 \family typewriter
8079
8080 \backslash
8081 paragraph
8082 \family default
8083  (2.7), 
8084 \family typewriter
8085
8086 \backslash
8087 facility
8088 \family default
8089  (2.10), 
8090 \family typewriter
8091
8092 \backslash
8093 begin{displaymath}
8094 \family default
8095  (2.12), 
8096 \family typewriter
8097
8098 \backslash
8099 begin{equation}
8100 \family default
8101  (2.12), 
8102 \family typewriter
8103
8104 \backslash
8105 begin{eqnarray}
8106 \family default
8107  (2.12), 
8108 \family typewriter
8109
8110 \backslash
8111 begin{mathletters}
8112 \family default
8113  (2.12), 
8114 \family typewriter
8115
8116 \backslash
8117 begin{thebibliography}
8118 \family default
8119  (2.13.1), 
8120 \family typewriter
8121
8122 \backslash
8123 bibitem
8124 \family default
8125  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8126  graphicx figure commands (2.14.1), 
8127 \family typewriter
8128
8129 \backslash
8130 begin{table}
8131 \family default
8132  (2.15.4), 
8133 \family typewriter
8134
8135 \backslash
8136 begin{tabular}
8137 \family default
8138  (2.15.4), 
8139 \family typewriter
8140
8141 \backslash
8142 caption
8143 \family default
8144  (2.15.4), 
8145 \family typewriter
8146
8147 \backslash
8148 label
8149 \family default
8150  (2.15.4, amongst other places), 
8151 \family typewriter
8152
8153 \backslash
8154 tablerefs
8155 \family default
8156  (2.15.5), 
8157 \family typewriter
8158
8159 \backslash
8160 tablecomments
8161 \family default
8162  (2.15.5), 
8163 \family typewriter
8164
8165 \backslash
8166 url
8167 \family default
8168  (2.17.4), 
8169 \family typewriter
8170
8171 \backslash
8172 end{document}
8173 \family default
8174  (2.18).
8175 \end_layout
8176
8177 \begin_layout Standard
8178 The following style options also work correctly: 
8179 \family typewriter
8180 longabstract
8181 \family default
8182  (2.4), 
8183 \family typewriter
8184 preprint
8185 \family default
8186  (3.2.1), 
8187 \family typewriter
8188 preprint2
8189 \family default
8190  (3.2.2), 
8191 \family typewriter
8192 eqsecnum
8193 \family default
8194  (3.3), 
8195 \family typewriter
8196 flushrt
8197 \family default
8198  (3.4).
8199  Simply put them in the 
8200 \family sans
8201 Options
8202 \family default
8203  box in 
8204 \family sans
8205 Layout\SpecialChar \menuseparator
8206 Document
8207 \family default
8208 .
8209 \end_layout
8210
8211 \begin_layout Subsubsection
8212 Things that work, but require more comment
8213 \end_layout
8214
8215 \begin_layout Standard
8216 The following items work, but require a little more discussion:
8217 \end_layout
8218
8219 \begin_layout Itemize
8220 These items are reserved for use by the journal editors, but you can put
8221  them into the LaTeX preamble if you feel compelled to do so: 
8222 \family typewriter
8223
8224 \backslash
8225 received
8226 \family default
8227
8228 \family typewriter
8229
8230 \backslash
8231 revised
8232 \family default
8233
8234 \family typewriter
8235
8236 \backslash
8237 accepted
8238 \family default
8239
8240 \family typewriter
8241
8242 \backslash
8243 ccc
8244 \family default
8245
8246 \family typewriter
8247
8248 \backslash
8249 cpright
8250 \family default
8251  (all from 2.1.3)
8252 \end_layout
8253
8254 \begin_layout Itemize
8255 These items may be placed in the LaTeX preamble, and are included as blanks
8256  in the template file: 
8257 \family typewriter
8258
8259 \backslash
8260 slugcomment
8261 \family default
8262  (2.1.4), 
8263 \family typewriter
8264
8265 \backslash
8266 shorttitle
8267 \family default
8268  (2.1.5), 
8269 \family typewriter
8270
8271 \backslash
8272 shortauthors
8273 \family default
8274  (2.1.5)
8275 \end_layout
8276
8277 \begin_layout Itemize
8278
8279 \family typewriter
8280
8281 \backslash
8282 email
8283 \family default
8284  (2.3) – can only be used 
8285 \begin_inset Quotes eld
8286 \end_inset
8287
8288 standalone
8289 \begin_inset Quotes erd
8290 \end_inset
8291
8292 , not in the middle of a paragraph.
8293  Use TeX code if you need to embed it.
8294 \end_layout
8295
8296 \begin_layout Itemize
8297
8298 \family typewriter
8299
8300 \backslash
8301 and
8302 \family default
8303  (2.3) – will have extra {} after it.
8304  This should not cause an error.
8305 \end_layout
8306
8307 \begin_layout Itemize
8308
8309 \family typewriter
8310
8311 \backslash
8312 notetoeditor
8313 \family default
8314  (2.6) – can only be used 
8315 \begin_inset Quotes eld
8316 \end_inset
8317
8318 standalone
8319 \begin_inset Quotes erd
8320 \end_inset
8321
8322 , not in the middle of a paragraph.
8323  Use TeX code if you need to embed it.
8324 \end_layout
8325
8326 \begin_layout Itemize
8327
8328 \family typewriter
8329
8330 \backslash
8331 placetable
8332 \family default
8333  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8334  hand
8335 \end_layout
8336
8337 \begin_layout Itemize
8338
8339 \family typewriter
8340
8341 \backslash
8342 placefigure
8343 \family default
8344  (2.8) – same as for 
8345 \family typewriter
8346
8347 \backslash
8348 placetable
8349 \end_layout
8350
8351 \begin_layout Itemize
8352
8353 \family typewriter
8354
8355 \backslash
8356 acknowledgements
8357 \family default
8358  (2.9) – will have extra {} after it.
8359  This should not cause an error.
8360 \end_layout
8361
8362 \begin_layout Itemize
8363
8364 \family typewriter
8365
8366 \backslash
8367 appendix
8368 \family default
8369  (2.11) – will have extra {} after it.
8370  This should not cause an error.
8371 \end_layout
8372
8373 \begin_layout Itemize
8374
8375 \family typewriter
8376
8377 \backslash
8378 figcaption
8379 \family default
8380  (2.14.2) – you can insert an optional filename argument by placing the cursor
8381  at the beginning of the text and selecting 
8382 \family sans
8383 Insert\SpecialChar \menuseparator
8384 Short Title
8385 \family default
8386 .
8387  
8388 \begin_inset Quotes eld
8389 \end_inset
8390
8391 Short Title
8392 \begin_inset Quotes erd
8393 \end_inset
8394
8395  inserts an optional argument of the type needed by 
8396 \family typewriter
8397
8398 \backslash
8399 figcaption
8400 \family default
8401 .
8402  Hopefully it will be renamed someday.
8403 \end_layout
8404
8405 \begin_layout Itemize
8406
8407 \family typewriter
8408
8409 \backslash
8410 objectname
8411 \family default
8412  (2.17.1) – same as 
8413 \family typewriter
8414
8415 \backslash
8416 figcaption
8417 \family default
8418  for the catalog ID optional parameter
8419 \end_layout
8420
8421 \begin_layout Itemize
8422
8423 \family typewriter
8424
8425 \backslash
8426 dataset
8427 \family default
8428  (2.17.1) – same as 
8429 \family typewriter
8430
8431 \backslash
8432 figcaption
8433 \family default
8434  for the catalog ID optional parameter
8435 \end_layout
8436
8437 \begin_layout Subsubsection
8438 Things not implemented, use TeX code
8439 \end_layout
8440
8441 \begin_layout Standard
8442
8443 \family typewriter
8444
8445 \backslash
8446 altaffilmark
8447 \family default
8448  (2.3), 
8449 \family typewriter
8450
8451 \backslash
8452 altaffiltext
8453 \family default
8454  (2.3), 
8455 \family typewriter
8456
8457 \backslash
8458 eqnum
8459 \family default
8460  (2.12), 
8461 \family typewriter
8462
8463 \backslash
8464 setcounter{equation}
8465 \family default
8466  (2.12), Journal name abbreviations (2.13.4), 
8467 \family typewriter
8468
8469 \backslash
8470 figurenum
8471 \family default
8472  (2.14.1), 
8473 \family typewriter
8474
8475 \backslash
8476 epsscale
8477 \family default
8478  (2.14.1), 
8479 \family typewriter
8480
8481 \backslash
8482 plotone
8483 \family default
8484  (2.14.1), 
8485 \family typewriter
8486
8487 \backslash
8488 plottwo
8489 \family default
8490  (2.14.1), 
8491 \family typewriter
8492
8493 \backslash
8494 tablenum
8495 \family default
8496  (2.15.4), 
8497 \family typewriter
8498
8499 \backslash
8500 tableline
8501 \family default
8502  (2.15.4, insert it as the first element in the lefthand cell after where
8503  you want it.
8504  Don't use any of LyX's rules in the table), 
8505 \family typewriter
8506
8507 \backslash
8508 tablenotemark
8509 \family default
8510  (2.15.5), 
8511 \family typewriter
8512
8513 \backslash
8514 tablenotetext
8515 \family default
8516  (2.15.5), much of Misc (2.17, except 
8517 \family typewriter
8518
8519 \backslash
8520 objectname
8521 \family default
8522
8523 \family typewriter
8524
8525 \backslash
8526 dataset
8527 \family default
8528
8529 \family typewriter
8530
8531 \backslash
8532 url
8533 \family default
8534 , and 
8535 \family typewriter
8536
8537 \backslash
8538 email
8539 \family default
8540 ; see above), 
8541 \family typewriter
8542
8543 \backslash
8544 singlespace
8545 \family default
8546  (3.1), 
8547 \family typewriter
8548
8549 \backslash
8550 doublespace
8551 \family default
8552  (3.1), 
8553 \family typewriter
8554
8555 \backslash
8556 onecolumn
8557 \family default
8558  (3.2), 
8559 \family typewriter
8560
8561 \backslash
8562 twocolumn
8563 \family default
8564  (3.2)
8565 \end_layout
8566
8567 \begin_layout Subsubsection
8568 Things that cannot be implemented
8569 \end_layout
8570
8571 \begin_layout Standard
8572 \SpecialChar \ldots{}
8573  at least in any meaningful sort of way, so I suggest ignoring them.
8574  They are the references environment (2.13.3), and the deluxetable environment
8575  (2.15).
8576  If you really, really need to use deluxetable, I suggest editing it in
8577  a separate file with a text editor, then using 
8578 \family sans
8579 Insert\SpecialChar \menuseparator
8580 Child
8581 \begin_inset space ~
8582 \end_inset
8583
8584 Document
8585 \family default
8586  to include it in your LyX document.
8587  See the 
8588 \family typewriter
8589 aas_sample.lyx
8590 \family default
8591  file to see an example of this.
8592 \end_layout
8593
8594 \begin_layout Subsection
8595 FAQs, Tips, Tricks, and Other Ruminations
8596 \end_layout
8597
8598 \begin_layout Subsubsection
8599 Getting LyX and AASTeX to cooperate
8600 \end_layout
8601
8602 \begin_layout Standard
8603 It can be a bit tricky to get LyX to recognize a new layout and document
8604  class.
8605  When all else fails, do this:
8606 \end_layout
8607
8608 \begin_layout Enumerate
8609 Make certain that LaTeX can find AASTeX.
8610  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8611  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8612 \family typewriter
8613 sample.tex
8614 \family default
8615 .
8616 \end_layout
8617
8618 \begin_layout Enumerate
8619 Make certain that 
8620 \family typewriter
8621 aastex.layout
8622 \family default
8623  appears in LyX's 
8624 \family typewriter
8625 layouts
8626 \family default
8627  folder
8628 \end_layout
8629
8630 \begin_layout Enumerate
8631 Rerun 
8632 \family sans
8633 Tools\SpecialChar \menuseparator
8634 Reconfigure
8635 \family default
8636  in LyX, then restart LyX.
8637 \end_layout
8638
8639 \begin_layout Enumerate
8640 Open a regular new file, not from a template.
8641  Does AASTeX appear in the class list in 
8642 \family sans
8643 Document\SpecialChar \menuseparator
8644 Settings
8645 \family default
8646 ?
8647 \end_layout
8648
8649 \begin_layout Standard
8650 If you get a warning from an existing AASTeX document about not being able
8651  to find the AASTeX layout or a message about 
8652 \begin_inset Quotes eld
8653 \end_inset
8654
8655 You should not mix title layouts with normal ones
8656 \begin_inset Quotes erd
8657 \end_inset
8658
8659 , things haven't been installed correctly.
8660 \end_layout
8661
8662 \begin_layout Subsubsection
8663 LaTeX error processing a table 
8664 \end_layout
8665
8666 \begin_layout Standard
8667 LyX, by default, attempts to center the table caption/title.
8668  This seems to produce a bad interaction in AASTeX so you should click somewhere
8669  in the caption/title, then select 
8670 \family sans
8671 Edit\SpecialChar \menuseparator
8672 Paragraph
8673 \begin_inset space ~
8674 \end_inset
8675
8676 Settings
8677 \family default
8678 , then set the 
8679 \family sans
8680 Alignment
8681 \family default
8682  to 
8683 \family sans
8684 Block
8685 \family default
8686 .
8687  This took care of it for me.
8688 \end_layout
8689
8690 \begin_layout Subsubsection
8691 References
8692 \end_layout
8693
8694 \begin_layout Standard
8695 A couple of things: 1) I have noticed some funny spacing in the reference
8696  entries in the text.
8697  When you enter the bibliography item data, make sure their is 
8698 \emph on
8699 no
8700 \emph default
8701  space between the last author and the parenthesis setting off the year;
8702  
8703 \emph on
8704 e.
8705 \begin_inset space \thinspace{}
8706 \end_inset
8707
8708 g.
8709 \begin_inset space \space{}
8710 \end_inset
8711
8712
8713 \emph default
8714 type 
8715 \family typewriter
8716 Ressler(1992)
8717 \family default
8718 , not 
8719 \family typewriter
8720 Ressler (1992)
8721 \family default
8722 .
8723  2) Entering the references at all is not obvious.
8724  The easiest thing is to start typing your first reference at the end of
8725  the document, then mark it as type 
8726 \family sans
8727 References
8728 \family default
8729 .
8730  That will put a small gray box in front of what you just typed.
8731  Click on the box to fill in the rest of the information.
8732  For new references, go to the end of an existing reference and press return.
8733  That will create a new line with its own box, etc.
8734 \end_layout
8735
8736 \begin_layout Subsubsection
8737 Including EPS files
8738 \end_layout
8739
8740 \begin_layout Standard
8741 Even though AASTeX provides its own figure commands (
8742 \family typewriter
8743
8744 \backslash
8745 plotone
8746 \family default
8747 , for example), I much prefer LaTeX's standard figure commands (with the
8748  default graphicx).
8749  You can insert the 
8750 \family typewriter
8751
8752 \backslash
8753 plotone
8754 \family default
8755 , etc.
8756 \begin_inset space ~
8757 \end_inset
8758
8759 commands as TeX code into a Figure Float box if you desire, but I never
8760  have much luck getting the layout right.
8761  With the standard graphics, LyX will insert a 
8762 \family typewriter
8763
8764 \backslash
8765 usepackage{graphicx}
8766 \family default
8767  command into the LaTeX preamble and handle the figures in the standard
8768  LaTeX2e way, interspersing the figures in the text.
8769  I believe ApJ accepts figures exactly this way now; AJ might still use
8770  the 
8771 \begin_inset Quotes eld
8772 \end_inset
8773
8774 stack everything at the end
8775 \begin_inset Quotes erd
8776 \end_inset
8777
8778  technique.
8779 \end_layout
8780
8781 \begin_layout Subsubsection
8782 Things I could have done, but didn't
8783 \end_layout
8784
8785 \begin_layout Standard
8786 There are a few 
8787 \begin_inset Quotes eld
8788 \end_inset
8789
8790 pretty
8791 \begin_inset Quotes erd
8792 \end_inset
8793
8794  things I could have implemented, but chose not to.
8795  For instance, I saw no point in double-spacing the text in the LyX window,
8796  even though it is double-spaced in the paper manuscript.
8797  Also, I chose not to make separate layouts for the preprint and preprint2
8798  styles.
8799  Since I assume you will spend most of your time in the plain manuscript
8800  mode anyway, I decided not to chew up more disk space with this.
8801  
8802 \end_layout
8803
8804 \begin_layout Subsection
8805 Final Caveat
8806 \end_layout
8807
8808 \begin_layout Standard
8809 Your mileage may vary.
8810  I've now had papers published by both ApJ and AJ that have had 98% of the
8811  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8812  cleanups.
8813  I have had no trouble with the submission process, and I'm sure the journals
8814  were never aware that there might be a difference.
8815  So, go forth and publish!
8816 \end_layout
8817
8818 \begin_layout Section
8819 AMS LaTeX
8820 \end_layout
8821
8822 \begin_layout Standard
8823 by 
8824 \noun on
8825 David Johnson
8826 \noun default
8827 ; updated by 
8828 \noun on
8829 Richard Heck
8830 \end_layout
8831
8832 \begin_layout Standard
8833 \begin_inset VSpace bigskip
8834 \end_inset
8835
8836
8837 \end_layout
8838
8839 \begin_layout Standard
8840 \noindent
8841 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8842  papers to be submitted to American Mathematical Society publications.
8843  The layouts are not tailored to a specific journal, but easily can be.
8844  You should refer to the AMS documentation for specific instructions for
8845  each journal (usually it will entail only changing a single line in the
8846  TeX output).
8847  That documentation is available on the Web at 
8848 \begin_inset Flex URL
8849 status open
8850
8851 \begin_layout Plain Layout
8852
8853 http://www.ams.org
8854 \end_layout
8855
8856 \end_inset
8857
8858  or by ftp at 
8859 \begin_inset Flex URL
8860 status open
8861
8862 \begin_layout Plain Layout
8863
8864 ftp://ftp.ams.org/pub/tex/amslatex/
8865 \end_layout
8866
8867 \end_inset
8868
8869 .
8870  These layouts are appropriate, and useful, for any mathematical writing.
8871  
8872 \end_layout
8873
8874 \begin_layout Standard
8875 There are two basic AMS LaTeX layouts: 
8876 \end_layout
8877
8878 \begin_layout Itemize
8879 amsart: The standard AMS article format.
8880 \end_layout
8881
8882 \begin_layout Itemize
8883 amsbook: the standard AMS book (really, monograph) format.
8884  
8885 \end_layout
8886
8887 \begin_layout Standard
8888 The layouts themselves contain only the minimum necessary to use the AMS
8889  classes.
8890  They do not, in particular, contain any of the `theorem' environments used
8891  for setting theorems, lemmas, and the like.
8892  These are contained, instead, in the 
8893 \begin_inset Flex Code
8894 status collapsed
8895
8896 \begin_layout Plain Layout
8897 Theorems (AMS)
8898 \end_layout
8899
8900 \end_inset
8901
8902  module, which is loaded by default when when you select one of the AMS
8903  classes.
8904  (It can also be used with other classes and can be removed, if you would
8905  rather use something else.) Less commonly used environments are in the 
8906 \begin_inset Flex Code
8907 status collapsed
8908
8909 \begin_layout Plain Layout
8910 Theorems (AMS-Extended)
8911 \end_layout
8912
8913 \end_inset
8914
8915  module, which must be loaded manually.
8916 \end_layout
8917
8918 \begin_layout Standard
8919 By default, theorems and the like are numbered consecutively throughout
8920  the document, but this may be modified by loading the module 
8921 \begin_inset Flex Code
8922 status collapsed
8923
8924 \begin_layout Plain Layout
8925 Theorems (Order by Section)
8926 \end_layout
8927
8928 \end_inset
8929
8930  or, if you are using 
8931 \begin_inset Flex Code
8932 status collapsed
8933
8934 \begin_layout Plain Layout
8935 book (AMS)
8936 \end_layout
8937
8938 \end_inset
8939
8940 , the module 
8941 \begin_inset Flex Code
8942 status collapsed
8943
8944 \begin_layout Plain Layout
8945 Theorems (Order by Chapter)
8946 \end_layout
8947
8948 \end_inset
8949
8950 .
8951  These will number the results as 
8952 \begin_inset Formula $n.m$
8953 \end_inset
8954
8955 , where the first number refers to the section (or chapter) and the second
8956  refers to the total number of results so far in that section (or chapter).
8957  Many environments are also available unnumbered.
8958  These are indicated by an asterisk at the end.
8959  If you happen to want 
8960 \emph on
8961 only
8962 \emph default
8963  unnumbered results, the module 
8964 \begin_inset Flex Code
8965 status collapsed
8966
8967 \begin_layout Plain Layout
8968 Theorems (Starred)
8969 \end_layout
8970
8971 \end_inset
8972
8973  provides that option.
8974 \end_layout
8975
8976 \begin_layout Standard
8977 Note that these modules do not 
8978 \emph on
8979 have
8980 \emph default
8981  to be used with the AMS classes.
8982  It is perfectly possible to use the 
8983 \begin_inset Flex Code
8984 status collapsed
8985
8986 \begin_layout Plain Layout
8987 Theorems (AMS)
8988 \end_layout
8989
8990 \end_inset
8991
8992  module, and the others mentioned, with other classes, such as 
8993 \begin_inset Flex Code
8994 status collapsed
8995
8996 \begin_layout Plain Layout
8997 article
8998 \end_layout
8999
9000 \end_inset
9001
9002
9003 \begin_inset Flex Code
9004 status collapsed
9005
9006 \begin_layout Plain Layout
9007 report
9008 \end_layout
9009
9010 \end_inset
9011
9012
9013 \begin_inset Flex Code
9014 status collapsed
9015
9016 \begin_layout Plain Layout
9017 book (KOMA-script)
9018 \end_layout
9019
9020 \end_inset
9021
9022 , and so forth.
9023 \end_layout
9024
9025 \begin_layout Subsection
9026 What these layouts provide
9027 \end_layout
9028
9029 \begin_layout Standard
9030 There is a long list of included environments provided by these layouts.
9031  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9032  variety of `theorem' environments.
9033  However, the AMS recommends the environments that are available in LyX.
9034  
9035 \end_layout
9036
9037 \begin_layout Standard
9038 The following environments—as well as the standard environments, such as
9039  
9040 \begin_inset Flex Noun
9041 status collapsed
9042
9043 \begin_layout Plain Layout
9044 section
9045 \end_layout
9046
9047 \end_inset
9048
9049
9050 \begin_inset Flex Noun
9051 status collapsed
9052
9053 \begin_layout Plain Layout
9054 bibliography
9055 \end_layout
9056
9057 \end_inset
9058
9059
9060 \begin_inset Flex Noun
9061 status collapsed
9062
9063 \begin_layout Plain Layout
9064 title
9065 \end_layout
9066
9067 \end_inset
9068
9069
9070 \begin_inset Flex Noun
9071 status collapsed
9072
9073 \begin_layout Plain Layout
9074 author
9075 \end_layout
9076
9077 \end_inset
9078
9079 , and 
9080 \begin_inset Flex Noun
9081 status collapsed
9082
9083 \begin_layout Plain Layout
9084 date
9085 \end_layout
9086
9087 \end_inset
9088
9089 —are provided by 
9090 \begin_inset Flex Code
9091 status collapsed
9092
9093 \begin_layout Plain Layout
9094 article (AMS)
9095 \end_layout
9096
9097 \end_inset
9098
9099  and 
9100 \begin_inset Flex Code
9101 status collapsed
9102
9103 \begin_layout Plain Layout
9104 book (AMS)
9105 \end_layout
9106
9107 \end_inset
9108
9109 :
9110 \end_layout
9111
9112 \begin_layout Description
9113 Address This should be the author's permanent address.
9114 \end_layout
9115
9116 \begin_layout Description
9117 Current
9118 \begin_inset space ~
9119 \end_inset
9120
9121 Address This should be the author's temporary address at the time of submission,
9122  if different from the Address.
9123 \end_layout
9124
9125 \begin_layout Description
9126 Email Author's e-mail address
9127 \end_layout
9128
9129 \begin_layout Description
9130 URL Author's Web address, if desired.
9131 \end_layout
9132
9133 \begin_layout Description
9134 Keywords Key words or phrases used to identify specific topics discussed
9135  in the paper.
9136 \end_layout
9137
9138 \begin_layout Description
9139 Subjectclass These refer to the AMS Subject Classifications, published and
9140  described in 
9141 \emph on
9142 Mathematical Reviews
9143 \emph default
9144 .
9145  These are also available online at the AMS cites listed above.
9146 \end_layout
9147
9148 \begin_layout Description
9149 Thanks
9150 \end_layout
9151
9152 \begin_layout Description
9153 Dedicatory
9154 \end_layout
9155
9156 \begin_layout Description
9157 Translator
9158 \end_layout
9159
9160 \begin_layout Standard
9161 The following environments are provided by both the 
9162 \begin_inset Flex Code
9163 status collapsed
9164
9165 \begin_layout Plain Layout
9166 Theorems
9167 \end_layout
9168
9169 \end_inset
9170
9171  and 
9172 \begin_inset Flex Code
9173 status collapsed
9174
9175 \begin_layout Plain Layout
9176 Theorems (AMS)
9177 \end_layout
9178
9179 \end_inset
9180
9181  modules, in the latter case in both starred (unnumbered) and unstarred
9182  (numbered) versions.
9183  These same environments are provided only in the starred versions by the
9184  
9185 \begin_inset Flex Code
9186 status collapsed
9187
9188 \begin_layout Plain Layout
9189 Theorems (Starred)
9190 \end_layout
9191
9192 \end_inset
9193
9194  module:
9195 \end_layout
9196
9197 \begin_layout Theorem
9198 This is typically used for the statements of major results.
9199  
9200 \end_layout
9201
9202 \begin_layout Corollary*
9203 This is used for statements which follow fairly directly from previous statement
9204 s.
9205  Again, these can be major results.
9206  
9207 \end_layout
9208
9209 \begin_layout Lemma
9210 These are smaller results needed to prove other statements.
9211 \end_layout
9212
9213 \begin_layout Proposition
9214 These are less major results which (hopefully) add to the general theory
9215  being discussed.
9216 \end_layout
9217
9218 \begin_layout Conjecture
9219 These are statements provided without justification, which the author does
9220  not know how to prove, but which seem to be true (to the author, at least).
9221 \end_layout
9222
9223 \begin_layout Definition*
9224 Guess what this is for.
9225  The font is different for this environment than for the previous ones.
9226  
9227 \end_layout
9228
9229 \begin_layout Example*
9230 Used for examples illustrating proven results.
9231 \end_layout
9232
9233 \begin_layout Problem
9234 It's not really known what this is for.
9235  You should figure it out.
9236 \end_layout
9237
9238 \begin_layout Exercise*
9239 Write a description for this one.
9240 \end_layout
9241
9242 \begin_layout Remark
9243 This environment is also a type of theorem, usually a lesser sort of observation.
9244 \end_layout
9245
9246 \begin_layout Claim*
9247 Often used in the course of giving a proof of a larger result.
9248 \end_layout
9249
9250 \begin_layout Case
9251 Generally, these are used to break up long arguments, using specific instances
9252  of some condition.
9253  
9254 \end_layout
9255
9256 \begin_layout Case
9257 The numbering scheme for cases is on its own, not together with other numbered
9258  statements.
9259  
9260 \end_layout
9261
9262 \begin_layout Proof
9263 At the end of this environment, a QED symbol (usually a square, but it can
9264  vary with different styles) is placed.
9265  If you want to have other environments within this one—for example, Case
9266  environments—and have the QED symbol appear only after them, then the other
9267  environments need to be nested within the proof environment.
9268  See the section 
9269 \emph on
9270 Nesting Environments
9271 \emph default
9272  of the 
9273 \emph on
9274 User's Guide
9275 \emph default
9276  for information on nesting.
9277 \end_layout
9278
9279 \begin_layout Standard
9280 And these environments are provided by 
9281 \begin_inset Flex Code
9282 status collapsed
9283
9284 \begin_layout Plain Layout
9285 Theorems (AMS-Extended)
9286 \end_layout
9287
9288 \end_inset
9289
9290 :
9291 \end_layout
9292
9293 \begin_layout Criterion*
9294 A required condition.
9295 \end_layout
9296
9297 \begin_layout Algorithm*
9298 A general procedure to be used.
9299 \end_layout
9300
9301 \begin_layout Axiom*
9302 This is a property or statement taken as true within the system being discussed.
9303 \end_layout
9304
9305 \begin_layout Condition*
9306 Sometimes used to state a condition assumed within the present context of
9307  discussion.
9308 \end_layout
9309
9310 \begin_layout Note*
9311 Similar to a Remark.
9312 \end_layout
9313
9314 \begin_layout Notation*
9315 Used for the explanation of, yes, notation.
9316 \end_layout
9317
9318 \begin_layout Summary
9319 Do we really need to tell you? 
9320 \end_layout
9321
9322 \begin_layout Acknowledgement*
9323 Acknowledgement.
9324 \end_layout
9325
9326 \begin_layout Conclusion*
9327 Sometimes used at the end of a long train of argument.
9328 \end_layout
9329
9330 \begin_layout Fact
9331 Used in a way similar to Proposition, though perhaps lower on the scale.
9332 \end_layout
9333
9334 \begin_layout Standard
9335 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9336  fonts packages.
9337  They need to be available on your system in order to use these environments.
9338 \end_layout
9339
9340 \begin_layout Section
9341 AGU journals (
9342 \family sans
9343 aguplus
9344 \family default
9345 )
9346 \end_layout
9347
9348 \begin_layout Standard
9349 by 
9350 \shape smallcaps
9351 Martin Vermeer
9352 \end_layout
9353
9354 \begin_layout Subsection
9355 Description
9356 \end_layout
9357
9358 \begin_layout Standard
9359 These are the layout files for some of the journals of the American Geophysical
9360  Society.
9361  It is assumed that you have both the AGU's own class files and AGUplus
9362  installed (everything to be found at
9363 \begin_inset Flex URL
9364 status collapsed
9365
9366 \begin_layout Plain Layout
9367
9368 ftp://ftp.agu.org/journals/latex/journals
9369 \end_layout
9370
9371 \end_inset
9372
9373 ).
9374 \end_layout
9375
9376 \begin_layout Subsection
9377 New styles
9378 \end_layout
9379
9380 \begin_layout Standard
9381 Redefined are 
9382 \family sans
9383 Paragraph
9384 \family default
9385
9386 \family sans
9387 Paragraph*
9388 \family default
9389 .
9390  They are still called this in the LyX GUI, though their LaTeX equivalents
9391  in the AGU classes are 
9392 \family sans
9393 Subsubsubsection
9394 \family default
9395  and 
9396 \family sans
9397 Subsubsubsection*
9398 \family default
9399 .
9400 \end_layout
9401
9402 \begin_layout Standard
9403 Newly defined styles are 
9404 \family sans
9405 Left_Header
9406 \family default
9407
9408 \family sans
9409 Right_Header
9410 \family default
9411
9412 \family sans
9413 Received
9414 \family default
9415
9416 \family sans
9417 Revised
9418 \family default
9419
9420 \family sans
9421 Accepted
9422 \family default
9423
9424 \family sans
9425 CCC
9426 \family default
9427
9428 \family sans
9429 PaperId
9430 \family default
9431
9432 \family sans
9433 AuthorAddr
9434 \family default
9435
9436 \family sans
9437 SlugComment
9438 \family default
9439 .
9440  These are mostly manuscript attributes and defined in the AGU class documentati
9441 on.
9442 \end_layout
9443
9444 \begin_layout Standard
9445 I suspect this is still badly incomplete.
9446 \end_layout
9447
9448 \begin_layout Subsection
9449 New floats
9450 \end_layout
9451
9452 \begin_layout Standard
9453
9454 \family sans
9455 Planotable
9456 \family default
9457  and 
9458 \family sans
9459 Plate
9460 \family default
9461 .
9462  We also have a new 
9463 \family sans
9464 Table_Caption
9465 \family default
9466 .
9467 \end_layout
9468
9469 \begin_layout Subsection
9470 Supported journals
9471 \end_layout
9472
9473 \begin_layout Itemize
9474
9475 \emph on
9476 Journal of Geophysical Research
9477 \emph default
9478
9479 \family typewriter
9480 jgrga.layout
9481 \family default
9482  — Martin Vermeer
9483 \end_layout
9484
9485 \begin_layout Standard
9486 Add your own, it isn't so hard! Look at the 
9487 \family typewriter
9488 jgrga.layout
9489 \family default
9490  example and 
9491 \family typewriter
9492 aguplus.inc
9493 \family default
9494 .
9495 \end_layout
9496
9497 \begin_layout Subsection
9498 Bugs and things to remember
9499 \end_layout
9500
9501 \begin_layout Standard
9502 In order to use the new layouts, you must remember to do the following for
9503  a new document:
9504 \end_layout
9505
9506 \begin_layout Enumerate
9507
9508 \emph on
9509 Turn off babel
9510 \emph default
9511 .
9512  This can be done in the 
9513 \family sans
9514 Layout\SpecialChar \menuseparator
9515 Document
9516 \family default
9517  or 
9518 \family sans
9519 Document\SpecialChar \menuseparator
9520 Settings
9521 \family default
9522  menu item.
9523  (AGU articles are always in English, right? So 
9524 \emph on
9525 don't
9526 \emph default
9527  choose a language.)
9528 \end_layout
9529
9530 \begin_layout Enumerate
9531 Enter 
9532 \family typewriter
9533 jgrga
9534 \family default
9535  into the document's 
9536 \family sans
9537 Extra Options
9538 \family default
9539  field.
9540  (Yes, this is a bug.)
9541 \end_layout
9542
9543 \begin_layout Enumerate
9544 Make sure you use the 
9545 \family typewriter
9546 agu.bst
9547 \family default
9548  bibliography style, by entering 
9549 \family sans
9550 agu
9551 \family default
9552  into the second field of the BibTeX inset.
9553  None of the standard styles will do.
9554 \end_layout
9555
9556 \begin_layout Section
9557 Broadway
9558 \end_layout
9559
9560 \begin_layout Standard
9561 by 
9562 \shape smallcaps
9563 Garst Reese
9564 \end_layout
9565
9566 \begin_layout Subsection
9567 Introduction
9568 \end_layout
9569
9570 \begin_layout Standard
9571 Broadway is for writing plays.
9572  The format is more decorative than Hollywood, and much less standardized.
9573  This format should be suitable for workshops.
9574 \end_layout
9575
9576 \begin_layout Subsection
9577 Special problems
9578 \end_layout
9579
9580 \begin_layout Standard
9581 The same as in Hollywood.
9582 \end_layout
9583
9584 \begin_layout Subsection
9585 Special features
9586 \end_layout
9587
9588 \begin_layout Standard
9589 Insert the 
9590 \family sans
9591 Speaker
9592 \family default
9593  names as labels then cross-reference the label to insert the name.
9594  The cross-reference dialog will show the current cast of characters.
9595 \end_layout
9596
9597 \begin_layout Subsection
9598 Paper size and Margins
9599 \end_layout
9600
9601 \begin_layout Standard
9602 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9603 \end_layout
9604
9605 \begin_layout Subsection
9606 Environments
9607 \end_layout
9608
9609 \begin_layout Standard
9610 The following environments are available.
9611  You can use broadway.bind to get the bind keys shown at the right.
9612 \end_layout
9613
9614 \begin_layout Itemize
9615
9616 \family sans
9617 Standard
9618 \begin_inset Newline newline
9619 \end_inset
9620
9621
9622 \family default
9623 You should not have to use this, but it is here for anything that does not
9624  fit otherwise.
9625 \end_layout
9626
9627 \begin_layout Itemize
9628
9629 \family sans
9630 Narrative
9631 \begin_inset space \hfill{}
9632 \end_inset
9633
9634 M-z n
9635 \begin_inset Newline newline
9636 \end_inset
9637
9638
9639 \family default
9640 Used to describe stage setting and the action.
9641  First use of speaker names in all CAPs.
9642 \end_layout
9643
9644 \begin_layout Itemize
9645
9646 \family sans
9647 ACT
9648 \begin_inset space \hfill{}
9649 \end_inset
9650
9651 M-z a
9652 \begin_inset Newline newline
9653 \end_inset
9654
9655
9656 \family default
9657 Automatically numbered.
9658  On screen it will be arabic, but will print as Roman.
9659 \end_layout
9660
9661 \begin_layout Itemize
9662
9663 \family sans
9664 ACT*
9665 \begin_inset space \hfill{}
9666 \end_inset
9667
9668 M-z S at
9669 \begin_inset Newline newline
9670 \end_inset
9671
9672
9673 \family default
9674 Subtitle for 
9675 \family sans
9676 ACT.
9677
9678 \family default
9679  It is just centered text.
9680 \end_layout
9681
9682 \begin_layout Itemize
9683
9684 \family sans
9685 SCENE
9686 \begin_inset space \hfill{}
9687 \end_inset
9688
9689 M-z S-S
9690 \begin_inset Newline newline
9691 \end_inset
9692
9693
9694 \family default
9695 Not automatically numbered.
9696  You supply the number.
9697  This is because I couldn't figure out how.
9698 \end_layout
9699
9700 \begin_layout Itemize
9701
9702 \family sans
9703 AT_RISE:
9704 \begin_inset space \hfill{}
9705 \end_inset
9706
9707 M-z S-R
9708 \begin_inset Newline newline
9709 \end_inset
9710
9711
9712 \family default
9713 A special case of Narrative to describe the setting and action as the curtain
9714  rises.
9715 \end_layout
9716
9717 \begin_layout Itemize
9718
9719 \family sans
9720 Speaker
9721 \begin_inset space \hfill{}
9722 \end_inset
9723
9724 M-z s
9725 \begin_inset Newline newline
9726 \end_inset
9727
9728
9729 \family default
9730 The speaker's (actor's) title, centered in all CAPS.
9731 \end_layout
9732
9733 \begin_layout Itemize
9734
9735 \family sans
9736 Parenthetical
9737 \begin_inset space \hfill{}
9738 \end_inset
9739
9740 M-z p
9741 \begin_inset Newline newline
9742 \end_inset
9743
9744
9745 \family default
9746 Instructions to the speaker.
9747  The parentheses are automatically inserted.
9748  The ( will appear on screen, but both will be in the printed play.
9749  This environment is only used within 
9750 \family sans
9751 Dialogue
9752 \family default
9753 .
9754 \end_layout
9755
9756 \begin_layout Itemize
9757
9758 \family sans
9759 Dialogue
9760 \begin_inset space \hfill{}
9761 \end_inset
9762
9763 M-z d
9764 \begin_inset Newline newline
9765 \end_inset
9766
9767
9768 \family default
9769 What the Speaker says.
9770 \end_layout
9771
9772 \begin_layout Itemize
9773
9774 \family sans
9775 CURTAIN
9776 \begin_inset space \hfill{}
9777 \end_inset
9778
9779 M-z S-C
9780 \begin_inset Newline newline
9781 \end_inset
9782
9783
9784 \family default
9785 The curtain comes down.
9786 \end_layout
9787
9788 \begin_layout Itemize
9789
9790 \family sans
9791 Title
9792 \begin_inset space \hfill{}
9793 \end_inset
9794
9795 M-z S-T
9796 \end_layout
9797
9798 \begin_layout Itemize
9799
9800 \family sans
9801 Author
9802 \begin_inset space \hfill{}
9803 \end_inset
9804
9805 M-z S-A
9806 \end_layout
9807
9808 \begin_layout Itemize
9809
9810 \family sans
9811 Right_Address
9812 \begin_inset space \hfill{}
9813 \end_inset
9814
9815 M-z r
9816 \end_layout
9817
9818 \begin_layout Standard
9819 Hello there.
9820 \end_layout
9821
9822 \begin_layout Section
9823 Dinbrief
9824 \end_layout
9825
9826 \begin_layout Standard
9827 The document class 
9828 \family sans
9829 dinbrief
9830 \family default
9831  can be used to type letters according to German conventions.
9832  A template file is included in 
9833 \family typewriter
9834 .../lyx/share/templates
9835 \family default
9836  for you to use as a starting point.
9837 \end_layout
9838
9839 \begin_layout Section
9840 EGS journals (
9841 \family sans
9842 egs
9843 \family default
9844 )
9845 \end_layout
9846
9847 \begin_layout Standard
9848 by 
9849 \shape smallcaps
9850 Martin Vermeer
9851 \end_layout
9852
9853 \begin_layout Subsection
9854 Description
9855 \end_layout
9856
9857 \begin_layout Standard
9858 This is the layout file for the European Geophysical Society journals.
9859  The needed 
9860 \family typewriter
9861 egs.cls
9862 \family default
9863  can be downloaded from the web site of the EGS under 
9864 \begin_inset Flex URL
9865 status collapsed
9866
9867 \begin_layout Plain Layout
9868
9869 www.copernicus.org
9870 \end_layout
9871
9872 \end_inset
9873
9874 .
9875 \end_layout
9876
9877 \begin_layout Subsection
9878 New styles
9879 \end_layout
9880
9881 \begin_layout Standard
9882
9883 \family sans
9884 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9885  Accepted
9886 \family default
9887
9888 \family sans
9889 Offsets
9890 \family default
9891 .
9892  The current layout file is unfortunately very unmodular and would benefit
9893  from using the various 
9894 \family typewriter
9895 std*.inc
9896 \family default
9897  file inclusions.
9898 \end_layout
9899
9900 \begin_layout Section
9901 Elsevier Journals
9902 \end_layout
9903
9904 \begin_layout Standard
9905 See the LyX template file 
9906 \family typewriter
9907 elsarticle.lyx
9908 \family default
9909 .
9910  It contains all infos you need.
9911 \end_layout
9912
9913 \begin_layout Section
9914 Foils [aka 
9915 \family sans
9916 FoilTeX
9917 \family default
9918 ]
9919 \begin_inset CommandInset label
9920 LatexCommand label
9921 name "sec:foiltex"
9922
9923 \end_inset
9924
9925
9926 \end_layout
9927
9928 \begin_layout Standard
9929 by 
9930 \noun on
9931 Allan Rae
9932 \end_layout
9933
9934 \begin_layout Subsection
9935 Introduction
9936 \end_layout
9937
9938 \begin_layout Standard
9939 This section describes how to use LyX to make slides for overhead projectors.
9940  There are two document classes that can do this: the default slides class
9941  and the 
9942 \family sans
9943 FoilTeX
9944 \family default
9945  slides class.
9946  This section documents the latter.
9947 \end_layout
9948
9949 \begin_layout Standard
9950 I'm going to say this again, nice and clear, so that there's no misunderstanding
9951 :
9952 \end_layout
9953
9954 \begin_layout Standard
9955 \begin_inset VSpace bigskip
9956 \end_inset
9957
9958
9959 \end_layout
9960
9961 \begin_layout Standard
9962 \align center
9963
9964 \size large
9965 This section documents the class 
9966 \begin_inset Quotes eld
9967 \end_inset
9968
9969
9970 \family sans
9971 slides (FoilTeX)
9972 \family default
9973
9974 \begin_inset Quotes erd
9975 \end_inset
9976
9977  
9978 \emph on
9979 only.
9980 \end_layout
9981
9982 \begin_layout Standard
9983 \begin_inset VSpace bigskip
9984 \end_inset
9985
9986
9987 \end_layout
9988
9989 \begin_layout Standard
9990 If you're looking for the documentation for 
9991 \begin_inset Quotes eld
9992 \end_inset
9993
9994
9995 \family sans
9996 slides (default)
9997 \family default
9998
9999 \begin_inset Quotes erd
10000 \end_inset
10001
10002 , check out section
10003 \begin_inset space ~
10004 \end_inset
10005
10006
10007 \begin_inset CommandInset ref
10008 LatexCommand ref
10009 reference "sec:slitex"
10010
10011 \end_inset
10012
10013 .
10014  If your machine doesn't have the 
10015 \family sans
10016 foils
10017 \family default
10018  class [
10019 \begin_inset Quotes eld
10020 \end_inset
10021
10022
10023 \family sans
10024 slides (FoilTeX)
10025 \family default
10026
10027 \begin_inset Quotes erd
10028 \end_inset
10029
10030 ] installed, you'll probably have to use the default 
10031 \family sans
10032 slides
10033 \family default
10034  class, which isn't quite as good as 
10035 \family sans
10036 foils.
10037 \end_layout
10038
10039 \begin_layout Standard
10040 The 
10041 \family sans
10042 foils
10043 \family default
10044  class is designed for use with version 2.1 of the 
10045 \family sans
10046 foils.cls
10047 \family default
10048  LaTeX class file which is now an integral part of LaTeX2e.
10049 \end_layout
10050
10051 \begin_layout Subsection
10052 Getting Started
10053 \end_layout
10054
10055 \begin_layout Standard
10056 Obviously, to use this document class, you need to select 
10057 \begin_inset Quotes eld
10058 \end_inset
10059
10060
10061 \family sans
10062 slides (FoilTeX)
10063 \family default
10064
10065 \begin_inset Quotes erd
10066 \end_inset
10067
10068  from the 
10069 \family sans
10070 Class
10071 \family default
10072  entry in the 
10073 \family sans
10074 Document
10075 \begin_inset space ~
10076 \end_inset
10077
10078 Layout
10079 \family default
10080  dialog.
10081  There are some settings in the 
10082 \family sans
10083 Document
10084 \begin_inset space ~
10085 \end_inset
10086
10087 Layout
10088 \family default
10089  dialog that you should know about that are specific to this class:
10090 \end_layout
10091
10092 \begin_layout Itemize
10093 Don't change the options 
10094 \family sans
10095 Sides
10096 \family default
10097  and 
10098 \family sans
10099 Columns
10100 \family default
10101  on the 
10102 \family sans
10103 Document
10104 \begin_inset space ~
10105 \end_inset
10106
10107 Layout
10108 \family default
10109  dialog.
10110  They're ignored by the 
10111 \family sans
10112 foils
10113 \family default
10114  class.
10115 \end_layout
10116
10117 \begin_layout Itemize
10118 The default font size is 20
10119 \begin_inset space \thinspace{}
10120 \end_inset
10121
10122 pt with the other options being 17
10123 \begin_inset space \thinspace{}
10124 \end_inset
10125
10126 pt, 25
10127 \begin_inset space \thinspace{}
10128 \end_inset
10129
10130 pt and 30
10131 \begin_inset space \thinspace{}
10132 \end_inset
10133
10134 pt.
10135 \end_layout
10136
10137 \begin_layout Itemize
10138 The default font is 
10139 \family sans
10140 sans
10141 \family default
10142  
10143 \family sans
10144 serif
10145 \family default
10146  but all math equations are still typeset in the usual roman font.
10147 \end_layout
10148
10149 \begin_layout Itemize
10150
10151 \family sans
10152 FoilTeX
10153 \family default
10154  supports A4 and Letter paper sizes as well as a special size for working
10155  with 35
10156 \begin_inset space \thinspace{}
10157 \end_inset
10158
10159 mm slides.
10160  It doesn't support A5, B5, legal or executive paper sizes.
10161 \end_layout
10162
10163 \begin_layout Itemize
10164 Don't bother changing the 
10165 \family sans
10166 Float Placement
10167 \family default
10168  settings because they are ignored anyway.
10169  All floats appear where they are defined in the text.
10170 \end_layout
10171
10172 \begin_layout Itemize
10173 The 
10174 \family sans
10175 Pagestyle
10176 \family default
10177  setting behaves a bit differently for this class.
10178  
10179 \family sans
10180 FoilTeX
10181 \family default
10182  provides extensive footer and header capabilities including a user-defined
10183  logo.
10184  See section
10185 \begin_inset space ~
10186 \end_inset
10187
10188
10189 \begin_inset CommandInset ref
10190 LatexCommand ref
10191 reference "sec:foilfoot"
10192
10193 \end_inset
10194
10195  for more details.
10196  The title page is treated differently to all other pages in the document
10197  and is 
10198 \emph on
10199 always
10200 \emph default
10201  unnumbered and 
10202 \emph on
10203 always
10204 \emph default
10205  has the logo centered at the bottom of the page (if one is defined).
10206  The possible page style choices and what they do are as follows:
10207 \end_layout
10208
10209 \begin_deeper
10210 \begin_layout Labeling
10211 \labelwidthstring MMMMMMM
10212
10213 \family sans
10214 \series bold
10215 empty
10216 \family default
10217 \series default
10218  The final output contains no page numbers, or other headers or footers
10219  (except footnotes of course).
10220  
10221 \end_layout
10222
10223 \begin_layout Labeling
10224 \labelwidthstring MMMMMMM
10225
10226 \family sans
10227 \series bold
10228 plain
10229 \family default
10230 \series default
10231  The final output contains page numbers centered at the bottom of the page.
10232  No other headings or footers (other than footnotes).
10233 \end_layout
10234
10235 \begin_layout Labeling
10236 \labelwidthstring MMMMMMM
10237
10238 \series bold
10239 foilheadings
10240 \series default
10241  Page numbers in lower right corner.
10242  Additional headers and footers are also shown.
10243  This is also the default.
10244 \end_layout
10245
10246 \begin_layout Labeling
10247 \labelwidthstring MMMMMMM
10248
10249 \series bold
10250 fancy
10251 \series default
10252  Gives you access to the 
10253 \family sans
10254 fancyheadings
10255 \family default
10256  package although its use with 
10257 \family sans
10258 FoilTeX
10259 \family default
10260  is discouraged by the writer of the 
10261 \family sans
10262 FoilTeX
10263 \family default
10264  package because of some potential page layout clashes.
10265 \end_layout
10266
10267 \end_deeper
10268 \begin_layout Subsubsection
10269 Extra Options
10270 \end_layout
10271
10272 \begin_layout Standard
10273 The following options may be used in the extra class options in the 
10274 \family sans
10275 Document\SpecialChar \menuseparator
10276 Settings
10277 \family default
10278  dialog.
10279 \end_layout
10280
10281 \begin_layout Labeling
10282 \labelwidthstring MMMMMMx
10283
10284 \series bold
10285 35mmSlide
10286 \series default
10287  This sets up the page layout for 7.33
10288 \begin_inset space \thinspace{}
10289 \end_inset
10290
10291 in by 11
10292 \begin_inset space \thinspace{}
10293 \end_inset
10294
10295 in paper, which is about the same aspect ratio as a 35
10296 \begin_inset space \thinspace{}
10297 \end_inset
10298
10299 mm slide, making it a bit easier to work with this medium.
10300 \end_layout
10301
10302 \begin_layout Labeling
10303 \labelwidthstring MMMMMMx
10304
10305 \series bold
10306 headrule
10307 \series default
10308  Places a rule across the page below the header on every page except the
10309  title page.
10310 \end_layout
10311
10312 \begin_layout Labeling
10313 \labelwidthstring MMMMMMx
10314
10315 \series bold
10316 footrule
10317 \series default
10318  Places a rule across the page above the footer on every page except the
10319  title page.
10320 \end_layout
10321
10322 \begin_layout Labeling
10323 \labelwidthstring MMMMMMx
10324
10325 \series bold
10326 dvips
10327 \series default
10328  This is automatically set each time you create a new 
10329 \family sans
10330 foils
10331 \family default
10332  document.
10333  This option tells 
10334 \family sans
10335 FoilTeX
10336 \family default
10337  to use the dvips driver to rotate those pages that are set as landscape
10338  foils.
10339 \end_layout
10340
10341 \begin_layout Labeling
10342 \labelwidthstring MMMMMMx
10343
10344 \series bold
10345 landscape
10346 \series default
10347  Simply changes the page dimensions to those of a landscape page but doesn't
10348  do any rotation.
10349  Thus if you use this option you need to use an external program to rotate
10350  each page or feed your paper through your printer as landscape.
10351  Note that this option effectively reverses the roles of the 
10352 \family sans
10353 Foilhead
10354 \family default
10355  and 
10356 \family sans
10357 Rotatefoilhead
10358 \family default
10359  environments (don't worry these are described in the next section).
10360 \end_layout
10361
10362 \begin_layout Labeling
10363 \labelwidthstring MMMMMMx
10364
10365 \series bold
10366 leqno
10367 \series default
10368  Equation numbers on the left.
10369 \end_layout
10370
10371 \begin_layout Labeling
10372 \labelwidthstring MMMMMMx
10373
10374 \series bold
10375 fleqn
10376 \series default
10377  Flush-left equations.
10378 \end_layout
10379
10380 \begin_layout Subsection
10381 Supported Environments
10382 \end_layout
10383
10384 \begin_layout Standard
10385 Most of the environments commonly supported in other classes are also supported
10386  by the 
10387 \family sans
10388 foils
10389 \family default
10390  class.
10391  There are several additional environments provided by 
10392 \family sans
10393 FoilTeX
10394 \family default
10395  as well as a couple added by LyX.
10396  The following environments are shared with other classes:
10397 \end_layout
10398
10399 \begin_layout Standard
10400 \begin_inset ERT
10401 status open
10402
10403 \begin_layout Plain Layout
10404
10405
10406 \backslash
10407 begin{multicols}{2}
10408 \end_layout
10409
10410 \end_inset
10411
10412
10413 \end_layout
10414
10415 \begin_layout Itemize
10416
10417 \family sans
10418 Standard
10419 \end_layout
10420
10421 \begin_layout Itemize
10422
10423 \family sans
10424 Itemize
10425 \end_layout
10426
10427 \begin_layout Itemize
10428
10429 \family sans
10430 Enumerate
10431 \end_layout
10432
10433 \begin_layout Itemize
10434
10435 \family sans
10436 Description
10437 \end_layout
10438
10439 \begin_layout Itemize
10440
10441 \family sans
10442 List
10443 \end_layout
10444
10445 \begin_layout Itemize
10446
10447 \family sans
10448 LyX-Code
10449 \end_layout
10450
10451 \begin_layout Itemize
10452
10453 \family sans
10454 Verse
10455 \end_layout
10456
10457 \begin_layout Itemize
10458
10459 \family sans
10460 Quote
10461 \end_layout
10462
10463 \begin_layout Itemize
10464
10465 \family sans
10466 Quotation
10467 \end_layout
10468
10469 \begin_layout Itemize
10470
10471 \family sans
10472 Title
10473 \end_layout
10474
10475 \begin_layout Itemize
10476
10477 \family sans
10478 Author
10479 \end_layout
10480
10481 \begin_layout Itemize
10482
10483 \family sans
10484 Date
10485 \end_layout
10486
10487 \begin_layout Itemize
10488
10489 \family sans
10490 Abstract
10491 \end_layout
10492
10493 \begin_layout Itemize
10494
10495 \family sans
10496 Bibliography
10497 \end_layout
10498
10499 \begin_layout Itemize
10500
10501 \family sans
10502 Address
10503 \end_layout
10504
10505 \begin_layout Itemize
10506
10507 \family sans
10508 RightAddress
10509 \end_layout
10510
10511 \begin_layout Itemize
10512
10513 \family sans
10514 Caption
10515 \end_layout
10516
10517 \begin_layout Itemize
10518
10519 \family sans
10520 Comment
10521 \end_layout
10522
10523 \begin_layout Standard
10524 \begin_inset ERT
10525 status open
10526
10527 \begin_layout Plain Layout
10528
10529
10530 \backslash
10531 end{multicols}
10532 \end_layout
10533
10534 \end_inset
10535
10536
10537 \end_layout
10538
10539 \begin_layout Standard
10540 That is, all the major environments apart from the sectioning environments.
10541  Since foils are essentially self-contained sections, with a title and body,
10542  
10543 \family sans
10544 FoilTeX
10545 \family default
10546  provides specific commands for starting new foils and these are:
10547 \end_layout
10548
10549 \begin_layout Itemize
10550
10551 \family sans
10552 Foilhead
10553 \end_layout
10554
10555 \begin_layout Itemize
10556
10557 \family sans
10558 Rotatefoilhead
10559 \end_layout
10560
10561 \begin_layout Standard
10562 LyX also provides slightly modified versions of these two environments called:
10563 \end_layout
10564
10565 \begin_layout Itemize
10566
10567 \family sans
10568 ShortFoilhead
10569 \end_layout
10570
10571 \begin_layout Itemize
10572
10573 \family sans
10574 ShortRotatefoilhead
10575 \end_layout
10576
10577 \begin_layout Standard
10578 and the differences will be explained in the next section.
10579 \end_layout
10580
10581 \begin_layout Standard
10582 Since foils are often used in presenting ideas or new theorems and such
10583  
10584 \family sans
10585 FoilTeX
10586 \family default
10587  also provides a comprehensive box of goodies for presenting them:
10588 \end_layout
10589
10590 \begin_layout Standard
10591 \begin_inset ERT
10592 status open
10593
10594 \begin_layout Plain Layout
10595
10596
10597 \backslash
10598 begin{multicols}{2}
10599 \end_layout
10600
10601 \end_inset
10602
10603
10604 \end_layout
10605
10606 \begin_layout Itemize
10607
10608 \family sans
10609 Theorem
10610 \end_layout
10611
10612 \begin_layout Itemize
10613
10614 \family sans
10615 Lemma
10616 \end_layout
10617
10618 \begin_layout Itemize
10619
10620 \family sans
10621 Corollary
10622 \end_layout
10623
10624 \begin_layout Itemize
10625
10626 \family sans
10627 Proposition
10628 \end_layout
10629
10630 \begin_layout Itemize
10631
10632 \family sans
10633 Definition
10634 \end_layout
10635
10636 \begin_layout Itemize
10637
10638 \family sans
10639 Proof
10640 \end_layout
10641
10642 \begin_layout Itemize
10643
10644 \family sans
10645 Theorem*
10646 \end_layout
10647
10648 \begin_layout Itemize
10649
10650 \family sans
10651 Lemma*
10652 \end_layout
10653
10654 \begin_layout Itemize
10655
10656 \family sans
10657 Corollary*
10658 \end_layout
10659
10660 \begin_layout Itemize
10661
10662 \family sans
10663 Proposition*
10664 \end_layout
10665
10666 \begin_layout Itemize
10667
10668 \family sans
10669 Definition*
10670 \end_layout
10671
10672 \begin_layout Standard
10673 \begin_inset ERT
10674 status open
10675
10676 \begin_layout Plain Layout
10677
10678
10679 \backslash
10680 end{multicols}
10681 \end_layout
10682
10683 \end_inset
10684
10685
10686 \end_layout
10687
10688 \begin_layout Standard
10689 The starred versions are unnumbered while the unstarred versions are numbered.
10690  There are also two list environments added by LyX and these are:
10691 \end_layout
10692
10693 \begin_layout Itemize
10694
10695 \family sans
10696 TickList
10697 \end_layout
10698
10699 \begin_layout Itemize
10700
10701 \family sans
10702 CrossList
10703 \end_layout
10704
10705 \begin_layout Standard
10706
10707 \family sans
10708 FoilTeX
10709 \family default
10710  provides some powerful header and footer capabilities that are best set
10711  in the preamble although they may be set at any point in a document.
10712  If you want to change these settings in your document the best place to
10713  do so is at the very top of a foil, i.
10714 \begin_inset space \thinspace{}
10715 \end_inset
10716
10717 g.
10718 \emph on
10719
10720 \begin_inset space \space{}
10721 \end_inset
10722
10723
10724 \emph default
10725 straight after the foilhead.
10726 \end_layout
10727
10728 \begin_layout Standard
10729 For this purpose, the following command styles are provided [
10730 \shape smallcaps
10731 Martin Vermeer
10732 \shape default
10733 ]:
10734 \end_layout
10735
10736 \begin_layout Standard
10737 \begin_inset ERT
10738 status open
10739
10740 \begin_layout Plain Layout
10741
10742
10743 \backslash
10744 begin{multicols}{2}
10745 \end_layout
10746
10747 \end_inset
10748
10749
10750 \end_layout
10751
10752 \begin_layout Itemize
10753
10754 \family sans
10755 My
10756 \begin_inset space ~
10757 \end_inset
10758
10759 Logo
10760 \end_layout
10761
10762 \begin_layout Itemize
10763
10764 \family sans
10765 Restriction
10766 \end_layout
10767
10768 \begin_layout Itemize
10769
10770 \family sans
10771 Right
10772 \begin_inset space ~
10773 \end_inset
10774
10775 Footer
10776 \end_layout
10777
10778 \begin_layout Itemize
10779
10780 \family sans
10781 Right
10782 \begin_inset space ~
10783 \end_inset
10784
10785 Header
10786 \end_layout
10787
10788 \begin_layout Itemize
10789
10790 \family sans
10791 Left
10792 \begin_inset space ~
10793 \end_inset
10794
10795 Header
10796 \end_layout
10797
10798 \begin_deeper
10799 \begin_layout Standard
10800 \begin_inset space ~
10801 \end_inset
10802
10803
10804 \end_layout
10805
10806 \end_deeper
10807 \begin_layout Standard
10808 \begin_inset ERT
10809 status open
10810
10811 \begin_layout Plain Layout
10812
10813
10814 \backslash
10815 end{multicols}
10816 \end_layout
10817
10818 \end_inset
10819
10820
10821 \end_layout
10822
10823 \begin_layout Standard
10824 There are also a few commands provided by 
10825 \family sans
10826 FoilTeX
10827 \family default
10828  that aren't directly supported by LyX but I'll tell you what they do and
10829  how to use them in section
10830 \begin_inset space ~
10831 \end_inset
10832
10833
10834 \begin_inset CommandInset ref
10835 LatexCommand ref
10836 reference "sec:unsuppfoils"
10837
10838 \end_inset
10839
10840 .
10841 \end_layout
10842
10843 \begin_layout Subsection
10844 Building a Set of Foils
10845 \end_layout
10846
10847 \begin_layout Standard
10848 This section will give a simple introduction to using the different environments
10849  to build a set of foils.
10850  If you want to see an example set of foils, take a look at the 
10851 \family typewriter
10852 Foils.lyx
10853 \family default
10854  file you find in LyX's 
10855 \family typewriter
10856 examples
10857 \family default
10858  folder.
10859 \end_layout
10860
10861 \begin_layout Subsubsection
10862 Give It a Title Page
10863 \end_layout
10864
10865 \begin_layout Standard
10866 Unlike other classes that provide 
10867 \family sans
10868 Title
10869 \family default
10870
10871 \family sans
10872 Author
10873 \family default
10874
10875 \family sans
10876 Date
10877 \family default
10878  and 
10879 \family sans
10880 Abstract
10881 \family default
10882  environments, 
10883 \family sans
10884 foils
10885 \family default
10886  creates the title on a page of its own.
10887  If you leave out the 
10888 \family sans
10889 Date
10890 \family default
10891  environment LaTeX will substitute the current date (every time you regenerate
10892  the output).
10893 \end_layout
10894
10895 \begin_layout Subsubsection
10896 Start a New Foil
10897 \end_layout
10898
10899 \begin_layout Standard
10900 As I mentioned earlier, there are four ways of starting a new foil.
10901  For portrait foils you should use 
10902 \family sans
10903 Foilhead
10904 \family default
10905  or 
10906 \family sans
10907 ShortFoilhead.
10908
10909 \family default
10910  The difference between these two environments is the amount of space between
10911  the title of the foil (the foilhead) and the body of the foil.
10912 \end_layout
10913
10914 \begin_layout Standard
10915 Landscape foils are generated using the 
10916 \family sans
10917 Rotatefoilhead
10918 \family default
10919  and 
10920 \family sans
10921 ShortRotatefoilhead
10922 \family default
10923  environments.
10924  Again the only difference is the spacing between foilhead and body.
10925  Both of the short versions have 0.5 inches less separation between the foilhead
10926  and the body.
10927  
10928 \end_layout
10929
10930 \begin_layout Standard
10931 One problem with the support for landscape foils is the requirement that
10932  you have to use the 
10933 \family typewriter
10934 dvips
10935 \family default
10936  driver to generate the PostScript output otherwise the foils won't be rotated.
10937  It is possible to get landscape foils even if you haven't got the 
10938 \family typewriter
10939 dvips
10940 \family default
10941  driver provided you can feed your foils sideways through your printer ;-)
10942 \end_layout
10943
10944 \begin_layout Subsubsection
10945 Theorems, Lemmas, Proofs and more
10946 \end_layout
10947
10948 \begin_layout Standard
10949 Due to a small bug in LyX you can't have two of the same type of these environme
10950 nts directly following each other.
10951  They must be separated by something.
10952  If you try, you will just be extending the previous environment as if you
10953  had merged the two environments together.
10954  So, how do you get around this problem? The simplest option is to insert
10955  some text between the two environments or add a 
10956 \family sans
10957 LaTeX
10958 \family default
10959  environment between the two with just a 
10960 \begin_inset Quotes eld
10961 \end_inset
10962
10963
10964 \family typewriter
10965 %
10966 \family default
10967
10968 \begin_inset Quotes erd
10969 \end_inset
10970
10971  in it.
10972  This will force LyX to produce two separate environments and hence the
10973  correct LaTeX output.
10974  An example is provided in the example file included with the LyX distribution.
10975  Remember, this problem only occurs if you are trying to place two of the
10976  same type of theorem-like environments one directly after the other.
10977 \end_layout
10978
10979 \begin_layout Subsubsection
10980 Lists
10981 \end_layout
10982
10983 \begin_layout Standard
10984 You get all the commonly supported list styles found in other classes as
10985  well as two new ones.
10986  I'll only describe the new ones here.
10987  If you want to find out more about the other list environments check out
10988  the 
10989 \emph on
10990 User's Guide.
10991
10992 \emph default
10993  If you intend to use itemized lists you might also want to read about the
10994  
10995 \family sans
10996 Itemize
10997 \begin_inset space ~
10998 \end_inset
10999
11000 Bullet
11001 \begin_inset space ~
11002 \end_inset
11003
11004 Selection
11005 \family default
11006  dialog described above in section
11007 \begin_inset space ~
11008 \end_inset
11009
11010
11011 \begin_inset CommandInset ref
11012 LatexCommand ref
11013 reference "sec:bullet"
11014
11015 \end_inset
11016
11017 .
11018 \end_layout
11019
11020 \begin_layout Standard
11021 The two new list styles, 
11022 \family sans
11023 TickList
11024 \family default
11025  and 
11026 \family sans
11027 CrossList
11028 \family default
11029 , are designed to make it easier for you to create lists of do's and don'ts
11030  or right and wrong by providing dedicated environments that use a tick
11031  or a cross as the label of the list.
11032  These lists are in fact dedicated variants of the 
11033 \family sans
11034 Itemize
11035 \family default
11036  environment.
11037  They do however require that you have the 
11038 \family typewriter
11039 psnfss
11040 \family default
11041  packages installed.
11042 \end_layout
11043
11044 \begin_layout Subsubsection
11045 Figures and Tables
11046 \end_layout
11047
11048 \begin_layout Standard
11049
11050 \family sans
11051 FoilTeX
11052 \family default
11053  redefines the floating tables and figures so that they appear exactly where
11054  they are in the text rather than pushing them to the top of the page or
11055  to some user specified location.
11056  In fact if you change the float placement settings they are simply ignored.
11057 \end_layout
11058
11059 \begin_layout Subsubsection
11060 Page Headers and Footers
11061 \begin_inset CommandInset label
11062 LatexCommand label
11063 name "sec:foilfoot"
11064
11065 \end_inset
11066
11067
11068 \end_layout
11069
11070 \begin_layout Standard
11071
11072 \family sans
11073 My
11074 \begin_inset space ~
11075 \end_inset
11076
11077 Logo
11078 \family default
11079  and 
11080 \family sans
11081 Restriction
11082 \family default
11083  are two commands used to control the left-footer text string.
11084  The first is meant to allow you to include a graphic logo on your foils
11085  and defaults to 
11086 \begin_inset Quotes eld
11087 \end_inset
11088
11089 -Typeset by 
11090 \family sans
11091 FoilTeX
11092 \family default
11093 -
11094 \begin_inset Quotes erd
11095 \end_inset
11096
11097 .
11098  While the second is meant to provide a classification for the audience,
11099  
11100 \emph on
11101 e.
11102 \begin_inset space \thinspace{}
11103 \end_inset
11104
11105 g.
11106 \emph default
11107
11108 \begin_inset space \space{}
11109 \end_inset
11110
11111 Confidential.
11112  It is empty by default.
11113 \end_layout
11114
11115 \begin_layout Standard
11116 The remaining page corners can be filled by 
11117 \family sans
11118 Right
11119 \begin_inset space ~
11120 \end_inset
11121
11122 Footer
11123 \family default
11124  (which defaults to page numbers), 
11125 \family sans
11126 Right
11127 \begin_inset space ~
11128 \end_inset
11129
11130 Header
11131 \family default
11132  (top right) and 
11133 \family sans
11134 Left
11135 \begin_inset space ~
11136 \end_inset
11137
11138 Header
11139 \family default
11140  (top left).
11141 \end_layout
11142
11143 \begin_layout Subsection
11144 Unsupported 
11145 \family sans
11146 FoilTeX
11147 \family default
11148  Goodies
11149 \begin_inset CommandInset label
11150 LatexCommand label
11151 name "sec:unsuppfoils"
11152
11153 \end_inset
11154
11155
11156 \end_layout
11157
11158 \begin_layout Standard
11159 All the commands mentioned below need to be set in a 
11160 \family sans
11161 LaTeX
11162 \family default
11163  environment or as 
11164 \family sans
11165 TeX
11166 \family default
11167  within another environment.
11168 \end_layout
11169
11170 \begin_layout Subsubsection
11171 Lengths
11172 \end_layout
11173
11174 \begin_layout Standard
11175 All lengths are adjusted using the 
11176 \family typewriter
11177
11178 \backslash
11179 setlength{
11180 \family default
11181 \emph on
11182 lengthname
11183 \family typewriter
11184 \emph default
11185 }{
11186 \family default
11187 \emph on
11188 newlength
11189 \family typewriter
11190 \emph default
11191 }
11192 \family default
11193  command.
11194  Where 
11195 \emph on
11196 lengthname
11197 \emph default
11198  should be replaced by the name given to the length you want to change and
11199  
11200 \emph on
11201 newlength
11202 \emph default
11203  is the length value.
11204  All lengths should be specified in units of length such as inches (
11205 \family typewriter
11206 in
11207 \family default
11208 ), millimeters (
11209 \family typewriter
11210 mm
11211 \family default
11212 ) or points (
11213 \family typewriter
11214 pt
11215 \family default
11216 ) or relative to some document or font-based length such as 
11217 \family typewriter
11218
11219 \backslash
11220 textwidth
11221 \family default
11222 .
11223  
11224 \end_layout
11225
11226 \begin_layout Standard
11227 It's possible to change the spacing between a foilhead and the body of the
11228  foil by adjusting the length specified by 
11229 \family typewriter
11230
11231 \backslash
11232 foilheadskip
11233 \family default
11234 .
11235  For example, to make 
11236 \emph on
11237 all
11238 \emph default
11239  foilheads 0.5
11240 \begin_inset space \space{}
11241 \end_inset
11242
11243 in closer to their bodies put the following in the preamble: 
11244 \family typewriter
11245
11246 \backslash
11247 setlength{
11248 \backslash
11249 foilheadskip}{-0.5in}
11250 \end_layout
11251
11252 \begin_layout Standard
11253 The spacings around floats can be adjusted by setting these lengths:
11254 \end_layout
11255
11256 \begin_layout Labeling
11257 \labelwidthstring MMMMMMMMMMM
11258
11259 \family typewriter
11260
11261 \backslash
11262 abovefloatskip
11263 \family default
11264  Separation between the text and the top of the float
11265 \end_layout
11266
11267 \begin_layout Labeling
11268 \labelwidthstring MMMMMMMMMMM
11269
11270 \family typewriter
11271
11272 \backslash
11273 abovecaptionskip
11274 \family default
11275  Separation between the float and the caption
11276 \end_layout
11277
11278 \begin_layout Labeling
11279 \labelwidthstring MMMMMMMMMMM
11280
11281 \family typewriter
11282
11283 \backslash
11284 belowcaptionskip
11285 \family default
11286  Separation between the caption and the following text
11287 \end_layout
11288
11289 \begin_layout Labeling
11290 \labelwidthstring MMMMMMMMMMM
11291
11292 \family typewriter
11293
11294 \backslash
11295 captionwidth
11296 \family default
11297  You can make the captions narrower than the surrounding text by adjusting
11298  this length.
11299  Best done relative to 
11300 \family typewriter
11301
11302 \backslash
11303 textwidth
11304 \family default
11305 .
11306 \end_layout
11307
11308 \begin_layout Standard
11309 There are also several title page related lengths that you may find useful
11310  if you have a long title or several authors:
11311 \end_layout
11312
11313 \begin_layout Labeling
11314 \labelwidthstring MMMMMMMMMMM
11315
11316 \family typewriter
11317
11318 \backslash
11319 abovetitleskip
11320 \family default
11321  Separation from headers to 
11322 \family sans
11323 Title
11324 \end_layout
11325
11326 \begin_layout Labeling
11327 \labelwidthstring MMMMMMMMMMM
11328
11329 \family typewriter
11330
11331 \backslash
11332 titleauthorskip
11333 \family default
11334  between 
11335 \family sans
11336 Title
11337 \family default
11338  and 
11339 \family sans
11340 Author
11341 \family default
11342  environments
11343 \end_layout
11344
11345 \begin_layout Labeling
11346 \labelwidthstring MMMMMMMMMMM
11347
11348 \family typewriter
11349
11350 \backslash
11351 authorauthorskip
11352 \family default
11353  between multiple 
11354 \family sans
11355 Author
11356 \family default
11357  lines
11358 \end_layout
11359
11360 \begin_layout Labeling
11361 \labelwidthstring MMMMMMMMMMM
11362
11363 \family typewriter
11364
11365 \backslash
11366 authordateskip
11367 \family default
11368  between the 
11369 \family sans
11370 Author
11371 \family default
11372  and the 
11373 \family sans
11374 Date
11375 \end_layout
11376
11377 \begin_layout Labeling
11378 \labelwidthstring MMMMMMMMMMM
11379
11380 \family typewriter
11381
11382 \backslash
11383 dateabstractskip
11384 \family default
11385  between the 
11386 \family sans
11387 Date
11388 \family default
11389  and the 
11390 \family sans
11391 Abstract
11392 \end_layout
11393
11394 \begin_layout Standard
11395 The last length related command affects all the list environments.
11396  If you place 
11397 \family typewriter
11398
11399 \backslash
11400 zerolistvertdimens
11401 \family default
11402  
11403 \emph on
11404 inside
11405 \emph default
11406  a list environment then all the vertical spacing between the list items
11407  is removed.
11408  Note that this is a command not a length so it doesn't require 
11409 \family typewriter
11410
11411 \backslash
11412 setlength
11413 \family default
11414  like the stuff mentioned above.
11415 \end_layout
11416
11417 \begin_layout Subsubsection
11418 Headers and Footers
11419 \end_layout
11420
11421 \begin_layout Standard
11422 The 
11423 \family typewriter
11424
11425 \backslash
11426 LogoOn
11427 \family default
11428  and 
11429 \family typewriter
11430
11431 \backslash
11432 LogoOff
11433 \family default
11434  commands control whether the logo in the 
11435 \family sans
11436 MyLogo
11437 \family default
11438  definition appear on a given page.
11439  If you put 
11440 \family typewriter
11441
11442 \backslash
11443 LogoOff
11444 \family default
11445  in the preamble then none of the foils will have the logo on them.
11446  If you don't want the logo on a particular page place the 
11447 \family typewriter
11448
11449 \backslash
11450 LogoOff
11451 \family default
11452  directly after the foilhead of that page and the 
11453 \family typewriter
11454
11455 \backslash
11456 LogoOn
11457 \family default
11458  directly after the next foilhead.
11459 \end_layout
11460
11461 \begin_layout Standard
11462 If you decide to use the 
11463 \family sans
11464 fancy
11465 \family default
11466  page style setting in the 
11467 \family sans
11468 Document
11469 \begin_inset space ~
11470 \end_inset
11471
11472 Layout
11473 \family default
11474  dialog you should probably add 
11475 \family typewriter
11476
11477 \backslash
11478 let
11479 \backslash
11480 headwidth
11481 \backslash
11482 textwidth
11483 \family default
11484  to your preamble so headers and footers on landscape pages are correctly
11485  placed when rotated.
11486  This is due to some clashes between the page layouts provided by the 
11487 \family sans
11488 fancyheadings
11489 \family default
11490  package and the 
11491 \family sans
11492 foils
11493 \family default
11494  class.
11495 \end_layout
11496
11497 \begin_layout Section
11498 Hollywood (Hollywood spec scripts)
11499 \end_layout
11500
11501 \begin_layout Standard
11502 by 
11503 \shape smallcaps
11504 Garst Reese
11505 \end_layout
11506
11507 \begin_layout Subsection
11508 Introduction
11509 \end_layout
11510
11511 \begin_layout Standard
11512 Getting the format of a Hollywood script right is a 
11513 \begin_inset Quotes eld
11514 \end_inset
11515
11516 rite of passage.
11517 \begin_inset Quotes erd
11518 \end_inset
11519
11520  It is designed to make the readers focus on content and to be easy and
11521  familiar for the actors to read.
11522  Each page of a script should be one minute of film.
11523  Nothing goes in a script that you cannot see or hear on screen.
11524  The courier 12 pt font should be used throughout.
11525  No italics.
11526 \end_layout
11527
11528 \begin_layout Subsection
11529 Special problems
11530 \end_layout
11531
11532 \begin_layout Standard
11533 Speakers' lines should NEVER break in mid-sentence.
11534  If a speaker's lines continue over a page break, repeat the 
11535 \family sans
11536 Speaker
11537 \family default
11538  title followed by (Cont'd).
11539 \end_layout
11540
11541 \begin_layout Subsection
11542 Special features
11543 \end_layout
11544
11545 \begin_layout Standard
11546 Insert the 
11547 \family sans
11548 Speaker
11549 \family default
11550  names as labels then cross-reference the label to insert the name.
11551  The cross-reference dialog will show the current cast of characters.
11552  You can use this to insert the speaker name in narratives also.
11553 \end_layout
11554
11555 \begin_layout Subsection
11556 Paper size and Margins
11557 \end_layout
11558
11559 \begin_layout Standard
11560 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11561 \end_layout
11562
11563 \begin_layout Subsection
11564 Environments
11565 \end_layout
11566
11567 \begin_layout Standard
11568 The following environments are available.
11569  You can use hollywood.bind to get the bind keys shown at the right.
11570 \end_layout
11571
11572 \begin_layout Itemize
11573
11574 \family sans
11575 Standard
11576 \begin_inset Newline newline
11577 \end_inset
11578
11579
11580 \family default
11581 Used where nothing else works.
11582  Try to avoid it.
11583 \end_layout
11584
11585 \begin_layout Itemize
11586
11587 \family sans
11588 FADE_IN
11589 \family default
11590 :
11591 \begin_inset space \hfill{}
11592 \end_inset
11593
11594
11595 \family sans
11596 M-z S-I
11597 \family default
11598
11599 \begin_inset Newline newline
11600 \end_inset
11601
11602 Usually followed by something like 
11603 \begin_inset Quotes eld
11604 \end_inset
11605
11606 on Sally waking up.
11607 \begin_inset Quotes erd
11608 \end_inset
11609
11610
11611 \end_layout
11612
11613 \begin_layout Itemize
11614
11615 \family sans
11616 INT:
11617 \begin_inset space \hfill{}
11618 \end_inset
11619
11620 M-z i
11621 \begin_inset Newline newline
11622 \end_inset
11623
11624
11625 \family default
11626 Introduces a new INTERIOR camera set-up.
11627  Always followed by DAY or NIGHT, or something similar to define the lighting
11628  required.
11629  Everthing on this line in CAPS.
11630 \end_layout
11631
11632 \begin_layout Itemize
11633
11634 \family sans
11635 EXT:
11636 \begin_inset space \hfill{}
11637 \end_inset
11638
11639 M-z e
11640 \begin_inset Newline newline
11641 \end_inset
11642
11643
11644 \family default
11645 Introduces a new EXTERIOR camera set-up.
11646  Everthing on this line in CAPS.
11647 \end_layout
11648
11649 \begin_layout Itemize
11650
11651 \family sans
11652 Speaker
11653 \begin_inset space \hfill{}
11654 \end_inset
11655
11656 M-z s
11657 \begin_inset Newline newline
11658 \end_inset
11659
11660
11661 \family default
11662 The character speaking.
11663 \end_layout
11664
11665 \begin_layout Itemize
11666
11667 \family sans
11668 Parenthetical
11669 \begin_inset space \hfill{}
11670 \end_inset
11671
11672 M-z p
11673 \begin_inset Newline newline
11674 \end_inset
11675
11676
11677 \family default
11678 Instructions to the speaker.
11679  The () are automatically inserted, but only the ( will show in LyX.
11680  Both will be printed.
11681 \end_layout
11682
11683 \begin_layout Itemize
11684
11685 \family sans
11686 Dialogue
11687 \begin_inset space \hfill{}
11688 \end_inset
11689
11690 M-z d
11691 \begin_inset Newline newline
11692 \end_inset
11693
11694
11695 \family default
11696 What the 
11697 \family sans
11698 Speaker
11699 \family default
11700  says.
11701 \end_layout
11702
11703 \begin_layout Itemize
11704
11705 \family sans
11706 Transition
11707 \begin_inset space \hfill{}
11708 \end_inset
11709
11710 M-z t
11711 \begin_inset Newline newline
11712 \end_inset
11713
11714
11715 \family default
11716 Camera movement instruction.
11717  e.
11718 \begin_inset space \thinspace{}
11719 \end_inset
11720
11721 g.
11722 \begin_inset space \space{}
11723 \end_inset
11724
11725 CUT TO:
11726 \end_layout
11727
11728 \begin_layout Itemize
11729
11730 \family sans
11731 FADE OUT:
11732 \begin_inset space \hfill{}
11733 \end_inset
11734
11735 M-z S-I
11736 \end_layout
11737
11738 \begin_layout Itemize
11739
11740 \family sans
11741 Author
11742 \begin_inset space \hfill{}
11743 \end_inset
11744
11745 M-z S-A
11746 \end_layout
11747
11748 \begin_layout Itemize
11749
11750 \family sans
11751 Title
11752 \begin_inset space \hfill{}
11753 \end_inset
11754
11755 M-z S-T
11756 \end_layout
11757
11758 \begin_layout Itemize
11759
11760 \family sans
11761 Right_Address
11762 \begin_inset space \hfill{}
11763 \end_inset
11764
11765 M-z r
11766 \end_layout
11767
11768 \begin_layout Subsection
11769 Script jargon
11770 \end_layout
11771
11772 \begin_layout Itemize
11773 (O.S) — off screen
11774 \end_layout
11775
11776 \begin_layout Itemize
11777 (V.0) — voice over
11778 \end_layout
11779
11780 \begin_layout Itemize
11781 b.
11782 \begin_inset space \thinspace{}
11783 \end_inset
11784
11785 g.
11786  — background
11787 \end_layout
11788
11789 \begin_layout Itemize
11790 C.U.
11791  — close-up
11792 \end_layout
11793
11794 \begin_layout Itemize
11795 PAN — camera movement
11796 \end_layout
11797
11798 \begin_layout Itemize
11799 INSERT — cut to close-up of
11800 \end_layout
11801
11802 \begin_layout Section
11803 ijmpc and ijmpd
11804 \end_layout
11805
11806 \begin_layout Standard
11807 by 
11808 \noun on
11809 Panayotis Papasotiriou
11810 \end_layout
11811
11812 \begin_layout Subsection
11813 Overview
11814 \end_layout
11815
11816 \begin_layout Standard
11817 The ijmpc package is a set of macros that facilitates electronic manuscript
11818  submission to the 
11819 \emph on
11820 International Journal of Modern Physics C
11821 \emph default
11822 .
11823  Similarly, the ijmpd package is for creating manuscripts to be submitted
11824  to the 
11825 \emph on
11826 International Journal of Modern Physics D
11827 \emph default
11828 .
11829  Both journals are published by World Scientific.
11830  The corresponding document classes are named 
11831 \family typewriter
11832 ws-ijmpc.cls
11833 \family default
11834  and 
11835 \family typewriter
11836 ws-ijmpd.cls
11837 \family default
11838 , respectively.
11839  These files, together with instructions for the authors, can be downloaded
11840  from the sites 
11841 \begin_inset Flex URL
11842 status collapsed
11843
11844 \begin_layout Plain Layout
11845
11846 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11847 \end_layout
11848
11849 \end_inset
11850
11851  and 
11852 \begin_inset Flex URL
11853 status collapsed
11854
11855 \begin_layout Plain Layout
11856
11857 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11858 \end_layout
11859
11860 \end_inset
11861
11862 .
11863  Both packages are modified versions of the standard 
11864 \begin_inset Quotes eld
11865 \end_inset
11866
11867 article
11868 \begin_inset Quotes erd
11869 \end_inset
11870
11871  package, and they are almost (but not exactly) identical.
11872  Most of their features are supported by LyX.
11873  I have used LyX successfully to write articles submitted to both journals
11874  without any problem.
11875 \end_layout
11876
11877 \begin_layout Subsection
11878 Writing a paper
11879 \end_layout
11880
11881 \begin_layout Standard
11882 As usual, the easiest way to write a paper is to start with a template.
11883  Click on 
11884 \family sans
11885 File\SpecialChar \menuseparator
11886 New from
11887 \family default
11888  
11889 \family sans
11890 \bar under
11891 T
11892 \bar default
11893 emplate
11894 \family default
11895 , then choose the 
11896 \family typewriter
11897 ijmpc.lyx
11898 \family default
11899  or 
11900 \family typewriter
11901 ijmpd.lyx
11902 \family default
11903  template.
11904  This will give an (almost) empty document that includes the most common
11905  fields found in a manuscript.
11906  Simply overwrite the existing text (including the brackets, 
11907 \family typewriter
11908 <>
11909 \family default
11910 ) with your text.
11911  You should keep in mind the following remarks.
11912 \end_layout
11913
11914 \begin_layout Enumerate
11915 LyX won't let you change the font size and the page style of the document,
11916  because such modifications are not allowed by both packages.
11917 \end_layout
11918
11919 \begin_layout Enumerate
11920 The language of the document should not be changed.
11921  Before previewing your paper, be sure that the babel package is not used.
11922  To do this, click on 
11923 \family sans
11924 Tools\SpecialChar \menuseparator
11925 Preferences
11926 \family default
11927 , select the 
11928 \family sans
11929 Lang Opts
11930 \family default
11931  tab, deselect the 
11932 \family sans
11933 Use babel
11934 \family default
11935  checkbox in the language settings, and click on 
11936 \family sans
11937 Apply
11938 \family default
11939  (or 
11940 \family sans
11941 Save
11942 \family default
11943 , if you wish to make this change permanent).
11944 \end_layout
11945
11946 \begin_layout Enumerate
11947 The 
11948 \begin_inset Quotes eld
11949 \end_inset
11950
11951 Keywords
11952 \begin_inset Quotes erd
11953 \end_inset
11954
11955  style must be used to define keywords.
11956 \end_layout
11957
11958 \begin_layout Enumerate
11959 The ijmpc package provides a style named 
11960 \begin_inset Quotes eld
11961 \end_inset
11962
11963 Classification Codes
11964 \begin_inset Quotes erd
11965 \end_inset
11966
11967 , which can be used to define classification codes, such as PACS numbers.
11968  Note that this facility is not supported by the ijmpd package.
11969 \end_layout
11970
11971 \begin_layout Enumerate
11972 Several new environments are available: 
11973 \begin_inset Quotes eld
11974 \end_inset
11975
11976 Definition
11977 \begin_inset Quotes erd
11978 \end_inset
11979
11980
11981 \begin_inset Quotes eld
11982 \end_inset
11983
11984 Step
11985 \begin_inset Quotes erd
11986 \end_inset
11987
11988
11989 \begin_inset Quotes eld
11990 \end_inset
11991
11992 Example
11993 \begin_inset Quotes erd
11994 \end_inset
11995
11996
11997 \begin_inset Quotes eld
11998 \end_inset
11999
12000 Remark
12001 \begin_inset Quotes erd
12002 \end_inset
12003
12004
12005 \begin_inset Quotes eld
12006 \end_inset
12007
12008 Notation
12009 \begin_inset Quotes erd
12010 \end_inset
12011
12012
12013 \begin_inset Quotes eld
12014 \end_inset
12015
12016 Theorem
12017 \begin_inset Quotes erd
12018 \end_inset
12019
12020
12021 \begin_inset Quotes eld
12022 \end_inset
12023
12024 Proof
12025 \begin_inset Quotes erd
12026 \end_inset
12027
12028
12029 \begin_inset Quotes eld
12030 \end_inset
12031
12032 Corollary
12033 \begin_inset Quotes erd
12034 \end_inset
12035
12036
12037 \begin_inset Quotes eld
12038 \end_inset
12039
12040 Lemma
12041 \begin_inset Quotes erd
12042 \end_inset
12043
12044
12045 \begin_inset Quotes eld
12046 \end_inset
12047
12048 Proposition
12049 \begin_inset Quotes erd
12050 \end_inset
12051
12052
12053 \begin_inset Quotes eld
12054 \end_inset
12055
12056 Prop
12057 \begin_inset Quotes erd
12058 \end_inset
12059
12060
12061 \begin_inset Quotes eld
12062 \end_inset
12063
12064 Question
12065 \begin_inset Quotes erd
12066 \end_inset
12067
12068
12069 \begin_inset Quotes eld
12070 \end_inset
12071
12072 Claim
12073 \begin_inset Quotes erd
12074 \end_inset
12075
12076 , and 
12077 \begin_inset Quotes eld
12078 \end_inset
12079
12080 Conjecture
12081 \begin_inset Quotes erd
12082 \end_inset
12083
12084 .
12085  Their use is more or less obvious.
12086  LyX supports all these environments; it will use the proper label, text
12087  style, and numbering scheme for each of them.
12088 \end_layout
12089
12090 \begin_layout Enumerate
12091 Both packages use basic citations; the natbib package should not be used.
12092  In LyX, citation references are shown as usual; in the output, citations
12093  are shown as superscripts.
12094  If you want to use a citation as normal text, you should use the 
12095 \family typewriter
12096 refcite
12097 \family default
12098  command, e.
12099 \begin_inset space \thinspace{}
12100 \end_inset
12101
12102 g.
12103 \begin_inset space \space{}
12104 \end_inset
12105
12106
12107 \begin_inset Quotes eld
12108 \end_inset
12109
12110 See Ref.
12111 \begin_inset space \space{}
12112 \end_inset
12113
12114
12115 \family typewriter
12116
12117 \backslash
12118 refcite{key}
12119 \family default
12120
12121 \begin_inset Quotes erd
12122 \end_inset
12123
12124 .
12125 \end_layout
12126
12127 \begin_layout Enumerate
12128 There is no 
12129 \begin_inset Quotes eld
12130 \end_inset
12131
12132 Acknowledgments
12133 \begin_inset Quotes erd
12134 \end_inset
12135
12136  section in both packages.
12137  To put acknowledgments, just use the 
12138 \begin_inset Quotes eld
12139 \end_inset
12140
12141 Section*
12142 \begin_inset Quotes erd
12143 \end_inset
12144
12145  environment.
12146 \end_layout
12147
12148 \begin_layout Enumerate
12149 Appendices may be added to the paper, 
12150 \emph on
12151 after
12152 \emph default
12153  the Acknowledgments and 
12154 \shape italic
12155 before
12156 \shape default
12157  the References.
12158  LyX provides a special environment, called 
12159 \begin_inset Quotes eld
12160 \end_inset
12161
12162 Appendices Section
12163 \begin_inset Quotes erd
12164 \end_inset
12165
12166  which marks the beginning of the appendices.
12167  This environment should be left blank; it just sends a LaTeX command, but
12168  nothing is really printed.
12169  In LyX, the word 
12170 \begin_inset Quotes eld
12171 \end_inset
12172
12173 Appendix
12174 \begin_inset Quotes erd
12175 \end_inset
12176
12177  is printed with blue letters, as a signal that all sections after that
12178  point are appendices.
12179  To write an appendix, use the 
12180 \begin_inset Quotes eld
12181 \end_inset
12182
12183 Appendix
12184 \begin_inset Quotes erd
12185 \end_inset
12186
12187  environment.
12188  LyX will number each appendix with capital letters, as required by both
12189  journals.
12190  Note that 
12191 \begin_inset Quotes eld
12192 \end_inset
12193
12194 Appendices Section
12195 \begin_inset Quotes erd
12196 \end_inset
12197
12198  
12199 \emph on
12200 must
12201 \emph default
12202  be present before the first appendix; if not, all appendices will be numbered
12203  as normal sections in the output.
12204 \end_layout
12205
12206 \begin_layout Enumerate
12207 The ijmpc and the ijmpd packages use the 
12208 \family typewriter
12209 tbl
12210 \family default
12211  command to implement table captions.
12212  As a result, a table created by LyX is printed correctly, but its caption
12213  is ignored.
12214  However, you can use some TeX code to overcome this problem, so that captions
12215  are printed as expected.
12216  To do so, create a float table as usual, remove the caption, and replace
12217  it with the TeX code 
12218 \family typewriter
12219
12220 \backslash
12221 tbl{
12222 \emph on
12223 your table caption
12224 \emph default
12225 }{
12226 \family default
12227  (sic); you must also the TeX code 
12228 \family typewriter
12229 }
12230 \family default
12231  immediately after the tabular material.
12232  Study the example table included in the template files to see how this
12233  trick is implemented.
12234  Alternatively, If you need table captions, you should implement the whole
12235  table float in a 
12236 \family typewriter
12237 .tex
12238 \family default
12239  file, then include this file to the LyX document (
12240 \family sans
12241 Insert\SpecialChar \menuseparator
12242 File\SpecialChar \menuseparator
12243 Child
12244 \begin_inset space ~
12245 \end_inset
12246
12247 Document
12248 \family default
12249 ).
12250  Details on how to create a table float can be found in the files 
12251 \family typewriter
12252 ws-ijmpc.tex
12253 \family default
12254  and 
12255 \family typewriter
12256 ws-ijmpd.tex
12257 \family default
12258 , included in the corresponding packages.
12259 \end_layout
12260
12261 \begin_layout Subsection
12262 Preparing a paper for submission
12263 \end_layout
12264
12265 \begin_layout Standard
12266 Before you submit your paper you must export the LyX document as a LaTeX
12267  file (
12268 \family sans
12269 File\SpecialChar \menuseparator
12270 Export\SpecialChar \menuseparator
12271 LaTeX
12272 \family default
12273 )
12274 \begin_inset Foot
12275 status open
12276
12277 \begin_layout Plain Layout
12278 Actually you have the choice between LaTeX (plain) and pdflatex.
12279  If you intend to use pdflatex to prepare the paper, you should use the
12280  pdflatex option so that included graphics are converted to PDF format,
12281  ready for use by pdflatex.
12282 \end_layout
12283
12284 \end_inset
12285
12286 , then make the following changes to the resulting 
12287 \family typewriter
12288 .tex
12289 \family default
12290  file.
12291 \end_layout
12292
12293 \begin_layout Enumerate
12294 Remove the comment lines before the 
12295 \family typewriter
12296
12297 \backslash
12298 documentclass
12299 \family default
12300  command.
12301 \end_layout
12302
12303 \begin_layout Enumerate
12304 Remove everything between (and including) the 
12305 \family typewriter
12306
12307 \backslash
12308 makeatletter
12309 \family default
12310  and 
12311 \family typewriter
12312
12313 \backslash
12314 makeatother
12315 \family default
12316  commands, except for any commands you specifically put into the LaTeX preamble.
12317 \end_layout
12318
12319 \begin_layout Standard
12320 The modified 
12321 \family typewriter
12322 .tex
12323 \family default
12324  file should be saved and processed through LaTeX as many times as necessary.
12325  You may also want to check the resulting 
12326 \family typewriter
12327 .dvi
12328 \family default
12329  document.
12330 \end_layout
12331
12332 \begin_layout Subsection
12333 Use of TeX code
12334 \end_layout
12335
12336 \begin_layout Standard
12337 The use of TeX code is reduced to two commands, which must be placed at
12338  the top of the document.
12339  If you started writing your paper by using the 
12340 \family typewriter
12341 ijmpc.lyx
12342 \family default
12343  or the 
12344 \family typewriter
12345 ijmpd.lyx
12346 \family default
12347  template, the TeX code needed is already in its place; you usually don't
12348  need to delete it.
12349  You may only modify the first TeX code to specify the information printed
12350  to the top of odd and even pages (authors' names and short paper's title,
12351  respectively).
12352  This TeX code must have the form 
12353 \family typewriter
12354
12355 \backslash
12356 markboth{Authors' Names}{Short Paper's Title}
12357 \family default
12358 .
12359 \end_layout
12360
12361 \begin_layout Section
12362 iopart
12363 \end_layout
12364
12365 \begin_layout Standard
12366 by 
12367 \noun on
12368 Uwe Stöhr
12369 \end_layout
12370
12371 \begin_layout Subsection
12372 Overview
12373 \end_layout
12374
12375 \begin_layout Standard
12376 The iopart package provides a document class to create electronic manuscript
12377  submission to the journals published by the Institute of Physics.
12378  Instructions for the authors how to create a paper using the iopart class
12379  can be downloaded together with the iopart package from the site 
12380 \begin_inset Flex URL
12381 status collapsed
12382
12383 \begin_layout Plain Layout
12384
12385 ftp://ftp.iop.org/pub/journals/latex2e
12386 \end_layout
12387
12388 \end_inset
12389
12390 .
12391 \end_layout
12392
12393 \begin_layout Subsection
12394 Writing a paper
12395 \end_layout
12396
12397 \begin_layout Standard
12398 The easiest way to write a paper is to start with the file 
12399 \emph on
12400 IOP-article.lyx
12401 \emph default
12402  that is available in LyX's examples files folder.
12403  Open this file, save it under a new name, and start writing.
12404  The example file explains how to use the special text environments.
12405  Here are the most important advices:
12406 \end_layout
12407
12408 \begin_layout Itemize
12409 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12410  two options 
12411 \family sans
12412 Use AMS math package
12413 \family default
12414  in the document settings under 
12415 \family sans
12416 Math Options
12417 \family default
12418  are not used!
12419 \end_layout
12420
12421 \begin_layout Itemize
12422
12423 \size normal
12424 The title environment defines the kind of your paper.
12425  So use one of the following environments for the title:
12426 \end_layout
12427
12428 \begin_deeper
12429 \begin_layout Itemize
12430
12431 \family sans
12432 \size normal
12433 Title
12434 \family default
12435  for a Paper
12436 \end_layout
12437
12438 \begin_layout Itemize
12439
12440 \family sans
12441 \size normal
12442 Review
12443 \family default
12444  for a Review
12445 \end_layout
12446
12447 \begin_layout Itemize
12448
12449 \family sans
12450 \size normal
12451 Topical
12452 \family default
12453  for a Topical review
12454 \end_layout
12455
12456 \begin_layout Itemize
12457
12458 \family sans
12459 \size normal
12460 Comment
12461 \family default
12462  for a Comment
12463 \end_layout
12464
12465 \begin_layout Itemize
12466
12467 \family sans
12468 \size normal
12469 Note
12470 \family default
12471  for a Note
12472 \end_layout
12473
12474 \begin_layout Itemize
12475
12476 \family sans
12477 \size normal
12478 Paper
12479 \family default
12480  for a Paper (same as Title)
12481 \end_layout
12482
12483 \begin_layout Itemize
12484
12485 \family sans
12486 \size normal
12487 Prelim
12488 \family default
12489  for a Preliminary communication
12490 \end_layout
12491
12492 \begin_layout Itemize
12493
12494 \family sans
12495 \size normal
12496 Rapid
12497 \family default
12498  for a Rapid communication
12499 \end_layout
12500
12501 \begin_layout Itemize
12502
12503 \family sans
12504 \size normal
12505 Letter
12506 \family default
12507  for a Letter to the editor
12508 \end_layout
12509
12510 \end_deeper
12511 \begin_layout Itemize
12512
12513 \size normal
12514 All title environments except of 
12515 \family sans
12516 Letter
12517 \family default
12518  can have an optional short title.
12519 \end_layout
12520
12521 \begin_layout Itemize
12522 There is a general title environment 
12523 \family sans
12524 Article
12525 \family default
12526  which is not directly supported by the LyX.
12527  This can be used as TeX code when your document doesn't fit into one of
12528  the other title types.
12529 \end_layout
12530
12531 \begin_layout Standard
12532 For more informations like hints for special table and formula formatting,
12533  look at the IOP author guidelines.
12534 \end_layout
12535
12536 \begin_layout Section
12537 Kluwer
12538 \end_layout
12539
12540 \begin_layout Standard
12541 by 
12542 \noun on
12543 Panayotis Papasotiriou
12544 \end_layout
12545
12546 \begin_layout Subsection
12547 Overview
12548 \end_layout
12549
12550 \begin_layout Standard
12551 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12552  that facilitates electronic manuscript submission to the journals they
12553  publish.
12554  Most known of them (at least in my domain of interest) are 
12555 \emph on
12556 Astrophysics and Space Science
12557 \emph default
12558  and 
12559 \emph on
12560 Solar Physics
12561 \emph default
12562 , but there are many others (see a complete list at 
12563 \begin_inset Flex URL
12564 status open
12565
12566 \begin_layout Plain Layout
12567
12568 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12569 \end_layout
12570
12571 \end_inset
12572
12573 ).
12574  The Kluwer package may be downloaded from the site 
12575 \begin_inset Flex URL
12576 status collapsed
12577
12578 \begin_layout Plain Layout
12579
12580 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12581 \end_layout
12582
12583 \end_inset
12584
12585 .
12586  A complete user guide is contained in that package (but it can also be
12587  downloaded separately).
12588 \end_layout
12589
12590 \begin_layout Standard
12591 LyX supports many features of the package but not everything.
12592  However, the TeX code needed is reduced to some 
12593 \begin_inset Quotes eld
12594 \end_inset
12595
12596 peculiar
12597 \begin_inset Quotes erd
12598 \end_inset
12599
12600  commands of the package (see
12601 \begin_inset space ~
12602 \end_inset
12603
12604
12605 \begin_inset CommandInset ref
12606 LatexCommand ref
12607 reference "subsec:kluwer_peculiarities"
12608
12609 \end_inset
12610
12611 ).
12612  I have recently used LyX to write an article submitted to the 
12613 \emph on
12614 Astrophysics and Space Science
12615 \emph default
12616  without any problem.
12617 \end_layout
12618
12619 \begin_layout Subsection
12620 Writing a paper
12621 \end_layout
12622
12623 \begin_layout Standard
12624 The easiest way to write a paper is to start with the Kluwer template file.
12625  Click on 
12626 \family sans
12627 File\SpecialChar \menuseparator
12628 New from
12629 \family default
12630  
12631 \family sans
12632 Template
12633 \family default
12634 , then choose the 
12635 \family typewriter
12636 kluwer.lyx
12637 \family default
12638  template.
12639  This will give an (almost) empty document that includes the most common
12640  fields found in a manuscript and a short description of their use.
12641  As in most templates, simply overwrite the existing text (including the
12642  brackets, 
12643 \family typewriter
12644 <>
12645 \family default
12646 ) with the correct information.
12647 \end_layout
12648
12649 \begin_layout Subsection
12650 Preparing a paper for submission
12651 \end_layout
12652
12653 \begin_layout Standard
12654 As in the AASTeX package, before you submit your paper to a journal you
12655  must 
12656 \begin_inset Quotes eld
12657 \end_inset
12658
12659 postprocess
12660 \begin_inset Quotes erd
12661 \end_inset
12662
12663  it as follows.
12664 \end_layout
12665
12666 \begin_layout Enumerate
12667 Export your paper as a LaTeX file.
12668  To do this, click on 
12669 \family sans
12670 File\SpecialChar \menuseparator
12671 Export\SpecialChar \menuseparator
12672 LaTeX
12673 \family default
12674 .
12675  
12676 \end_layout
12677
12678 \begin_layout Enumerate
12679 Edit the resulting 
12680 \family typewriter
12681 .tex
12682 \family default
12683  file with a text editor and make the following changes
12684 \end_layout
12685
12686 \begin_deeper
12687 \begin_layout Enumerate
12688 remove the comment lines before the 
12689 \family typewriter
12690
12691 \backslash
12692 documentclass
12693 \family default
12694  command,
12695 \end_layout
12696
12697 \begin_layout Enumerate
12698 remove everything between (and including) the 
12699 \family typewriter
12700
12701 \backslash
12702 makeatletter
12703 \family default
12704  and 
12705 \family typewriter
12706
12707 \backslash
12708 makeatother
12709 \family default
12710  commands, except for any commands you specifically put into the LaTeX preamble.
12711 \end_layout
12712
12713 \begin_layout Standard
12714 Save the resulting 
12715 \family typewriter
12716 .tex
12717 \family default
12718  file.
12719 \end_layout
12720
12721 \end_deeper
12722 \begin_layout Enumerate
12723 Run the 
12724 \family typewriter
12725 .tex
12726 \family default
12727  file through LaTeX as many times as necessary (usually up to three).
12728 \end_layout
12729
12730 \begin_layout Enumerate
12731 View the resulting 
12732 \family typewriter
12733 .dvi
12734 \family default
12735  document using, e.
12736 \begin_inset space \thinspace{}
12737 \end_inset
12738
12739 g.
12740 \begin_inset space \space{}
12741 \end_inset
12742
12743
12744 \family sans
12745 xdvi
12746 \family default
12747 , and check if everything is OK (it should, if you didn't make any mistake).
12748 \end_layout
12749
12750 \begin_layout Subsection
12751 \begin_inset Quotes eld
12752 \end_inset
12753
12754 Peculiarities
12755 \begin_inset Quotes erd
12756 \end_inset
12757
12758  of the Kluwer package
12759 \begin_inset CommandInset label
12760 LatexCommand label
12761 name "subsec:kluwer_peculiarities"
12762
12763 \end_inset
12764
12765
12766 \end_layout
12767
12768 \begin_layout Standard
12769 The Kluwer package has the following 
12770 \begin_inset Quotes eld
12771 \end_inset
12772
12773 peculiarities
12774 \begin_inset Quotes erd
12775 \end_inset
12776
12777 .
12778 \end_layout
12779
12780 \begin_layout Enumerate
12781 It is possible to write multiple articles in the same LaTeX file
12782 \begin_inset Foot
12783 status collapsed
12784
12785 \begin_layout Plain Layout
12786 I can't imagine any good reason to do this.
12787 \end_layout
12788
12789 \end_inset
12790
12791 .
12792  Each article must be included in the environment 
12793 \begin_inset Quotes eld
12794 \end_inset
12795
12796 article
12797 \begin_inset Quotes erd
12798 \end_inset
12799
12800 .
12801  Unfortunately, this environment cannot be omitted, even if you write just
12802  one article.
12803  Therefore, each article starts with the command 
12804 \family typewriter
12805
12806 \backslash
12807 begin{article}
12808 \family default
12809  and, obviously, ends with the command 
12810 \family typewriter
12811
12812 \backslash
12813 end{article}
12814 \family default
12815 .
12816  Although this can be implemented in LyX, I didn't included it, since it
12817  looks ugly and can confuse the novice user.
12818  Therefore, you need to enter them directly and mark them as LaTeX code
12819  (the well-known 
12820 \begin_inset Quotes eld
12821 \end_inset
12822
12823 TeX code
12824 \begin_inset Quotes erd
12825 \end_inset
12826
12827 ).
12828 \end_layout
12829
12830 \begin_layout Enumerate
12831 Information given at the beginning of the article (i.
12832 \begin_inset space \thinspace{}
12833 \end_inset
12834
12835 g.
12836 \begin_inset space \space{}
12837 \end_inset
12838
12839 title, subtitle, author, institution, running title, running author, abstract
12840  and keywords) must be included in an environment called 
12841 \begin_inset Quotes eld
12842 \end_inset
12843
12844 opening
12845 \begin_inset Quotes erd
12846 \end_inset
12847
12848 .
12849  This is not implemented in LyX, so you must enter title, subtitle etc.
12850 \begin_inset space ~
12851 \end_inset
12852
12853 between two TeX code lines (
12854 \family typewriter
12855
12856 \backslash
12857 begin{opening}
12858 \family default
12859  and 
12860 \family typewriter
12861
12862 \backslash
12863 end{opening}
12864 \family default
12865 ).
12866 \end_layout
12867
12868 \begin_layout Enumerate
12869 According to the user manual, the label of each bibliography item must be
12870  written as 
12871 \family typewriter
12872
12873 \backslash
12874 protect
12875 \backslash
12876 citeauthoryear{
12877 \family default
12878 \emph on
12879 author(s)
12880 \family typewriter
12881 \emph default
12882 }{
12883 \family default
12884 \emph on
12885 year
12886 \family typewriter
12887 \emph default
12888 }
12889 \family default
12890 .
12891 \end_layout
12892
12893 \begin_layout Standard
12894 The 
12895 \family typewriter
12896 kluwer.lyx
12897 \family default
12898  template takes care of all these 
12899 \begin_inset Quotes eld
12900 \end_inset
12901
12902 peculiarities
12903 \begin_inset Quotes erd
12904 \end_inset
12905
12906 .
12907  If you start a new paper using this template you don't need to do anything
12908  special.
12909  Just 
12910 \end_layout
12911
12912 \begin_layout Enumerate
12913 don't delete the TeX code included in the template, and
12914 \end_layout
12915
12916 \begin_layout Enumerate
12917 copy the example bibliography item included in the template and modify it
12918  as necessary to enter new bibliography items.
12919 \end_layout
12920
12921 \begin_layout Section
12922 Koma-Script
12923 \end_layout
12924
12925 \begin_layout Standard
12926 by 
12927 \noun on
12928 Bernd Rellermeyer
12929 \end_layout
12930
12931 \begin_layout Subsection
12932 Overview
12933 \end_layout
12934
12935 \begin_layout Standard
12936 The LyX document classes 
12937 \emph on
12938 article (koma-script)
12939 \emph default
12940
12941 \emph on
12942 report (koma-script)
12943 \emph default
12944
12945 \emph on
12946 book
12947 \emph default
12948  
12949 \emph on
12950 (koma-script)
12951 \emph default
12952 , and 
12953 \emph on
12954 letter
12955 \emph default
12956  
12957 \emph on
12958 (koma-script)
12959 \emph default
12960  correspond to the LaTeX document classes 
12961 \family typewriter
12962 scrartcl.cls
12963 \family default
12964
12965 \family typewriter
12966 scrreprt.cls
12967 \family default
12968
12969 \family typewriter
12970 scrbook.cls
12971 \family default
12972 , and 
12973 \family typewriter
12974 scrlettr.cls
12975 \family default
12976 , resp.
12977 \begin_inset space ~
12978 \end_inset
12979
12980 of the Koma-Script family.
12981  They are replacements for the standard document classes 
12982 \family typewriter
12983 article.cls
12984 \family default
12985
12986 \family typewriter
12987 report.cls
12988 \family default
12989
12990 \family typewriter
12991 book.cls
12992 \family default
12993  and 
12994 \family typewriter
12995 letter.cls
12996 \family default
12997 , resp., and fit better to European typography conventions in a number of
12998  points.
12999 \end_layout
13000
13001 \begin_layout Itemize
13002 Standard character size is 11pt in 
13003 \emph on
13004 article (koma-script)
13005 \emph default
13006
13007 \emph on
13008 report (koma-script)
13009 \emph default
13010 , and 
13011 \emph on
13012 book (koma-script)
13013 \emph default
13014 , and 12pt in 
13015 \emph on
13016 letter (koma-script)
13017 \emph default
13018 .
13019 \end_layout
13020
13021 \begin_layout Itemize
13022 Headings, labels of the description environment, and a number of elements
13023  of the 
13024 \emph on
13025 letter (koma-script)
13026 \emph default
13027  document class are set in a bold sans serif font.
13028 \begin_inset Foot
13029 status collapsed
13030
13031 \begin_layout Plain Layout
13032 There is a big difference between the bold sans serif old cm fonts and new
13033  ec fonts, especially in the appearance of headings.
13034  In comparison, the ec bold sans serif fonts look a bit thin.
13035  Here the LaTeX package 
13036 \family typewriter
13037 cmsd.sty by
13038 \family default
13039  
13040 \shape smallcaps
13041 Walter Schmidt
13042 \shape default
13043  helps to produce the 
13044 \begin_inset Quotes eld
13045 \end_inset
13046
13047 usual
13048 \begin_inset Quotes erd
13049 \end_inset
13050
13051  appearance when using the ec fonts.
13052 \end_layout
13053
13054 \end_inset
13055
13056  The numbering of chapter headings is made in the same way as the numbering
13057  of section headings, that is without the extra line 
13058 \begin_inset Quotes eld
13059 \end_inset
13060
13061 Chapter\SpecialChar \ldots{}
13062
13063 \begin_inset Quotes erd
13064 \end_inset
13065
13066 .
13067  In addition, the appearance of the headings can be modified by using a
13068  number of options (in LyX to be entered in the field 
13069 \family sans
13070 Extra
13071 \begin_inset space ~
13072 \end_inset
13073
13074 Options
13075 \family default
13076  of the dialog 
13077 \family sans
13078 Layout\SpecialChar \menuseparator
13079 Document
13080 \family default
13081 ).
13082  
13083 \end_layout
13084
13085 \begin_layout Itemize
13086 The main means in the Koma-Script document classes to design the type area
13087  are the options 
13088 \family sans
13089 BCOR
13090 \family default
13091  and 
13092 \family sans
13093 DIV
13094 \family default
13095  (in LyX to be entered in the extra class options field in the dialog 
13096 \family sans
13097 Document\SpecialChar \menuseparator
13098 Settings
13099 \family default
13100 ).
13101  They make a clearer modification of page margins possible as do the options
13102  of the dialog 
13103 \family sans
13104 Document\SpecialChar \menuseparator
13105 Settings
13106 \family default
13107 .
13108  
13109 \end_layout
13110
13111 \begin_layout Itemize
13112 The LaTeX document classes of the Koma-Script family define a number of
13113  additional commands.
13114  Those part of it which makes sense in LyX is implemented in corresponding
13115  paragraph types.
13116 \end_layout
13117
13118 \begin_layout Standard
13119 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13120  can be found in the Koma-Script documentation 
13121 \emph on
13122 scrguide
13123 \emph default
13124  (German) and 
13125 \emph on
13126 scrguien
13127 \emph default
13128  (English).
13129 \end_layout
13130
13131 \begin_layout Subsection
13132 article (koma-script), report (koma-script), and book (koma-script)
13133 \end_layout
13134
13135 \begin_layout Standard
13136 The document classes 
13137 \emph on
13138 article (koma-script)
13139 \emph default
13140
13141 \emph on
13142 report (koma-script)
13143 \emph default
13144 , and 
13145 \emph on
13146 book
13147 \emph default
13148  
13149 \emph on
13150 (koma-script)
13151 \emph default
13152  are implemented in the layout files 
13153 \family typewriter
13154 scrartcl.layout
13155 \family default
13156
13157 \family typewriter
13158 scrreprt.layout
13159 \family default
13160 , and 
13161 \family typewriter
13162 scrbook.layout
13163 \family default
13164 , resp.
13165  They contain all the paragraph types of the corresponding standard document
13166  classes 
13167 \emph on
13168 article
13169 \emph default
13170
13171 \emph on
13172 report
13173 \emph default
13174 , and 
13175 \emph on
13176 book
13177 \emph default
13178 , resp., partly modified, with the exception of the LyX specific 
13179 \family sans
13180 List
13181 \family default
13182 -type, which is replaced by the new 
13183 \family sans
13184 Labeling
13185 \family default
13186 -type having the same functionality.
13187  Beside the 
13188 \family sans
13189 Labeling
13190 \family default
13191 -Type there is a number of new paragraph types added.
13192  They are 
13193 \emph on
13194 not
13195 \emph default
13196  part of 
13197 \emph on
13198 letter (koma-script)
13199 \emph default
13200 .
13201 \end_layout
13202
13203 \begin_layout Itemize
13204
13205 \family sans
13206 Addpart, Addchap
13207 \family default
13208
13209 \family sans
13210 Addsec
13211 \family default
13212 : are equivalents to 
13213 \family sans
13214 Part*, Chapter*
13215 \family default
13216  and 
13217 \family sans
13218 Section*
13219 \family default
13220 , resp., additionally inserting an entry in the table of contents.
13221  
13222 \family sans
13223 Addpart
13224 \family default
13225  and 
13226 \family sans
13227 Addchap
13228 \family default
13229  are not contained in 
13230 \emph on
13231 article (koma-script)
13232 \emph default
13233 .
13234 \end_layout
13235
13236 \begin_layout Itemize
13237
13238 \family sans
13239 Addchap*
13240 \family default
13241
13242 \family sans
13243 Addsec*
13244 \family default
13245 : behave exactly as 
13246 \family sans
13247 Addchap
13248 \family default
13249  and 
13250 \family sans
13251 Addsec
13252 \family default
13253 , resp., additionally clearing running heads.
13254  
13255 \family sans
13256 Addchap*
13257 \family default
13258  is not contained in 
13259 \emph on
13260 article (koma-script)
13261 \emph default
13262 .
13263 \begin_inset Foot
13264 status collapsed
13265
13266 \begin_layout Plain Layout
13267 There is also an 
13268 \family typewriter
13269
13270 \backslash
13271 addpart*
13272 \family default
13273  command in 
13274 \emph on
13275 book (koma-script)
13276 \emph default
13277  and in 
13278 \emph on
13279 report (koma-script)
13280 \emph default
13281 , but since this is identical to 
13282 \family sans
13283 Part*
13284 \family default
13285 , is has not been implemented in LyX.
13286 \end_layout
13287
13288 \end_inset
13289
13290
13291 \end_layout
13292
13293 \begin_layout Itemize
13294
13295 \family sans
13296 Minisec
13297 \family default
13298 : generates a heading directly above the following paragraph in the standard
13299  character size without affecting the structure of the document.
13300 \end_layout
13301
13302 \begin_layout Itemize
13303
13304 \family sans
13305 Captionabove
13306 \family default
13307  and 
13308 \family sans
13309 Captionbelow
13310 \family default
13311  are special captions which respect the different space settings needed
13312  for captions placed above or below an element (if you follow strict typographic
13313  rules, you might want to place table captions always above the table).
13314  You can also use the class option 
13315 \family typewriter
13316 tablecaptionsabove
13317 \family default
13318 , which will switch 
13319 \family sans
13320 caption
13321 \family default
13322  to 
13323 \family sans
13324 captionabove
13325 \family default
13326  for tables and 
13327 \family sans
13328 captionbelow
13329 \family default
13330  for figures.
13331  You need at least Koma-Script version 2.8q to use this.
13332 \end_layout
13333
13334 \begin_layout Itemize
13335
13336 \family sans
13337 Dictum
13338 \family default
13339 : can be used to set a bonmot, e.
13340 \begin_inset space \thinspace{}
13341 \end_inset
13342
13343 g.
13344 \begin_inset space \space{}
13345 \end_inset
13346
13347 at the beginning of a chapter.
13348  If you use the optional argument (
13349 \family sans
13350 Insert\SpecialChar \menuseparator
13351 Short
13352 \begin_inset space ~
13353 \end_inset
13354
13355 Title
13356 \family default
13357 ), you can insert the dictum's author there.
13358  Dictum and author are separated by a line.
13359  You need at least Koma-Script version 2.8q to use this.
13360  
13361 \family sans
13362 Dictum
13363 \family default
13364  is not contained in 
13365 \emph on
13366 article (koma-script)
13367 \emph default
13368 .
13369 \end_layout
13370
13371 \begin_layout Standard
13372 The following types, together with the standard types 
13373 \family sans
13374 Title
13375 \family default
13376
13377 \family sans
13378 Author
13379 \family default
13380 , and 
13381 \family sans
13382 Date
13383 \family default
13384 , form the title area of the document.
13385  They must be entered ahead of the first 
13386 \begin_inset Quotes eld
13387 \end_inset
13388
13389 ordinary
13390 \begin_inset Quotes erd
13391 \end_inset
13392
13393  paragraph.
13394 \begin_inset Foot
13395 status collapsed
13396
13397 \begin_layout Plain Layout
13398 The corresponding LaTeX commands must appear before the 
13399 \family typewriter
13400
13401 \backslash
13402 maketitle
13403 \family default
13404  command.
13405 \end_layout
13406
13407 \end_inset
13408
13409  When such a type is used more than once, the latter usage overwrites the
13410  former one, that means, for every type only the latest usage is valid.
13411  The order of the different types however has, like 
13412 \family sans
13413 Title
13414 \family default
13415
13416 \family sans
13417 Author
13418 \family default
13419 , and 
13420 \family sans
13421 Date
13422 \family default
13423 , no effect on the appearance of the produced document.
13424 \end_layout
13425
13426 \begin_layout Itemize
13427
13428 \family sans
13429 Subject
13430 \family default
13431 : produces a centered paragraph above the ordinary title (
13432 \family sans
13433 Title
13434 \family default
13435
13436 \family sans
13437 Author
13438 \family default
13439
13440 \family sans
13441 Date
13442 \family default
13443 ) for the subject of the document.
13444 \end_layout
13445
13446 \begin_layout Itemize
13447
13448 \family sans
13449 Publishers
13450 \family default
13451 : produces a centered paragraph below the ordinary title (
13452 \family sans
13453 Title
13454 \family default
13455
13456 \family sans
13457 Author
13458 \family default
13459
13460 \family sans
13461 Date
13462 \family default
13463 ) for the publishers' name.
13464 \end_layout
13465
13466 \begin_layout Itemize
13467
13468 \family sans
13469 Dedication
13470 \family default
13471 : in 
13472 \emph on
13473 report (koma-script)
13474 \emph default
13475  and 
13476 \emph on
13477 book (koma-script)
13478 \emph default
13479  produces a centered paragraph on its own page behind the title page, or
13480  in 
13481 \emph on
13482 article (koma-script)
13483 \emph default
13484  produces a centered paragraph below the ordinary title (
13485 \family sans
13486 Title
13487 \family default
13488
13489 \family sans
13490 Author
13491 \family default
13492
13493 \family sans
13494 Date
13495 \family default
13496
13497 \family sans
13498 Publishers
13499 \family default
13500 ) for a dedication.
13501 \end_layout
13502
13503 \begin_layout Itemize
13504
13505 \family sans
13506 Titlehead
13507 \family default
13508 : produces a left aligned paragraph above the ordinary title (
13509 \family sans
13510 Title
13511 \family default
13512
13513 \family sans
13514 Author
13515 \family default
13516
13517 \family sans
13518 Date
13519 \family default
13520
13521 \family sans
13522 Subject
13523 \family default
13524 ) for a document`s head.
13525 \end_layout
13526
13527 \begin_layout Itemize
13528
13529 \family sans
13530 Uppertitleback
13531 \family default
13532 : produces in a double-sided print in 
13533 \emph on
13534 report (koma-script)
13535 \emph default
13536  and 
13537 \emph on
13538 book (koma-script)
13539 \emph default
13540  a left-aligned paragraph at the top of the title page`s back or has no
13541  effect in a single-sided print or in 
13542 \emph on
13543 article (koma-script)
13544 \emph default
13545 .
13546 \end_layout
13547
13548 \begin_layout Itemize
13549
13550 \family sans
13551 Lowertitleback
13552 \family default
13553 : produces in a double-sided print in 
13554 \emph on
13555 report (koma-script)
13556 \emph default
13557  and 
13558 \emph on
13559 book (koma-script)
13560 \emph default
13561  a left-aligned paragraph at the bottom of the title page`s back or has
13562  no effect in a single-sided print or in 
13563 \emph on
13564 article (koma-script)
13565 \emph default
13566 .
13567 \end_layout
13568
13569 \begin_layout Itemize
13570
13571 \family sans
13572 Extratitle
13573 \family default
13574 : produces a special 
13575 \begin_inset Quotes eld
13576 \end_inset
13577
13578 dirty
13579 \begin_inset Quotes erd
13580 \end_inset
13581
13582  page ahead of the actual document containing a paragraph without special
13583  formatting.
13584 \end_layout
13585
13586 \begin_layout Standard
13587 The layout files for the document classes 
13588 \emph on
13589 article (koma-script)
13590 \emph default
13591
13592 \emph on
13593 report (koma-script)
13594 \emph default
13595 , and 
13596 \emph on
13597 book (koma-script)
13598 \emph default
13599  do include the file 
13600 \family typewriter
13601 scrmacros.inc
13602 \family default
13603 .
13604  This is thought of as a place to define your own types.
13605  Copy scrmacros
13606 \family typewriter
13607 .inc
13608 \family default
13609  in your personal layout directory and edit the file!
13610 \end_layout
13611
13612 \begin_layout Subsection
13613 letter (koma-script)
13614 \end_layout
13615
13616 \begin_layout Standard
13617 \noindent
13618 The document class 
13619 \emph on
13620 letter (koma-script)
13621 \emph default
13622  is implemented in the layout file 
13623 \family typewriter
13624 scrlettr.layout
13625 \family default
13626 .
13627  It contains all the paragraph types of the corresponding standard document
13628  class 
13629 \emph on
13630 letter
13631 \emph default
13632 , partly modified, with the exception of the LyX specific types 
13633 \family sans
13634 LyX-Code
13635 \family default
13636  and 
13637 \family sans
13638 Comment
13639 \family default
13640  and the 
13641 \family sans
13642 List
13643 \family default
13644  type, which is replaced by the new 
13645 \family sans
13646 Labeling
13647 \family default
13648  type.
13649  In addition, it contains, in contrast to the standard document class, the
13650  standard types 
13651 \family sans
13652 LaTeX
13653 \family default
13654
13655 \family sans
13656 Quotation
13657 \family default
13658
13659 \family sans
13660 Quote
13661 \family default
13662 , and 
13663 \family sans
13664 Verse
13665 \family default
13666 .
13667  Furthermore, there are a number of new letter specific types.
13668 \end_layout
13669
13670 \begin_layout Standard
13671 The appearance of the letter produced by this document class can be controlled
13672  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13673 \begin_inset Foot
13674 status collapsed
13675
13676 \begin_layout Plain Layout
13677 For example, the standard appearance of the letter`s heading, consisting
13678  of name and address, is quite self-willed.
13679  An 
13680 \begin_inset Quotes eld
13681 \end_inset
13682
13683 ordinary
13684 \begin_inset Quotes erd
13685 \end_inset
13686
13687  heading is produced by the following LaTeX commands in the preamble:
13688 \end_layout
13689
13690 \begin_layout LyX-Code
13691
13692 \backslash
13693 firsthead{
13694 \backslash
13695 parbox[b]{
13696 \backslash
13697 textwidth}
13698 \end_layout
13699
13700 \begin_layout LyX-Code
13701   {
13702 \backslash
13703 ignorespaces 
13704 \backslash
13705 fromname
13706 \backslash
13707
13708 \backslash
13709  
13710 \backslash
13711 ignorespaces 
13712 \backslash
13713 fromaddress}} 
13714 \end_layout
13715
13716 \begin_layout LyX-Code
13717
13718 \backslash
13719 nexthead{
13720 \backslash
13721 parbox[b]{
13722 \backslash
13723 textwidth}
13724 \end_layout
13725
13726 \begin_layout LyX-Code
13727   {
13728 \backslash
13729 ignorespaces 
13730 \backslash
13731 fromname 
13732 \backslash
13733 hfill 
13734 \backslash
13735 ignorespaces 
13736 \backslash
13737 pagename
13738 \backslash
13739  
13740 \backslash
13741 thepage}}
13742 \end_layout
13743
13744 \end_inset
13745
13746  A detailed German description of such LaTeX commands can be found in the
13747  Koma-Script documentation 
13748 \emph on
13749 scrguide
13750 \emph default
13751 .
13752  With it, the letter's author can produce his personal letter layout.
13753 \end_layout
13754
13755 \begin_layout Standard
13756 The types 
13757 \family sans
13758 Letter
13759 \family default
13760  and 
13761 \family sans
13762 Opening
13763 \family default
13764  define the beginning of the letter and must be used in every letter.
13765  To emphasize them in the LyX document class, they are marked with the letter
13766  
13767 \shape italic
13768 L
13769 \shape default
13770  or 
13771 \shape italic
13772 O
13773 \shape default
13774 , resp.
13775 \begin_inset space ~
13776 \end_inset
13777
13778 in the left margin.
13779  It is possible to write any number of letters in one file.
13780  An 
13781 \family sans
13782 Opening
13783 \family default
13784  type produces a new letter using the same addressee and a 
13785 \family sans
13786 Letter
13787 \family default
13788  type produces a new addressee.
13789  The types 
13790 \family sans
13791 Closing
13792 \family default
13793
13794 \family sans
13795 PS
13796 \family default
13797
13798 \family sans
13799 CC
13800 \family default
13801 , and 
13802 \family sans
13803 Encl
13804 \family default
13805  are ordinary paragraph types and can also be used several times in one
13806  and the same letter.
13807 \end_layout
13808
13809 \begin_layout Itemize
13810
13811 \family sans
13812 Letter
13813 \family default
13814 : produces a paragraph for the addressee and implicitly defines the beginning
13815  of the letter.
13816 \end_layout
13817
13818 \begin_layout Itemize
13819
13820 \family sans
13821 Opening
13822 \family default
13823 : produces a paragraph for the form of address and implicitly produces a
13824  new letter.
13825 \end_layout
13826
13827 \begin_layout Itemize
13828
13829 \family sans
13830 Closing
13831 \family default
13832 : produces a paragraph for a close.
13833 \end_layout
13834
13835 \begin_layout Itemize
13836
13837 \family sans
13838 PS
13839 \family default
13840 : produces a paragraph for a postscript.
13841 \end_layout
13842
13843 \begin_layout Itemize
13844
13845 \family sans
13846 CC
13847 \family default
13848 : produces a paragraph for a distribution list.
13849 \end_layout
13850
13851 \begin_layout Itemize
13852
13853 \family sans
13854 Encl
13855 \family default
13856 : produces a paragraph for enclosures.
13857 \end_layout
13858
13859 \begin_layout Standard
13860 The types 
13861 \family sans
13862 Name
13863 \family default
13864
13865 \family sans
13866 Signature
13867 \family default
13868
13869 \family sans
13870 Address
13871 \family default
13872
13873 \family sans
13874 Telephone
13875 \family default
13876
13877 \family sans
13878 Place
13879 \family default
13880
13881 \family sans
13882 Backaddress
13883 \family default
13884
13885 \family sans
13886 Specialmail
13887 \family default
13888
13889 \family sans
13890 Location
13891 \family default
13892
13893 \family sans
13894 Title
13895 \family default
13896 , and 
13897 \family sans
13898 Subject
13899 \family default
13900  are input types provided with a label to enter information, which will
13901  be processed by the document class.
13902 \begin_inset Foot
13903 status open
13904
13905 \begin_layout Plain Layout
13906 It could be seen as a matter of inconsequence, that the types 
13907 \family sans
13908 Letter
13909 \family default
13910  and 
13911 \family sans
13912 Opening
13913 \family default
13914  described above are not such input types as well.
13915  Because of the special meaning of those types, however, I have implemented
13916  them as ordinary paragraph types with a one letter mark in the left margin.
13917  Moreover, it would affect my feeling of symmetry, if the 
13918 \family sans
13919 Opening
13920 \family default
13921  type and the 
13922 \family sans
13923 Closing
13924 \family default
13925  type had such a serious different appearance.
13926 \end_layout
13927
13928 \end_inset
13929
13930  The types must be used ahead of the corresponding 
13931 \family sans
13932 Opening
13933 \family default
13934  type.
13935 \end_layout
13936
13937 \begin_layout Standard
13938 An implementation of these types in a WYSIWYG fashion does not seem to make
13939  sense, because the real appearance of the produced letter does not only
13940  depend on the usage of the particular type, but also on other factors.
13941  For example, a signature entered in the 
13942 \family sans
13943 Signature
13944 \family default
13945  type will in the standard behavior appear in the produced letter only,
13946  when in the same letter also a 
13947 \family sans
13948 Closing
13949 \family default
13950  type is used.
13951  The entered value of the 
13952 \family sans
13953 Telephone
13954 \family default
13955  type will in the standard behavior not appear in the produced letter at
13956  all.
13957  The possibility to design the letter`s heading freely is already indicated
13958  in a footnote above.
13959 \end_layout
13960
13961 \begin_layout Standard
13962 The input types can also be used as empty paragraphs.
13963  This makes sense e.
13964 \begin_inset space \thinspace{}
13965 \end_inset
13966
13967 g.
13968 \begin_inset space \space{}
13969 \end_inset
13970
13971 for the 
13972 \family sans
13973 Signature
13974 \family default
13975  type.
13976  If the 
13977 \family sans
13978 Signature
13979 \family default
13980  type is not used at all, in the standard behavior the value of the 
13981 \family sans
13982 Name
13983 \family default
13984  type is used as signature, whereas if an empty 
13985 \family sans
13986 Signature
13987 \family default
13988  type is used, no signature value is defined.
13989 \end_layout
13990
13991 \begin_layout Standard
13992 By using the input types it is possible to write a letter template, containing
13993  filled input types with your personal dates (name, address, etc.) and empty
13994  input types for other dates you want to enter.
13995 \end_layout
13996
13997 \begin_layout Itemize
13998
13999 \family sans
14000 Name
14001 \family default
14002 : sender's name, in the standard behavior appears as a centered paragraph
14003  in small caps in the letter`s heading.
14004 \end_layout
14005
14006 \begin_layout Itemize
14007
14008 \family sans
14009 Signature
14010 \family default
14011 : sender's signature, in the standard behavior appears below the 
14012 \family sans
14013 Closing
14014 \family default
14015  type.
14016  If no 
14017 \family sans
14018 Signature
14019 \family default
14020  type is used, the value of the 
14021 \family sans
14022 Name
14023 \family default
14024  type appears instead.
14025 \end_layout
14026
14027 \begin_layout Itemize
14028
14029 \family sans
14030 Address
14031 \family default
14032 : sender's address, in the standard behavior appears in a centered paragraph
14033  in the letter`s heading below the sender's name.
14034 \end_layout
14035
14036 \begin_layout Itemize
14037
14038 \family sans
14039 Telephone
14040 \family default
14041 : sender's telephone number, in the standard behavior only sets the LaTeX
14042  variable 
14043 \family typewriter
14044
14045 \backslash
14046 telephonenum
14047 \family default
14048 .
14049 \end_layout
14050
14051 \begin_layout Itemize
14052
14053 \family sans
14054 Place
14055 \family default
14056 : place of the letter`s making.
14057 \end_layout
14058
14059 \begin_layout Itemize
14060
14061 \family sans
14062 Date
14063 \family default
14064 : date of the letter`s making.
14065  
14066 \family sans
14067 Place
14068 \family default
14069  and 
14070 \family sans
14071 Date
14072 \family default
14073 , in the standard behavior, produce the place and the date in a right-aligned
14074  line below the addressee's field.
14075  If an empty 
14076 \family sans
14077 Date
14078 \family default
14079  type is used, neither place nor date appear, independent of the value of
14080  the 
14081 \family sans
14082 Place
14083 \family default
14084  type.
14085  If no 
14086 \family sans
14087 Date
14088 \family default
14089  type is used, the date of the letter `s production is used.
14090 \end_layout
14091
14092 \begin_layout Itemize
14093
14094 \family sans
14095 Backaddress
14096 \family default
14097 : sender`s back address, in the standard behavior appears above the addressee's
14098  field in a small sans serif font.
14099 \end_layout
14100
14101 \begin_layout Itemize
14102
14103 \family sans
14104 Specialmail
14105 \family default
14106 : special mail information, in the standard behavior appears underlined
14107  above the addressee's field below the back address.
14108 \end_layout
14109
14110 \begin_layout Itemize
14111
14112 \family sans
14113 Location
14114 \family default
14115 : additional information, in the standard behavior appears on right side
14116  below the addressee`s field.
14117 \end_layout
14118
14119 \begin_layout Itemize
14120
14121 \family sans
14122 Title
14123 \family default
14124 : the letter's title, in the standard behavior appears in a big, bold, sans
14125  serif font above the subject.
14126 \end_layout
14127
14128 \begin_layout Itemize
14129
14130 \family sans
14131 Subject
14132 \family default
14133 : the letter's subject, in the standard behavior appears in a bold font
14134  above the 
14135 \family sans
14136 Opening
14137 \family default
14138  paragraph.
14139 \end_layout
14140
14141 \begin_layout Standard
14142 The types 
14143 \family sans
14144 Yourref
14145 \family default
14146
14147 \family sans
14148 Yourmail
14149 \family default
14150
14151 \family sans
14152 Myref
14153 \family default
14154
14155 \family sans
14156 Customer
14157 \family default
14158 , and 
14159 \family sans
14160 Invoice
14161 \family default
14162  produce a business letter like line above the 
14163 \family sans
14164 Title
14165 \family default
14166  line containing the fields 
14167 \begin_inset Quotes eld
14168 \end_inset
14169
14170 Your ref.
14171 \begin_inset Quotes erd
14172 \end_inset
14173
14174
14175 \begin_inset Quotes eld
14176 \end_inset
14177
14178 Your letter of
14179 \begin_inset Quotes erd
14180 \end_inset
14181
14182
14183 \begin_inset Quotes eld
14184 \end_inset
14185
14186 Our ref.
14187 \begin_inset Quotes erd
14188 \end_inset
14189
14190
14191 \begin_inset Quotes eld
14192 \end_inset
14193
14194 Customer no.
14195 \begin_inset Quotes erd
14196 \end_inset
14197
14198
14199 \begin_inset Quotes eld
14200 \end_inset
14201
14202 Invoice no.
14203 \begin_inset Quotes erd
14204 \end_inset
14205
14206 , and 
14207 \begin_inset Quotes eld
14208 \end_inset
14209
14210 Date
14211 \begin_inset Quotes erd
14212 \end_inset
14213
14214 .
14215  For the date field, the value of the 
14216 \family sans
14217 Date
14218 \family default
14219  type is used.
14220  If one of these 
14221 \begin_inset Quotes eld
14222 \end_inset
14223
14224 business letter types
14225 \begin_inset Quotes erd
14226 \end_inset
14227
14228  is used, the value of the 
14229 \family sans
14230 Place
14231 \family default
14232  type however does not appear, but only the LaTeX variable 
14233 \family typewriter
14234
14235 \backslash
14236 fromplace
14237 \family default
14238  is set.
14239  The ordinary output of place and date in a right-aligned line below the
14240  addressee`s field is suppressed.
14241  The types are implemented as input types provided with a label and must
14242  be used ahead of the corresponding 
14243 \family sans
14244 Opening
14245 \family default
14246  type.
14247 \end_layout
14248
14249 \begin_layout Itemize
14250
14251 \family sans
14252 Yourref
14253 \family default
14254 : Your ref.
14255 \end_layout
14256
14257 \begin_layout Itemize
14258
14259 \family sans
14260 Yourmail
14261 \family default
14262 : Your letter of.
14263 \end_layout
14264
14265 \begin_layout Itemize
14266
14267 \family sans
14268 Myref
14269 \family default
14270 : Our ref.
14271 \end_layout
14272
14273 \begin_layout Itemize
14274
14275 \family sans
14276 Customer
14277 \family default
14278 : Customer no.
14279 \end_layout
14280
14281 \begin_layout Itemize
14282
14283 \family sans
14284 Invoice
14285 \family default
14286 : Invoice no.
14287 \end_layout
14288
14289 \begin_layout Subsection
14290 The new letter class: letter (koma-script v.2)
14291 \end_layout
14292
14293 \begin_layout Standard
14294 by 
14295 \noun on
14296 Jürgen Spitzmüller
14297 \end_layout
14298
14299 \begin_layout Standard
14300 \begin_inset VSpace medskip
14301 \end_inset
14302
14303
14304 \end_layout
14305
14306 \begin_layout Standard
14307 \noindent
14308 Koma-Script version 2.8 has introduced a new letter class 
14309 \family typewriter
14310 scrlttr2
14311 \family default
14312  which supersedes the now unsupported 
14313 \family typewriter
14314 scrlettr
14315 \family default
14316 .
14317  It has — on the LaTeX side — a completely new interface and is not compatible
14318  with the old class.
14319  Therefore, LyX supports both, though it is recommended you use the new
14320  class.
14321 \end_layout
14322
14323 \begin_layout Standard
14324 This class covers the same functionality as 
14325 \emph on
14326 letter (koma-script),
14327 \emph default
14328  and a few more.
14329  The basic items are 
14330 \family sans
14331 Address
14332 \family default
14333  (receiver's address, same as 
14334 \family sans
14335 Letter
14336 \family default
14337  in the old layout), 
14338 \family sans
14339 Opening
14340 \family default
14341 , and 
14342 \family sans
14343 Closing
14344 \family default
14345 .
14346  
14347 \family sans
14348 NextAddress
14349 \family default
14350  will start a new letter (i.
14351 \begin_inset space \thinspace{}
14352 \end_inset
14353
14354 g.
14355 \begin_inset space \space{}
14356 \end_inset
14357
14358 you can write several letters per document).
14359  New elements are sender's 
14360 \family sans
14361 E-Mail
14362 \family default
14363
14364 \family sans
14365 URL
14366 \family default
14367
14368 \family sans
14369 Fax
14370 \family default
14371
14372 \family sans
14373 Bank
14374 \family default
14375  and the possibility to use a 
14376 \family sans
14377 Logo
14378 \family default
14379  (via 
14380 \family sans
14381 Insert\SpecialChar \menuseparator
14382 Graphics
14383 \family default
14384 ) in the header.
14385 \end_layout
14386
14387 \begin_layout Standard
14388 The biggest improvement is, though, that the letter's layout is configurable
14389  to meet almost any needs.
14390  This can be done via the preamble or with a special style file (Letter
14391  Class Option, extension 
14392 \family typewriter
14393 *.lco
14394 \family default
14395 ), that will be read in as a class option.
14396 \begin_inset Foot
14397 status collapsed
14398
14399 \begin_layout Plain Layout
14400 The KOMA package comes with some default 
14401 \family typewriter
14402 *.lco
14403 \family default
14404  files.
14405  There is, for instance, a 
14406 \family typewriter
14407 DIN.lco
14408 \family default
14409  file that follows german typesetting rules, or a 
14410 \family typewriter
14411 KOMAold.lco
14412 \family default
14413  that provides the default layout of the old 
14414 \family typewriter
14415 scrlettr
14416 \family default
14417  class.
14418  The latter can be loaded with the class option 
14419 \family typewriter
14420 KOMAold
14421 \family default
14422 , inserted via the 
14423 \family sans
14424 \bar under
14425 L
14426 \bar default
14427 ayout\SpecialChar \menuseparator
14428
14429 \bar under
14430 D
14431 \bar default
14432 ocument\SpecialChar \menuseparator
14433 Extra Options
14434 \family default
14435  field.
14436 \end_layout
14437
14438 \end_inset
14439
14440  Have a look at the 
14441 \emph on
14442 koma-letter2
14443 \emph default
14444  template that is included in LyX for examples.
14445  A detailed description is to be found in the Koma-Script documentation
14446  (
14447 \emph on
14448 scrguide
14449 \emph default
14450 ).
14451 \end_layout
14452
14453 \begin_layout Subsection
14454 Problems
14455 \end_layout
14456
14457 \begin_layout Standard
14458 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14459  some problems.
14460 \end_layout
14461
14462 \begin_layout Itemize
14463 The chapter number of a 
14464 \family sans
14465 Chapter
14466 \family default
14467  type appears on a line of its own above the chapter heading instead of
14468  appearing in the same line ahead of it.
14469  The cause for that is the LyX internal behavior for the labeltype 
14470 \family sans
14471 Counter_Chapter
14472 \family default
14473  in the layout file.
14474 \end_layout
14475
14476 \begin_layout Itemize
14477 The headings of the types 
14478 \family sans
14479 Addchap
14480 \family default
14481  and 
14482 \family sans
14483 Addsec
14484 \family default
14485  are only put in the 
14486 \begin_inset Quotes eld
14487 \end_inset
14488
14489 true
14490 \begin_inset Quotes erd
14491 \end_inset
14492
14493  LaTeX table of contents, but not in the LyX table of contents (
14494 \family sans
14495 Document\SpecialChar \menuseparator
14496 Table
14497 \begin_inset space ~
14498 \end_inset
14499
14500 of
14501 \begin_inset space ~
14502 \end_inset
14503
14504 Contents
14505 \family default
14506 ).
14507 \end_layout
14508
14509 \begin_layout Itemize
14510 The paragraphs in a 
14511 \emph on
14512 letter
14513 \emph default
14514  document class appear in a skip separation mode, not indented.
14515  This is the standard behavior, no special LaTeX commands are needed for
14516  that.
14517  But in the 
14518 \family sans
14519 Document\SpecialChar \menuseparator
14520 Settings
14521 \family default
14522  dialog the corresponding radio button indicates 
14523 \family sans
14524 Indent
14525 \family default
14526 .
14527  A 
14528 \family sans
14529 Skip
14530 \family default
14531  value always has the effect that extra LaTeX commands are inserted in the
14532  document to produce the gap, which is not what is wanted in this case.
14533 \end_layout
14534
14535 \begin_layout Section
14536 Memoir
14537 \end_layout
14538
14539 \begin_layout Standard
14540 By 
14541 \noun on
14542 Jürgen Spitzmüller
14543 \end_layout
14544
14545 \begin_layout Subsection
14546 Overview
14547 \end_layout
14548
14549 \begin_layout Standard
14550 Memoir is a very powerful and constantly evolving class.
14551  It has been designed with regard to fictional and non-fictional literature.
14552  Its aim is to let the user have maximum control over the typesetting of
14553  his document.
14554  Memoir is based on the standard book class, but it can also emulate the
14555  article class (see below).
14556 \end_layout
14557
14558 \begin_layout Standard
14559 Peter Wilson, the developer of Memoir, is known as the author of lots of
14560  useful packages in the LaTeX world.
14561  Most of them have been merged with Memoir.
14562  Therefore, it is much easier to layout the table of contents, appendices,
14563  chapter designs and such.
14564  LyX, though, does not support all of these goodies natively.
14565  Some of them might be added to forthcoming releases
14566 \begin_inset Foot
14567 status collapsed
14568
14569 \begin_layout Plain Layout
14570 You are invited to send suggestions to 
14571 \begin_inset Flex URL
14572 status collapsed
14573
14574 \begin_layout Plain Layout
14575
14576 lyx-devel@lists.lyx.org
14577 \end_layout
14578
14579 \end_inset
14580
14581 .
14582 \end_layout
14583
14584 \end_inset
14585
14586 , lots will probably never, due to the limitations of LyX's framework.
14587  Of course you can still use all features with the help of some native LaTeX
14588  commands (TeX code
14589 \begin_inset Foot
14590 status collapsed
14591
14592 \begin_layout Plain Layout
14593 Cf.
14594 \begin_inset ERT
14595 status collapsed
14596
14597 \begin_layout Plain Layout
14598
14599
14600 \backslash
14601  
14602 \end_layout
14603
14604 \end_inset
14605
14606 section
14607 \begin_inset space ~
14608 \end_inset
14609
14610
14611 \begin_inset CommandInset ref
14612 LatexCommand ref
14613 reference "sec:Inserting-TeX-Code"
14614
14615 \end_inset
14616
14617  for details.
14618 \end_layout
14619
14620 \end_inset
14621
14622 ).
14623  In this section, we can only list those features which are natively supported
14624  by LyX.
14625  For detailed descriptions (and for the rest of features) we recommend you
14626  have a look at the detailed manual of the Memoir class
14627 \begin_inset Foot
14628 status collapsed
14629
14630 \begin_layout Plain Layout
14631 Cf.
14632 \begin_inset ERT
14633 status collapsed
14634
14635 \begin_layout Plain Layout
14636
14637
14638 \backslash
14639  
14640 \end_layout
14641
14642 \end_inset
14643
14644
14645 \begin_inset Flex URL
14646 status collapsed
14647
14648 \begin_layout Plain Layout
14649
14650 CTAN:/macros/latex/memoir/memman.pdf
14651 \end_layout
14652
14653 \end_inset
14654
14655 .
14656 \end_layout
14657
14658 \end_inset
14659
14660 , which is not only a user guide for the class, but also both a comprehensive
14661  description on good typesetting and a superb example for good typesetting
14662  itself.
14663 \end_layout
14664
14665 \begin_layout Subsection
14666 Basic features and restrictions
14667 \end_layout
14668
14669 \begin_layout Standard
14670 Memoir supports basically all features of the standard book classes.
14671  There are, however, some differences, as follows:
14672 \end_layout
14673
14674 \begin_layout Description
14675 Font
14676 \begin_inset space ~
14677 \end_inset
14678
14679 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14680 \end_layout
14681
14682 \begin_layout Description
14683 Page
14684 \begin_inset space ~
14685 \end_inset
14686
14687 style: The fancy page style is not supported, due to a command clash between
14688  Memoir and the fancyhdr package (they both define a command with the same
14689  name, which confuses LaTeX).
14690  Instead, Memoir comes with a number of its own page styles (see 
14691 \family sans
14692 Layout\SpecialChar \menuseparator
14693 Document\SpecialChar \menuseparator
14694 Page
14695 \begin_inset space ~
14696 \end_inset
14697
14698 Style
14699 \family default
14700 ).
14701  If you want to use these for the chapter pages, you have to use the command
14702  
14703 \family typewriter
14704
14705 \backslash
14706 chapterstyle
14707 \family default
14708  in the main text or in preamble (e.
14709 \begin_inset space \thinspace{}
14710 \end_inset
14711
14712 g.
14713 \begin_inset space \space{}
14714 \end_inset
14715
14716
14717 \family typewriter
14718
14719 \backslash
14720 chapterstyle{companion}
14721 \family default
14722 ).
14723 \end_layout
14724
14725 \begin_layout Description
14726 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14727  optional argument in the standard classes.
14728  With this, you can specify an alternative version of the title for the
14729  table of contents and the headers (for instance, if the title is too long).
14730  In LyX, you can do this via 
14731 \family sans
14732 Insert\SpecialChar \menuseparator
14733 Short
14734 \begin_inset space ~
14735 \end_inset
14736
14737 Title
14738 \family default
14739  at the beginning of a chapter/section.
14740  Memoir features a second optional argument and thus separates the table
14741  of contents from the header.
14742  You can define three variants of a title with this: one for the main text,
14743  one for the table of contents, and one for the headers.
14744  Simply insert two optional arguments if you need this feature, the first
14745  one containing the short title for the Table of Contents, the second one
14746  containing an alternative short title for the headers.
14747 \end_layout
14748
14749 \begin_layout Description
14750 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14751  of contents, the list of figures and the list of table start a new page
14752  automatically.
14753  Memoir does not follow this route.
14754  You have to insert a page break yourself, if you want to have one.
14755 \end_layout
14756
14757 \begin_layout Description
14758 Titlepage: For some unknown reason, Memoir uses pagination on the title
14759  page (in the standard classes, title pages are 
14760 \begin_inset Quotes eld
14761 \end_inset
14762
14763 empty
14764 \begin_inset Quotes erd
14765 \end_inset
14766
14767 , i.
14768 \begin_inset space \thinspace{}
14769 \end_inset
14770
14771 g.
14772 \begin_inset space \space{}
14773 \end_inset
14774
14775 without pagina).
14776  If you want an empty title page, type 
14777 \family typewriter
14778
14779 \backslash
14780 aliaspagestyle{title}{empty}
14781 \family default
14782  in the preamble.
14783 \end_layout
14784
14785 \begin_layout Description
14786 Article: With the class option 
14787 \emph on
14788 article
14789 \emph default
14790  (to be inserted in 
14791 \family sans
14792 Layout\SpecialChar \menuseparator
14793 Document\SpecialChar \menuseparator
14794 Extra
14795 \begin_inset space ~
14796 \end_inset
14797
14798 Options
14799 \family default
14800 ), you can emulate article style.
14801  That is, counters (footnotes, figures, tables etc.) will not be reset on
14802  new chapters, chapters don't start a new page (but are—in contrary to 
14803 \begin_inset Quotes eld
14804 \end_inset
14805
14806 real
14807 \begin_inset Quotes erd
14808 \end_inset
14809
14810  article classes—still allowed), parts, though, use their own page, as in
14811  book.
14812 \end_layout
14813
14814 \begin_layout Description
14815 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14816  font commands, which have been used in the old LaTeX version 2.09 (e.
14817 \begin_inset space \thinspace{}
14818 \end_inset
14819
14820 g.
14821 \begin_inset space \space{}
14822 \end_inset
14823
14824
14825 \family typewriter
14826
14827 \backslash
14828 rm
14829 \family default
14830
14831 \family typewriter
14832
14833 \backslash
14834 it
14835 \family default
14836 ).
14837  It produces an error and stops LaTeX whenever such a command appears.
14838  The class option 
14839 \emph on
14840 oldfontcommands
14841 \emph default
14842  reallows the commands and spits out warnings instead (which does at least
14843  not stop LaTeX).
14844  Since a lot of packages and particularly BibTeX style files are still using
14845  those commands, we have decided to use this option by default.
14846 \end_layout
14847
14848 \begin_layout Subsection
14849 Extra features
14850 \end_layout
14851
14852 \begin_layout Standard
14853 We will only describe the features supported by LyX (which is not much currently
14854 ).
14855  Please consult the Memoir manual
14856 \begin_inset Foot
14857 status collapsed
14858
14859 \begin_layout Plain Layout
14860 Cf.
14861 \begin_inset ERT
14862 status collapsed
14863
14864 \begin_layout Plain Layout
14865
14866
14867 \backslash
14868  
14869 \end_layout
14870
14871 \end_inset
14872
14873
14874 \begin_inset Flex URL
14875 status collapsed
14876
14877 \begin_layout Plain Layout
14878
14879 CTAN:/macros/latex/memoir/memman.pdf
14880 \end_layout
14881
14882 \end_inset
14883
14884 .
14885 \end_layout
14886
14887 \end_inset
14888
14889  for details.
14890 \end_layout
14891
14892 \begin_layout Description
14893 Abstract: You may wonder why an abstract is an extra feature.
14894  Well, it is in book class.
14895  Usually books don't have abstracts.
14896  Memoir, however, has.
14897  You can use it wherever and how often you like.
14898 \end_layout
14899
14900 \begin_layout Description
14901 Chapterprecis: You may know this older typesetting style: The contents of
14902  a chapter are summarized below the title and also in the table of contents
14903  (e.
14904 \begin_inset space \thinspace{}
14905 \end_inset
14906
14907 g.
14908 \begin_inset space \space{}
14909 \end_inset
14910
14911
14912 \emph on
14913 Our hero arrives in Troia; he loses some friends; he finds others
14914 \emph default
14915 ).
14916  Chapterprecis does exactly this.
14917  It is therefore only sensible below a chapter.
14918 \end_layout
14919
14920 \begin_layout Description
14921 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14922  The epigraph environment provides an elegant way of typesetting such a
14923  motto.
14924  The motto itself (text) and its author (source) are divided by a short
14925  line.
14926  Unfortunately, we have to fool LyX a bit here again, since the environment
14927  needs two arguments (text and source).
14928  In this case, we have to use curly brackets (in TeX mode) between the two
14929  arguments: 
14930 \emph on
14931 <smart slogan>
14932 \emph default
14933  
14934 \family typewriter
14935 }{
14936 \family default
14937  
14938 \emph on
14939 <author of the slogan>.
14940 \end_layout
14941
14942 \begin_layout Description
14943 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14944  complex figurative poems).
14945  LyX can only support a few of them.
14946  One is poemtitle, which is a centered title for poems, which will also
14947  be added to the table of contents (verse is the standard environment for
14948  poems.
14949  Memoir has some enhanced versions of verse, but you need to use TeX code,
14950  because they have to be nested inside regular verse environments, which
14951  is not possible with LyX).
14952 \end_layout
14953
14954 \begin_layout Description
14955 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14956 \end_layout
14957
14958 \begin_layout Section
14959 Article (mwart), book (mwbk) and report (mwrep)
14960 \begin_inset Argument
14961 status collapsed
14962
14963 \begin_layout Plain Layout
14964 The 
14965 \family typewriter
14966 mw
14967 \family default
14968  Classes
14969 \end_layout
14970
14971 \end_inset
14972
14973
14974 \end_layout
14975
14976 \begin_layout Standard
14977 by 
14978 \noun on
14979 Tomasz Luczak
14980 \end_layout
14981
14982 \begin_layout Standard
14983 The LyX document classes 
14984 \emph on
14985 article (mwart)
14986 \emph default
14987
14988 \emph on
14989 report (mwrep)
14990 \emph default
14991  and 
14992 \emph on
14993 book
14994 \emph default
14995  
14996 \emph on
14997 (mwbk)
14998 \emph default
14999  correspond to the LaTeX document classes 
15000 \family typewriter
15001 mwart.cls
15002 \family default
15003
15004 \family typewriter
15005 mwrep.cls
15006 \family default
15007  and 
15008 \family typewriter
15009 mwbk.cls
15010 \family default
15011 , resp.
15012  They are replacements for the standard document classes 
15013 \family typewriter
15014 article.cls
15015 \family default
15016
15017 \family typewriter
15018 report.cls
15019 \family default
15020  and 
15021 \family typewriter
15022 book.cls
15023 \family default
15024 , resp., and fit better to Polish typography conventions in a number of points.
15025  
15026 \end_layout
15027
15028 \begin_layout Standard
15029 Basic differences:
15030 \end_layout
15031
15032 \begin_layout Itemize
15033 Unnumbered titles (with star, e.
15034 \begin_inset space \thinspace{}
15035 \end_inset
15036
15037 g.
15038 \begin_inset space \space{}
15039 \end_inset
15040
15041
15042 \family sans
15043 Section*
15044 \family default
15045 ) are added into table of contents,
15046 \end_layout
15047
15048 \begin_layout Itemize
15049 Additional page styles:
15050 \end_layout
15051
15052 \begin_deeper
15053 \begin_layout Description
15054 uheadings header with separated lines,
15055 \end_layout
15056
15057 \begin_layout Description
15058 myheadings custom header, contents headers via commands: 
15059 \family typewriter
15060
15061 \backslash
15062 markright
15063 \family default
15064  and 
15065 \family typewriter
15066
15067 \backslash
15068 markboth
15069 \family default
15070 ,
15071 \end_layout
15072
15073 \begin_layout Description
15074 myuheadings custom header with separated lines,
15075 \end_layout
15076
15077 \begin_layout Description
15078 outer page number is placed on outer side of page
15079 \end_layout
15080
15081 \end_deeper
15082 \begin_layout Itemize
15083 Options 
15084 \end_layout
15085
15086 \begin_deeper
15087 \begin_layout Description
15088 rmheadings serif titles — default,
15089 \end_layout
15090
15091 \begin_layout Description
15092 sfheadings sansserif titles,
15093 \end_layout
15094
15095 \begin_layout Description
15096 authortitle on title page first placed is author next title — default,
15097 \end_layout
15098
15099 \begin_layout Description
15100 titleauthor on title page first placed is title next author,
15101 \end_layout
15102
15103 \begin_layout Description
15104 withmarginpar reserve place on page for margins.
15105 \end_layout
15106
15107 \end_deeper
15108 \begin_layout Section
15109 Paper
15110 \end_layout
15111
15112 \begin_layout Standard
15113 The document class 
15114 \family sans
15115 paper
15116 \family default
15117  provides an alternative to the standard 
15118 \family sans
15119 article
15120 \family default
15121  class.
15122  It provides similar functionality, but you might prefer this layout with
15123  sans serif sections, headings, and more.
15124 \end_layout
15125
15126 \begin_layout Section
15127 RevTeX4
15128 \end_layout
15129
15130 \begin_layout Standard
15131 by 
15132 \noun on
15133 Amir Karger
15134 \end_layout
15135
15136 \begin_layout Standard
15137 \begin_inset VSpace bigskip
15138 \end_inset
15139
15140
15141 \end_layout
15142
15143 \begin_layout Standard
15144 \noindent
15145 The 
15146 \family sans
15147 Revtex
15148 \begin_inset space ~
15149 \end_inset
15150
15151 4
15152 \family default
15153  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15154 \begin_inset Formula $\beta$
15155 \end_inset
15156
15157  release of May, 1999) class.
15158 \end_layout
15159
15160 \begin_layout Standard
15161 LyX has a 
15162 \family sans
15163 Revtex
15164 \family default
15165  textclass, which works with RevTeX 3.1.
15166  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15167  That means that it doesn't interact very well with LyX, which requires
15168  LaTeX2e, although it has been kludged to work.
15169  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15170  LyX with the 
15171 \family sans
15172 RevTeX
15173 \begin_inset space ~
15174 \end_inset
15175
15176 4
15177 \family default
15178  textclass should also be pretty easy to use.
15179 \end_layout
15180
15181 \begin_layout Standard
15182 These documents are supposed to be used in 
15183 \emph on
15184 addition
15185 \emph default
15186  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15187  macros, and assume you'll know what to put in the preamble if necessary.
15188 \end_layout
15189
15190 \begin_layout Subsection
15191 Installation
15192 \end_layout
15193
15194 \begin_layout Standard
15195 All you need to do is install RevTeX 4, as described in the package's README
15196  file.
15197  The package can be found at The RevTeX 4 Web Site 
15198 \begin_inset Flex URL
15199 status collapsed
15200
15201 \begin_layout Plain Layout
15202
15203 http://publish.aps.org/revtex4/
15204 \end_layout
15205
15206 \end_inset
15207
15208 .
15209  Install it somewhere that LaTeX can see it.
15210  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15211  (i.
15212 \begin_inset space \thinspace{}
15213 \end_inset
15214
15215 g.
15216 \begin_inset space \space{}
15217 \end_inset
15218
15219 not the directory where you installed the class file.) Then, if you reconfigure
15220  LyX, it will find the class file and let you use the RevTeX4 textclass.
15221 \end_layout
15222
15223 \begin_layout Standard
15224 Probably the easiest way to get started is either to import a RevTeX 4 document
15225  using 
15226 \family typewriter
15227 tex2lyx
15228 \family default
15229 , or to use the 
15230 \family sans
15231 Revtex
15232 \begin_inset space ~
15233 \end_inset
15234
15235 4
15236 \family default
15237  template, found in the templates directory.
15238 \end_layout
15239
15240 \begin_layout Subsection
15241 Preamble Matter
15242 \end_layout
15243
15244 \begin_layout Standard
15245 Optional arguments to 
15246 \family typewriter
15247
15248 \backslash
15249 documentclass
15250 \family default
15251 , like 
15252 \begin_inset Quotes eld
15253 \end_inset
15254
15255 preprint
15256 \begin_inset Quotes erd
15257 \end_inset
15258
15259  and 
15260 \begin_inset Quotes eld
15261 \end_inset
15262
15263 aps
15264 \begin_inset Quotes erd
15265 \end_inset
15266
15267 , go in the 
15268 \family sans
15269 E
15270 \bar under
15271 x
15272 \bar default
15273 tra
15274 \begin_inset space ~
15275 \end_inset
15276
15277 Options
15278 \family default
15279  field in the 
15280 \family sans
15281 Document
15282 \begin_inset space ~
15283 \end_inset
15284
15285 Layout
15286 \family default
15287  dialog, as usual.
15288  Remember that in RevTeX, at least one optional argument is required! 
15289 \end_layout
15290
15291 \begin_layout Standard
15292 Other preamble matter, like 
15293 \family typewriter
15294
15295 \backslash
15296 draft
15297 \family default
15298  etc.
15299 \begin_inset space ~
15300 \end_inset
15301
15302 goes in the 
15303 \family sans
15304 LaTeX
15305 \begin_inset space ~
15306 \end_inset
15307
15308 Preamble
15309 \family default
15310  dialog, also as usual.
15311 \end_layout
15312
15313 \begin_layout Subsection
15314 Layouts
15315 \end_layout
15316
15317 \begin_layout Standard
15318 The layouts basically correspond to the commands in RevTeX4.0.
15319  For example, the Email layout corresponds to 
15320 \family typewriter
15321
15322 \backslash
15323 email{}
15324 \family default
15325 .
15326  Note that (at least as of RevTeX 4.0 Beta), the 
15327 \family sans
15328 Address
15329 \family default
15330  and 
15331 \family sans
15332 Affiliation
15333 \family default
15334  layouts are exactly equivalent, so you shouldn't need to use both.
15335 \begin_inset Foot
15336 status collapsed
15337
15338 \begin_layout Plain Layout
15339 In case you're curious, both were included so that 
15340 \family typewriter
15341 tex2lyx
15342 \family default
15343  would be able to translate both 
15344 \family typewriter
15345
15346 \backslash
15347 address
15348 \family default
15349  and 
15350 \family typewriter
15351
15352 \backslash
15353 affiliation
15354 \family default
15355 .
15356 \end_layout
15357
15358 \end_inset
15359
15360
15361 \end_layout
15362
15363 \begin_layout Subsection
15364 Important Notes
15365 \end_layout
15366
15367 \begin_layout Standard
15368 There are a couple of important unique aspects of RevTeX 4 which might cause
15369  bugs that will be even more confusing in LyX.
15370 \end_layout
15371
15372 \begin_layout Standard
15373 In RevTeX, the 
15374 \family typewriter
15375
15376 \backslash
15377 thanks
15378 \family default
15379  command goes 
15380 \emph on
15381 outside
15382 \emph default
15383  the 
15384 \family typewriter
15385
15386 \backslash
15387 author
15388 \family default
15389  command.
15390  The LyX equivalent is that there is a separate Thanks layout.
15391  Do 
15392 \emph on
15393 not
15394 \emph default
15395  write footnotes in the 
15396 \family sans
15397 Author
15398 \family default
15399  layout, or weird things may happen.
15400  See the RevTeX 4 documentation for more details.
15401 \end_layout
15402
15403 \begin_layout Standard
15404 Also, the 
15405 \family sans
15406 Author
15407 \begin_inset space ~
15408 \end_inset
15409
15410 Email
15411 \family default
15412
15413 \family sans
15414 Author
15415 \begin_inset space ~
15416 \end_inset
15417
15418 URL
15419 \family default
15420 , and 
15421 \family sans
15422 Thanks
15423 \family default
15424  layouts must be placed 
15425 \emph on
15426 in between
15427 \emph default
15428  the 
15429 \family sans
15430 Author
15431 \family default
15432  layout and the corresponding 
15433 \family sans
15434 Address
15435 \family default
15436  (or equivalent 
15437 \family sans
15438 Affiliation
15439 \family default
15440 ) layout.
15441  If you put the 
15442 \family sans
15443 Thanks
15444 \family default
15445  after the 
15446 \family sans
15447 Address
15448 \family default
15449 , the LaTeX won't compile.
15450 \end_layout
15451
15452 \begin_layout Subsection
15453 Drawbacks
15454 \end_layout
15455
15456 \begin_layout Standard
15457 The main problem with this layout is that you can't use the optional arguments
15458  to layouts like Email and Title.
15459  (The problem is not unique to this layout; you can't use optional arguments
15460  to the Section layouts either.) This means that after you export that file
15461  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15462  need to edit the LaTeX file with a text editor to add the optional arguments
15463  to set, e.
15464 \begin_inset space \thinspace{}
15465 \end_inset
15466
15467 g.
15468 \begin_inset space \space{}
15469 \end_inset
15470
15471 the running title for the page headers.
15472  Lacking these layouts makes the 
15473 \family typewriter
15474
15475 \backslash
15476 altaffiliation
15477 \family default
15478  (and the equivalent 
15479 \family typewriter
15480
15481 \backslash
15482 altaddress
15483 \family default
15484 ) useless, so the corresponding layouts don't exist, and will have to be
15485  added by hand.
15486 \begin_inset Foot
15487 status collapsed
15488
15489 \begin_layout Plain Layout
15490
15491 \emph on
15492 Note from JMarc:
15493 \emph default
15494  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15495  has not been updated yet to take advantage of it.
15496 \end_layout
15497
15498 \end_inset
15499
15500  
15501 \end_layout
15502
15503 \begin_layout Section
15504 Springer Journals (
15505 \family sans
15506 svjour
15507 \family default
15508 )
15509 \end_layout
15510
15511 \begin_layout Standard
15512 by 
15513 \noun on
15514 Martin Vermeer
15515 \end_layout
15516
15517 \begin_layout Subsection
15518 Description
15519 \end_layout
15520
15521 \begin_layout Standard
15522 These are the layout files for some of the journal formats used by Springer
15523  Verlag and listed on 
15524 \begin_inset Flex URL
15525 status collapsed
15526
15527 \begin_layout Plain Layout
15528
15529 http://www.springer.de/author/tex/help-journals.html
15530 \end_layout
15531
15532 \end_inset
15533
15534 , where you should also go to fetch the class files (yes, these are LaTeX2e
15535  now!).
15536  It is a modular system: the things common to all journals are implemented
15537  in 
15538 \family typewriter
15539 svjour.inc
15540 \family default
15541 , which journal-specific layout files (such as, e.
15542 \begin_inset space \thinspace{}
15543 \end_inset
15544
15545 g.
15546 \begin_inset space \space{}
15547 \end_inset
15548
15549
15550 \family typewriter
15551 svjog.layout
15552 \family default
15553  for Journal of Geodesy) can include.
15554 \end_layout
15555
15556 \begin_layout Standard
15557 This means that implementing support for any other Springer journal on this
15558  list is as simple as writing your own 
15559 \family typewriter
15560 sv
15561 \family default
15562 <myjournal>
15563 \family typewriter
15564 .layout
15565 \family default
15566  file following the outline given in 
15567 \family typewriter
15568 svjog.layout
15569 \family default
15570 .
15571  
15572 \end_layout
15573
15574 \begin_layout Standard
15575 It is reasonably well tested only for the Journal of Geodesy.
15576  
15577 \family typewriter
15578 svjour
15579 \family default
15580  and 
15581 \family typewriter
15582 svjog
15583 \family default
15584  come with the standard LyX distribution.
15585  Install the relevant class file (downloaded from Springer) in a proper
15586  directory, reconfigure LaTeX (in the teTeX case by running 
15587 \family typewriter
15588 texhash
15589 \family default
15590 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15591  and it should work.
15592 \end_layout
15593
15594 \begin_layout Subsection
15595 New styles
15596 \end_layout
15597
15598 \begin_layout Standard
15599 A large number of theorem-like styles — 
15600 \family sans
15601 Claim, Conjecture,
15602 \family default
15603  
15604 \family sans
15605 \SpecialChar \ldots{}
15606 Theorem
15607 \family default
15608 .
15609 \end_layout
15610
15611 \begin_layout Standard
15612
15613 \family sans
15614 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15615  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15616 \family default
15617 .
15618  See the Springer class file documentation for details.
15619 \end_layout
15620
15621 \begin_layout Subsection
15622 Supported journals
15623 \end_layout
15624
15625 \begin_layout Itemize
15626
15627 \emph on
15628 Journal of Geodesy
15629 \emph default
15630
15631 \family typewriter
15632 svjog.layout
15633 \family default
15634  — Martin Vermeer
15635 \end_layout
15636
15637 \begin_layout Itemize
15638
15639 \emph on
15640 Probability Theory and Related Fields
15641 \emph default
15642
15643 \family typewriter
15644 svprobth.layout
15645 \family default
15646  — Jean-Marc Lasgouttes
15647 \end_layout
15648
15649 \begin_layout Standard
15650 Add your own, it isn't so hard!
15651 \end_layout
15652
15653 \begin_layout Subsection
15654 Credits
15655 \end_layout
15656
15657 \begin_layout Standard
15658 These files are partly based on the older 
15659 \family typewriter
15660 ejour2.layout
15661 \family default
15662 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15663  file from Springer.
15664  All this, and the 
15665 \family typewriter
15666 ejour2
15667 \family default
15668  layout, are now defunct.
15669  Jean-Marc Lasgouttes helped out big in making me find my way around the
15670  LyX layout file mechanism.
15671 \end_layout
15672
15673 \begin_layout Subsection
15674 Bugs
15675 \end_layout
15676
15677 \begin_layout Standard
15678 Probably.
15679  But probably less than in the old hacked-LaTeX 
15680 \family typewriter
15681 ejour2
15682 \family default
15683 .
15684 \end_layout
15685
15686 \begin_layout Standard
15687 Limitations e.
15688 \begin_inset space \thinspace{}
15689 \end_inset
15690
15691 g.: does not display the number for theorem-like layouts, just #.
15692 \end_layout
15693
15694 \begin_layout Section
15695 Slides [aka 
15696 \noun on
15697 SliTeX
15698 \noun default
15699 ]
15700 \begin_inset CommandInset label
15701 LatexCommand label
15702 name "sec:slitex"
15703
15704 \end_inset
15705
15706
15707 \end_layout
15708
15709 \begin_layout Standard
15710 by 
15711 \noun on
15712 John Weiss
15713 \noun default
15714  
15715 \end_layout
15716
15717 \begin_layout Subsection
15718 Introduction
15719 \end_layout
15720
15721 \begin_layout Standard
15722 This section describes how to use LyX to make slides for overhead projectors.
15723  There are two document classes that can do this: the default slides class
15724  and the 
15725 \family sans
15726 FoilTeX
15727 \family default
15728  slides class.
15729  This section documents the former.
15730 \end_layout
15731
15732 \begin_layout Standard
15733 I'm going to say this again, nice and clear, so that there's no misunderstanding
15734 :
15735 \end_layout
15736
15737 \begin_layout Standard
15738 \begin_inset VSpace bigskip
15739 \end_inset
15740
15741
15742 \end_layout
15743
15744 \begin_layout Standard
15745 \align center
15746
15747 \size large
15748 This section documents the class 
15749 \begin_inset Quotes eld
15750 \end_inset
15751
15752
15753 \family sans
15754 slides (default)
15755 \family default
15756
15757 \begin_inset Quotes erd
15758 \end_inset
15759
15760  
15761 \emph on
15762 only.
15763 \end_layout
15764
15765 \begin_layout Standard
15766 \begin_inset VSpace bigskip
15767 \end_inset
15768
15769
15770 \end_layout
15771
15772 \begin_layout Standard
15773 If you're looking for the documentation for 
15774 \begin_inset Quotes eld
15775 \end_inset
15776
15777
15778 \family sans
15779 slides (FoilTeX)
15780 \family default
15781
15782 \begin_inset Quotes erd
15783 \end_inset
15784
15785 , check out section
15786 \begin_inset space ~
15787 \end_inset
15788
15789
15790 \begin_inset CommandInset ref
15791 LatexCommand ref
15792 reference "sec:foiltex"
15793
15794 \end_inset
15795
15796 .
15797  The 
15798 \family sans
15799 foils
15800 \family default
15801  class [
15802 \begin_inset Quotes eld
15803 \end_inset
15804
15805
15806 \family sans
15807 slides (FoilTeX)
15808 \family default
15809
15810 \begin_inset Quotes erd
15811 \end_inset
15812
15813 ] is actually somewhat better than the default 
15814 \family sans
15815 slides
15816 \family default
15817  class,
15818 \begin_inset Foot
15819 status collapsed
15820
15821 \begin_layout Plain Layout
15822 \SpecialChar \ldots{}
15823 or so I've been told repeatedly by its advocates.
15824  Having never used it, I have no idea if this claim is true or not.
15825 \end_layout
15826
15827 \end_inset
15828
15829  which this section documents.
15830 \end_layout
15831
15832 \begin_layout Standard
15833 This class is the LaTeX2e improvement of the old 
15834 \noun on
15835 SliTeX
15836 \noun default
15837  package.
15838  Every LaTeX2e distribution includes this class [which I'll just refer to
15839  as 
15840 \begin_inset Quotes eld
15841 \end_inset
15842
15843
15844 \family sans
15845 slides
15846 \family default
15847
15848 \begin_inset Quotes erd
15849 \end_inset
15850
15851  from now on], so you're bound to have it.
15852  As I noted earlier, there are other classes, such as 
15853 \family sans
15854 foils
15855 \family default
15856 , which also produce slides for overhead projectors and do a better job
15857  at it.
15858  However, there are some things which 
15859 \family sans
15860 slides
15861 \family default
15862  can do which the others can't, such as generate overlays.
15863  Read on to learn more!
15864 \end_layout
15865
15866 \begin_layout Subsection
15867 Getting Started
15868 \begin_inset CommandInset label
15869 LatexCommand label
15870 name "sec:slidesetup"
15871
15872 \end_inset
15873
15874
15875 \end_layout
15876
15877 \begin_layout Standard
15878 Obviously, to use this document class, you need to select 
15879 \begin_inset Quotes eld
15880 \end_inset
15881
15882
15883 \family sans
15884 slides (default)
15885 \family default
15886
15887 \begin_inset Quotes erd
15888 \end_inset
15889
15890  from the class list in the 
15891 \family sans
15892 Document\SpecialChar \menuseparator
15893 Settings
15894 \family default
15895  dialog.
15896  There are some other special things you should know about this class:
15897 \end_layout
15898
15899 \begin_layout Itemize
15900 Don't bother changing the options 
15901 \family sans
15902 Sides and Columns
15903 \family default
15904 .
15905  They're not supported by the 
15906 \family sans
15907 slides
15908 \family default
15909  class, anyways.
15910 \end_layout
15911
15912 \begin_layout Itemize
15913 The option 
15914 \family sans
15915 Page
15916 \begin_inset space ~
15917 \end_inset
15918
15919 style
15920 \family default
15921  behaves a bit differently for this class.
15922  The possible choices and what they do are as follows:
15923 \end_layout
15924
15925 \begin_deeper
15926 \begin_layout Description
15927
15928 \family sans
15929 plain
15930 \family default
15931  The final output contains page numbers in the lower right corner.
15932 \end_layout
15933
15934 \begin_layout Description
15935
15936 \family sans
15937 headings
15938 \family default
15939  Like 
15940 \family sans
15941 plain
15942 \family default
15943 , but also prints out any time markers you've put in.
15944  This is the default.
15945 \end_layout
15946
15947 \begin_layout Description
15948
15949 \family sans
15950 empty
15951 \family default
15952  The final output contains no page numbers, time markers, or alignment markers.
15953 \end_layout
15954
15955 \end_deeper
15956 \begin_layout Itemize
15957 The 
15958 \family sans
15959 slides
15960 \family default
15961  class has an extra option: 
15962 \family typewriter
15963 clock
15964 \family default
15965 .
15966  To use it, put 
15967 \begin_inset Quotes eld
15968 \end_inset
15969
15970
15971 \family typewriter
15972 clock
15973 \family default
15974
15975 \begin_inset Quotes erd
15976 \end_inset
15977
15978  in the extra class options.
15979 \end_layout
15980
15981 \begin_deeper
15982 \begin_layout Standard
15983 Using this options allows you to add time markers to 
15984 \family sans
15985 Note
15986 \family default
15987 s.
15988  See section
15989 \begin_inset space ~
15990 \end_inset
15991
15992
15993 \begin_inset CommandInset ref
15994 LatexCommand ref
15995 reference "sec:slideNote"
15996
15997 \end_inset
15998
15999  for more details.
16000 \end_layout
16001
16002 \end_deeper
16003 \begin_layout Standard
16004 You can also use the template file 
16005 \begin_inset Quotes eld
16006 \end_inset
16007
16008
16009 \family typewriter
16010 slides.lyx
16011 \family default
16012
16013 \begin_inset Quotes erd
16014 \end_inset
16015
16016  to automatically set up a document to use the 
16017 \family sans
16018 slides
16019 \family default
16020  class [using 
16021 \family sans
16022 File\SpecialChar \menuseparator
16023 New
16024 \begin_inset space ~
16025 \end_inset
16026
16027 from
16028 \begin_inset space ~
16029 \end_inset
16030
16031 Template
16032 \family default
16033  to open your new document].
16034  The template file also contains some examples of the special paragraph
16035  environments used by this class.
16036  I'll describe those next.
16037 \end_layout
16038
16039 \begin_layout Subsection
16040 Paragraph Environments
16041 \end_layout
16042
16043 \begin_layout Subsubsection
16044 Supported Environments
16045 \end_layout
16046
16047 \begin_layout Standard
16048 The first thing you'll notice when you start up a new 
16049 \family sans
16050 slides
16051 \family default
16052  document is the font size and type: it's the equivalent of the size 
16053 \begin_inset Quotes eld
16054 \end_inset
16055
16056
16057 \family sans
16058 Largest
16059 \family default
16060
16061 \begin_inset Quotes erd
16062 \end_inset
16063
16064  in the 
16065 \family sans
16066 Sans
16067 \begin_inset space ~
16068 \end_inset
16069
16070 Serif
16071 \family default
16072  font.
16073  This is also what's used in the output.
16074  Think of this as a 
16075 \begin_inset Quotes eld
16076 \end_inset
16077
16078 visual cue
16079 \begin_inset Quotes erd
16080 \end_inset
16081
16082  to remind you that this is a slide.
16083  Your final slides will use a larger font; ergo, you'll have less space.
16084  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16085 \end_layout
16086
16087 \begin_layout Standard
16088 The next thing that becomes obvious is the changes to the paragraph environment
16089  pull-down box [at the far-left end of the toolbar].
16090  Most of the paragraph environments you're used to seeing are missing.
16091  There are also five new ones.
16092  That's because the 
16093 \family sans
16094 slides
16095 \family default
16096  class itself only supports certain paragraph environments:
16097 \end_layout
16098
16099 \begin_layout Itemize
16100
16101 \family sans
16102 Standard
16103 \end_layout
16104
16105 \begin_layout Itemize
16106
16107 \family sans
16108 Itemize
16109 \end_layout
16110
16111 \begin_layout Itemize
16112
16113 \family sans
16114 Enumerate
16115 \end_layout
16116
16117 \begin_layout Itemize
16118
16119 \family sans
16120 Description
16121 \end_layout
16122
16123 \begin_layout Itemize
16124
16125 \family sans
16126 List
16127 \end_layout
16128
16129 \begin_layout Itemize
16130
16131 \family sans
16132 Quotation
16133 \end_layout
16134
16135 \begin_layout Itemize
16136
16137 \family sans
16138 Quote
16139 \end_layout
16140
16141 \begin_layout Itemize
16142
16143 \family sans
16144 Verse
16145 \end_layout
16146
16147 \begin_layout Itemize
16148
16149 \family sans
16150 Caption
16151 \end_layout
16152
16153 \begin_layout Itemize
16154
16155 \family sans
16156 LyX-Code
16157 \end_layout
16158
16159 \begin_layout Itemize
16160
16161 \family sans
16162 Comment
16163 \end_layout
16164
16165 \begin_layout Standard
16166 All of the other standard environments, including the section-heading environmen
16167 ts, aren't used in the 
16168 \family sans
16169 slides
16170 \family default
16171  class.
16172 \end_layout
16173
16174 \begin_layout Standard
16175 On the other hand, you'll notice the following new environments:
16176 \end_layout
16177
16178 \begin_layout Itemize
16179
16180 \family sans
16181 Slide
16182 \end_layout
16183
16184 \begin_layout Itemize
16185
16186 \family sans
16187 Overlay
16188 \end_layout
16189
16190 \begin_layout Itemize
16191
16192 \family sans
16193 Note
16194 \end_layout
16195
16196 \begin_layout Itemize
16197
16198 \family sans
16199 InvisibleText
16200 \end_layout
16201
16202 \begin_layout Itemize
16203
16204 \family sans
16205 VisibleText
16206 \end_layout
16207
16208 \begin_layout Standard
16209 These five are kind of quirky, due to a 
16210 \begin_inset Quotes eld
16211 \end_inset
16212
16213 feature
16214 \begin_inset Quotes erd
16215 \end_inset
16216
16217  in LyX.
16218  You see, LyX doesn't permit you to nest any other paragraph environment
16219  into an empty environment.
16220  Now, that's fine and dandy, but it means that you wouldn't be able to start
16221  a slide with anything except plain text.
16222  To deal with this, I've performed a little 
16223 \begin_inset Quotes eld
16224 \end_inset
16225
16226 LaTeX magic.
16227 \begin_inset Quotes erd
16228 \end_inset
16229
16230  
16231 \end_layout
16232
16233 \begin_layout Subsubsection
16234 Quirks of the New Environments
16235 \begin_inset CommandInset label
16236 LatexCommand label
16237 name "sec:slideQuirk"
16238
16239 \end_inset
16240
16241
16242 \end_layout
16243
16244 \begin_layout Standard
16245 All five of the new paragraph environments are somewhat quirky due to inherent
16246  limitiations in the current version of LyX.
16247  As I just mentioned, LyX forbids environments that begin with another environme
16248 nt.
16249  To get around this, the 
16250 \family sans
16251 Slide
16252 \family default
16253  environment isn't a paragraph environment as described in the 
16254 \emph on
16255 User's Guide
16256 \emph default
16257 .
16258  
16259 \end_layout
16260
16261 \begin_layout Standard
16262 You should consider 
16263 \family sans
16264 Slide
16265 \family default
16266
16267 \family sans
16268 Overlay
16269 \family default
16270 , and 
16271 \family sans
16272 Note
16273 \family default
16274  to be 
16275 \begin_inset Quotes eld
16276 \end_inset
16277
16278 pseudo-environments.
16279 \begin_inset Quotes erd
16280 \end_inset
16281
16282  They look like a section heading or a 
16283 \begin_inset Quotes eld
16284 \end_inset
16285
16286
16287 \family sans
16288 Caption
16289 \family default
16290 ,
16291 \begin_inset Quotes erd
16292 \end_inset
16293
16294  but really begin a [and, if necessary, end the previous] paragraph environment.
16295  Likewise, treat 
16296 \family sans
16297 InvisibleText
16298 \family default
16299  and 
16300 \family sans
16301 VisibleText
16302 \family default
16303  as 
16304 \begin_inset Quotes eld
16305 \end_inset
16306
16307 pseudo-commands.
16308 \begin_inset Quotes erd
16309 \end_inset
16310
16311  These two perform some action.
16312 \end_layout
16313
16314 \begin_layout Standard
16315 A common feature of all five environments, 
16316 \family sans
16317 Slide
16318 \family default
16319
16320 \family sans
16321 Overlay
16322 \family default
16323
16324 \family sans
16325 Note
16326 \family default
16327
16328 \family sans
16329 InvisibleText
16330 \family default
16331  and 
16332 \family sans
16333 VisibleText
16334 \family default
16335 , is a rather long-ish label.
16336  The text following this label — ordinarily the contents of the paragraph
16337  environment — is utterly irrelevant for 
16338 \family sans
16339 Slide
16340 \family default
16341
16342 \family sans
16343 Overlay
16344 \family default
16345
16346 \family sans
16347 Note
16348 \family default
16349
16350 \family sans
16351 InvisibleText
16352 \family default
16353  and 
16354 \family sans
16355 VisibleText
16356 \family default
16357 .
16358  LyX completely ignores it.
16359  In fact, you can leave these five environments completely empty.
16360  
16361 \end_layout
16362
16363 \begin_layout Standard
16364 While you don't 
16365 \emph on
16366 have
16367 \emph default
16368  to put any text after the rather long-ish label, you might want to.
16369  This could be a short description of the contents of the 
16370 \family sans
16371 Slide
16372 \family default
16373 , for example.
16374  In that case, enter your descriptive comment and hit 
16375 \family sans
16376 Return
16377 \family default
16378  as you normally would.
16379 \end_layout
16380
16381 \begin_layout Standard
16382 If, on the other hand, you don't want to enter any descriptive text, you'll
16383  hit another LyX quirk.
16384  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16385  environment until you put something in the old one.
16386  So, do this:
16387 \end_layout
16388
16389 \begin_layout Itemize
16390 Start entering the text that will 
16391 \emph on
16392 follow
16393 \emph default
16394  the new 
16395 \family sans
16396 Slide
16397 \family default
16398
16399 \family sans
16400 Overlay
16401 \family default
16402
16403 \family sans
16404 Note
16405 \family default
16406
16407 \family sans
16408 InvisibleText
16409 \family default
16410  or 
16411 \family sans
16412 VisibleText
16413 \family default
16414 .
16415  
16416 \end_layout
16417
16418 \begin_layout Itemize
16419 Now move to the beginning of that paragraph.
16420  
16421 \end_layout
16422
16423 \begin_layout Itemize
16424 Next, hit 
16425 \family sans
16426 Return
16427 \family default
16428 .
16429  
16430 \end_layout
16431
16432 \begin_layout Itemize
16433 Finally, change this new, empty paragraph to a 
16434 \family sans
16435 Slide
16436 \family default
16437
16438 \family sans
16439 Overlay
16440 \family default
16441
16442 \family sans
16443 Note
16444 \family default
16445
16446 \family sans
16447 InvisibleText
16448 \family default
16449  or 
16450 \family sans
16451 VisibleText
16452 \family default
16453 .
16454  
16455 \end_layout
16456
16457 \begin_layout Standard
16458 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16459
16460 \end_layout
16461
16462 \begin_layout Subsection
16463 Making a Presentation with 
16464 \family sans
16465 Slide
16466 \family default
16467
16468 \family sans
16469 Overlay
16470 \family default
16471  and 
16472 \family sans
16473 Note
16474 \end_layout
16475
16476 \begin_layout Subsubsection
16477 Using the 
16478 \family sans
16479 Slide
16480 \family default
16481  Environment
16482 \end_layout
16483
16484 \begin_layout Standard
16485 If you're expecting this section to teach you how to actually make a presentatio
16486 n, you'll be sorely disappointed.
16487  Naturally, I'll describe all of the ways the 
16488 \family sans
16489 slides
16490 \family default
16491  class can assist you in preparing the materials for a presentation.
16492  Filling in the contents, however, is up to you.
16493  [Then again, that 
16494 \emph on
16495 is
16496 \emph default
16497  the LyX philosophy.]
16498 \end_layout
16499
16500 \begin_layout Standard
16501 Choosing the 
16502 \family sans
16503 Slide
16504 \family default
16505  environment [in the manner described in section
16506 \begin_inset space ~
16507 \end_inset
16508
16509
16510 \begin_inset CommandInset ref
16511 LatexCommand ref
16512 reference "sec:slideQuirk"
16513
16514 \end_inset
16515
16516 ] tells LyX to begin a new slide [duh].
16517  The label for this environment/
16518 \begin_inset Quotes erd
16519 \end_inset
16520
16521 pseudo-command
16522 \begin_inset Quotes erd
16523 \end_inset
16524
16525  is an 
16526 \begin_inset Quotes eld
16527 \end_inset
16528
16529 ASCII line,
16530 \begin_inset Quotes erd
16531 \end_inset
16532
16533  in cool blue, followed by the label, 
16534 \begin_inset Quotes eld
16535 \end_inset
16536
16537 NewSlide:
16538 \begin_inset Quotes erd
16539 \end_inset
16540
16541 .
16542  Any text or paragraph environments that follow this one go on the new slide.
16543  It's that simple.
16544 \end_layout
16545
16546 \begin_layout Standard
16547 Slides are probably the only time you'll need to forcibly end pages in LyX
16548  (this can be specified in the 
16549 \family sans
16550 Paragraph Layout
16551 \family default
16552  dialog).
16553  In fact, you'll want to, once you finish entering the contents of one slide.
16554  If you've entered more text than can physically fit on a slide, the extra
16555  overflows onto a new slide.
16556  I don't recommend doing this, however, since the overflow slide won't have
16557  any page number on it.
16558  Furthermore, it may interfere with any 
16559 \family sans
16560 Overlay
16561 \family default
16562  you've made to accompany the oversized 
16563 \family sans
16564 Slide
16565 \family default
16566 .
16567 \end_layout
16568
16569 \begin_layout Standard
16570 The 
16571 \family sans
16572 Overlay
16573 \family default
16574  and 
16575 \family sans
16576 Note
16577 \family default
16578  environments work the same way as the 
16579 \family sans
16580 Slide
16581 \family default
16582  environment.
16583  They both create an 
16584 \begin_inset Quotes eld
16585 \end_inset
16586
16587 ASCII line
16588 \begin_inset Quotes erd
16589 \end_inset
16590
16591  followed by a label [
16592 \begin_inset Quotes eld
16593 \end_inset
16594
16595 NewOverlay:
16596 \begin_inset Quotes erd
16597 \end_inset
16598
16599  and 
16600 \begin_inset Quotes eld
16601 \end_inset
16602
16603 NewNote:
16604 \begin_inset Quotes erd
16605 \end_inset
16606
16607 , respectively].
16608  The color is a stunning magenta instead of blue, and the 
16609 \begin_inset Quotes eld
16610 \end_inset
16611
16612 ASCII line
16613 \begin_inset Quotes erd
16614 \end_inset
16615
16616  will look different, in style and in length.
16617  The label fonts of all three also differ from one another.
16618 \end_layout
16619
16620 \begin_layout Standard
16621 As with a 
16622 \family sans
16623 Slide
16624 \family default
16625 , if the contents of a 
16626 \family sans
16627 Note
16628 \family default
16629  or 
16630 \family sans
16631 Overlay
16632 \family default
16633  exceed the physical size of a slide or sheet of paper, the extra will overflow
16634  onto a new sheet.
16635  Again, you should avoid this.
16636  It defeats the whole purpose of 
16637 \family sans
16638 Note
16639 \family default
16640 s and 
16641 \family sans
16642 Overlay
16643 \family default
16644 s.
16645 \end_layout
16646
16647 \begin_layout Subsubsection
16648 Using 
16649 \family sans
16650 Overlay
16651 \family default
16652  with 
16653 \family sans
16654 Slide
16655 \end_layout
16656
16657 \begin_layout Standard
16658 The idea behind an 
16659 \family sans
16660 Overlay
16661 \family default
16662  is a slide that sits atop another slide.
16663  Perhaps you wish to discuss a figure on the main 
16664 \family sans
16665 Slide
16666 \family default
16667  before displaying the text associated with it.
16668  One way to accomplish this is tape a flap of dark paper over the part of
16669  the 
16670 \family sans
16671 Slide
16672 \family default
16673  you want to display later.
16674  This method fails, however, if you wish to overlap one graph with another,
16675  for example.
16676  You would then have to fumble while speaking to align the two separate,
16677  overlapping 
16678 \family sans
16679 Slide
16680 \family default
16681 s to align the two graphs.
16682  The use of an 
16683 \family sans
16684 Overlay
16685 \family default
16686  environment in both cases makes life much easier.
16687 \end_layout
16688
16689 \begin_layout Standard
16690 Each 
16691 \family sans
16692 Overlay
16693 \family default
16694  receives the page number of its 
16695 \begin_inset Quotes eld
16696 \end_inset
16697
16698 parent
16699 \begin_inset Quotes erd
16700 \end_inset
16701
16702  
16703 \family sans
16704 Slide
16705 \family default
16706 , appended by 
16707 \begin_inset Quotes eld
16708 \end_inset
16709
16710
16711 \family typewriter
16712 -a
16713 \family default
16714
16715 \begin_inset Quotes erd
16716 \end_inset
16717
16718 .
16719 \begin_inset Foot
16720 status collapsed
16721
16722 \begin_layout Plain Layout
16723 Presumably, mutliple 
16724 \family sans
16725 Overlay
16726 \family default
16727 s would have 
16728 \begin_inset Quotes eld
16729 \end_inset
16730
16731
16732 \family typewriter
16733 -a
16734 \family default
16735
16736 \begin_inset Quotes erd
16737 \end_inset
16738
16739
16740 \begin_inset Quotes eld
16741 \end_inset
16742
16743
16744 \family typewriter
16745 -b
16746 \family default
16747
16748 \begin_inset Quotes erd
16749 \end_inset
16750
16751
16752 \begin_inset Quotes eld
16753 \end_inset
16754
16755
16756 \family typewriter
16757 -c
16758 \family default
16759
16760 \begin_inset Quotes erd
16761 \end_inset
16762
16763 , etc.
16764 \begin_inset space ~
16765 \end_inset
16766
16767 appended to the page number of the parent 
16768 \family sans
16769 Slide
16770 \family default
16771 .
16772  
16773 \end_layout
16774
16775 \end_inset
16776
16777  Clearly, you want the contents of both the 
16778 \family sans
16779 Slide
16780 \family default
16781  and the 
16782 \family sans
16783 Overlay
16784 \family default
16785  to each fit on a single physical slide! You should probably consider an
16786  
16787 \family sans
16788 Overlay
16789 \family default
16790  as 
16791 \begin_inset Quotes eld
16792 \end_inset
16793
16794 part of
16795 \begin_inset Quotes erd
16796 \end_inset
16797
16798  a 
16799 \family sans
16800 Slide
16801 \family default
16802 .
16803  Indeed, the LyX 
16804 \family sans
16805 slides
16806 \family default
16807  class provides a visual cue for this: the label at the start of an 
16808 \family sans
16809 Overlay
16810 \family default
16811  is shorter than that at the start of a 
16812 \family sans
16813 Slide
16814 \family default
16815 .
16816  Lastly, when you generate printable output, you'll find alignment markers
16817  in all four corners of both the 
16818 \family sans
16819 Overlay
16820 \family default
16821  page and its parent 
16822 \family sans
16823 Slide
16824 \family default
16825 .
16826  These will assist you in lining up the two physical slides.
16827 \end_layout
16828
16829 \begin_layout Standard
16830 The major problem in overlaying two slides is aligning the contents of the
16831  two transparencies.
16832  How much space should you leave for that graph on the second slide? Worse
16833  still, what if you want a graph and a sentence on second slide, but there
16834  is text on the main transparency that goes in between them? You could try
16835  and insert vertical space of the right size.
16836  The better way is to use 
16837 \family sans
16838 InvisibleText
16839 \family default
16840  and 
16841 \family sans
16842 VisibleText
16843 \family default
16844 .
16845 \end_layout
16846
16847 \begin_layout Standard
16848 As their names imply, 
16849 \family sans
16850 InvisibleText
16851 \family default
16852  and 
16853 \family sans
16854 VisibleText
16855 \family default
16856  are two command-like paragraph environments that make all subsequent text
16857  invisible and visible, respectively.
16858  Note from section
16859 \begin_inset space ~
16860 \end_inset
16861
16862
16863 \begin_inset CommandInset ref
16864 LatexCommand ref
16865 reference "sec:slideQuirk"
16866
16867 \end_inset
16868
16869  that you don't place anything 
16870 \emph on
16871 into
16872 \emph default
16873  these two environments, however.
16874  When you create an 
16875 \family sans
16876 InvisibleText
16877 \family default
16878 , it inserts a centered, sky-blue label into the page reading 
16879 \begin_inset Quotes eld
16880 \end_inset
16881
16882 <Invisible Text Follows>
16883 \begin_inset Quotes erd
16884 \end_inset
16885
16886 .
16887  For paragraphs following this label, the parts of the 
16888 \family sans
16889 Slide
16890 \family default
16891  [or 
16892 \family sans
16893 Overlay
16894 \family default
16895 ; it doesn't matter which] where they would be contain instead blank space.
16896  
16897 \end_layout
16898
16899 \begin_layout Standard
16900 For 
16901 \family sans
16902 VisibleText
16903 \family default
16904 , the corresponding centered label is 
16905 \begin_inset Quotes eld
16906 \end_inset
16907
16908 <Visible Text Follows>
16909 \begin_inset Quotes erd
16910 \end_inset
16911
16912  in blazing green.
16913  Paragraphs following this label behave normally.
16914  Note that the beginning of a new 
16915 \family sans
16916 Slide
16917 \family default
16918
16919 \family sans
16920 Overlay
16921 \family default
16922 , or 
16923 \family sans
16924 Note
16925 \family default
16926  automatically shuts off an 
16927 \family sans
16928 InvisibleText
16929 \family default
16930 .
16931  It's therefore not necessary to use 
16932 \family sans
16933 VisibleText
16934 \family default
16935  at the end of a 
16936 \family sans
16937 Slide
16938 \family default
16939 .
16940 \end_layout
16941
16942 \begin_layout Standard
16943 By now, it should be obvious how to create overlay transparencies using
16944  the proper combination of 
16945 \family sans
16946 InvisibleText
16947 \family default
16948  and 
16949 \family sans
16950 VisibleText
16951 \family default
16952  on a 
16953 \family sans
16954 Slide
16955 \family default
16956  and 
16957 \family sans
16958 Overlay
16959 \family default
16960 :
16961 \end_layout
16962
16963 \begin_layout Enumerate
16964 Create a 
16965 \family sans
16966 Slide
16967 \family default
16968 , including everything that will appear on it, whether on the main slide
16969  or on the 
16970 \family sans
16971 Overlay
16972 \family default
16973 .
16974 \end_layout
16975
16976 \begin_layout Enumerate
16977 Before each figure or paragraph that will appear only on the 
16978 \family sans
16979 Overlay
16980 \family default
16981 , insert an 
16982 \family sans
16983 InvisibleText
16984 \family default
16985  environment.
16986  If necessary, insert a 
16987 \family sans
16988 VisibleText
16989 \family default
16990  environment after the 
16991 \family sans
16992 Overlay
16993 \family default
16994 -only text.
16995 \end_layout
16996
16997 \begin_layout Enumerate
16998 Start an 
16999 \family sans
17000 Overlay
17001 \family default
17002  immediately following the 
17003 \family sans
17004 Slide
17005 \family default
17006 .
17007 \end_layout
17008
17009 \begin_layout Enumerate
17010 Copy the contents of this 
17011 \family sans
17012 Slide
17013 \family default
17014  into the 
17015 \family sans
17016 Overlay
17017 \family default
17018 .
17019 \end_layout
17020
17021 \begin_layout Enumerate
17022 Within the 
17023 \family sans
17024 Overlay
17025 \family default
17026 , change all of the 
17027 \family sans
17028 InvisibleText
17029 \family default
17030  lines to 
17031 \family sans
17032 VisibleText
17033 \family default
17034  and vice-versa.
17035 \end_layout
17036
17037 \begin_layout Standard
17038 That's it.
17039  You've just made an 
17040 \family sans
17041 Overlay
17042 \family default
17043 .
17044 \end_layout
17045
17046 \begin_layout Standard
17047 There's one problem with the way I've designed the LyX 
17048 \family sans
17049 slides
17050 \family default
17051  class: you can't make text in the middle of a paragraph invisible, nor
17052  make text in the middle of an invisible paragraph visible again.
17053  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17054 \begin_inset Foot
17055 status collapsed
17056
17057 \begin_layout Plain Layout
17058 The commands of interest are: 
17059 \end_layout
17060
17061 \begin_layout Itemize
17062
17063 \family typewriter
17064 {
17065 \backslash
17066 invisible \SpecialChar \ldots{}
17067  }
17068 \end_layout
17069
17070 \begin_layout Itemize
17071
17072 \family typewriter
17073 {
17074 \backslash
17075 visible \SpecialChar \ldots{}
17076  }
17077 \end_layout
17078
17079 \begin_layout Plain Layout
17080 \SpecialChar \ldots{}
17081 and need to be marked as TeX.
17082  The text whose 
17083 \begin_inset Quotes eld
17084 \end_inset
17085
17086 visibility
17087 \begin_inset Quotes erd
17088 \end_inset
17089
17090  you wish to change goes in between the brackets [and after the 
17091 \family typewriter
17092
17093 \backslash
17094 invisible
17095 \family default
17096  or 
17097 \family typewriter
17098
17099 \backslash
17100 visible
17101 \family default
17102  command].
17103  If you don't know how to mark text as TeX, see the appropriate section
17104  of the 
17105 \emph on
17106 User's Guide
17107 \emph default
17108 .
17109 \end_layout
17110
17111 \end_inset
17112
17113
17114 \end_layout
17115
17116 \begin_layout Subsubsection
17117 Using 
17118 \family sans
17119 Note
17120 \family default
17121  with 
17122 \family sans
17123 Slide
17124 \family default
17125
17126 \begin_inset CommandInset label
17127 LatexCommand label
17128 name "sec:slideNote"
17129
17130 \end_inset
17131
17132
17133 \end_layout
17134
17135 \begin_layout Standard
17136 Like an 
17137 \family sans
17138 Overlay
17139 \family default
17140 , a 
17141 \family sans
17142 Note
17143 \family default
17144  is associated with a 
17145 \begin_inset Quotes eld
17146 \end_inset
17147
17148 parent
17149 \begin_inset Quotes erd
17150 \end_inset
17151
17152  
17153 \family sans
17154 Slide
17155 \family default
17156 .
17157  Here, too, the LyX 
17158 \family sans
17159 slides
17160 \family default
17161  class provides visual cues.
17162  The label for a 
17163 \family sans
17164 Note
17165 \family default
17166  is shorter than that of a 
17167 \family sans
17168 Slide
17169 \family default
17170  [yet longer than that of an 
17171 \family sans
17172 Overlay
17173 \family default
17174 ] and, like the label of an 
17175 \family sans
17176 Overlay
17177 \family default
17178  is shockingly magenta.
17179  Additionally, the printed 
17180 \family sans
17181 Note
17182 \family default
17183  has the page number of its 
17184 \begin_inset Quotes eld
17185 \end_inset
17186
17187 parent
17188 \begin_inset Quotes erd
17189 \end_inset
17190
17191  
17192 \family sans
17193 Slide
17194 \family default
17195 , appended by 
17196 \begin_inset Quotes eld
17197 \end_inset
17198
17199
17200 \family typewriter
17201 -
17202 \family default
17203 1
17204 \begin_inset Quotes erd
17205 \end_inset
17206
17207
17208 \begin_inset Quotes eld
17209 \end_inset
17210
17211
17212 \family typewriter
17213 -
17214 \family default
17215 2
17216 \begin_inset Quotes erd
17217 \end_inset
17218
17219
17220 \begin_inset Quotes eld
17221 \end_inset
17222
17223
17224 \family typewriter
17225 -
17226 \family default
17227 3
17228 \begin_inset Quotes erd
17229 \end_inset
17230
17231 , etc.
17232  You can have multiple 
17233 \family sans
17234 Note
17235 \family default
17236 s associated with a single 
17237 \family sans
17238 Slide
17239 \family default
17240 , and, as with 
17241 \family sans
17242 Slide
17243 \family default
17244  and 
17245 \family sans
17246 Overlay
17247 \family default
17248 , you'll probably want to break up long 
17249 \family sans
17250 Note
17251 \family default
17252 s so that they fit on a single sheet of paper.
17253 \end_layout
17254
17255 \begin_layout Standard
17256 The purpose of a 
17257 \family sans
17258 Note
17259 \family default
17260  is obvious: it contains anything additional you might want to say about
17261  a 
17262 \family sans
17263 Slide
17264 \family default
17265 .
17266  It could also be used as a sheet of reminders for a particular 
17267 \family sans
17268 Slide
17269 \family default
17270 .
17271  In the case of the latter, you might want to make use of time markers.
17272  Currently, the LyX 
17273 \family sans
17274 slides
17275 \family default
17276  class has no 
17277 \begin_inset Quotes eld
17278 \end_inset
17279
17280 native
17281 \begin_inset Quotes erd
17282 \end_inset
17283
17284  support for time markers, a 
17285 \noun on
17286 SliTeX
17287 \noun default
17288  feature.
17289  So, you'll have to resort to using the LaTeX codes.
17290 \end_layout
17291
17292 \begin_layout Standard
17293 To use time markers, you'll need to specify the extra class option 
17294 \begin_inset Quotes eld
17295 \end_inset
17296
17297
17298 \family typewriter
17299 clock
17300 \family default
17301
17302 \begin_inset Quotes erd
17303 \end_inset
17304
17305  [see section
17306 \begin_inset space ~
17307 \end_inset
17308
17309
17310 \begin_inset CommandInset ref
17311 LatexCommand ref
17312 reference "sec:slidesetup"
17313
17314 \end_inset
17315
17316 ].
17317  This option turns on timing marks, which will appear in the lower-left-hand
17318  corner of every 
17319 \family sans
17320 Note
17321 \family default
17322  you generate.
17323  To set what appears in the time marker, you use the LaTeX commands 
17324 \begin_inset Quotes eld
17325 \end_inset
17326
17327
17328 \family typewriter
17329
17330 \backslash
17331 settime{}
17332 \family default
17333
17334 \begin_inset Quotes erd
17335 \end_inset
17336
17337  and 
17338 \begin_inset Quotes eld
17339 \end_inset
17340
17341
17342 \family typewriter
17343
17344 \backslash
17345 addtime{}
17346 \family default
17347
17348 \begin_inset Quotes erd
17349 \end_inset
17350
17351 .
17352  The arguments of both commands are time measured in seconds.
17353  
17354 \begin_inset Quotes eld
17355 \end_inset
17356
17357
17358 \family typewriter
17359
17360 \backslash
17361 settime{}
17362 \family default
17363
17364 \begin_inset Quotes erd
17365 \end_inset
17366
17367  sets the time marker to a given time.
17368  
17369 \begin_inset Quotes eld
17370 \end_inset
17371
17372
17373 \family typewriter
17374
17375 \backslash
17376 addtime{}
17377 \family default
17378
17379 \begin_inset Quotes erd
17380 \end_inset
17381
17382  increments the time marker by the specified amount.
17383  Using time markers and 
17384 \family sans
17385 Note
17386 \family default
17387 s in this fashion, you can remind yourself how much time to spend on a particula
17388
17389 \family sans
17390 Slide
17391 \family default
17392 .
17393 \end_layout
17394
17395 \begin_layout Standard
17396 There's one last feature to describe.
17397  Clearly, you'd like to print out all of your 
17398 \family sans
17399 Slide
17400 \family default
17401 s and 
17402 \family sans
17403 Overlay
17404 \family default
17405 s on transparencies while printing all of your 
17406 \family sans
17407 Note
17408 \family default
17409 s on plain paper.
17410  However, a 
17411 \family sans
17412 Note
17413 \family default
17414  
17415 \emph on
17416 must
17417 \emph default
17418  follow the 
17419 \family sans
17420 Slide
17421 \family default
17422  with which it is associated.
17423  What's a person to do?
17424 \end_layout
17425
17426 \begin_layout Standard
17427 Luckily, there are two LaTeX commands that allow you to select what to print
17428  out.
17429  Both must be placed into the preamble of your document.
17430  The command 
17431 \begin_inset Quotes eld
17432 \end_inset
17433
17434
17435 \family typewriter
17436
17437 \backslash
17438 onlyslides{
17439 \backslash
17440 slides}
17441 \family default
17442
17443 \begin_inset Quotes erd
17444 \end_inset
17445
17446  will cause the output to contain only the 
17447 \family sans
17448 Slide
17449 \family default
17450 s and 
17451 \family sans
17452 Overlay
17453 \family default
17454 s.
17455  Correspondingly, the command 
17456 \begin_inset Quotes eld
17457 \end_inset
17458
17459
17460 \family typewriter
17461
17462 \backslash
17463 onlynotes{
17464 \backslash
17465 notes}
17466 \family default
17467
17468 \begin_inset Quotes erd
17469 \end_inset
17470
17471  prevents the output of anything but 
17472 \family sans
17473 Note
17474 \family default
17475 s.
17476  I'd advise placing both commands in the preamble and initially comment
17477  both out.
17478  You can then preview your entire presentation as you write.
17479  When you're done writing, you can then uncomment one of the two to select
17480  what you want to print.
17481  I like to uncomment 
17482 \begin_inset Quotes eld
17483 \end_inset
17484
17485
17486 \family typewriter
17487
17488 \backslash
17489 onlyslides{
17490 \backslash
17491 slides}
17492 \family default
17493
17494 \begin_inset Quotes erd
17495 \end_inset
17496
17497  , print to a file with 
17498 \begin_inset Quotes eld
17499 \end_inset
17500
17501
17502 \family typewriter
17503 -slides
17504 \family default
17505
17506 \begin_inset Quotes erd
17507 \end_inset
17508
17509  in its name, comment it back out, then uncomment 
17510 \begin_inset Quotes eld
17511 \end_inset
17512
17513
17514 \family typewriter
17515
17516 \backslash
17517 onlynotes{
17518 \backslash
17519 notes}
17520 \family default
17521
17522 \begin_inset Quotes erd
17523 \end_inset
17524
17525  and print to a 
17526 \begin_inset Quotes eld
17527 \end_inset
17528
17529
17530 \family typewriter
17531 *-notes.ps
17532 \family default
17533
17534 \begin_inset Quotes erd
17535 \end_inset
17536
17537  file.
17538  I can then send either file to a printer, loading transparencies or plain
17539  paper as appropriate.
17540 \end_layout
17541
17542 \begin_layout Standard
17543 You can also provide other arguments to the 
17544 \begin_inset Quotes eld
17545 \end_inset
17546
17547
17548 \family typewriter
17549
17550 \backslash
17551 onlyslides{}
17552 \family default
17553
17554 \begin_inset Quotes erd
17555 \end_inset
17556
17557  and 
17558 \begin_inset Quotes eld
17559 \end_inset
17560
17561
17562 \family typewriter
17563
17564 \backslash
17565 onlynotes{}
17566 \family default
17567
17568 \begin_inset Quotes erd
17569 \end_inset
17570
17571  commands.
17572  See a good LaTeX book for details.
17573 \end_layout
17574
17575 \begin_layout Subsection
17576 The 
17577 \family sans
17578 slides
17579 \family default
17580  Class Template File
17581 \end_layout
17582
17583 \begin_layout Standard
17584 I have also provided a template file, 
17585 \begin_inset Quotes eld
17586 \end_inset
17587
17588
17589 \family typewriter
17590 slides.lyx
17591 \family default
17592
17593 \begin_inset Quotes erd
17594 \end_inset
17595
17596 , with the 
17597 \family sans
17598 slides
17599 \family default
17600  class.
17601  To use it, begin your new presentation with 
17602 \family sans
17603 \bar under
17604 F
17605 \bar default
17606 ile\SpecialChar \menuseparator
17607 New
17608 \begin_inset space ~
17609 \end_inset
17610
17611 from
17612 \begin_inset space ~
17613 \end_inset
17614
17615
17616 \bar under
17617 T
17618 \bar default
17619 emplate
17620 \family default
17621 .
17622  Your new LyX presentation file will contain an example 
17623 \family sans
17624 Slide
17625 \family default
17626  – 
17627 \family sans
17628 Overlay
17629 \family default
17630  – 
17631 \family sans
17632 Note
17633 \family default
17634  triplet.
17635  The 
17636 \family sans
17637 Slide
17638 \family default
17639  and 
17640 \family sans
17641 Overlay
17642 \family default
17643  additionally contain an example of the use of 
17644 \family sans
17645 InvisibleText
17646 \family default
17647  and 
17648 \family sans
17649 VisibleText
17650 \family default
17651 .
17652  Lastly, the preamble will contain:
17653 \end_layout
17654
17655 \begin_layout LyX-Code
17656 % Uncomment to print out only slides and overlays
17657 \end_layout
17658
17659 \begin_layout LyX-Code
17660 %
17661 \end_layout
17662
17663 \begin_layout LyX-Code
17664 %
17665 \backslash
17666 onlyslides{
17667 \backslash
17668 slides}
17669 \begin_inset Newline newline
17670 \end_inset
17671
17672  
17673 \end_layout
17674
17675 \begin_layout LyX-Code
17676 % Uncomment to print out only notes
17677 \end_layout
17678
17679 \begin_layout LyX-Code
17680 %
17681 \end_layout
17682
17683 \begin_layout LyX-Code
17684 %
17685 \backslash
17686 onlynotes{
17687 \backslash
17688 notes}
17689 \end_layout
17690
17691 \begin_layout Standard
17692 One final thing: I created this class to support the LaTeX2e 
17693 \begin_inset Quotes eld
17694 \end_inset
17695
17696
17697 \noun on
17698 SliTeX
17699 \noun default
17700  emulation
17701 \begin_inset Quotes erd
17702 \end_inset
17703
17704  class, one of the built-in LaTeX2e classes.
17705  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17706  built-in slide class.
17707  It's here if you want it or need it.
17708  There exist other LaTeX2e classes for creating presentations, such as the
17709  
17710 \family sans
17711 Foils
17712 \family default
17713  class [see section
17714 \begin_inset space ~
17715 \end_inset
17716
17717
17718 \begin_inset CommandInset ref
17719 LatexCommand ref
17720 reference "sec:foiltex"
17721
17722 \end_inset
17723
17724 ] or the 
17725 \begin_inset Quotes eld
17726 \end_inset
17727
17728
17729 \family typewriter
17730 seminar
17731 \family default
17732
17733 \begin_inset Quotes erd
17734 \end_inset
17735
17736  package [present on some TeX distributions].
17737  The latter is not yet supported under LyX.
17738 \begin_inset Foot
17739 status collapsed
17740
17741 \begin_layout Plain Layout
17742 Perhaps you can take on the task\SpecialChar \ldots{}
17743
17744 \end_layout
17745
17746 \end_inset
17747
17748  I know nothing about these other classes.
17749  Try them out to see what sort of alternative they provide.
17750 \end_layout
17751
17752 \begin_layout Chapter
17753 LyX Features needing Extra Software
17754 \end_layout
17755
17756 \begin_layout Section
17757 Checking TeX
17758 \end_layout
17759
17760 \begin_layout Standard
17761 by 
17762 \noun on
17763 Asger Alstrup
17764 \end_layout
17765
17766 \begin_layout Subsection
17767 Introduction
17768 \end_layout
17769
17770 \begin_layout Standard
17771 If you have the 
17772 \family typewriter
17773 chktex
17774 \family default
17775  program installed
17776 \begin_inset Foot
17777 status collapsed
17778
17779 \begin_layout Plain Layout
17780
17781 \family typewriter
17782 chktex
17783 \family default
17784  is not yet available when you are using the LaTeX distribution MiKTeX.
17785 \end_layout
17786
17787 \end_inset
17788
17789 , you'll find in the 
17790 \family sans
17791 Tools
17792 \family default
17793  menu the entry: 
17794 \family sans
17795 Check
17796 \begin_inset space ~
17797 \end_inset
17798
17799 TeX
17800 \family default
17801 .
17802  You can get 
17803 \family typewriter
17804 chktex
17805 \family default
17806  it from CTAN, 
17807 \begin_inset CommandInset href
17808 LatexCommand href
17809 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17810
17811 \end_inset
17812
17813 .
17814 \end_layout
17815
17816 \begin_layout Standard
17817 The 
17818 \family sans
17819 ChkTeX
17820 \family default
17821  package is a program that was written by 
17822 \begin_inset Flex Noun
17823 status collapsed
17824
17825 \begin_layout Plain Layout
17826 Jens T.
17827 \begin_inset space ~
17828 \end_inset
17829
17830 Berger Thielemann
17831 \end_layout
17832
17833 \end_inset
17834
17835  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17836  and easy to forget.
17837  The program runs over your LaTeX file, checks the integrity of the file,
17838  and flags some common errors.
17839  In other technical words, it is 
17840 \family typewriter
17841 lint
17842 \family default
17843  for LaTeX.
17844 \end_layout
17845
17846 \begin_layout Standard
17847 Well, what is a syntax checker doing in LyX which is supposed to produce
17848  correct LaTeX anyways? The answer is simple: Just as 
17849 \family typewriter
17850 Lint
17851 \family default
17852  not only checks the 
17853 \emph on
17854 syntax
17855 \emph default
17856  of C programs, but also does 
17857 \emph on
17858 semantic
17859 \emph default
17860  checks for type-errors, 
17861 \family sans
17862 ChkTeX
17863 \family default
17864  catches some common 
17865 \emph on
17866 typographic
17867 \emph default
17868  errors, in addition to the syntactical ones.
17869  Specifically, 
17870 \family sans
17871 ChkTeX
17872 \family default
17873  is capable of detecting several common errors, such as
17874 \end_layout
17875
17876 \begin_layout Itemize
17877 Ellipsis detection:
17878 \begin_inset Newline newline
17879 \end_inset
17880
17881 Use \SpecialChar \ldots{}
17882  instead of ...
17883 \end_layout
17884
17885 \begin_layout Itemize
17886 No space in front of/after parenthesis:
17887 \begin_inset Newline newline
17888 \end_inset
17889
17890 ( wrong spacing )
17891 \end_layout
17892
17893 \begin_layout Itemize
17894 Enforcement of normal space after common abbreviations:
17895 \begin_inset Newline newline
17896 \end_inset
17897
17898 e.
17899 \begin_inset space \thinspace{}
17900 \end_inset
17901
17902 g.
17903 \begin_inset space \space{}
17904 \end_inset
17905
17906 is too wide spacing.
17907 \end_layout
17908
17909 \begin_layout Itemize
17910 Enforcement of end-of-sentence space when the last sentence ends with a
17911  capital letter:
17912 \begin_inset Newline newline
17913 \end_inset
17914
17915 This is a TEST.
17916  And this is wrong spacing.
17917 \end_layout
17918
17919 \begin_layout Itemize
17920 Space in front of labels and similar commands:
17921 \begin_inset Newline newline
17922 \end_inset
17923
17924 The label should stick right up to the text to avoid falling to a wrong
17925  page.
17926  
17927 \begin_inset CommandInset label
17928 LatexCommand label
17929 name "sec:chktex"
17930
17931 \end_inset
17932
17933  
17934 \begin_inset Foot
17935 status collapsed
17936
17937 \begin_layout Plain Layout
17938 This footnote is in danger of falling off to a wrong page
17939 \end_layout
17940
17941 \end_inset
17942
17943  The label is separated too much.
17944 \end_layout
17945
17946 \begin_layout Itemize
17947 Space in front of references, instead of hard spaces:
17948 \begin_inset Newline newline
17949 \end_inset
17950
17951 In you are in bad luck, the text will break right between the referenced
17952  text and reference number, and that's a pity.
17953  See section 
17954 \begin_inset CommandInset ref
17955 LatexCommand ref
17956 reference "sec:chktex"
17957
17958 \end_inset
17959
17960 .
17961 \end_layout
17962
17963 \begin_layout Itemize
17964 Use of 
17965 \begin_inset Quotes eld
17966 \end_inset
17967
17968 x
17969 \begin_inset Quotes erd
17970 \end_inset
17971
17972  instead of 
17973 \begin_inset Formula $\times$
17974 \end_inset
17975
17976  between numbers:
17977 \begin_inset Newline newline
17978 \end_inset
17979
17980 2x2 looks cheap compared to 
17981 \begin_inset Formula $2\times2$
17982 \end_inset
17983
17984 .
17985 \end_layout
17986
17987 \begin_layout Standard
17988 and more \SpecialChar \ldots{}
17989  It is an invaluable tool when you are 
17990 \begin_inset Quotes eld
17991 \end_inset
17992
17993 finishing up
17994 \begin_inset Quotes erd
17995 \end_inset
17996
17997  your document before printing, and you should run it right after the obligatory
17998  spelling check, and before you go fine tuning the typesetting.
17999 \end_layout
18000
18001 \begin_layout Subsection
18002 How to use it
18003 \end_layout
18004
18005 \begin_layout Standard
18006 If you have the program installed, usage is as simple as choosing 
18007 \family sans
18008 Tools\SpecialChar \menuseparator
18009 Check
18010 \begin_inset space ~
18011 \end_inset
18012
18013 TeX
18014 \family default
18015 .
18016  This will make LyX generate a LaTeX file of your document, start 
18017 \family sans
18018 ChkTeX
18019 \family default
18020  to check it, and then make LyX insert 
18021 \begin_inset Quotes eld
18022 \end_inset
18023
18024 error boxes
18025 \begin_inset Quotes erd
18026 \end_inset
18027
18028  with the warnings from 
18029 \family sans
18030 ChkTeX
18031 \family default
18032 , if there were any.
18033  The warnings will be placed close to the point of the mistake, and you
18034  can quickly find them by using the 
18035 \family sans
18036 Navigate\SpecialChar \menuseparator
18037 Error
18038 \family default
18039  menu item, or the shortcut key 
18040 \family sans
18041 C-g
18042 \family default
18043  from the default 
18044 \family typewriter
18045 cua
18046 \family default
18047  bind file.
18048  Open the error boxes by clicking on them with the mouse, or use the shortcut
18049  key 
18050 \family sans
18051 C-i
18052 \family default
18053  from 
18054 \family typewriter
18055 cua
18056 \family default
18057  bindings, or the corresponding 
18058 \family sans
18059 C-o
18060 \family default
18061  for the alternate 
18062 \family typewriter
18063 emacs
18064 \family default
18065  bind file.
18066  Read the warning and correct the mistake, if it is a mistake.
18067  If you have trouble understanding what the warning is about, you can safely
18068  ignore it.
18069  Remember that there is a hidden layer between the document on screen and
18070  the technical details in invoking 
18071 \family sans
18072 ChkTeX
18073 \family default
18074 , and this gap can make some warnings seem arcane or just right down plain
18075  silly.
18076 \end_layout
18077
18078 \begin_layout Standard
18079 This document is an excellent testing bed for the feature, and it should
18080  provide quite a few warnings for you to fiddle with.
18081  Since computers are only so smart, expect most of the warnings to be false
18082  alarms, though.
18083 \end_layout
18084
18085 \begin_layout Subsection
18086 How to fine tune it
18087 \end_layout
18088
18089 \begin_layout Standard
18090 Sometimes, you'll find that 
18091 \family sans
18092 ChkTeX
18093 \family default
18094  makes more noise than suits your mood.
18095  Then you can choose not to use it, wait until your mood changes, or try
18096  to customize 
18097 \family sans
18098 ChkTeX
18099 \family default
18100  to get better along with you.
18101 \end_layout
18102
18103 \begin_layout Standard
18104 Although 
18105 \family sans
18106 ChkTeX
18107 \family default
18108  
18109 \emph on
18110 is
18111 \emph default
18112  very configurable and extensible, you shouldn't expect to solve all problems
18113  with 
18114 \family sans
18115 ChkTeX
18116 \family default
18117  in LyX this way.
18118  Since LyX has to generate a somewhat special LaTeX file to be able to match
18119  the line numbers from the 
18120 \family sans
18121 ChkTeX
18122 \family default
18123  output
18124 \begin_inset Foot
18125 status collapsed
18126
18127 \begin_layout Plain Layout
18128 You can inspect the specific output from 
18129 \family sans
18130 chktex
18131 \family default
18132  by using 
18133 \family sans
18134 Edit\SpecialChar \menuseparator
18135 View
18136 \begin_inset space ~
18137 \end_inset
18138
18139 LaTeX
18140 \begin_inset space ~
18141 \end_inset
18142
18143 Log
18144 \family default
18145  right after a 
18146 \family sans
18147 chktex
18148 \family default
18149  run.
18150 \end_layout
18151
18152 \end_inset
18153
18154  to the internal document structure, some of the warnings will not seen
18155  to appear correctly.
18156  There are two things you can do about this:
18157 \end_layout
18158
18159 \begin_layout Itemize
18160 Fine tune the 
18161 \family sans
18162 ChkTeX
18163 \family default
18164  invocation command line in 
18165 \family sans
18166 Preferences
18167 \family default
18168  (tabs 
18169 \family sans
18170 Outputs
18171 \family default
18172
18173 \family sans
18174 Misc
18175 \family default
18176 ), or the global 
18177 \family sans
18178 ChkTeX
18179 \family default
18180  installation configuration file (usually with the file 
18181 \family typewriter
18182 chktexrc
18183 \family default
18184 ).
18185  See below to learn what warnings can be enabled and disabled on the command
18186  line.
18187  
18188 \end_layout
18189
18190 \begin_layout Itemize
18191 Export your document as a raw LaTeX file using 
18192 \family sans
18193 File\SpecialChar \menuseparator
18194 Export\SpecialChar \menuseparator
18195 LaTeX
18196 \family default
18197  and run 
18198 \family typewriter
18199 chktex
18200 \family default
18201  manually on that.
18202  Invoked in this way, it can be a hassle to find the corresponding place
18203  in the document inside LyX, but with a little patience, you should be able
18204  to do it.
18205 \end_layout
18206
18207 \begin_layout Standard
18208 Here follows the warning messages that can be enabled and disabled in 
18209 \family sans
18210 Preferences
18211 \family default
18212 .
18213  Use 
18214 \family typewriter
18215 -n#
18216 \family default
18217  to disable a warning, and 
18218 \family typewriter
18219 -w#
18220 \family default
18221  to enable a warning.
18222  The emphasized entries are disabled by default, because the default is
18223  "
18224 \family typewriter
18225 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18226 \family default
18227 ".
18228 \end_layout
18229
18230 \begin_layout Standard
18231 Notice that you should only use the options that enable and disable warnings,
18232  because LyX relies on some of the other command line parameters to be set
18233  in a specific way to have a chance to communicate with 
18234 \family typewriter
18235 chktex
18236 \family default
18237 .
18238 \end_layout
18239
18240 \begin_layout Enumerate
18241
18242 \size small
18243 \emph on
18244 Command terminated with space.
18245 \end_layout
18246
18247 \begin_layout Enumerate
18248
18249 \size small
18250 Non-breaking space (
18251 \begin_inset Quotes eld
18252 \end_inset
18253
18254
18255 \family typewriter
18256 ~
18257 \family default
18258
18259 \begin_inset Quotes erd
18260 \end_inset
18261
18262 ) should have been used.
18263 \end_layout
18264
18265 \begin_layout Enumerate
18266
18267 \size small
18268 \emph on
18269 You should enclose the previous parenthesis with 
18270 \begin_inset Quotes eld
18271 \end_inset
18272
18273
18274 \family typewriter
18275 {}
18276 \family default
18277
18278 \begin_inset Quotes erd
18279 \end_inset
18280
18281 .
18282 \end_layout
18283
18284 \begin_layout Enumerate
18285
18286 \size small
18287 Italic correction (
18288 \begin_inset Quotes eld
18289 \end_inset
18290
18291
18292 \family typewriter
18293
18294 \backslash
18295 /
18296 \family default
18297
18298 \begin_inset Quotes erd
18299 \end_inset
18300
18301 ) found in non-italic buffer.
18302 \end_layout
18303
18304 \begin_layout Enumerate
18305
18306 \size small
18307 Italic correction (
18308 \begin_inset Quotes eld
18309 \end_inset
18310
18311
18312 \family typewriter
18313
18314 \backslash
18315 /
18316 \family default
18317
18318 \begin_inset Quotes erd
18319 \end_inset
18320
18321 ) found more than once.
18322 \end_layout
18323
18324 \begin_layout Enumerate
18325
18326 \size small
18327 \emph on
18328 No italic correction (
18329 \begin_inset Quotes eld
18330 \end_inset
18331
18332
18333 \family typewriter
18334
18335 \backslash
18336 /
18337 \family default
18338
18339 \begin_inset Quotes erd
18340 \end_inset
18341
18342 ) found.
18343 \end_layout
18344
18345 \begin_layout Enumerate
18346
18347 \size small
18348 Accent command 
18349 \begin_inset Quotes eld
18350 \end_inset
18351
18352
18353 \family typewriter
18354 cmd
18355 \family default
18356
18357 \begin_inset Quotes erd
18358 \end_inset
18359
18360  needs use of 
18361 \begin_inset Quotes eld
18362 \end_inset
18363
18364
18365 \family typewriter
18366 cmd
18367 \family default
18368
18369 \begin_inset Quotes erd
18370 \end_inset
18371
18372 .
18373 \end_layout
18374
18375 \begin_layout Enumerate
18376
18377 \size small
18378 Wrong length of dash may have been used.
18379 \end_layout
18380
18381 \begin_layout Enumerate
18382
18383 \size small
18384 \emph on
18385 \begin_inset Quotes eld
18386 \end_inset
18387
18388
18389 \family typewriter
18390 %s
18391 \family default
18392
18393 \begin_inset Quotes erd
18394 \end_inset
18395
18396  expected, found 
18397 \begin_inset Quotes eld
18398 \end_inset
18399
18400
18401 \family typewriter
18402 %s
18403 \family default
18404
18405 \begin_inset Quotes erd
18406 \end_inset
18407
18408 .
18409 \end_layout
18410
18411 \begin_layout Enumerate
18412
18413 \size small
18414 Solo 
18415 \begin_inset Quotes eld
18416 \end_inset
18417
18418
18419 \family typewriter
18420 %s
18421 \family default
18422
18423 \begin_inset Quotes erd
18424 \end_inset
18425
18426  found.
18427 \end_layout
18428
18429 \begin_layout Enumerate
18430
18431 \size small
18432 You should use 
18433 \begin_inset Quotes eld
18434 \end_inset
18435
18436
18437 \family typewriter
18438 %s
18439 \family default
18440
18441 \begin_inset Quotes erd
18442 \end_inset
18443
18444  to achieve an ellipsis.
18445 \end_layout
18446
18447 \begin_layout Enumerate
18448
18449 \size small
18450 Inter-word spacing (
18451 \begin_inset Quotes eld
18452 \end_inset
18453
18454
18455 \family typewriter
18456
18457 \backslash
18458
18459 \family default
18460  
18461 \begin_inset Quotes eld
18462 \end_inset
18463
18464 ) should perhaps be used.
18465 \end_layout
18466
18467 \begin_layout Enumerate
18468
18469 \size small
18470 Inter-sentence spacing (
18471 \begin_inset Quotes eld
18472 \end_inset
18473
18474
18475 \family typewriter
18476
18477 \backslash
18478 @
18479 \family default
18480
18481 \begin_inset Quotes erd
18482 \end_inset
18483
18484 ) should perhaps be used.
18485 \end_layout
18486
18487 \begin_layout Enumerate
18488
18489 \size small
18490 Could not find argument for command.
18491 \end_layout
18492
18493 \begin_layout Enumerate
18494
18495 \size small
18496 No match found for 
18497 \begin_inset Quotes eld
18498 \end_inset
18499
18500
18501 \family typewriter
18502 %s
18503 \family default
18504
18505 \begin_inset Quotes erd
18506 \end_inset
18507
18508 .
18509 \end_layout
18510
18511 \begin_layout Enumerate
18512
18513 \size small
18514 Math mode still on at end of LaTeX file.
18515 \end_layout
18516
18517 \begin_layout Enumerate
18518
18519 \size small
18520 Number of 
18521 \begin_inset Quotes eld
18522 \end_inset
18523
18524
18525 \family typewriter
18526 char
18527 \family default
18528
18529 \begin_inset Quotes erd
18530 \end_inset
18531
18532  doesn't match the number of 
18533 \begin_inset Quotes eld
18534 \end_inset
18535
18536
18537 \family typewriter
18538 char
18539 \family default
18540
18541 \begin_inset Quotes erd
18542 \end_inset
18543
18544 .
18545 \end_layout
18546
18547 \begin_layout Enumerate
18548
18549 \size small
18550 You should use either 
18551 \family typewriter
18552
18553 \begin_inset Quotes eld
18554 \end_inset
18555
18556
18557 \family default
18558  or 
18559 \family typewriter
18560
18561 \begin_inset Quotes erd
18562 \end_inset
18563
18564
18565 \family default
18566  as an alternative to 
18567 \begin_inset Quotes eld
18568 \end_inset
18569
18570
18571 \family typewriter
18572 "
18573 \family default
18574
18575 \begin_inset Quotes erd
18576 \end_inset
18577
18578 .
18579 \end_layout
18580
18581 \begin_layout Enumerate
18582
18583 \size small
18584 You should use "
18585 \family typewriter
18586 '
18587 \family default
18588 " (ASCII 39) instead of "
18589 \family typewriter
18590 ´
18591 \family default
18592 " (ASCII 180).
18593 \end_layout
18594
18595 \begin_layout Enumerate
18596
18597 \size small
18598 User-specified pattern found.
18599 \end_layout
18600
18601 \begin_layout Enumerate
18602
18603 \size small
18604 This command might not be intended.
18605 \end_layout
18606
18607 \begin_layout Enumerate
18608
18609 \size small
18610 \emph on
18611 Comment displayed.
18612 \end_layout
18613
18614 \begin_layout Enumerate
18615
18616 \size small
18617 Either 
18618 \family typewriter
18619 ''
18620 \backslash
18621 ,'
18622 \family default
18623  or 
18624 \family typewriter
18625 '
18626 \backslash
18627 ,''
18628 \family default
18629  will look better.
18630 \end_layout
18631
18632 \begin_layout Enumerate
18633
18634 \size small
18635 Delete this space to maintain correct page references.
18636 \end_layout
18637
18638 \begin_layout Enumerate
18639
18640 \size small
18641 \emph on
18642 You might wish to put this between a pair of 
18643 \begin_inset Quotes eld
18644 \end_inset
18645
18646
18647 \family typewriter
18648 {}
18649 \family default
18650
18651 \begin_inset Quotes erd
18652 \end_inset
18653
18654 .
18655 \end_layout
18656
18657 \begin_layout Enumerate
18658
18659 \size small
18660 You ought to remove spaces in front of punctuation.
18661 \end_layout
18662
18663 \begin_layout Enumerate
18664
18665 \size small
18666 Could not execute LaTeX command.
18667 \end_layout
18668
18669 \begin_layout Enumerate
18670
18671 \size small
18672 Don't use 
18673 \family typewriter
18674
18675 \backslash
18676 /
18677 \family default
18678  in front of small punctuation.
18679 \end_layout
18680
18681 \begin_layout Enumerate
18682
18683 \family typewriter
18684 \size small
18685 $
18686 \backslash
18687 times$
18688 \family default
18689  may look prettier here.
18690 \end_layout
18691
18692 \begin_layout Enumerate
18693
18694 \size small
18695 \emph on
18696 Multiple spaces detected in output.
18697 \end_layout
18698
18699 \begin_layout Enumerate
18700
18701 \size small
18702 This text may be ignored.
18703 \end_layout
18704
18705 \begin_layout Enumerate
18706
18707 \size small
18708 Use 
18709 \family typewriter
18710
18711 \begin_inset Quotes eld
18712 \end_inset
18713
18714
18715 \family default
18716  to begin quotation, not 
18717 \family typewriter
18718 '
18719 \family default
18720 .
18721 \end_layout
18722
18723 \begin_layout Enumerate
18724
18725 \size small
18726 Use 
18727 \family typewriter
18728 '
18729 \family default
18730  to end quotation, not 
18731 \family typewriter
18732
18733 \begin_inset Quotes eld
18734 \end_inset
18735
18736
18737 \family default
18738 .
18739 \end_layout
18740
18741 \begin_layout Enumerate
18742
18743 \size small
18744 Don't mix quotes.
18745 \end_layout
18746
18747 \begin_layout Enumerate
18748
18749 \size small
18750 You should perhaps use 
18751 \begin_inset Quotes eld
18752 \end_inset
18753
18754
18755 \family typewriter
18756 cmd
18757 \family default
18758
18759 \begin_inset Quotes erd
18760 \end_inset
18761
18762  instead.
18763 \end_layout
18764
18765 \begin_layout Enumerate
18766
18767 \size small
18768 You should put a space in front of/after parenthesis.
18769 \end_layout
18770
18771 \begin_layout Enumerate
18772
18773 \size small
18774 You should avoid spaces in front of/after parenthesis.
18775 \end_layout
18776
18777 \begin_layout Enumerate
18778
18779 \size small
18780 \emph on
18781 You should not use punctuation in front of/after quotes.
18782 \end_layout
18783
18784 \begin_layout Enumerate
18785
18786 \size small
18787 Double space found.
18788 \end_layout
18789
18790 \begin_layout Enumerate
18791
18792 \size small
18793 You should put punctuation outside inner/inside display math mode.
18794 \end_layout
18795
18796 \begin_layout Enumerate
18797
18798 \size small
18799 You ought to not use primitive TeX in LaTeX code.
18800 \end_layout
18801
18802 \begin_layout Enumerate
18803
18804 \size small
18805 You should remove spaces in front of 
18806 \begin_inset Quotes eld
18807 \end_inset
18808
18809
18810 \family typewriter
18811 %s
18812 \family default
18813
18814 \begin_inset Quotes erd
18815 \end_inset
18816
18817
18818 \end_layout
18819
18820 \begin_layout Enumerate
18821
18822 \size small
18823 \begin_inset Quotes eld
18824 \end_inset
18825
18826
18827 \family typewriter
18828 %s
18829 \family default
18830
18831 \begin_inset Quotes erd
18832 \end_inset
18833
18834  is normally not followed by 
18835 \begin_inset Quotes eld
18836 \end_inset
18837
18838
18839 \family typewriter
18840 %c
18841 \family default
18842
18843 \begin_inset Quotes erd
18844 \end_inset
18845
18846 .
18847 \end_layout
18848
18849 \begin_layout Standard
18850 In later versions of LyX, we hope to provide a more complete interface to
18851  this tool (and it's smaller cousin 
18852 \family typewriter
18853 lacheck
18854 \family default
18855 ) to exploit the full power of it.
18856  But it's not exactly useless as it is now: go try it on one of your existing
18857  documents of a certain length and be surprised.
18858 \end_layout
18859
18860 \begin_layout Section
18861 Version Control in LyX
18862 \end_layout
18863
18864 \begin_layout Standard
18865 by
18866 \noun on
18867  Lars Gullik Bjønnes 
18868 \noun default
18869 and 
18870 \noun on
18871 Pavel Sanda
18872 \end_layout
18873
18874 \begin_layout Subsection
18875 Introduction
18876 \end_layout
18877
18878 \begin_layout Standard
18879 A friend of mine wanted to try LyX for a group project.
18880  When he didn't find support for version control or file locking, he dropped
18881  it.
18882  This angered me a bit, so I thought that I should at least make support
18883  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18884  This has been done.
18885  LyX now supports some of the most basic RCS/CVS/SVN commands.
18886  If you need something a bit more sophisticated you will have to do that
18887  manually in a terminal.
18888 \end_layout
18889
18890 \begin_layout Standard
18891 Also note that CVS support is not as good as subversion support so we advice
18892  using SVN instead.
18893  Good place to start with Subversion is SVN Book
18894 \begin_inset Foot
18895 status open
18896
18897 \begin_layout Plain Layout
18898 \begin_inset CommandInset href
18899 LatexCommand href
18900 target "http://svnbook.red-bean.com/"
18901
18902 \end_inset
18903
18904
18905 \end_layout
18906
18907 \end_inset
18908
18909 .
18910  In case of RCS you should read 
18911 \begin_inset Quotes eld
18912 \end_inset
18913
18914 rcsintro
18915 \begin_inset Quotes erd
18916 \end_inset
18917
18918  (a man file, read it with 
18919 \family typewriter
18920 man rcsintro
18921 \family default
18922 ).
18923  This file describes all the basic features of RCS.
18924  You should especially notice the comment about a RCS directory, and the
18925  notion of a master RCS file (the file ending in 
18926 \family typewriter
18927 ,v
18928 \family default
18929 ).
18930 \end_layout
18931
18932 \begin_layout Standard
18933 Before you begin to use the version control features in LyX, you should
18934  be familiar with RCS/CVS/SVN usage.
18935  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18936  package—no guarantees are made for older versions.
18937  Most of the log messages are not currently displayed after operations —
18938  you can check them in Messages pane if unsure.
18939 \end_layout
18940
18941 \begin_layout Standard
18942 For introducing your own external commands consult vc-command in the manual
18943  of LyX functions.
18944 \end_layout
18945
18946 \begin_layout Subsection
18947 RCS commands in LyX
18948 \end_layout
18949
18950 \begin_layout Standard
18951 The following sections describe the RCS commands supported by LyX.
18952  You can find them in the 
18953 \family sans
18954 File\SpecialChar \menuseparator
18955 Version
18956 \begin_inset space ~
18957 \end_inset
18958
18959 Control
18960 \family default
18961  submenu.
18962  LyX was tested against RCS 5.7/5.8.
18963 \end_layout
18964
18965 \begin_layout Subsubsection
18966
18967 \family sans
18968 Register
18969 \end_layout
18970
18971 \begin_layout Standard
18972 If your document is not under revision control, this is the only item shown
18973  in the menu.
18974  And if it is under revision control, the 
18975 \family sans
18976 Register
18977 \family default
18978  item is not visible.
18979  
18980 \end_layout
18981
18982 \begin_layout Standard
18983 This command registers your document with RCS (unless you are under the
18984  directory managed by CVS)\SpecialChar \@.
18985  You are asked interactively to supply an initial
18986  description of the document.
18987  The document is now set in Read-Only mode and you have to 
18988 \family sans
18989 Check
18990 \begin_inset space ~
18991 \end_inset
18992
18993 Out
18994 \begin_inset space ~
18995 \end_inset
18996
18997 For
18998 \begin_inset space ~
18999 \end_inset
19000
19001 Edit
19002 \family default
19003 , before making any changes to it.
19004  A document under revision control has a 
19005 \begin_inset Quotes eld
19006 \end_inset
19007
19008 [RCS:<version> <locker>]
19009 \begin_inset Quotes erd
19010 \end_inset
19011
19012  item tagged to the filename in the minibuffer.
19013 \end_layout
19014
19015 \begin_layout Standard
19016 RCS command that is run: 
19017 \family typewriter
19018 ci -q -u -i -t-"<initial description>" <file-name>
19019 \end_layout
19020
19021 \begin_layout Standard
19022 Read 
19023 \family typewriter
19024 man ci
19025 \family default
19026  to understand the switches.
19027  
19028 \end_layout
19029
19030 \begin_layout Subsubsection
19031
19032 \family sans
19033 Check In Changes
19034 \end_layout
19035
19036 \begin_layout Standard
19037 When you are finished editing a file, you check in your changes.
19038  When you do this, you are asked for a description of the changes.
19039  This is stored in the history log.
19040  The version number is bumped, your changes are applied to the master RCS
19041  file, the document is unlocked and set to Read-Only mode.
19042  
19043 \end_layout
19044
19045 \begin_layout Standard
19046 RCS command: 
19047 \family typewriter
19048 ci -q -u -m"<description>" <file-name>
19049 \end_layout
19050
19051 \begin_layout Subsubsection
19052
19053 \family sans
19054 Check Out For Edit
19055 \end_layout
19056
19057 \begin_layout Standard
19058 By doing this you lock the document so that only you can edit it.
19059  This will also make the document Read-Write only for you.
19060  You will usually continue editing for a while and when you are finished
19061  you check in your changes.
19062  The status line is changed to reflect that you have locked the file.
19063  
19064 \end_layout
19065
19066 \begin_layout Standard
19067 RCS command: 
19068 \family typewriter
19069 co -q -l <file-name>
19070 \end_layout
19071
19072 \begin_layout Subsubsection
19073
19074 \family sans
19075 Revert To Repository Version
19076 \end_layout
19077
19078 \begin_layout Standard
19079 This will discard all changes made to the document since the last check
19080  in.
19081  You get a warning before changes are discarded.
19082 \end_layout
19083
19084 \begin_layout Standard
19085 RCS command: 
19086 \family typewriter
19087 co -f -u<version> <file-name>
19088 \end_layout
19089
19090 \begin_layout Subsubsection
19091
19092 \family sans
19093 Undo Last Checkin
19094 \end_layout
19095
19096 \begin_layout Standard
19097 This makes as if the last check in never happened.
19098  No changes are made to the document loaded into LyX, but the last version
19099  is removed from the master RCS file.
19100  
19101 \end_layout
19102
19103 \begin_layout Standard
19104 RCS command: 
19105 \family typewriter
19106 rcs -o<version> <file-name>
19107 \end_layout
19108
19109 \begin_layout Subsubsection
19110
19111 \family sans
19112 Show History
19113 \end_layout
19114
19115 \begin_layout Standard
19116 This shows the complete history of the RCS document.
19117  The output of 
19118 \family typewriter
19119 rlog <file-name>
19120 \family default
19121  is shown in a browser.
19122  See 
19123 \family typewriter
19124 man rlog
19125 \family default
19126  for more info.
19127 \end_layout
19128
19129 \begin_layout Subsubsection
19130 Revision info
19131 \end_layout
19132
19133 \begin_layout Standard
19134 LyX supports RCS version number, author name, date and time of last commit.
19135  All those are extracted from 
19136 \family typewriter
19137 rlog -r <file-name>
19138 \family default
19139 .
19140  For other details see 
19141 \begin_inset CommandInset ref
19142 LatexCommand ref
19143 reference "sub:VCS-Revision-Information"
19144
19145 \end_inset
19146
19147  for details.
19148 \end_layout
19149
19150 \begin_layout Subsection
19151 CVS commands in LyX
19152 \end_layout
19153
19154 \begin_layout Standard
19155 A subset of CVS operations is supported by LyX.
19156  You can find the commands in the 
19157 \family sans
19158 File\SpecialChar \menuseparator
19159 Version
19160 \begin_inset space ~
19161 \end_inset
19162
19163 Control
19164 \family default
19165  submenu.
19166  The version control system SVN is more powerful, so please use it instead
19167  of CVS if possible.
19168 \end_layout
19169
19170 \begin_layout Subsubsection
19171
19172 \family sans
19173 General CVS usage
19174 \end_layout
19175
19176 \begin_layout Standard
19177 If you start from scratch with CVS you have to create your repository and
19178  checkout the working copy with external tools.
19179  If you're using a client-server setup you may need to login before doing
19180  the first repository checkout.
19181 \end_layout
19182
19183 \begin_layout Standard
19184 If your documents are under revision control and others are using the same
19185  repository problems arise when different changes to the same document at
19186  the same location happen.
19187  Standard CVS repositories doesn't operate with a file locking mechanism.
19188  This may be surprising, but conflicts only occur if people disagree on
19189  the proper content of the same part of a document.
19190  So, if co-workers are used to communicate regularly, these conflicts occur
19191  rarely.
19192  If they don't communicate they have a fundamental problem anyway.
19193  Nevertheless some people like to work with so called 
19194 \begin_inset Quotes eld
19195 \end_inset
19196
19197 reserved checkouts
19198 \begin_inset Quotes erd
19199 \end_inset
19200
19201 .
19202  If they do so the working copy of all files is readonly when checked out
19203  first and the user starts editing after using a special command to make
19204  the working copy writable.
19205  When the changes are checked in the working copy returns to readonly state.
19206  With LyX one has to edit the 
19207 \begin_inset Flex Code
19208 status collapsed
19209
19210 \begin_layout Plain Layout
19211 .cvsrc
19212 \end_layout
19213
19214 \end_inset
19215
19216  file and add the line 
19217 \begin_inset Flex Code
19218 status collapsed
19219
19220 \begin_layout Plain Layout
19221 cvs -r
19222 \end_layout
19223
19224 \end_inset
19225
19226  to work with reserved checkouts.
19227  The benefit is the possibility to see who is using a writable copy of some
19228  document.
19229  It's not guaranteed only one user makes a copy writable.
19230 \end_layout
19231
19232 \begin_layout Standard
19233 LyX tries to guess if you're using reserved or non-reserved checkouts.
19234  If your working copy is readonly or it is writable and an additional copy
19235  of your document exists in the CVS/Base sub-directory a reserved otherwise
19236  a non-reserved checkout is assumed.
19237  When a reserved checkout is detected you have to use 
19238 \begin_inset Flex MenuItem
19239 status collapsed
19240
19241 \begin_layout Plain Layout
19242 Check Out
19243 \end_layout
19244
19245 \end_inset
19246
19247  to make your working copy writable if it's readonly.
19248  After doing so the 
19249 \begin_inset Flex MenuItem
19250 status collapsed
19251
19252 \begin_layout Plain Layout
19253 Check In
19254 \end_layout
19255
19256 \end_inset
19257
19258  operation is possible and that makes your working copy readonly again after
19259  transferring your changes to the repository.
19260 \end_layout
19261
19262 \begin_layout Standard
19263 More information about CVS can be found here 
19264 \begin_inset Flex URL
19265 status collapsed
19266
19267 \begin_layout Plain Layout
19268
19269 http://www.nongnu.org/cvs
19270 \end_layout
19271
19272 \end_inset
19273
19274  and here 
19275 \begin_inset Flex URL
19276 status collapsed
19277
19278 \begin_layout Plain Layout
19279
19280 http://ximbiot.com/cvs
19281 \end_layout
19282
19283 \end_inset
19284
19285 .
19286 \end_layout
19287
19288 \begin_layout Standard
19289 Read 
19290 \family typewriter
19291 man cvs
19292 \family default
19293  to understand the sub-commands and the switches mentioned below.
19294 \end_layout
19295
19296 \begin_layout Subsubsection
19297
19298 \family sans
19299 Register
19300 \end_layout
19301
19302 \begin_layout Standard
19303 If your document is not under revision control, this is the only item shown
19304  in the menu.
19305  And if it is under revision control, the 
19306 \family sans
19307 \bar under
19308 R
19309 \bar default
19310 egister
19311 \family default
19312  item is not visible.
19313  
19314 \end_layout
19315
19316 \begin_layout Standard
19317 This command registers in CVS your document 
19318 \begin_inset Flex Strong
19319 status collapsed
19320
19321 \begin_layout Plain Layout
19322
19323 \emph on
19324 only
19325 \end_layout
19326
19327 \end_inset
19328
19329  in case you have already the documents directory under CVS control (in
19330  particular 
19331 \family typewriter
19332 CVS/Entries
19333 \family default
19334  file exists).
19335  This means you have to create or checkout the archive by yourself using
19336  external tools.
19337  (In case you forget that step LyX registers the document with RCS.)
19338 \end_layout
19339
19340 \begin_layout Standard
19341 Then you are asked interactively to supply an initial description of the
19342  document.
19343  Don't forget that registered file is not yet checked in.
19344 \end_layout
19345
19346 \begin_layout Standard
19347 CVS command that is run: 
19348 \family typewriter
19349 cvs -q add -m"<entered message>" "<file-name>"
19350 \end_layout
19351
19352 \begin_layout Standard
19353 The term 
19354 \family typewriter
19355 "<file-name>"
19356 \family default
19357  above and for all other CVS commands is an abbreviation for 
19358 \begin_inset Quotes eld
19359 \end_inset
19360
19361 change the current working directory to file location and use the file name
19362  without path component as argument
19363 \begin_inset Quotes erd
19364 \end_inset
19365
19366 .
19367 \end_layout
19368
19369 \begin_layout Subsubsection
19370
19371 \family sans
19372 Check In Changes
19373 \end_layout
19374
19375 \begin_layout Standard
19376 When you are finished editing a file, you commit your changes.
19377  When you do this and you had changed the document, you are asked for a
19378  description of the changes.
19379  After that changes are written to the repository.
19380  In case you didn't change the document and a reserved checkout is detected
19381  the reservation made on 
19382 \begin_inset Flex MenuItem
19383 status collapsed
19384
19385 \begin_layout Plain Layout
19386 Check Out
19387 \end_layout
19388
19389 \end_inset
19390
19391  is undone.
19392 \end_layout
19393
19394 \begin_layout Labeling
19395 \labelwidthstring 00.00.0000
19396 CVS
19397 \begin_inset space ~
19398 \end_inset
19399
19400 command: 
19401 \begin_inset space ~
19402 \end_inset
19403
19404
19405 \begin_inset Newline newline
19406 \end_inset
19407
19408
19409 \begin_inset Flex Code
19410 status collapsed
19411
19412 \begin_layout Plain Layout
19413 cvs 
19414 \family typewriter
19415 -q commit -m"<description>" "<file-name>"
19416 \end_layout
19417
19418 \end_inset
19419
19420  or
19421 \begin_inset Newline newline
19422 \end_inset
19423
19424
19425 \begin_inset Flex Code
19426 status collapsed
19427
19428 \begin_layout Plain Layout
19429 cvs -q unedit 
19430 \family typewriter
19431 "<file-name>"
19432 \end_layout
19433
19434 \end_inset
19435
19436
19437 \end_layout
19438
19439 \begin_layout Subsubsection
19440
19441 \family sans
19442 Check Out Changes
19443 \end_layout
19444
19445 \begin_layout Standard
19446 When you are sharing a repository with others, you may have to incorporate
19447  their changes into your working copy.
19448 \end_layout
19449
19450 \begin_layout Standard
19451 CVS command: 
19452 \family typewriter
19453 cvs -q update "<file-name>"
19454 \end_layout
19455
19456 \begin_layout Standard
19457 If a readonly checkout is detected the working copy is made writable and
19458  reserved.
19459 \end_layout
19460
19461 \begin_layout Standard
19462 CVS command: 
19463 \family typewriter
19464 cvs -q edit "<file-name>"
19465 \end_layout
19466
19467 \begin_layout Subsubsection
19468
19469 \family sans
19470 Revert To Repository Version
19471 \end_layout
19472
19473 \begin_layout Standard
19474 This will discard all changes made to the document since the last check
19475  in.
19476  You get a warning before changes are discarded.
19477  Firstly the file is deleted, secondly CVS update command is run.
19478 \end_layout
19479
19480 \begin_layout Standard
19481 CVS command: 
19482 \family typewriter
19483 cvs -q update "<file-name>"
19484 \end_layout
19485
19486 \begin_layout Standard
19487 If a reserved checkout is detected and the working copy has no changes only
19488  the reservation is undone.
19489 \end_layout
19490
19491 \begin_layout Standard
19492 CVS command: 
19493 \family typewriter
19494 cvs -q unedit "<file-name>"
19495 \end_layout
19496
19497 \begin_layout Subsubsection
19498 Update of the local directory checkout from repository
19499 \end_layout
19500
19501 \begin_layout Standard
19502 Once your documents gets more complex, containing sub-documents and pictures,
19503  including external 
19504 \begin_inset Flex Code
19505 status collapsed
19506
19507 \begin_layout Plain Layout
19508 .tex
19509 \end_layout
19510
19511 \end_inset
19512
19513  files and so on using version control becomes more complicated.
19514  LyX supports updating the whole tree in which resides the document.
19515  This become especially useful once you cooperate with people which neither
19516  have detailed knowledge about CVS usage nor they have ambition to commit
19517  additional material to the repository.
19518  You have to organize the files structure so that all external files are
19519  in the same directory or subdirectories of the document.
19520  It's good practice anyway to store multipart documents in an extra directory.
19521 \end_layout
19522
19523 \begin_layout Standard
19524 The 
19525 \begin_inset Flex Code
19526 status collapsed
19527
19528 \begin_layout Plain Layout
19529 Update local directory from repository
19530 \end_layout
19531
19532 \end_inset
19533
19534  command updates the whole directory.
19535  If local changes are detected user is warned before update starts.
19536  In case of merge conflicts both versions of the conflicting document parts
19537  are placed in the final document.
19538  You have to review and correct the result of the merge.
19539  You'll find the conflicts enclosed in pairs of 
19540 \begin_inset Flex Code
19541 status collapsed
19542
19543 \begin_layout Plain Layout
19544 <<<<<<<
19545 \end_layout
19546
19547 \end_inset
19548
19549  and 
19550 \begin_inset Flex Code
19551 status collapsed
19552
19553 \begin_layout Plain Layout
19554 >>>>>>>
19555 \end_layout
19556
19557 \end_inset
19558
19559  separated by 
19560 \begin_inset Flex Code
19561 status collapsed
19562
19563 \begin_layout Plain Layout
19564 =======
19565 \end_layout
19566
19567 \end_inset
19568
19569 .
19570  The first part is your version as before the update operation with the
19571  document name prepended.
19572  The second one is the repository version with the version number after
19573  the sequence of 
19574 \begin_inset Flex Code
19575 status collapsed
19576
19577 \begin_layout Plain Layout
19578 >
19579 \end_layout
19580
19581 \end_inset
19582
19583  signs.
19584 \end_layout
19585
19586 \begin_layout Labeling
19587 \labelwidthstring 00.00.0000
19588 CVS
19589 \begin_inset space ~
19590 \end_inset
19591
19592 commands: 
19593 \begin_inset space ~
19594 \end_inset
19595
19596
19597 \begin_inset Newline newline
19598 \end_inset
19599
19600
19601 \begin_inset Flex Code
19602 status collapsed
19603
19604 \begin_layout Plain Layout
19605 cd $path; cvs diff 
19606 \family typewriter
19607 "."
19608 \end_layout
19609
19610 \end_inset
19611
19612  (Ask if changes are detected.)
19613 \begin_inset Newline newline
19614 \end_inset
19615
19616
19617 \begin_inset Flex Code
19618 status collapsed
19619
19620 \begin_layout Plain Layout
19621 cd $path; cvs -q update 
19622 \family typewriter
19623 "."
19624 \end_layout
19625
19626 \end_inset
19627
19628
19629 \end_layout
19630
19631 \begin_layout Standard
19632 where 
19633 \begin_inset Flex Code
19634 status collapsed
19635
19636 \begin_layout Plain Layout
19637 $path
19638 \end_layout
19639
19640 \end_inset
19641
19642  stands for the path to the document.
19643 \end_layout
19644
19645 \begin_layout Subsubsection
19646
19647 \family sans
19648 Show History
19649 \end_layout
19650
19651 \begin_layout Standard
19652 This shows the complete history of the CVS document.
19653  The output of 
19654 \family typewriter
19655 cvs log "<file-name>"
19656 \family default
19657  is shown in a browser.
19658 \end_layout
19659
19660 \begin_layout Subsection
19661 SVN commands in LyX
19662 \end_layout
19663
19664 \begin_layout Standard
19665 SVN is now partially supported by LyX.
19666  You can find the commands in the 
19667 \family sans
19668 File\SpecialChar \menuseparator
19669 Version
19670 \begin_inset space ~
19671 \end_inset
19672
19673 Control
19674 \family default
19675  submenu.
19676  Please note that if you use password protected access to repository via
19677  ssh, you will be asked in terminal window.
19678  LyX was tested against SVN 1.5 and 1.6
19679 \begin_inset Foot
19680 status open
19681
19682 \begin_layout Plain Layout
19683 Most of the commands will work with 1.4 too, see 
19684 \begin_inset CommandInset ref
19685 LatexCommand ref
19686 reference "sub:SVN-Repo-Update"
19687
19688 \end_inset
19689
19690 .
19691 \end_layout
19692
19693 \end_inset
19694
19695
19696 \end_layout
19697
19698 \begin_layout Subsubsection
19699
19700 \family sans
19701 Register
19702 \end_layout
19703
19704 \begin_layout Standard
19705 If your document is not under revision control, this is the only item shown
19706  in the menu.
19707  And if it is under revision control, the 
19708 \family sans
19709 \bar under
19710 R
19711 \bar default
19712 egister
19713 \family default
19714  item is not visible.
19715  
19716 \end_layout
19717
19718 \begin_layout Standard
19719 This command registers in SVN your document ONLY in case you have already
19720  the documents directory under SVN control (in particular 
19721 \family typewriter
19722 .svn/entries
19723 \family default
19724  file exists).
19725  This means you have to checkout the archive by yourself.
19726  
19727 \end_layout
19728
19729 \begin_layout Standard
19730 Then you are asked interactively to supply an initial description of the
19731  document.
19732  Don't forget that registered file is not yet commited.
19733 \end_layout
19734
19735 \begin_layout Standard
19736 SVN command that is run: 
19737 \family typewriter
19738 svn add -q 
19739 \begin_inset Quotes eld
19740 \end_inset
19741
19742 <file-name>
19743 \begin_inset Quotes erd
19744 \end_inset
19745
19746
19747 \end_layout
19748
19749 \begin_layout Standard
19750 Read 
19751 \family typewriter
19752 man svn
19753 \family default
19754  to understand the switches.
19755  
19756 \end_layout
19757
19758 \begin_layout Subsubsection
19759
19760 \family sans
19761 Check In Changes
19762 \end_layout
19763
19764 \begin_layout Standard
19765 When you are finished editing a file, you commit your changes.
19766  When you do this, you are asked for a description of the changes.
19767  After that changes are commited.
19768 \end_layout
19769
19770 \begin_layout Standard
19771 SVN command:
19772 \begin_inset Foot
19773 status collapsed
19774
19775 \begin_layout Plain Layout
19776 In case locking is not enabled.
19777  See Section 
19778 \begin_inset CommandInset ref
19779 LatexCommand ref
19780 reference "subsec:SVN-File-Locking"
19781
19782 \end_inset
19783
19784 .
19785 \end_layout
19786
19787 \end_inset
19788
19789  
19790 \family typewriter
19791 svn commit -q -m"<description>" <file-name>
19792 \end_layout
19793
19794 \begin_layout Subsubsection
19795
19796 \family sans
19797 Check Out For Edit
19798 \end_layout
19799
19800 \begin_layout Standard
19801 Updates the changes of this file from the repository.
19802  Be sure you understand SVN merging and conflicts resolving before using
19803  this function, because all conflicts has to be resolved manually by you!
19804 \end_layout
19805
19806 \begin_layout Standard
19807 SVN command:
19808 \begin_inset Foot
19809 status collapsed
19810
19811 \begin_layout Plain Layout
19812 Ditto.
19813 \end_layout
19814
19815 \end_inset
19816
19817  
19818 \family typewriter
19819 svn update --non-interactive 
19820 \begin_inset Quotes eld
19821 \end_inset
19822
19823 <file-name>
19824 \begin_inset Quotes erd
19825 \end_inset
19826
19827
19828 \end_layout
19829
19830 \begin_layout Subsubsection
19831
19832 \family sans
19833 Revert To Repository Version
19834 \end_layout
19835
19836 \begin_layout Standard
19837 This will discard all changes made to the document since the last check
19838  in.
19839  You get a warning before changes are discarded.
19840  
19841 \end_layout
19842
19843 \begin_layout Standard
19844 SVN command: 
19845 \family typewriter
19846 svn revert -q 
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 \begin_inset CommandInset label
19859 LatexCommand label
19860 name "sub:SVN-Repo-Update"
19861
19862 \end_inset
19863
19864 Update of the local directory checkout from repository
19865 \begin_inset Foot
19866 status collapsed
19867
19868 \begin_layout Plain Layout
19869 Note that this command will work only with subversion 
19870 \begin_inset Formula $\geqq1.5$
19871 \end_inset
19872
19873
19874 \end_layout
19875
19876 \end_inset
19877
19878
19879 \end_layout
19880
19881 \begin_layout Standard
19882 All the commands above have one shortcomming - they deal with the current
19883  document only.
19884  Once your document contains pictures, includes external 
19885 \begin_inset Flex Code
19886 status collapsed
19887
19888 \begin_layout Plain Layout
19889 .tex
19890 \end_layout
19891
19892 \end_inset
19893
19894  files and so on administration becomes more complicated.
19895  LyX now supports updating the whole tree in which resides the document
19896 \begin_inset Foot
19897 status collapsed
19898
19899 \begin_layout Plain Layout
19900 One need to organize the files structure so that all external files are
19901  in the same directory or subdirectories of the document.
19902  
19903 \end_layout
19904
19905 \end_inset
19906
19907 .
19908  This become especially useful once you cooperate with people which neither
19909  know about subversion management nor they have ambition to commit additional
19910  material to the repository.
19911  
19912 \end_layout
19913
19914 \begin_layout Standard
19915 \begin_inset Flex Code
19916 status collapsed
19917
19918 \begin_layout Plain Layout
19919 Update local directory from repository
19920 \end_layout
19921
19922 \end_inset
19923
19924  command updates the whole directory and in case of merge conflicts local
19925  version of the files are left, so no unintended data loss occurs.
19926  If local changes are detected user is warned before update starts.
19927 \end_layout
19928
19929 \begin_layout Labeling
19930 \labelwidthstring 00.00.0000
19931 SVN
19932 \begin_inset space ~
19933 \end_inset
19934
19935 commands: 
19936 \begin_inset space ~
19937 \end_inset
19938
19939
19940 \begin_inset Newline newline
19941 \end_inset
19942
19943
19944 \begin_inset Flex Code
19945 status collapsed
19946
19947 \begin_layout Plain Layout
19948 svn diff $path
19949 \end_layout
19950
19951 \end_inset
19952
19953  (Ask if changes are detected.)
19954 \begin_inset Newline newline
19955 \end_inset
19956
19957
19958 \begin_inset Flex Code
19959 status collapsed
19960
19961 \begin_layout Plain Layout
19962 svn update --accept mine-full $path
19963 \end_layout
19964
19965 \end_inset
19966
19967
19968 \end_layout
19969
19970 \begin_layout Standard
19971 where 
19972 \begin_inset Flex Code
19973 status collapsed
19974
19975 \begin_layout Plain Layout
19976 $path
19977 \end_layout
19978
19979 \end_inset
19980
19981  stands for the path to the document.
19982 \end_layout
19983
19984 \begin_layout Subsubsection
19985
19986 \family sans
19987 Show History
19988 \end_layout
19989
19990 \begin_layout Standard
19991 This shows the complete history of the SVN document.
19992  The output of 
19993 \family typewriter
19994 svn log 
19995 \begin_inset Quotes eld
19996 \end_inset
19997
19998 <file-name>
19999 \begin_inset Quotes erd
20000 \end_inset
20001
20002
20003 \family default
20004  is shown in a browser.
20005 \end_layout
20006
20007 \begin_layout Subsubsection
20008 File Locking
20009 \begin_inset CommandInset label
20010 LatexCommand label
20011 name "subsec:SVN-File-Locking"
20012
20013 \end_inset
20014
20015
20016 \end_layout
20017
20018 \begin_layout Standard
20019 The file exchange through various revision control systems brings the problem
20020  of merge conflicts in case two different users try to edit the same (parts
20021  of) document.
20022  When such a conflict happens it needs manual resolving and one reasonable
20023  alternative is to provide some kind of locking mechanism, which guarantees
20024  that only one user is allowed to edit file at the given time.
20025 \end_layout
20026
20027 \begin_layout Standard
20028 SVN has two such mechanisms to provide mutual exclusivity for file access
20029  - locks and automatic setting of write permissions (see sec.
20030  
20031 \begin_inset CommandInset ref
20032 LatexCommand ref
20033 reference "subsec:Automatical-Locking-Property"
20034
20035 \end_inset
20036
20037 ) based on 
20038 \begin_inset Flex Code
20039 status collapsed
20040
20041 \begin_layout Plain Layout
20042 svn:needs-lock
20043 \end_layout
20044
20045 \end_inset
20046
20047  file svn property
20048 \begin_inset Foot
20049 status open
20050
20051 \begin_layout Plain Layout
20052 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20053 \end_layout
20054
20055 \end_inset
20056
20057 .
20058  If this property is detected for a given document LyX starts to use SVN
20059  locks for document editing automatically and the whole check-in/out mechanism
20060  switches to the same regimen as for RCS.
20061  This in particular means there are two different modes of file use in LyX:
20062 \end_layout
20063
20064 \begin_layout Itemize
20065 Unlocked state.
20066  The loaded file is in the read-only mode.
20067  For editing on needs to check-out.
20068  
20069 \emph on
20070 Check-out
20071 \emph default
20072  consists of updating from the repository and gaining write lock.
20073  If the lock is not possible to obtain, we remain in unlocked state.
20074 \end_layout
20075
20076 \begin_layout Itemize
20077 Locked state.
20078  The loaded file is in the 'normal' edit mode.
20079  No other user is allowed to edit the file.
20080  
20081 \emph on
20082 Check-in
20083 \emph default
20084  consists of commiting changes and releasing write-lock.
20085  If no changes have been made to the document, no commit will be produced
20086 \begin_inset Foot
20087 status collapsed
20088
20089 \begin_layout Plain Layout
20090 Don't be puzzled by the fact that you will be asked for commit message anyway.
20091 \end_layout
20092
20093 \end_inset
20094
20095  and only the write-lock will be released.
20096 \end_layout
20097
20098 \begin_layout Standard
20099 SVN commands:
20100 \end_layout
20101
20102 \begin_layout Labeling
20103 \labelwidthstring 00.00.0000
20104 Check-in:
20105 \family typewriter
20106  svn commit -q -m"<description>" "<file-name>"
20107 \begin_inset Newline newline
20108 \end_inset
20109
20110 svn unlock "<file-name>"
20111 \end_layout
20112
20113 \begin_layout Labeling
20114 \labelwidthstring 00.00.0000
20115 Check-out: 
20116 \family typewriter
20117 svn update "<file-name>"
20118 \begin_inset Newline newline
20119 \end_inset
20120
20121 svn lock "<file-name>"
20122 \end_layout
20123
20124 \begin_layout Subsubsection
20125
20126 \family typewriter
20127 \begin_inset CommandInset label
20128 LatexCommand label
20129 name "subsec:Automatical-Locking-Property"
20130
20131 \end_inset
20132
20133
20134 \family default
20135 Automatic Locking Property
20136 \end_layout
20137
20138 \begin_layout Standard
20139 The above mentioned automatic setting of write permissions of the .lyx file
20140  can be set through
20141 \family sans
20142 \bar under
20143  F
20144 \bar default
20145 ile\SpecialChar \menuseparator
20146
20147 \bar under
20148 V
20149 \bar default
20150 ersion
20151 \begin_inset space ~
20152 \end_inset
20153
20154 Control\SpecialChar \menuseparator
20155
20156 \bar under
20157 T
20158 \bar default
20159 oggle locking property
20160 \family default
20161 .
20162  This command is active only when the file is not locked on the svn server
20163  (i.e.
20164  you need to check-out before proceeding).
20165 \end_layout
20166
20167 \begin_layout Labeling
20168 \labelwidthstring 00.00.0000
20169 SVN
20170 \begin_inset space ~
20171 \end_inset
20172
20173 commands:
20174 \end_layout
20175
20176 \begin_layout Labeling
20177 \labelwidthstring 00.00.0000
20178 Set:
20179 \family typewriter
20180  svn propset svn:needs-lock ON "<file-name>"
20181 \end_layout
20182
20183 \begin_layout Labeling
20184 \labelwidthstring 00.00.0000
20185 Unset: 
20186 \family typewriter
20187 svn propdel svn:needs-lock "<file-name>"
20188 \end_layout
20189
20190 \begin_layout Subsubsection
20191 \begin_inset CommandInset label
20192 LatexCommand label
20193 name "sub:VCS-Revision-Information"
20194
20195 \end_inset
20196
20197 Revision Information in Documents
20198 \end_layout
20199
20200 \begin_layout Standard
20201 There are more possibilities how to activate revision information in our
20202  document.
20203 \end_layout
20204
20205 \begin_layout Itemize
20206 LyX supports directly:
20207 \end_layout
20208
20209 \begin_deeper
20210 \begin_layout Itemize
20211 tree revision information (
20212 \begin_inset Flex Code
20213 status collapsed
20214
20215 \begin_layout Plain Layout
20216 vcs-tree-revision
20217 \end_layout
20218
20219 \end_inset
20220
20221 ).
20222  The result is the output of the 
20223 \begin_inset Flex Code
20224 status collapsed
20225
20226 \begin_layout Plain Layout
20227 svnversion
20228 \end_layout
20229
20230 \end_inset
20231
20232  command, the following table gives you an idea, how to read the results.
20233 \end_layout
20234
20235 \begin_layout Standard
20236 \align center
20237 \begin_inset Tabular
20238 <lyxtabular version="3" rows="6" columns="2">
20239 <features tabularvalignment="middle">
20240 <column alignment="center" valignment="top" width="0">
20241 <column alignment="center" valignment="top" width="0">
20242 <row>
20243 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20244 \begin_inset Text
20245
20246 \begin_layout Plain Layout
20247 Output
20248 \end_layout
20249
20250 \end_inset
20251 </cell>
20252 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20253 \begin_inset Text
20254
20255 \begin_layout Plain Layout
20256 Meaning
20257 \end_layout
20258
20259 \end_inset
20260 </cell>
20261 </row>
20262 <row>
20263 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20264 \begin_inset Text
20265
20266 \begin_layout Plain Layout
20267 4123:4168
20268 \end_layout
20269
20270 \end_inset
20271 </cell>
20272 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20273 \begin_inset Text
20274
20275 \begin_layout Plain Layout
20276 mixed revision working copy
20277 \end_layout
20278
20279 \end_inset
20280 </cell>
20281 </row>
20282 <row>
20283 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20284 \begin_inset Text
20285
20286 \begin_layout Plain Layout
20287 4168M
20288 \end_layout
20289
20290 \end_inset
20291 </cell>
20292 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20293 \begin_inset Text
20294
20295 \begin_layout Plain Layout
20296 modified working copy
20297 \end_layout
20298
20299 \end_inset
20300 </cell>
20301 </row>
20302 <row>
20303 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20304 \begin_inset Text
20305
20306 \begin_layout Plain Layout
20307 4123S
20308 \end_layout
20309
20310 \end_inset
20311 </cell>
20312 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20313 \begin_inset Text
20314
20315 \begin_layout Plain Layout
20316 switched working copy
20317 \end_layout
20318
20319 \end_inset
20320 </cell>
20321 </row>
20322 <row>
20323 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20324 \begin_inset Text
20325
20326 \begin_layout Plain Layout
20327 4123P
20328 \end_layout
20329
20330 \end_inset
20331 </cell>
20332 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20333 \begin_inset Text
20334
20335 \begin_layout Plain Layout
20336 partial working copy, from a sparse checkout
20337 \end_layout
20338
20339 \end_inset
20340 </cell>
20341 </row>
20342 <row>
20343 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20344 \begin_inset Text
20345
20346 \begin_layout Plain Layout
20347 4123:4168MS
20348 \end_layout
20349
20350 \end_inset
20351 </cell>
20352 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20353 \begin_inset Text
20354
20355 \begin_layout Plain Layout
20356 mixed revision, modified, switched working copy
20357 \end_layout
20358
20359 \end_inset
20360 </cell>
20361 </row>
20362 </lyxtabular>
20363
20364 \end_inset
20365
20366
20367 \end_layout
20368
20369 \begin_layout Itemize
20370 file revision information.
20371  The result comes from parsing the output of 
20372 \begin_inset Flex Code
20373 status collapsed
20374
20375 \begin_layout Plain Layout
20376 svn
20377 \begin_inset space ~
20378 \end_inset
20379
20380 info
20381 \begin_inset space ~
20382 \end_inset
20383
20384 --xml
20385 \begin_inset space ~
20386 \end_inset
20387
20388 file.lyx
20389 \end_layout
20390
20391 \end_inset
20392
20393 .
20394  Supported flags are:
20395 \end_layout
20396
20397 \begin_deeper
20398 \begin_layout Itemize
20399 version number of the last commit (
20400 \begin_inset Flex Code
20401 status collapsed
20402
20403 \begin_layout Plain Layout
20404 vcs-revision
20405 \end_layout
20406
20407 \end_inset
20408
20409 )
20410 \end_layout
20411
20412 \begin_layout Itemize
20413 author of the last commit (
20414 \begin_inset Flex Code
20415 status collapsed
20416
20417 \begin_layout Plain Layout
20418 vcs-author
20419 \end_layout
20420
20421 \end_inset
20422
20423 )
20424 \end_layout
20425
20426 \begin_layout Itemize
20427 date of the last commit (
20428 \begin_inset Flex Code
20429 status collapsed
20430
20431 \begin_layout Plain Layout
20432 vcs-date
20433 \end_layout
20434
20435 \end_inset
20436
20437 )
20438 \end_layout
20439
20440 \begin_layout Itemize
20441 time of the last commit (
20442 \begin_inset Flex Code
20443 status collapsed
20444
20445 \begin_layout Plain Layout
20446 vcs-time
20447 \end_layout
20448
20449 \end_inset
20450
20451 )
20452 \end_layout
20453
20454 \end_deeper
20455 \begin_layout Standard
20456 You can obtain this info via InsetInfo (e.g.
20457  
20458 \begin_inset Flex Code
20459 status collapsed
20460
20461 \begin_layout Plain Layout
20462 info-insert buffer vcs-date
20463 \end_layout
20464
20465 \end_inset
20466
20467 ).
20468  The information will be available only when you have the file stored under
20469  svn managment (i.e.
20470  the 
20471 \begin_inset Flex Code
20472 status collapsed
20473
20474 \begin_layout Plain Layout
20475 .svn
20476 \end_layout
20477
20478 \end_inset
20479
20480  directory is available with your document).
20481 \end_layout
20482
20483 \end_deeper
20484 \begin_layout Itemize
20485 Another---a hacking one---possibility is to use svn keywords
20486 \begin_inset Foot
20487 status collapsed
20488
20489 \begin_layout Plain Layout
20490 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20491 \end_layout
20492
20493 \end_inset
20494
20495 .
20496  In short -- you set file keywords property (e.g.
20497  
20498 \family sans
20499 svn propset svn:keywords 'Rev' file.lyx
20500 \family default
20501 ) and then paste keyword TeX code
20502 \begin_inset Foot
20503 status collapsed
20504
20505 \begin_layout Plain Layout
20506 This is an easy way how to ensure that LyX won't break the line in the middle
20507  of keyword tag.
20508 \end_layout
20509
20510 \end_inset
20511
20512  tag in your document (e.g.
20513  
20514 \begin_inset ERT
20515 status open
20516
20517 \begin_layout Plain Layout
20518
20519 $Rev$
20520 \end_layout
20521
20522 \end_inset
20523
20524 ).
20525  This way svn client will automatically substitute revision number (e.g.
20526  
20527 \begin_inset ERT
20528 status open
20529
20530 \begin_layout Plain Layout
20531
20532 $Rev: 59 $
20533 \end_layout
20534
20535 \end_inset
20536
20537 ) after each update and commit.
20538  There are more problems with this approach.
20539  Firstly, the '$' character is used in TeX world for math equations, so
20540  any occurence of math formula 
20541 \begin_inset Formula $Rev$
20542 \end_inset
20543
20544  become 
20545 \begin_inset Formula $Rev:59$
20546 \end_inset
20547
20548  in your LyX document.
20549  Similarly for other keywords like Id, Date, Author, etc.
20550  Secondly svn output is dependent on your locales, so its very easy that
20551  svn would produce some problematic strings once Date is used.
20552  Thirdly you get the whole 'Rev: 59' string in your document instead of
20553  the plain number.
20554  Until subversion implements user's custom keywords it will be hard to use
20555  this approach reliably or let LyX to support it directly.
20556 \end_layout
20557
20558 \begin_layout Subsection
20559 SVN and Windows Environment
20560 \end_layout
20561
20562 \begin_layout Quote
20563 My inclination is to say that if the user cannot figure out the command
20564  line operations on their own fairly quickly, they would be well advised
20565  to use TortoiseSVN.
20566  ---P.
20567  A.
20568  Rubin
20569 \end_layout
20570
20571 \begin_layout Subsubsection
20572 Preparation
20573 \end_layout
20574
20575 \begin_layout Standard
20576 In addition to installing LyX, and having access to a Subversion repository,
20577  the user will need to install the Subversion client program.
20578  A Windows installer for the client program is available from 
20579 \begin_inset CommandInset href
20580 LatexCommand href
20581 name "CollabNet"
20582 target "http://www.collab.net/nonav/downloads/subversion/"
20583
20584 \end_inset
20585
20586 .
20587  The user may also want to install 
20588 \begin_inset CommandInset href
20589 LatexCommand href
20590 name "TortoiseSVN"
20591 target "http://tortoisesvn.tigris.org/"
20592
20593 \end_inset
20594
20595 , which integrates Subversion operations into the context (rightclick) menu
20596  of Windows Explorer.
20597  Operations done outside LyX will typically be more convenient using the
20598  Explorer context menu.
20599  Note that TortoiseSVN is not a replacement for the client program, which
20600  is what LyX itself will use.
20601 \end_layout
20602
20603 \begin_layout Subsubsection
20604 Bringing a document under Subversion control
20605 \end_layout
20606
20607 \begin_layout Standard
20608 Before a LyX document can be brought under version control in Subversion,
20609  its parent directory needs to be under version control.
20610  If the document is being added to a project already in the repository,
20611  this is accomplished by checking the project out to the directory where
20612  the new document will be placed.
20613  If the project itself is not yet under version control (for instance, if
20614  this document starts a new project), the directory must be imported into
20615  the repository.
20616  This is done outside LyX.
20617  Both import and checkout are easily accomplished from the Explorer context
20618  menu using TortoiseSVN, or alternatively can be done using the command
20619  line client at a DOS prompt.
20620  The procedure for importing the project using TortoiseSVN is described
20621  below, assuming an existing repository and a new project being started
20622  in 
20623 \family typewriter
20624 C:
20625 \backslash
20626 new project
20627 \family default
20628 .
20629  For information on using the Subversion client program, run 
20630 \family typewriter
20631 svn --help 
20632 \family default
20633 in a DOS shell.
20634 \end_layout
20635
20636 \begin_layout Enumerate
20637 Locate 
20638 \family typewriter
20639 C:
20640 \backslash
20641 new project 
20642 \family default
20643 in Windows Explorer, right click it, and select 
20644 \family typewriter
20645 TortoiseSVN > Repo-browser
20646 \family default
20647 .
20648  If necessary, adjust the URL for the repository, then click OK.
20649 \end_layout
20650
20651 \begin_layout Enumerate
20652 Right click the level of the repository under which you want to place the
20653  new project folder (typically the top level) and click 
20654 \family typewriter
20655 Create folder\SpecialChar \ldots{}
20656
20657 \family default
20658  Supply a name for the project folder and click OK.
20659  Add a message for the log file if desired, then click OK again.
20660  The new project folder should appear in the repository.
20661  Finally, click OK again to exit the repository browser.
20662 \end_layout
20663
20664 \begin_layout Enumerate
20665 Once again right click 
20666 \family typewriter
20667 C:
20668 \backslash
20669 new project
20670 \family default
20671 , this time selecting SVN Checkout\SpecialChar \ldots{}
20672  Select the URL of the project folder
20673  you just created in the repository, and set the checkout directory to 
20674 \family typewriter
20675 C:
20676 \backslash
20677 new project.
20678
20679 \family default
20680  Click OK.
20681  You will be warned about a non-empty folder; click OK to proceed.
20682  You should now have a 
20683 \family typewriter
20684 .svn
20685 \family default
20686  directory under 
20687 \family typewriter
20688 C:
20689 \backslash
20690 new project.
20691 \end_layout
20692
20693 \begin_layout Enumerate
20694 Create or open your document in LyX and click 
20695 \family sans
20696 \bar under
20697 F
20698 \bar default
20699 ile\SpecialChar \menuseparator
20700
20701 \bar under
20702 V
20703 \bar default
20704 ersion
20705 \begin_inset space ~
20706 \end_inset
20707
20708 Control\SpecialChar \menuseparator
20709
20710 \bar under
20711 R
20712 \bar default
20713 egister.
20714  
20715 \family default
20716 Add a log message and click OK to commit the document to version control.
20717 \end_layout
20718
20719 \begin_layout Standard
20720 From this point onward, you should have full functionality in the 
20721 \family sans
20722 \bar under
20723 F
20724 \bar default
20725 ile\SpecialChar \menuseparator
20726
20727 \bar under
20728 V
20729 \bar default
20730 ersion
20731 \begin_inset space ~
20732 \end_inset
20733
20734 Control
20735 \family default
20736  menu.
20737  You also have the option of checking the document in and out, viewing its
20738  history, etc.
20739  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20740  client program from a command prompt.
20741 \end_layout
20742
20743 \begin_layout Subsubsection
20744 SSH tunnel used with SVN under Windows
20745 \end_layout
20746
20747 \begin_layout Standard
20748 Compared with Linux setting up svn client to communicate over ssh under
20749  Windows is a rather troublesome task.
20750  We will at least offer some hints how to setup the client side but prior
20751  knowledge about ssh and the Windows command line is needed, also be prepared
20752  for a great deal of frustration\SpecialChar \ldots{}
20753
20754 \end_layout
20755
20756 \begin_layout Enumerate
20757 Get a svn client for windows, as described in the previous sections.
20758  When it is a fresh install run some svn command (e.g.
20759  
20760 \begin_inset Flex Code
20761 status collapsed
20762
20763 \begin_layout Plain Layout
20764 svn --version
20765 \end_layout
20766
20767 \end_inset
20768
20769 ) to create config files, which you will need to change later on.
20770 \end_layout
20771
20772 \begin_layout Enumerate
20773 Choose a ssh client for Windows.
20774  There are several possibilities, we will use the one from Putty tools
20775 \begin_inset Foot
20776 status open
20777
20778 \begin_layout Plain Layout
20779 \begin_inset Flex URL
20780 status collapsed
20781
20782 \begin_layout Plain Layout
20783
20784 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20785 \end_layout
20786
20787 \end_inset
20788
20789
20790 \end_layout
20791
20792 \end_inset
20793
20794 .
20795  You will need to set the connection up so that the client doesn't ask for
20796  any password from you.
20797  To keep things easy we will use only keys without any additional password
20798  protection etc.
20799 \end_layout
20800
20801 \begin_deeper
20802 \begin_layout Enumerate
20803 Generate keys by 
20804 \begin_inset Flex Code
20805 status collapsed
20806
20807 \begin_layout Plain Layout
20808 puttygen
20809 \end_layout
20810
20811 \end_inset
20812
20813 .
20814  Save your private .ppk key file and put the public one on the server side.
20815  If the SVN server runs on Linux, note that the format of the public key
20816  is not compatible with Linux openssh and you will need to direcly copy-paste
20817  the key from the “
20818 \emph on
20819 Public key for pasting into OpenSSH authorized_keys file
20820 \emph default
20821 :” edit field into the server's 
20822 \begin_inset Flex Code
20823 status collapsed
20824
20825 \begin_layout Plain Layout
20826 ~/.ssh/authorized_keys
20827 \end_layout
20828
20829 \end_inset
20830
20831
20832 \begin_inset Flex Code
20833 status collapsed
20834
20835 \begin_layout Plain Layout
20836 authorized_keys2
20837 \end_layout
20838
20839 \end_inset
20840
20841  file.
20842 \end_layout
20843
20844 \begin_layout Enumerate
20845 Get the Putty's 
20846 \begin_inset Flex Code
20847 status collapsed
20848
20849 \begin_layout Plain Layout
20850 plink
20851 \end_layout
20852
20853 \end_inset
20854
20855 .
20856  In the SVN config file
20857 \begin_inset Foot
20858 status collapsed
20859
20860 \begin_layout Plain Layout
20861 Exact path depends on Windows version, usually somewhere around 
20862 \begin_inset Flex Code
20863 status collapsed
20864
20865 \begin_layout Plain Layout
20866 c:
20867 \backslash
20868 Documents and Settings
20869 \backslash
20870 user
20871 \backslash
20872 Application Data
20873 \backslash
20874 Subversion
20875 \backslash
20876 config
20877 \end_layout
20878
20879 \end_inset
20880
20881  / 
20882 \begin_inset Flex Code
20883 status collapsed
20884
20885 \begin_layout Plain Layout
20886 AppData
20887 \backslash
20888 Roaming
20889 \backslash
20890 Subversion
20891 \end_layout
20892
20893 \end_inset
20894
20895 .
20896 \end_layout
20897
20898 \end_inset
20899
20900 , section [tunnels], setup ssh command, e.g.
20901  
20902 \begin_inset Flex Code
20903 status collapsed
20904
20905 \begin_layout Plain Layout
20906 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20907 \end_layout
20908
20909 \end_inset
20910
20911 .
20912 \begin_inset Foot
20913 status collapsed
20914
20915 \begin_layout Plain Layout
20916 It will usually take a lot of time to get exact command right and it depends
20917  on many things.
20918  For example do not have some remote server saved as a default session in
20919  Putty etc.
20920  If things fail, try to connect via plink without SVN first.
20921 \end_layout
20922
20923 \end_inset
20924
20925
20926 \end_layout
20927
20928 \end_deeper
20929 \begin_layout Enumerate
20930 Checkout the SVN archive, e.g.
20931  
20932 \begin_inset Flex Code
20933 status collapsed
20934
20935 \begin_layout Plain Layout
20936 svn co svn+ssh://user@server/repository_path
20937 \end_layout
20938
20939 \end_inset
20940
20941 .
20942 \end_layout
20943
20944 \begin_layout Subsubsection
20945 End-of-Line Conversions
20946 \end_layout
20947
20948 \begin_layout Standard
20949 When the collaborators are mixing Linux and Windows environments, LyX will
20950  use different line endings inside the .lyx files.
20951  This is not a problem as far as LyX functionality is concerned, but the
20952  commit diffs will be huge and merge-conflicts prone.
20953  Fortunately SVN itself knows
20954 \begin_inset Foot
20955 status collapsed
20956
20957 \begin_layout Plain Layout
20958 \begin_inset Flex URL
20959 status collapsed
20960
20961 \begin_layout Plain Layout
20962
20963 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20964 \end_layout
20965
20966 \end_inset
20967
20968
20969 \end_layout
20970
20971 \end_inset
20972
20973  how to deal with CR/LF problems when switching .lyx files to the 
20974 \begin_inset Flex Code
20975 status collapsed
20976
20977 \begin_layout Plain Layout
20978 native
20979 \end_layout
20980
20981 \end_inset
20982
20983  mode.
20984 \begin_inset Foot
20985 status collapsed
20986
20987 \begin_layout Plain Layout
20988 For the lazy guys: 
20989 \begin_inset Flex Code
20990 status collapsed
20991
20992 \begin_layout Plain Layout
20993 svn propset svn:eol-style native FILE_NAME
20994 \end_layout
20995
20996 \end_inset
20997
20998
20999 \end_layout
21000
21001 \end_inset
21002
21003
21004 \end_layout
21005
21006 \begin_layout Subsection
21007 Further tuning
21008 \end_layout
21009
21010 \begin_layout Standard
21011 With the recent addition of the vc-command function LyX power users are
21012  allowed to create their own commands for revision control.
21013 \end_layout
21014
21015 \begin_layout Standard
21016 As an example you can see how two TortoiseSVN commands could be integrated
21017  directly:
21018 \end_layout
21019
21020 \begin_layout Description
21021 Commit: 
21022 \begin_inset Flex Code
21023 status collapsed
21024
21025 \begin_layout Plain Layout
21026 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21027 \end_layout
21028
21029 \end_inset
21030
21031
21032 \end_layout
21033
21034 \begin_layout Description
21035 Revert: 
21036 \begin_inset Flex Code
21037 status collapsed
21038
21039 \begin_layout Plain Layout
21040 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21041 \end_layout
21042
21043 \end_inset
21044
21045
21046 \end_layout
21047
21048 \begin_layout Subsection
21049 Version control and Document comparison
21050 \end_layout
21051
21052 \begin_layout Standard
21053 One of the typical uses of version control is to inspect the changes between
21054  revisions, usually by creating 
21055 \begin_inset Flex Code
21056 status collapsed
21057
21058 \begin_layout Plain Layout
21059 diff
21060 \end_layout
21061
21062 \end_inset
21063
21064  dumps.
21065  While this is useful for plain text files, it is much less useful in the
21066  case of LyX files, which have more complicated structure.
21067  Hence we provide binding to the Document comparison feature.
21068  They are two ways of calling this feature - either by direct call of 
21069 \begin_inset Flex Code
21070 status collapsed
21071
21072 \begin_layout Plain Layout
21073 VC_COMPARE
21074 \end_layout
21075
21076 \end_inset
21077
21078  LyX function (for details see LyX functions manual) or by icon/menu item
21079  
21080 \begin_inset Flex MenuItem
21081 status collapsed
21082
21083 \begin_layout Plain Layout
21084 Compare with older revision...
21085 \end_layout
21086
21087 \end_inset
21088
21089 .
21090  One can either compare two chosen revisions of the document or he can simply
21091  compare the current version of edited text with older revisions (where
21092  '
21093 \begin_inset Flex MenuItem
21094 status collapsed
21095
21096 \begin_layout Plain Layout
21097 0
21098 \end_layout
21099
21100 \end_inset
21101
21102 ' revisions back means comparison of the edited file with last commited
21103  revision).
21104  
21105 \end_layout
21106
21107 \begin_layout Standard
21108 This feature is supported for SVN and RCS though due to the more complicated
21109  versioning scheme of RCS there is a constraint -- when addressing the revisions
21110  in dialog, numbers always point to the last number in RCS revision number,
21111  i.e.
21112  '35' in '1.2.35'.
21113 \end_layout
21114
21115 \begin_layout Section
21116 Literate Programming
21117 \end_layout
21118
21119 \begin_layout Standard
21120 Updated by 
21121 \noun on
21122 Kayvan Sylvan 
21123 \noun default
21124 (kayvan@sylvan.com)
21125 \noun on
21126
21127 \noun default
21128 original documentation written by 
21129 \noun on
21130 Edmar Wienskoski Jr.
21131
21132 \noun default
21133  (edmar-w-jr@technologist.com)
21134 \end_layout
21135
21136 \begin_layout Subsection
21137 Introduction
21138 \end_layout
21139
21140 \begin_layout Standard
21141 The main purpose of this documentation is to show you how to use LyX for
21142  literate programming, where it is assumed that you are familiar with this
21143  programming technique, and know what 
21144 \begin_inset Quotes eld
21145 \end_inset
21146
21147 tangling
21148 \begin_inset Quotes erd
21149 \end_inset
21150
21151  and 
21152 \begin_inset Quotes eld
21153 \end_inset
21154
21155 weaving
21156 \begin_inset Quotes erd
21157 \end_inset
21158
21159  means.
21160  If that is not the case, please follow the web links provided in the following
21161  sections.
21162  There is a lot of good documentation out there covering old development
21163  history to the latest tools tips.
21164 \end_layout
21165
21166 \begin_layout Standard
21167 It is also assumed that you are familiar with LyX itself to a point that
21168  you are comfortable changing your LyX preferences, and X resources file.
21169  If that is not the case please refer to other LyX documentation to cover
21170  your specific needs.
21171 \end_layout
21172
21173 \begin_layout Subsection
21174 Literate Programming
21175 \end_layout
21176
21177 \begin_layout Standard
21178 From the Literate Programming FAQ: 
21179 \end_layout
21180
21181 \begin_layout Quotation
21182 Literate programming is the combination of documentation and source together
21183  in a fashion suited for reading by human beings.
21184  In fact, literate programs should be enjoyable reading, even inviting!
21185  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21186  and documentation in a single file.
21187  Literate programming tools then parse the file to produce either readable
21188  documentation or compilable source.
21189  The WEB style of literate programming was created by D.
21190 \begin_inset space \thinspace{}
21191 \end_inset
21192
21193 E.
21194  Knuth during the development of his TeX typesetting software.
21195  
21196 \end_layout
21197
21198 \begin_layout Standard
21199 Another excerpt says:
21200 \end_layout
21201
21202 \begin_layout Quotation
21203
21204 \emph on
21205 How is literate programming different from verbose commenting?
21206 \end_layout
21207
21208 \begin_layout Quotation
21209 There are three distinguishing characteristics.
21210  In order of importance, they are: 
21211 \end_layout
21212
21213 \begin_deeper
21214 \begin_layout Itemize
21215 flexible order of elaboration 
21216 \end_layout
21217
21218 \begin_layout Itemize
21219 automatic support for browsing 
21220 \end_layout
21221
21222 \begin_layout Itemize
21223 typeset documentation, especially diagrams and mathematics 
21224 \end_layout
21225
21226 \end_deeper
21227 \begin_layout Standard
21228 Now that I sparked your curiosity, take a look in the references.
21229 \end_layout
21230
21231 \begin_layout Subsubsection
21232 References
21233 \end_layout
21234
21235 \begin_layout Standard
21236 The complete Literate Programming FAQ can be found at:
21237 \end_layout
21238
21239 \begin_layout Quote
21240 Literate Programming FAQ 
21241 \begin_inset Flex URL
21242 status collapsed
21243
21244 \begin_layout Plain Layout
21245
21246 http://www.literateprogramming.com/lpfaq.pdf
21247 \end_layout
21248
21249 \end_inset
21250
21251
21252 \end_layout
21253
21254 \begin_layout Standard
21255 The FAQ lists 23 (twenty three!) different literate programming tools.
21256  Where some are specialized or 
21257 \begin_inset Quotes eld
21258 \end_inset
21259
21260 tailored
21261 \begin_inset Quotes erd
21262 \end_inset
21263
21264  for particular programming languages, while other have general scope.
21265  I selected 
21266 \noun on
21267 Noweb
21268 \noun default
21269  for my own use for several reasons:
21270 \end_layout
21271
21272 \begin_layout Itemize
21273 It can generate the documentation either in LaTeX or HTML.
21274 \end_layout
21275
21276 \begin_layout Itemize
21277 It has a open architecture, i.
21278 \begin_inset space \thinspace{}
21279 \end_inset
21280
21281 g.
21282 \begin_inset space \space{}
21283 \end_inset
21284
21285 it is easy to plug in new filters and to perform special processing that
21286  you may need.
21287  
21288 \end_layout
21289
21290 \begin_layout Itemize
21291 There is a good selection of filters available already (the HTML is one
21292  of them).
21293 \end_layout
21294
21295 \begin_layout Itemize
21296 It is free.
21297 \end_layout
21298
21299 \begin_layout Standard
21300 The Noweb web page can be found at: 
21301 \end_layout
21302
21303 \begin_layout Quote
21304 Noweb home page 
21305 \begin_inset Flex URL
21306 status collapsed
21307
21308 \begin_layout Plain Layout
21309
21310 http://www.cs.virginia.edu/~nr/noweb/
21311 \end_layout
21312
21313 \end_inset
21314
21315
21316 \end_layout
21317
21318 \begin_layout Standard
21319 Starting from there you can reach many other interesting links and even
21320  some literate program examples.
21321 \end_layout
21322
21323 \begin_layout Subsection
21324 LyX and Literate Programming
21325 \end_layout
21326
21327 \begin_layout Standard
21328 The LyX support for Literate Programming is provided by using the generic
21329  LyX converters mechanism.
21330  This support is provided in a 
21331 \begin_inset Quotes eld
21332 \end_inset
21333
21334 Noweb independent
21335 \begin_inset Quotes erd
21336 \end_inset
21337
21338  way, i.
21339 \begin_inset space \thinspace{}
21340 \end_inset
21341
21342 g.
21343 \begin_inset space \space{}
21344 \end_inset
21345
21346 you will be able to use this new LyX feature with some other literate programmin
21347 g tool of your choice by just changing your LyX preferences.
21348 \end_layout
21349
21350 \begin_layout Subsubsection
21351 Generating documents and code (weaving and tangling)
21352 \end_layout
21353
21354 \begin_layout Paragraph
21355 Selecting the document class
21356 \end_layout
21357
21358 \begin_layout Standard
21359 If you have installed Noweb and LyX successfully, whenever you open a new
21360  document or try to change the document class of an existing one, you will
21361  find that there are three new document classes available:
21362 \end_layout
21363
21364 \begin_layout Itemize
21365 Article (Noweb)
21366 \end_layout
21367
21368 \begin_layout Itemize
21369 Book (Noweb)
21370 \end_layout
21371
21372 \begin_layout Itemize
21373 Report (Noweb)
21374 \end_layout
21375
21376 \begin_layout Standard
21377 You must select one of them to create your literate documents from.
21378  
21379 \end_layout
21380
21381 \begin_layout Standard
21382 Note that literate documents are not limited to these three classes.
21383  New classes can be generated from other styles like letter or in combination
21384  with other class variations like Article (AMS).
21385  If you have special needs that cannot be covered by one of the existing
21386  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21387  will arrange to insert a new entry, or teach you how to do it.
21388 \begin_inset Foot
21389 status collapsed
21390
21391 \begin_layout Plain Layout
21392 It is very simple, it involves the creation of a file with four lines, and
21393  re-running of the auto configuration.
21394 \end_layout
21395
21396 \end_inset
21397
21398  Moreover, if you use a literate tool other than Noweb you may need to create
21399  a new set of document classes for it.
21400 \end_layout
21401
21402 \begin_layout Paragraph
21403 Typing code in
21404 \end_layout
21405
21406 \begin_layout Standard
21407 LyX enables you to write code with a layout named 
21408 \noun on
21409 Scrap
21410 \noun default
21411 .
21412 \begin_inset Foot
21413 status collapsed
21414
21415 \begin_layout Plain Layout
21416 The equivalent Noweb term is 
21417 \begin_inset Quotes eld
21418 \end_inset
21419
21420 Chunk
21421 \begin_inset Quotes erd
21422 \end_inset
21423
21424 .
21425  For historical reasons, I got used to the term 
21426 \begin_inset Quotes eld
21427 \end_inset
21428
21429 scrap
21430 \begin_inset Quotes erd
21431 \end_inset
21432
21433  introduced by other literate tool named Nuweb, which I used for many years
21434  before rendering myself to Noweb.
21435 \end_layout
21436
21437 \end_inset
21438
21439  Noweb delimits scraps like this:
21440 \end_layout
21441
21442 \begin_layout LyX-Code
21443 <<My scrap>>=
21444 \end_layout
21445
21446 \begin_layout LyX-Code
21447   code
21448 \end_layout
21449
21450 \begin_layout LyX-Code
21451   more code
21452 \end_layout
21453
21454 \begin_layout LyX-Code
21455   even more code
21456 \end_layout
21457
21458 \begin_layout LyX-Code
21459   @
21460 \end_layout
21461
21462 \begin_layout Standard
21463 The problem is that whatever is written in between the << and the 
21464 \family typewriter
21465 @
21466 \family default
21467  must be taken literally, i.
21468 \begin_inset space \thinspace{}
21469 \end_inset
21470
21471 g.
21472 \begin_inset space \space{}
21473 \end_inset
21474
21475 LyX should be prevented from making any special interpretation of what has
21476  been written.
21477  This is handled by a special layout named Scrap, that works like a normal
21478  paragraph but has a free spacing capability.
21479 \end_layout
21480
21481 \begin_layout Standard
21482 The down side of the Scrap paragraph layout is that consecutive paragraphs
21483  of code will be spaced with one empty line in the source code and also
21484  in the printed documentation.
21485  The work around is to enter each line of code within a single Scrap, with
21486  a newline (ctrl-return).
21487  The example above will look like this:
21488 \begin_inset Foot
21489 status collapsed
21490
21491 \begin_layout Plain Layout
21492 If you have a printed version of this document you will not see any difference
21493  between the previous example and this one.
21494 \end_layout
21495
21496 \end_inset
21497
21498
21499 \end_layout
21500
21501 \begin_layout LyX-Code
21502 <<My scrap>>=
21503 \begin_inset Newline newline
21504 \end_inset
21505
21506   code
21507 \begin_inset Newline newline
21508 \end_inset
21509
21510   more code
21511 \begin_inset Newline newline
21512 \end_inset
21513
21514   even more code
21515 \begin_inset Newline newline
21516 \end_inset
21517
21518   @
21519 \end_layout
21520
21521 \begin_layout Standard
21522 This layout works fine.
21523  The only real inconvenience is that you have to type ctrl-return instead
21524  of a plain return.
21525 \begin_inset Foot
21526 status collapsed
21527
21528 \begin_layout Plain Layout
21529 It is in my list of 
21530 \begin_inset Quotes eld
21531 \end_inset
21532
21533 improvements
21534 \begin_inset Quotes erd
21535 \end_inset
21536
21537  to fix that.
21538 \end_layout
21539
21540 \end_inset
21541
21542
21543 \end_layout
21544
21545 \begin_layout Standard
21546 As a special note, you can also use the 
21547 \begin_inset Quotes eld
21548 \end_inset
21549
21550 %def
21551 \begin_inset Quotes erd
21552 \end_inset
21553
21554  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21555 rence:
21556 \end_layout
21557
21558 \begin_layout LyX-Code
21559 <<My scrap>>=
21560 \begin_inset Newline newline
21561 \end_inset
21562
21563   def some_function(args):
21564 \begin_inset Newline newline
21565 \end_inset
21566
21567     "This is the doc string for this function."
21568 \begin_inset Newline newline
21569 \end_inset
21570
21571     print "My args: ", args
21572 \end_layout
21573
21574 \begin_layout LyX-Code
21575 @ %def some_function
21576 \end_layout
21577
21578 \begin_layout Standard
21579 For an example of this usage and the resulting cross-reference output, look
21580  at the Literate python program in 
21581 \emph on
21582 LIBDIR/examples/listerrors.lyx
21583 \emph default
21584  which should make this all clear.
21585 \end_layout
21586
21587 \begin_layout Paragraph
21588 Generating the documentation
21589 \end_layout
21590
21591 \begin_layout Standard
21592 At this point you already have a new document file with a proper document
21593  class, and with some code and text on it.
21594  How do I print it? The answer is simple, you select 
21595 \family sans
21596 View\SpecialChar \menuseparator
21597 DVI,
21598 \family default
21599  etc.
21600  Just like you would do for a plain document.
21601  No special procedure is required.
21602 \end_layout
21603
21604 \begin_layout Standard
21605 To help orientate you, I will now explain what happens inside LyX:
21606 \end_layout
21607
21608 \begin_layout Enumerate
21609 When the 
21610 \family sans
21611 Update\SpecialChar \menuseparator
21612 DVI
21613 \family default
21614  menu option is chosen, a LaTeX file is generated.
21615  
21616 \end_layout
21617
21618 \begin_deeper
21619 \begin_layout Standard
21620 If the document is of any literate class the generated file will be named
21621  with an extension name defined by the 
21622 \begin_inset Quotes eld
21623 \end_inset
21624
21625 literate
21626 \begin_inset Quotes erd
21627 \end_inset
21628
21629  format (defined in the Preferences panel), otherwise the file will have
21630  the usual 
21631 \family typewriter
21632 .tex
21633 \family default
21634  extension.
21635 \end_layout
21636
21637 \end_deeper
21638 \begin_layout Enumerate
21639 Note that the only difference so far is in the name of the file, no special
21640  processing is required by LyX.
21641  Given that you formatted the code using the Scrap layout that, by itself,
21642  takes care of the business.
21643 \end_layout
21644
21645 \begin_layout Enumerate
21646 If the document is of any literate class LyX will then use the internal
21647  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21648 \begin_inset Foot
21649 status collapsed
21650
21651 \begin_layout Plain Layout
21652 The converters are defined in the 
21653 \family sans
21654 Tools\SpecialChar \menuseparator
21655 Preferences
21656 \family default
21657  panel, under the 
21658 \begin_inset Quotes eld
21659 \end_inset
21660
21661 Conversion
21662 \begin_inset Quotes erd
21663 \end_inset
21664
21665  tab.
21666  See section 
21667 \emph on
21668 Converters
21669 \emph default
21670  of the 
21671 \emph on
21672 Customization
21673 \emph default
21674  manual for general information about converters.
21675 \end_layout
21676
21677 \end_inset
21678
21679  to generate the LaTeX file.
21680 \end_layout
21681
21682 \begin_deeper
21683 \begin_layout Standard
21684 Otherwise it will just skip this step.
21685 \end_layout
21686
21687 \end_deeper
21688 \begin_layout Enumerate
21689 Finally, LaTeX is invoked and the regular post processing continues as in
21690  a plain document.
21691 \end_layout
21692
21693 \begin_layout Standard
21694 Independence from a particular 
21695 \begin_inset Quotes eld
21696 \end_inset
21697
21698 literate tool
21699 \begin_inset Quotes erd
21700 \end_inset
21701
21702  is easily achieved by changing the commands that are run by the various
21703  converters.
21704 \end_layout
21705
21706 \begin_layout Paragraph
21707 Generating the code
21708 \end_layout
21709
21710 \begin_layout Standard
21711 When the build menu option is chosen or the corresponding button in the
21712  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21713  Next, LyX invokes the 
21714 \family typewriter
21715 Noweb->Program
21716 \family default
21717  converter.
21718  This converter needs to be defined by the user and is not installed by
21719  default, though the Program format is.
21720  This converter (like any other converter) will have two parts:
21721 \end_layout
21722
21723 \begin_layout Enumerate
21724 The converter program itself.
21725  This program performs the conversion from the one format to the other (in
21726  this case, from the Noweb format to the Program pseudo-format).
21727 \end_layout
21728
21729 \begin_layout Enumerate
21730 The error log parser.
21731  This is a program whose sole purpose is to rewrite error messages in a
21732  format that LyX understands.
21733  This makes it possible for LyX to place error boxes in the right places
21734  in the file buffer.
21735 \end_layout
21736
21737 \begin_layout Standard
21738 The first part, the 
21739 \begin_inset Quotes eld
21740 \end_inset
21741
21742 Converter
21743 \begin_inset Quotes erd
21744 \end_inset
21745
21746  setting, should be set to 
21747 \begin_inset Quotes eld
21748 \end_inset
21749
21750
21751 \family typewriter
21752 build-script $$i
21753 \family default
21754
21755 \begin_inset Quotes erd
21756 \end_inset
21757
21758 .
21759  This basically means that LyX will call 
21760 \begin_inset Quotes eld
21761 \end_inset
21762
21763 build-script
21764 \begin_inset Quotes erd
21765 \end_inset
21766
21767  (a program or script) with the name of the Noweb file (normally a file
21768  in the LyX temp directory).
21769  
21770 \end_layout
21771
21772 \begin_layout Standard
21773 This is an implementation of 
21774 \begin_inset Quotes eld
21775 \end_inset
21776
21777 build-script
21778 \begin_inset Quotes erd
21779 \end_inset
21780
21781  that you can place in a directory on your path:
21782 \end_layout
21783
21784 \begin_layout LyX-Code
21785 #!/bin/sh
21786 \end_layout
21787
21788 \begin_layout LyX-Code
21789 #
21790 \end_layout
21791
21792 \begin_layout LyX-Code
21793 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21794 \end_layout
21795
21796 \begin_layout Standard
21797 The next part of the converter setting is the 
21798 \begin_inset Quotes eld
21799 \end_inset
21800
21801 Flags
21802 \begin_inset Quotes erd
21803 \end_inset
21804
21805  which is to be set to 
21806 \begin_inset Quotes eld
21807 \end_inset
21808
21809
21810 \family typewriter
21811 parselog=listerrors
21812 \family default
21813
21814 \begin_inset Quotes erd
21815 \end_inset
21816
21817 .
21818  This will run any errors that are generated by the 
21819 \begin_inset Quotes eld
21820 \end_inset
21821
21822 build-script
21823 \begin_inset Quotes erd
21824 \end_inset
21825
21826  process through the 
21827 \begin_inset Quotes eld
21828 \end_inset
21829
21830 listerrors
21831 \begin_inset Quotes erd
21832 \end_inset
21833
21834  program.
21835 \end_layout
21836
21837 \begin_layout Standard
21838 The converter code looks in 
21839 \emph on
21840 MYLYXDIR/scripts
21841 \emph default
21842  first, then in 
21843 \emph on
21844 LIBDIR/scripts
21845 \emph default
21846  then on the path for the 
21847 \begin_inset Quotes eld
21848 \end_inset
21849
21850 listerrors
21851 \begin_inset Quotes erd
21852 \end_inset
21853
21854  program.
21855 \end_layout
21856
21857 \begin_layout Standard
21858 The build will normally take place in LyX's temporary directory, so the
21859  files produced by the conversion will be in that directory.
21860  LyX will copy out what it regards as the `main' file, but the 
21861 \family typewriter
21862 Noweb->Program
21863 \family default
21864  conversion may produce several files, and so most of these would then be
21865  deleted when LyX was closed.
21866  The present solution is to use a `copier',
21867 \begin_inset Foot
21868 status collapsed
21869
21870 \begin_layout Plain Layout
21871 See section 
21872 \emph on
21873 Copiers
21874 \emph default
21875  of the 
21876 \emph on
21877 Customization
21878 \emph default
21879  manual for information on these.
21880 \end_layout
21881
21882 \end_inset
21883
21884  in this case, the 
21885 \family typewriter
21886 ext_copy.py
21887 \family default
21888  script in its default mode, so that the entire contents of the temporary
21889  directory is copied.
21890  More will get copied than is needed, to be sure, but nothing will be lost.
21891  If, however, you know what extensions the generated files will have, this
21892  can be improved by using the 
21893 \family typewriter
21894 -e
21895 \family default
21896  option to 
21897 \family typewriter
21898 ext_copy
21899 \family default
21900 .
21901  This option takes a comma-separated list of extensions to copy.
21902  So, for example, if the conversion will generate only files with the extensions
21903  
21904 \family typewriter
21905 .c
21906 \family default
21907  and 
21908 \family typewriter
21909 .h
21910 \family default
21911 , then the correct definition would be:
21912 \end_layout
21913
21914 \begin_layout LyX-Code
21915 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21916 \end_layout
21917
21918 \begin_layout Standard
21919 The result will be that only files with these two extensions will be copied
21920  out.
21921 \end_layout
21922
21923 \begin_layout Paragraph
21924 Build instructions in the document
21925 \end_layout
21926
21927 \begin_layout Standard
21928 The last piece of the integration between LyX and noweb is the 
21929 \begin_inset Quotes eld
21930 \end_inset
21931
21932 build-script
21933 \begin_inset Quotes erd
21934 \end_inset
21935
21936  scrap.
21937  Generally, the instructions for building your program should be embedded
21938  in a scrap of its own.
21939  The noweb-specific 
21940 \begin_inset Quotes eld
21941 \end_inset
21942
21943 build-script
21944 \begin_inset Quotes erd
21945 \end_inset
21946
21947  above uses the notangle command to look for this scrap (called 
21948 \begin_inset Quotes eld
21949 \end_inset
21950
21951 build-script
21952 \begin_inset Quotes erd
21953 \end_inset
21954
21955 ) and runs its contents through 
21956 \begin_inset Quotes eld
21957 \end_inset
21958
21959 sh
21960 \begin_inset Quotes erd
21961 \end_inset
21962
21963 .
21964 \end_layout
21965
21966 \begin_layout Standard
21967 Typically, such a scrap would look something like this:
21968 \end_layout
21969
21970 \begin_layout LyX-Code
21971 <<build-script>>=
21972 \begin_inset Newline newline
21973 \end_inset
21974
21975 #!/bin/sh
21976 \begin_inset Newline newline
21977 \end_inset
21978
21979
21980 \begin_inset Newline newline
21981 \end_inset
21982
21983 if [ -z "${NOWEB_SOURCE}" ]
21984 \begin_inset Newline newline
21985 \end_inset
21986
21987 then
21988 \begin_inset Newline newline
21989 \end_inset
21990
21991   NOWEB_SOURCE=myfile.nw
21992 \begin_inset Newline newline
21993 \end_inset
21994
21995 fi
21996 \begin_inset Newline newline
21997 \end_inset
21998
21999 [...
22000  code to extract files ...]
22001 \begin_inset Newline newline
22002 \end_inset
22003
22004 [...
22005  code to compile files ...]
22006 \begin_inset Newline newline
22007 \end_inset
22008
22009 @
22010 \end_layout
22011
22012 \begin_layout Standard
22013 Look in 
22014 \emph on
22015 LIBDIR/examples/listerrors.lyx
22016 \emph default
22017  or in 
22018 \emph on
22019 LIBDIR/examples/Literate.lyx
22020 \emph default
22021  which implement two versions of the 
22022 \begin_inset Quotes eld
22023 \end_inset
22024
22025 listerrors
22026 \begin_inset Quotes erd
22027 \end_inset
22028
22029  program for some illustrations of how all of these pieces go together or
22030  in 
22031 \emph on
22032 LIBDIR/examples/noweb2lyx.lyx.
22033
22034 \emph default
22035  Interestingly, these three files show off the language-indepence of the
22036  LyX literate programming support since they are written in Python, C and
22037  Perl respectively.
22038 \end_layout
22039
22040 \begin_layout Subsubsection
22041 Configuring LyX
22042 \end_layout
22043
22044 \begin_layout Standard
22045 All the Literate Programming support is configured by the 
22046 \family sans
22047 Tools\SpecialChar \menuseparator
22048 Preferences
22049 \family default
22050  panel in the 
22051 \begin_inset Quotes eld
22052 \end_inset
22053
22054 Conversion
22055 \begin_inset Quotes erd
22056 \end_inset
22057
22058  tab.
22059  The important parts are:
22060 \end_layout
22061
22062 \begin_layout Description
22063 the
22064 \begin_inset space ~
22065 \end_inset
22066
22067
22068 \begin_inset Quotes eld
22069 \end_inset
22070
22071 literate
22072 \begin_inset Quotes erd
22073 \end_inset
22074
22075
22076 \begin_inset space ~
22077 \end_inset
22078
22079 format Set up via the Formats tab, this is where the Noweb-specific pieces
22080  are set up.
22081  The 
22082 \family sans
22083 GUI Name
22084 \family default
22085  is set to 
22086 \family typewriter
22087 NoWeb
22088 \family default
22089 , the file extension is set to 
22090 \family typewriter
22091 .nw
22092 \family default
22093 .
22094  This tells LyX to create a file with a 
22095 \family typewriter
22096 .nw
22097 \family default
22098  extension in the first step of the conversion process.
22099 \end_layout
22100
22101 \begin_layout Description
22102 the
22103 \begin_inset space ~
22104 \end_inset
22105
22106
22107 \family sans
22108 Program
22109 \family default
22110
22111 \begin_inset space ~
22112 \end_inset
22113
22114 format This is an empty format whose sole purpose is to be the endpoint
22115  of a conversion (which then allows us to set up a converter for it).
22116 \end_layout
22117
22118 \begin_layout Description
22119
22120 \family sans
22121 NoWeb
22122 \family default
22123 ->
22124 \family sans
22125 LaTeX
22126 \family default
22127  This converter performs the 
22128 \begin_inset Quotes eld
22129 \end_inset
22130
22131 weaving
22132 \begin_inset Quotes erd
22133 \end_inset
22134
22135  of the literate document.
22136  For Noweb, it is set to 
22137 \begin_inset Quotes eld
22138 \end_inset
22139
22140
22141 \family typewriter
22142 noweave -delay -index $$i > $$o
22143 \family default
22144
22145 \begin_inset Quotes erd
22146 \end_inset
22147
22148
22149 \end_layout
22150
22151 \begin_layout Description
22152
22153 \family sans
22154 NoWeb
22155 \family default
22156 ->
22157 \family sans
22158 Program
22159 \family default
22160  This performs the 
22161 \begin_inset Quotes eld
22162 \end_inset
22163
22164 tangling step
22165 \begin_inset Quotes erd
22166 \end_inset
22167
22168 .
22169  As stated above, the Converter is set to 
22170 \begin_inset Quotes eld
22171 \end_inset
22172
22173
22174 \family typewriter
22175 build-script $$i
22176 \family default
22177
22178 \begin_inset Quotes erd
22179 \end_inset
22180
22181 , with Flags set to 
22182 \begin_inset Quotes eld
22183 \end_inset
22184
22185
22186 \family typewriter
22187 originaldir,parselog=listerrors
22188 \family default
22189
22190 \begin_inset Quotes erd
22191 \end_inset
22192
22193 .
22194 \end_layout
22195
22196 \begin_layout Subsubsection
22197 Debug extensions
22198 \end_layout
22199
22200 \begin_layout Standard
22201 There is also a new function implemented in the LyX server, the 
22202 \begin_inset Quotes eld
22203 \end_inset
22204
22205 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22206  
22207 \end_layout
22208
22209 \begin_layout Standard
22210 When debugging code with ddd/gdb, it is possible to invoke a text editor
22211  at the current execution position with a single key stroke.
22212  The default ddd configuration for that is shift-ctrl-V.
22213  It happens that you can define the editor command line invocation in ddd
22214  by accessing the 
22215 \family sans
22216 Edit\SpecialChar \menuseparator
22217 Preferences\SpecialChar \menuseparator
22218 Helpers
22219 \family default
22220  dialog and changing the "Edit Sources" entry.
22221 \end_layout
22222
22223 \begin_layout Standard
22224 I take advantage of the new created LyX server function and this ddd feature,
22225  and set 
22226 \begin_inset Quotes eld
22227 \end_inset
22228
22229 Edit Sources
22230 \begin_inset Quotes erd
22231 \end_inset
22232
22233  to:
22234 \end_layout
22235
22236 \begin_layout LyX-Code
22237 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22238 \end_layout
22239
22240 \begin_layout Standard
22241 With this, whenever you are using ddd and find a point in the program that
22242  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22243  ddd you forward this information to LyX through the LyX server and then
22244  the LyX window will show the same file with the cursor at the same position
22245  ddd was pointing to.
22246  No more guessing or long scrolling to locate a point in the program back
22247  from debugging !
22248 \end_layout
22249
22250 \begin_layout Standard
22251 Note however that you must enable the LyX server to get this feature working
22252  (it is disabled by default).
22253  You can enable it in 
22254 \family sans
22255 Preferences
22256 \family default
22257  (tabs 
22258 \family sans
22259 Inputs
22260 \family default
22261
22262 \family sans
22263 Paths
22264 \family default
22265 ) by entering in the 
22266 \family sans
22267 LyXserver pipe
22268 \family default
22269  a path like 
22270 \begin_inset Quotes eld
22271 \end_inset
22272
22273
22274 \family typewriter
22275 /home/<your-home-directory>/.lyx/lyxpipe
22276 \family default
22277
22278 \begin_inset Quotes erd
22279 \end_inset
22280
22281
22282 \end_layout
22283
22284 \begin_layout Standard
22285 Read the LyX server documentation in the 
22286 \emph on
22287 Customization Manual
22288 \emph default
22289  for further information.
22290 \end_layout
22291
22292 \begin_layout Subsubsection
22293 Toolbar extensions
22294 \end_layout
22295
22296 \begin_layout Standard
22297 There are six new buttons that can be added to your LyX toolbar.
22298  Five of these buttons are short cuts to layout styles: 
22299 \family sans
22300 Standard
22301 \family default
22302
22303 \family sans
22304 Section
22305 \family default
22306
22307 \family sans
22308 LaTeX
22309 \family default
22310
22311 \family sans
22312 LyX-Code
22313 \family default
22314 , and 
22315 \family sans
22316 Scrap
22317 \family default
22318 .
22319  The last one is a short cut to the 
22320 \begin_inset Quotes eld
22321 \end_inset
22322
22323 Build Program
22324 \begin_inset Quotes erd
22325 \end_inset
22326
22327  File menu entry.
22328  
22329 \end_layout
22330
22331 \begin_layout Standard
22332 LyX has a range of buttons that are available for tool bar customization.
22333  In my toolbar I like to combine the six short cuts above with two more:
22334  One for 
22335 \family sans
22336 View
22337 \family default
22338 \SpecialChar \menuseparator
22339
22340 \family sans
22341 Update
22342 \family default
22343 \SpecialChar \menuseparator
22344
22345 \family sans
22346 DVI
22347 \family default
22348  and the other for 
22349 \family sans
22350 View\SpecialChar \menuseparator
22351 DVI
22352 \family default
22353  File menu entries.
22354  Here is how it looks like:
22355 \end_layout
22356
22357 \begin_layout LyX-Code
22358 Toolbar
22359 \end_layout
22360
22361 \begin_layout LyX-Code
22362   Layouts
22363 \end_layout
22364
22365 \begin_layout LyX-Code
22366   Icon "layout Standard"
22367 \end_layout
22368
22369 \begin_layout LyX-Code
22370   Icon "layout Section"
22371 \end_layout
22372
22373 \begin_layout LyX-Code
22374   Icon "layout LaTeX"
22375 \end_layout
22376
22377 \begin_layout LyX-Code
22378   Icon "layout LyX-Code"
22379 \end_layout
22380
22381 \begin_layout LyX-Code
22382   Icon "layout Scrap"
22383 \end_layout
22384
22385 \begin_layout LyX-Code
22386   Separator
22387 \end_layout
22388
22389 \begin_layout LyX-Code
22390   Icon "buffer-view"
22391 \end_layout
22392
22393 \begin_layout LyX-Code
22394   Icon "buffer-typeset"
22395 \end_layout
22396
22397 \begin_layout LyX-Code
22398   Icon "build-program"
22399 \end_layout
22400
22401 \begin_layout LyX-Code
22402   Separator
22403 \end_layout
22404
22405 \begin_layout LyX-Code
22406 .
22407 \end_layout
22408
22409 \begin_layout LyX-Code
22410 .
22411 \end_layout
22412
22413 \begin_layout LyX-Code
22414 .
22415 \end_layout
22416
22417 \begin_layout LyX-Code
22418 End
22419 \end_layout
22420
22421 \begin_layout Subsubsection
22422 Colors customization
22423 \end_layout
22424
22425 \begin_layout Standard
22426 There are a number of colors in LyX that can be customized in 
22427 \family sans
22428 Preferences
22429 \family default
22430 .
22431  One of the things that bothers people is the LaTeX font color.
22432  The default color is red, since the scraps uses LaTeX font, and there is
22433  a lot of scraps in literate documents, you may get tired of seeing everything
22434  in red.
22435  You can change it by going to the tabs 
22436 \family sans
22437 Look&Feel
22438 \family default
22439
22440 \family sans
22441 Colors.
22442 \end_layout
22443
22444 \begin_layout Standard
22445 The next thing is the visible presence of the newline character in the screen.
22446  You can choose the color of this particular character and make it blend
22447  in the background.
22448  I recommend you choosing a color that is close to the background but not
22449  equal, that way you still can see it is there, but it is not bothering
22450  you anymore.
22451  
22452 \end_layout
22453
22454 \begin_layout Chapter
22455 Special features
22456 \end_layout
22457
22458 \begin_layout Standard
22459 You can do everything with LyX that you can do with LaTeX.
22460  However, LyX cannot support every LaTeX feature directly.
22461  But you can always use TeX Code.
22462  This chapter shows you some more special things you might want to use.
22463  For other special things you can do with figures, tables, floats, boxes
22464  and notes, have a look at the 
22465 \emph on
22466 EmbeddedObjects
22467 \emph default
22468  manual.
22469 \end_layout
22470
22471 \begin_layout Section
22472 Multiple Text Columns
22473 \end_layout
22474
22475 \begin_layout Standard
22476 This feature is independent of the option 
22477 \family sans
22478 Two-column document
22479 \family default
22480  in the document settings under 
22481 \family sans
22482 Text Layout
22483 \family default
22484 .
22485  If you want to have 2
22486 \begin_inset space ~
22487 \end_inset
22488
22489 columns for the whole document, it is recommended to use the 
22490 \family sans
22491 Two-column document
22492 \family default
22493  option.
22494  For all other cases use this feature.
22495 \end_layout
22496
22497 \begin_layout Standard
22498 To use multiple text columns in your document, you have to load the module
22499  
22500 \family sans
22501 Multiple Columns
22502 \family default
22503  (menu 
22504 \family sans
22505 Document\SpecialChar \menuseparator
22506 Settings\SpecialChar \menuseparator
22507 Modules
22508 \family default
22509 ) and must have the LaTeX-package 
22510 \series bold
22511 multicol
22512 \series default
22513
22514 \begin_inset Index idx
22515 status collapsed
22516
22517 \begin_layout Plain Layout
22518 LaTeX-packages ! multicol
22519 \end_layout
22520
22521 \end_inset
22522
22523  installed.
22524 \end_layout
22525
22526 \begin_layout Standard
22527 Footnotes within multiple columns will be placed at the bottom of the page
22528  and not under each column.
22529  Within the different columns you can use everything, with the limitation
22530  that for floats you need to use the float option 
22531 \family sans
22532 Span columns
22533 \family default
22534 .
22535 \end_layout
22536
22537 \begin_layout Subsection
22538 Basics
22539 \end_layout
22540
22541 \begin_layout Standard
22542 If you want to have 2
22543 \begin_inset space ~
22544 \end_inset
22545
22546 columns in your text, use the style 
22547 \family sans
22548 Begin Multiple Columns
22549 \family default
22550  where the columns should start.
22551  The content of the style is the number of the columns, so in this case
22552  use a 
22553 \begin_inset Quotes eld
22554 \end_inset
22555
22556 2
22557 \begin_inset Quotes erd
22558 \end_inset
22559
22560 .
22561  At the point where the columns should end use the style 
22562 \family sans
22563 End Multiple Columns
22564 \family default
22565  and keep it empty.
22566 \end_layout
22567
22568 \begin_layout Standard
22569 Here is an example:
22570 \end_layout
22571
22572 \begin_layout Begin Multiple Columns
22573 2
22574 \end_layout
22575
22576 \begin_layout Standard
22577 \noindent
22578
22579 \series bold
22580 \size small
22581 The Adventure of the Empty House
22582 \series default
22583
22584 \begin_inset Newline newline
22585 \end_inset
22586
22587 by 
22588 \noun on
22589 Sir Arthur Conan Doyle
22590 \end_layout
22591
22592 \begin_layout Standard
22593
22594 \size small
22595 It was in the spring of the year 1894 that all London was interested, and
22596  the fashionable world dismayed, by the murder of the Honourable Ronald
22597  Adair under most unusual and inexplicable circumstances.
22598  The public has already learned those particulars of the crime which came
22599  out in the police investigation, but a good deal was suppressed upon that
22600  occasion, since the case for the prosecution was so overwhelmingly strong
22601  that it was not necessary to bring forward all the facts.
22602  Only now, at the end of nearly ten years, am I allowed to supply those
22603  missing links which make up the whole of that remarkable chain.
22604  The crime was of interest in itself, but that interest was as nothing to
22605  me compared to the inconceivable sequel, which afforded me the greatest
22606  shock and surprise of any event in my adventurous life.
22607  Even now, after this long interval, I find myself thrilling as I think
22608  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22609 ty which utterly submerged my mind.
22610  Let me say to that public, which has shown some interest in those glimpses
22611  which I have occasionally given them of the thoughts and actions of a very
22612  remarkable man, that they are not to blame me if I have not shared my knowledge
22613  with them, for I should have considered it my first duty to do so, had
22614  I not been barred by a positive prohibition from his own lips, which was
22615  only withdrawn upon the third of last month.
22616 \end_layout
22617
22618 \begin_layout End Multiple Columns
22619
22620 \end_layout
22621
22622 \begin_layout Standard
22623 Here is an example with 3
22624 \begin_inset space ~
22625 \end_inset
22626
22627 columns:
22628 \end_layout
22629
22630 \begin_layout Begin Multiple Columns
22631 3
22632 \end_layout
22633
22634 \begin_layout Standard
22635
22636 \size footnotesize
22637 It can be imagined that my close intimacy with Sherlock Holmes had interested
22638  me deeply in crime, and that after his disappearance I never failed to
22639  read with care the various problems which came before the public.
22640  And I even attempted, more than once, for my own private satisfaction,
22641  to employ his methods in their solution, though with indifferent success.
22642  There was none, however, which appealed to me like this tragedy of Ronald
22643  Adair.
22644  As I read the evidence at the inquest, which led up to a verdict of willful
22645  murder against some person or persons unknown, I realized more clearly
22646  than I had ever done the loss which the community had sustained by the
22647  death of Sherlock Holmes.
22648  There were points about this strange business which would, I was sure,
22649  have specially appealed to him, and the efforts of the police would have
22650  been supplemented, or more probably anticipated, by the trained observation
22651  and the alert mind of the first criminal agent in Europe.
22652  All day, as I drove upon my round, I turned over the case in my mind and
22653  found no explanation which appeared to me to be adequate.
22654  At the risk of telling a twice-told tale, I will recapitulate the facts
22655  as they were known to the public at the conclusion of the inquest.
22656 \end_layout
22657
22658 \begin_layout End Multiple Columns
22659
22660 \end_layout
22661
22662 \begin_layout Standard
22663 You can have up to 10
22664 \begin_inset space ~
22665 \end_inset
22666
22667 columns if you want to, but that might not be very pleasant for the readers
22668  of your document.
22669 \end_layout
22670
22671 \begin_layout Standard
22672 \begin_inset Newpage newpage
22673 \end_inset
22674
22675
22676 \end_layout
22677
22678 \begin_layout Subsection
22679 Columns inside Columns
22680 \end_layout
22681
22682 \begin_layout Standard
22683 You can also have columns inside columns:
22684 \end_layout
22685
22686 \begin_layout Begin Multiple Columns
22687 2
22688 \end_layout
22689
22690 \begin_layout Standard
22691
22692 \size footnotesize
22693 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22694  at that time governor of one of the Australian colonies.
22695  Adair's mother had returned from Australia to undergo the operation for
22696  cataract, and she, her son Ronald, and her daughter Hilda were living together
22697  at 427 Park Lane.
22698 \end_layout
22699
22700 \begin_layout Begin Multiple Columns
22701 2
22702 \end_layout
22703
22704 \begin_layout Standard
22705
22706 \size footnotesize
22707 The youth moved in the best society–had, so far as was known, no enemies
22708  and no particular vices.
22709  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22710  had been broken off by mutual consent some months before, and there was
22711  no sign that it had left any very profound feeling behind it.
22712  For the rest {sic} the man's life moved in a narrow and conventional circle,
22713  for his habits were quiet and his nature unemotional.
22714  Yet it was upon this easy-going young aristocrat that death came, in most
22715  strange and unexpected form, between the hours of ten and eleven-twenty
22716  on the night of March 30, 1894.
22717 \end_layout
22718
22719 \begin_layout End Multiple Columns
22720
22721 \end_layout
22722
22723 \begin_layout Standard
22724
22725 \size footnotesize
22726 Ronald Adair was fond of cards–playing continually, but never for such stakes
22727  as would hurt him.
22728  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22729  It was shown that, after dinner on the day of his death, he had played
22730  a rubber of whist at the latter club.
22731  He had also played there in the afternoon.
22732
22733 \size default
22734  
22735 \size footnotesize
22736 The evidence of those who had played with him– Mr.
22737  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22738  and that there was a fairly equal fall of the cards.
22739  Adair might have lost five pounds, but not more.
22740  His fortune was a considerable one, and such a loss could not in any way
22741  affect him.
22742  He had played nearly every day at one club or other, but he was a cautious
22743  player, and usually rose a winner.
22744  It came out in evidence that, in partnership with Colonel Moran, he had
22745  actually won as much as four hundred and twenty pounds in a sitting, some
22746  weeks before, from Godfrey Milner and Lord Balmoral.
22747  So much for his recent history as it came out at the inquest.
22748 \end_layout
22749
22750 \begin_layout End Multiple Columns
22751
22752 \end_layout
22753
22754 \begin_layout Subsection
22755 Advanced Examples
22756 \end_layout
22757
22758 \begin_layout Standard
22759 The examples in this section show some more special features of multiple
22760  columns.
22761 \end_layout
22762
22763 \begin_layout Standard
22764 For more features of multiple columns, have a look at the documentation
22765  of the LaTeX-package 
22766 \series bold
22767 multicol
22768 \series default
22769
22770 \begin_inset Index idx
22771 status collapsed
22772
22773 \begin_layout Plain Layout
22774 LaTeX-packages ! multicol
22775 \end_layout
22776
22777 \end_inset
22778
22779
22780 \begin_inset CommandInset citation
22781 LatexCommand cite
22782 key "multicol"
22783
22784 \end_inset
22785
22786 .
22787 \end_layout
22788
22789 \begin_layout Subsubsection
22790 Preface
22791 \end_layout
22792
22793 \begin_layout Standard
22794 To add a preface text for multiple columns, add the command
22795 \end_layout
22796
22797 \begin_layout Standard
22798
22799 \series bold
22800 }[
22801 \end_layout
22802
22803 \begin_layout Standard
22804 as TeX Code behind the number of columns in the
22805 \family sans
22806  Begin Multiple Columns
22807 \family default
22808  style.
22809  Behind the command follows the preface text.
22810  At the end of the style use the command
22811 \end_layout
22812
22813 \begin_layout Standard
22814
22815 \series bold
22816 ]{
22817 \end_layout
22818
22819 \begin_layout Standard
22820 as TeX Code.
22821  An example with some preface text:
22822 \end_layout
22823
22824 \begin_layout Standard
22825 \begin_inset VSpace bigskip
22826 \end_inset
22827
22828
22829 \end_layout
22830
22831 \begin_layout Begin Multiple Columns
22832 2
22833 \begin_inset ERT
22834 status collapsed
22835
22836 \begin_layout Plain Layout
22837
22838 }[
22839 \end_layout
22840
22841 \end_inset
22842
22843 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22844
22845 \begin_inset ERT
22846 status collapsed
22847
22848 \begin_layout Plain Layout
22849
22850 ]{
22851 \end_layout
22852
22853 \end_inset
22854
22855
22856 \end_layout
22857
22858 \begin_layout Standard
22859
22860 \size small
22861 On the evening of the crime, he returned from the club exactly at ten.
22862  His mother and sister were out spending the evening with a relation.
22863  The servant deposed that she heard him enter the front room on the second
22864  floor, generally used as his sitting-room.
22865  She had lit a fire there, and as it smoked she had opened the window.
22866  No sound was heard from the room until eleven-twenty, the hour of the return
22867  of Lady Maynooth and her daughter.
22868  Desiring to say good-night, she attempted to enter her son's room.
22869  The door was locked on the inside, and no answer could be got to their
22870  cries and knocking.
22871  Help was obtained, and the door forced.
22872  The unfortunate young man was found lying near the table.
22873  His head had been horribly mutilated by an expanding revolver bullet, but
22874  no weapon of any sort was to be found in the room.
22875 \end_layout
22876
22877 \begin_layout End Multiple Columns
22878
22879 \end_layout
22880
22881 \begin_layout Standard
22882 You can also use a section heading as the preface if you use a section command
22883  as TeX Code behind the first TeX Code.
22884  For example the command
22885 \end_layout
22886
22887 \begin_layout Standard
22888
22889 \series bold
22890
22891 \backslash
22892 subsection{subsection title}
22893 \end_layout
22894
22895 \begin_layout Standard
22896 creates a subsection.
22897  In this example the preface is a subsubsection:
22898 \end_layout
22899
22900 \begin_layout Begin Multiple Columns
22901 2
22902 \begin_inset ERT
22903 status collapsed
22904
22905 \begin_layout Plain Layout
22906
22907 }[
22908 \end_layout
22909
22910 \end_inset
22911
22912
22913 \begin_inset ERT
22914 status collapsed
22915
22916 \begin_layout Plain Layout
22917
22918
22919 \backslash
22920 subsubsection{
22921 \end_layout
22922
22923 \end_inset
22924
22925 This is a subsubsection heading as a preface
22926 \begin_inset ERT
22927 status collapsed
22928
22929 \begin_layout Plain Layout
22930
22931 }
22932 \end_layout
22933
22934 \end_inset
22935
22936
22937 \begin_inset ERT
22938 status collapsed
22939
22940 \begin_layout Plain Layout
22941
22942 ]{
22943 \end_layout
22944
22945 \end_inset
22946
22947
22948 \end_layout
22949
22950 \begin_layout Standard
22951
22952 \size small
22953 A minute examination of the circumstances served only to make the case more
22954  complex.
22955  In the first place, no reason could be given why the young man should have
22956  fastened the door upon the inside.
22957  There was the possibility that the murderer had done this, and had afterwards
22958  escaped by the window.
22959  The drop was at least twenty feet, however, and a bed of crocuses in full
22960  bloom lay beneath.
22961  Neither the flowers nor the earth showed any sign of having been disturbed,
22962  nor were there any marks upon the narrow strip of grass which separated
22963  the house from the road.
22964  Apparently, therefore, it was the young man himself who had fastened the
22965  door.
22966  But how did he come by his death? No one could have climbed up to the window
22967  without leaving traces.
22968  Suppose a man had fired through the window, he would indeed be a remarkable
22969  shot who could with a revolver inflict so deadly a wound.
22970  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22971  a hundred yards of the house.
22972  No one had heard a shot.
22973 \end_layout
22974
22975 \begin_layout End Multiple Columns
22976
22977 \end_layout
22978
22979 \begin_layout Standard
22980 If there is less vertical space left on the page at the beginning of the
22981  multiple columns than needed for 6
22982 \begin_inset space ~
22983 \end_inset
22984
22985 text lines, a page break will be inserted before the multiple columns.
22986  Depending on the number of lines of the preface text, you might want to
22987  change this value.
22988  It is determined by inserting the command
22989 \end_layout
22990
22991 \begin_layout Standard
22992
22993 \series bold
22994 ][number
22995 \backslash
22996 baselineskip
22997 \end_layout
22998
22999 \begin_layout Standard
23000 as TeX Code behind the preface definition but before the final 
23001 \series bold
23002 ]{
23003 \series default
23004  command.
23005  
23006 \emph on
23007 number
23008 \emph default
23009  is hereby the number of text lines.
23010  In this example the space is set to 7
23011 \begin_inset space ~
23012 \end_inset
23013
23014 text lines:
23015 \end_layout
23016
23017 \begin_layout Begin Multiple Columns
23018 2
23019 \begin_inset ERT
23020 status collapsed
23021
23022 \begin_layout Plain Layout
23023
23024 }[
23025 \end_layout
23026
23027 \end_inset
23028
23029
23030 \begin_inset ERT
23031 status collapsed
23032
23033 \begin_layout Plain Layout
23034
23035
23036 \backslash
23037 subsubsection{
23038 \end_layout
23039
23040 \end_inset
23041
23042 This is the sectioning command
23043 \begin_inset Newline newline
23044 \end_inset
23045
23046 as a preface and
23047 \begin_inset Newline newline
23048 \end_inset
23049
23050 with multiple text lines
23051 \begin_inset ERT
23052 status collapsed
23053
23054 \begin_layout Plain Layout
23055
23056 }
23057 \end_layout
23058
23059 \end_inset
23060
23061
23062 \begin_inset ERT
23063 status collapsed
23064
23065 \begin_layout Plain Layout
23066
23067 ][7
23068 \backslash
23069 baselineskip
23070 \end_layout
23071
23072 \end_inset
23073
23074
23075 \begin_inset ERT
23076 status collapsed
23077
23078 \begin_layout Plain Layout
23079
23080 ]{
23081 \end_layout
23082
23083 \end_inset
23084
23085
23086 \end_layout
23087
23088 \begin_layout Standard
23089
23090 \size small
23091 On the evening of the crime, he returned from the club exactly at ten.
23092  His mother and sister were out spending the evening with a relation.
23093  The servant deposed that she heard him enter the front room on the second
23094  floor, generally used as his sitting-room.
23095  She had lit a fire there, and as it smoked she had opened the window.
23096  No sound was heard from the room until eleven-twenty, the hour of the return
23097  of Lady Maynooth and her daughter.
23098  Desiring to say good-night, she attempted to enter her son's room.
23099  The door was locked on the inside, and no answer could be got to their
23100  cries and knocking.
23101  Help was obtained, and the door forced.
23102  The unfortunate young man was found lying near the table.
23103  His head had been horribly mutilated by an expanding revolver bullet, but
23104  no weapon of any sort was to be found in the room.
23105 \end_layout
23106
23107 \begin_layout End Multiple Columns
23108
23109 \end_layout
23110
23111 \begin_layout Subsubsection
23112 Surrounding Space
23113 \end_layout
23114
23115 \begin_layout Standard
23116 The amount of space before and after multiple columns can be changed by
23117  changing the length 
23118 \series bold
23119
23120 \backslash
23121 multicolsep
23122 \series default
23123 .
23124  For example the command
23125 \end_layout
23126
23127 \begin_layout Standard
23128
23129 \series bold
23130
23131 \backslash
23132 setlength{
23133 \backslash
23134 multicolsep}{3cm}
23135 \end_layout
23136
23137 \begin_layout Standard
23138 in TeX Code changes its value to 3
23139 \begin_inset space \thinspace{}
23140 \end_inset
23141
23142 cm.
23143  The change must be made before the multiple columns' start.
23144  The predefined value is 13
23145 \begin_inset space \thinspace{}
23146 \end_inset
23147
23148 pt.
23149 \end_layout
23150
23151 \begin_layout Standard
23152 For this example 
23153 \series bold
23154
23155 \backslash
23156 multicolsep
23157 \series default
23158  was set to 2.5
23159 \begin_inset space \thinspace{}
23160 \end_inset
23161
23162 cm:
23163 \end_layout
23164
23165 \begin_layout Standard
23166 \begin_inset ERT
23167 status open
23168
23169 \begin_layout Plain Layout
23170
23171
23172 \backslash
23173 setlength{
23174 \backslash
23175 multicolsep}{2.5cm}
23176 \end_layout
23177
23178 \end_inset
23179
23180
23181 \end_layout
23182
23183 \begin_layout Begin Multiple Columns
23184 2
23185 \end_layout
23186
23187 \begin_layout Standard
23188
23189 \size small
23190 All day I turned these facts over in my mind, endeavouring to hit upon some
23191  theory which could reconcile them all, and to find that line of least resistanc
23192 e which my poor friend had declared to be the starting-point of every investigat
23193 ion.
23194  I confess that I made little progress.
23195  In the evening I strolled across the Park, and found myself about six o'clock
23196  at the Oxford Street end of Park Lane.
23197  A group of loafers upon the pavements, all staring up at a particular window,
23198  directed me to the house which I had come to see.
23199  A tall, thin man with coloured glasses, whom I strongly suspected of being
23200  a plain-clothes detective, was pointing out some theory of his own, while
23201  the others crowded round to listen to what he said.
23202  I got as near him as I could, but his observations seemed to me to be absurd,
23203  so I withdrew again in some disgust.
23204  As I did so I struck against an elderly, deformed man, who had been behind
23205  me, and I knocked down several books which he was carrying.
23206 \end_layout
23207
23208 \begin_layout End Multiple Columns
23209
23210 \end_layout
23211
23212 \begin_layout Standard
23213 \begin_inset Note Greyedout
23214 status open
23215
23216 \begin_layout Plain Layout
23217
23218 \series bold
23219 Note:
23220 \series default
23221  The values you set with 
23222 \series bold
23223
23224 \backslash
23225 setlength
23226 \series default
23227  will be used for all following multiple columns until to change them again.
23228 \end_layout
23229
23230 \end_inset
23231
23232
23233 \end_layout
23234
23235 \begin_layout Standard
23236 \begin_inset ERT
23237 status collapsed
23238
23239 \begin_layout Plain Layout
23240
23241
23242 \backslash
23243 setlength{
23244 \backslash
23245 multicolsep}{13pt}
23246 \end_layout
23247
23248 \end_inset
23249
23250
23251 \begin_inset Note Note
23252 status collapsed
23253
23254 \begin_layout Plain Layout
23255 go back to the default
23256 \end_layout
23257
23258 \end_inset
23259
23260
23261 \end_layout
23262
23263 \begin_layout Standard
23264 \begin_inset Newpage newpage
23265 \end_inset
23266
23267
23268 \end_layout
23269
23270 \begin_layout Subsubsection
23271 Column Separation
23272 \end_layout
23273
23274 \begin_layout Standard
23275 The width of the columns is automatically calculated, but you can modify
23276  the space between the columns.
23277  This is done by changing the length 
23278 \series bold
23279
23280 \backslash
23281 columnsep
23282 \series default
23283 .
23284  Its predefined value is 10
23285 \begin_inset space \thinspace{}
23286 \end_inset
23287
23288 pt.
23289  Here is an example where 
23290 \series bold
23291
23292 \backslash
23293 columnsep
23294 \series default
23295  is set to 3
23296 \begin_inset space \thinspace{}
23297 \end_inset
23298
23299 cm:
23300 \end_layout
23301
23302 \begin_layout Standard
23303 \begin_inset ERT
23304 status open
23305
23306 \begin_layout Plain Layout
23307
23308
23309 \backslash
23310 setlength{
23311 \backslash
23312 columnsep}{3cm}
23313 \end_layout
23314
23315 \end_inset
23316
23317
23318 \end_layout
23319
23320 \begin_layout Begin Multiple Columns
23321 2
23322 \end_layout
23323
23324 \begin_layout Standard
23325
23326 \size small
23327 My observations of No.
23328 \begin_inset space \space{}
23329 \end_inset
23330
23331 427 Park Lane did little to clear up the problem in which I was interested.
23332  The house was separated from the street by a low wall and railing, the
23333  whole not more than five feet high.
23334  It was perfectly easy, therefore, for anyone to get into the garden, but
23335  the window was entirely inaccessible, since there was no water pipe or
23336  anything which could help the most active man to climb it.
23337  More puzzled than ever, I retraced my steps to Kensington.
23338  I had not been in my study five minutes when the maid entered to say that
23339  a person desired to see me.
23340  To my astonishment it was none other than my strange old book collector,
23341  his sharp, wizened face peering out from a frame of white hair, and his
23342  precious volumes, a dozen of them at least, wedged under his right arm.
23343 \end_layout
23344
23345 \begin_layout End Multiple Columns
23346
23347 \end_layout
23348
23349 \begin_layout Standard
23350 \begin_inset ERT
23351 status collapsed
23352
23353 \begin_layout Plain Layout
23354
23355
23356 \backslash
23357 setlength{
23358 \backslash
23359 columnsep}{10pt}
23360 \end_layout
23361
23362 \end_inset
23363
23364
23365 \begin_inset Note Note
23366 status collapsed
23367
23368 \begin_layout Plain Layout
23369 go back to the default
23370 \end_layout
23371
23372 \end_inset
23373
23374
23375 \end_layout
23376
23377 \begin_layout Subsubsection
23378 Vertical Lines
23379 \end_layout
23380
23381 \begin_layout Standard
23382 Between the columns a rule with a width of the length 
23383 \series bold
23384
23385 \backslash
23386 columnseprule
23387 \series default
23388  is placed.
23389  If this rule width is set to 0
23390 \begin_inset space \thinspace{}
23391 \end_inset
23392
23393 pt (this is the default), the rule is suppressed.
23394  In the following example the line is 2
23395 \begin_inset space \thinspace{}
23396 \end_inset
23397
23398 pt wide:
23399 \end_layout
23400
23401 \begin_layout Standard
23402 \begin_inset ERT
23403 status open
23404
23405 \begin_layout Plain Layout
23406
23407
23408 \backslash
23409 setlength{
23410 \backslash
23411 columnseprule}{2pt}
23412 \end_layout
23413
23414 \end_inset
23415
23416
23417 \end_layout
23418
23419 \begin_layout Begin Multiple Columns
23420 2
23421 \end_layout
23422
23423 \begin_layout Standard
23424
23425 \size small
23426 \begin_inset Quotes eld
23427 \end_inset
23428
23429 You're surprised to see me, sir,
23430 \begin_inset Quotes erd
23431 \end_inset
23432
23433  said he, in a strange, croaking voice.
23434 \end_layout
23435
23436 \begin_layout Standard
23437
23438 \size small
23439 I acknowledged that I was.
23440 \end_layout
23441
23442 \begin_layout Standard
23443
23444 \size small
23445 \begin_inset Quotes eld
23446 \end_inset
23447
23448 Well, I've a conscience, sir, and when I chanced to see you go into this
23449  house, as I came hobbling after you, I thought to myself, I'll just step
23450  in and see that kind gentleman, and tell him that if I was a bit gruff
23451  in my manner there was not any harm meant, and that I am much obliged to
23452  him for picking up my books.
23453 \begin_inset Quotes erd
23454 \end_inset
23455
23456
23457 \end_layout
23458
23459 \begin_layout Standard
23460
23461 \size small
23462 \begin_inset Quotes eld
23463 \end_inset
23464
23465 You make too much of a trifle,
23466 \begin_inset Quotes erd
23467 \end_inset
23468
23469  said I.
23470  
23471 \begin_inset Quotes eld
23472 \end_inset
23473
23474 May I ask how you knew who I was?
23475 \begin_inset Quotes erd
23476 \end_inset
23477
23478
23479 \end_layout
23480
23481 \begin_layout Standard
23482
23483 \size small
23484 \begin_inset Quotes eld
23485 \end_inset
23486
23487 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23488  you'll find my little bookshop at the corner of Church Street, and very
23489  happy to see you, I am sure.
23490  Maybe you collect yourself, sir.
23491  Here's 
23492 \noun on
23493 British
23494 \begin_inset space ~
23495 \end_inset
23496
23497 Birds
23498 \noun default
23499 , and 
23500 \noun on
23501 Catullus
23502 \noun default
23503 , and 
23504 \noun on
23505 The Holy War
23506 \noun default
23507 --a bargain, every one of them.
23508  With five volumes you could just fill that gap on that second shelf.
23509  It looks untidy, does it not, sir?
23510 \begin_inset Quotes erd
23511 \end_inset
23512
23513
23514 \end_layout
23515
23516 \begin_layout End Multiple Columns
23517
23518 \end_layout
23519
23520 \begin_layout Standard
23521 \begin_inset ERT
23522 status collapsed
23523
23524 \begin_layout Plain Layout
23525
23526
23527 \backslash
23528 setlength{
23529 \backslash
23530 columnseprule}{0pt}
23531 \end_layout
23532
23533 \end_inset
23534
23535
23536 \begin_inset Note Note
23537 status collapsed
23538
23539 \begin_layout Plain Layout
23540 go back to the default
23541 \end_layout
23542
23543 \end_inset
23544
23545
23546 \end_layout
23547
23548 \begin_layout Standard
23549 \begin_inset Newpage newpage
23550 \end_inset
23551
23552
23553 \end_layout
23554
23555 \begin_layout Section
23556 Non-standard Paragraph Shapes
23557 \end_layout
23558
23559 \begin_layout Standard
23560 \begin_inset ERT
23561 status collapsed
23562
23563 \begin_layout Plain Layout
23564
23565
23566 \backslash
23567 begin{sloppypar}
23568 \end_layout
23569
23570 \end_inset
23571
23572
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 newdimen
23584 \backslash
23585 varunit 
23586 \end_layout
23587
23588 \begin_layout Plain Layout
23589
23590
23591 \backslash
23592 setlength{
23593 \backslash
23594 varunit}{4.5in}
23595 \end_layout
23596
23597 \end_inset
23598
23599
23600 \end_layout
23601
23602 \begin_layout Standard
23603 \noindent
23604 \begin_inset ERT
23605 status collapsed
23606
23607 \begin_layout Plain Layout
23608
23609
23610 \backslash
23611 parshape 19 0.45
23612 \backslash
23613 varunit 0.332
23614 \backslash
23615 varunit
23616 \end_layout
23617
23618 \begin_layout Plain Layout
23619
23620 0.40
23621 \backslash
23622 varunit 0.300
23623 \backslash
23624 varunit
23625 \end_layout
23626
23627 \begin_layout Plain Layout
23628
23629 0.35
23630 \backslash
23631 varunit 0.293
23632 \backslash
23633 varunit
23634 \end_layout
23635
23636 \begin_layout Plain Layout
23637
23638 0.30
23639 \backslash
23640 varunit 0.300
23641 \backslash
23642 varunit
23643 \end_layout
23644
23645 \begin_layout Plain Layout
23646
23647 0.25
23648 \backslash
23649 varunit 0.317
23650 \backslash
23651 varunit
23652 \end_layout
23653
23654 \begin_layout Plain Layout
23655
23656 0.20
23657 \backslash
23658 varunit 0.342
23659 \backslash
23660 varunit
23661 \end_layout
23662
23663 \begin_layout Plain Layout
23664
23665 0.15
23666 \backslash
23667 varunit 0.373
23668 \backslash
23669 varunit
23670 \end_layout
23671
23672 \begin_layout Plain Layout
23673
23674 0.10
23675 \backslash
23676 varunit 0.410
23677 \backslash
23678 varunit
23679 \end_layout
23680
23681 \begin_layout Plain Layout
23682
23683 0.05
23684 \backslash
23685 varunit 0.453
23686 \backslash
23687 varunit
23688 \end_layout
23689
23690 \begin_layout Plain Layout
23691
23692 0.00
23693 \backslash
23694 varunit 0.500
23695 \backslash
23696 varunit
23697 \end_layout
23698
23699 \begin_layout Plain Layout
23700
23701 0.05
23702 \backslash
23703 varunit 0.453
23704 \backslash
23705 varunit
23706 \end_layout
23707
23708 \begin_layout Plain Layout
23709
23710 0.10
23711 \backslash
23712 varunit 0.410
23713 \backslash
23714 varunit
23715 \end_layout
23716
23717 \begin_layout Plain Layout
23718
23719 0.15
23720 \backslash
23721 varunit 0.373
23722 \backslash
23723 varunit
23724 \end_layout
23725
23726 \begin_layout Plain Layout
23727
23728 0.20
23729 \backslash
23730 varunit 0.342
23731 \backslash
23732 varunit
23733 \end_layout
23734
23735 \begin_layout Plain Layout
23736
23737 0.25
23738 \backslash
23739 varunit 0.317
23740 \backslash
23741 varunit
23742 \end_layout
23743
23744 \begin_layout Plain Layout
23745
23746 0.30
23747 \backslash
23748 varunit 0.300
23749 \backslash
23750 varunit
23751 \end_layout
23752
23753 \begin_layout Plain Layout
23754
23755 0.35
23756 \backslash
23757 varunit 0.293
23758 \backslash
23759 varunit
23760 \end_layout
23761
23762 \begin_layout Plain Layout
23763
23764 0.40
23765 \backslash
23766 varunit 0.300
23767 \backslash
23768 varunit
23769 \end_layout
23770
23771 \begin_layout Plain Layout
23772
23773 0.45
23774 \backslash
23775 varunit 0.332
23776 \backslash
23777 varunit
23778 \end_layout
23779
23780 \begin_layout Plain Layout
23781
23782 \end_layout
23783
23784 \end_inset
23785
23786 There are times when the tyranny of rectangular paragraphs must be overthrown.
23787  In such situations, a call to the delightful plain TeX command 
23788 \family typewriter
23789
23790 \backslash
23791 parshape
23792 \family default
23793  is called for.
23794  As you can see, completely arbitrary shapes can be laid out with a suitable
23795  set of line length definitions.
23796  While this parshape may look a bit silly and useless, one could conceive
23797  of situations such as finely tuned dropped capitals, word wrapping around
23798  non-rectangular graphics, etc.
23799  which will benefit from such handcrafting.
23800 \end_layout
23801
23802 \begin_layout Standard
23803 \begin_inset VSpace bigskip
23804 \end_inset
23805
23806
23807 \end_layout
23808
23809 \begin_layout Standard
23810 The syntax is 
23811 \family typewriter
23812
23813 \backslash
23814 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23815  #nindent #nlength
23816 \family default
23817 , where 
23818 \family typewriter
23819 numlines
23820 \family default
23821  is the number of lines of text which define the paragraph.
23822  If there turn out to be fewer lines, the shape is truncated; if there are
23823  more, the excess lines have the same dimensions as the last line of the
23824  definition.
23825  The 
23826 \family typewriter
23827 #nindent
23828 \family default
23829  and 
23830 \family typewriter
23831 #nlength
23832 \family default
23833  entries specify the indentation of the line from the left margin, and the
23834  length of the line as measured from that point.
23835  The shape applies only to the current paragraph; everything is reset to
23836  normal for the next paragraph.
23837 \end_layout
23838
23839 \begin_layout Standard
23840 \begin_inset ERT
23841 status collapsed
23842
23843 \begin_layout Plain Layout
23844
23845
23846 \backslash
23847 end{sloppypar}
23848 \end_layout
23849
23850 \end_inset
23851
23852
23853 \end_layout
23854
23855 \begin_layout Bibliography
23856 \begin_inset CommandInset bibitem
23857 LatexCommand bibitem
23858 key "multicol"
23859
23860 \end_inset
23861
23862 Documentation of the LaTeX-package 
23863 \begin_inset CommandInset href
23864 LatexCommand href
23865 name "multicol"
23866 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23867
23868 \end_inset
23869
23870
23871 \begin_inset Index idx
23872 status collapsed
23873
23874 \begin_layout Plain Layout
23875 LaTeX-packages ! multicol
23876 \end_layout
23877
23878 \end_inset
23879
23880
23881 \end_layout
23882
23883 \end_body
23884 \end_document