]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
691f0eaf1618f2b9c8ea31f0b8f982f3fb3ed79b
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 431
3 \begin_document
4 \begin_header
5 \textclass scrbook
6 \begin_preamble
7 % DO NOT ALTER THIS PREAMBLE!!!
8 %
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected.  If you
12 % have problems LaTeXing this file, please contact 
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
15
16 % if pdflatex is used
17 \usepackage{ifpdf}
18 \ifpdf
19
20  % set fonts for nicer pdf view
21  \IfFileExists{lmodern.sty}
22   {\usepackage{lmodern}}{}
23
24 \fi % end if pdflatex is used
25
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
28 \pagenumbering{roman}
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31  \pdfbookmark[1]{\contentsname}{}
32  \myTOC
33  \cleardoublepage
34  \pagenumbering{arabic}}
35
36 % used for multi-column text
37 \usepackage{multicol}
38
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
41 \end_preamble
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
44 \begin_modules
45 logicalmkup
46 theorems-ams
47 theorems-ams-extended
48 multicol
49 \end_modules
50 \maintain_unincluded_children false
51 \begin_local_layout
52 Format 7
53 InsetLayout CharStyle:MenuItem
54 LyxType               charstyle
55 LabelString           menu
56 LatexType             command
57 LatexName             menuitem
58 Font
59 Family              Sans
60 EndFont
61 Preamble
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
63 EndPreamble
64 End
65 \end_local_layout
66 \language english
67 \language_package default
68 \inputencoding auto
69 \fontencoding global
70 \font_roman default
71 \font_sans default
72 \font_typewriter default
73 \font_default_family default
74 \use_non_tex_fonts false
75 \font_sc false
76 \font_osf false
77 \font_sf_scale 100
78 \font_tt_scale 100
79
80 \graphics default
81 \default_output_format default
82 \output_sync 1
83 \bibtex_command default
84 \index_command default
85 \paperfontsize 12
86 \spacing single
87 \use_hyperref true
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
92 \pdf_bookmarks true
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
96 \pdf_breaklinks false
97 \pdf_pdfborder false
98 \pdf_colorlinks true
99 \pdf_backref false
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
102 \papersize default
103 \use_geometry false
104 \use_package amsmath 1
105 \use_package amssymb 1
106 \use_package esint 0
107 \use_package mathdots 1
108 \use_package mathtools 0
109 \use_package mhchem 1
110 \use_package undertilde 0
111 \cite_engine basic
112 \cite_engine_type numerical
113 \biblio_style plain
114 \use_bibtopic false
115 \use_indices false
116 \paperorientation portrait
117 \suppress_date false
118 \justification true
119 \use_refstyle 0
120 \notefontcolor #0000ff
121 \index Index
122 \shortcut idx
123 \color #008000
124 \end_index
125 \secnumdepth 3
126 \tocdepth 3
127 \paragraph_separation indent
128 \paragraph_indentation default
129 \quotes_language english
130 \papercolumns 1
131 \papersides 2
132 \paperpagestyle headings
133 \tracking_changes false
134 \output_changes false
135 \html_math_output 0
136 \html_css_as_file 0
137 \html_be_strict true
138 \end_header
139
140 \begin_body
141
142 \begin_layout Title
143 Additional LyX Features
144 \end_layout
145
146 \begin_layout Subtitle
147 Version 2.0.x
148 \end_layout
149
150 \begin_layout Author
151 by the LyX Team
152 \begin_inset Foot
153 status collapsed
154
155 \begin_layout Plain Layout
156 \noindent
157 Principal maintainer of this file is
158 \noun on
159  Richard Heck
160 \noun default
161 .
162  If you have comments or error corrections, please send them to the LyX
163  Documentation mailing list, 
164 \begin_inset Flex Code
165 status collapsed
166
167 \begin_layout Plain Layout
168 \noindent
169 <lyx-docs@lists.lyx.org>
170 \end_layout
171
172 \end_inset
173
174 .
175 \end_layout
176
177 \end_inset
178
179
180 \end_layout
181
182 \begin_layout Standard
183 \begin_inset CommandInset toc
184 LatexCommand tableofcontents
185
186 \end_inset
187
188
189 \end_layout
190
191 \begin_layout Chapter
192 Introduction
193 \end_layout
194
195 \begin_layout Standard
196 This manual is essentially Part II of the 
197 \emph on
198 User's Guide\SpecialChar \@.
199
200 \emph default
201  The reason for separating the two documents is simple: the 
202 \emph on
203 User's Guide
204 \emph default
205  is already quite lengthy, and it contains information on all of the basic
206  features one needs to know in order to prepare most documents.
207  However, the LyX Team has worked to make LyX extensible through various
208  configuration files and external packages.
209  That means that if you want to support the Fizzwizzle LaTeX package, you
210  can create a layout file (or module) for it without having to alter LyX
211  itself.
212  We've already had contributions of several new features this way, and some
213  of them are documented here.
214  There are also some more `advanced' features, such as how to control the
215  presentation of bibliographies and how to work with multi-part documents,
216  that are not covered in the 
217 \emph on
218 User's Guide
219 \emph default
220  and are discussed here.
221 \end_layout
222
223 \begin_layout Standard
224 This manual also documents some special features, like fax support, version
225  control, and SGML support, which require additional software to work properly.
226  There is also a chapter on LyX's support for HTML.
227  And lastly, there's a chapter of LaTeX tools and tips, things you can use
228  to spruce up your documents by directly using the powerful features of
229  LaTeX.
230  After all, LyX 
231 \emph on
232 is
233 \emph default
234  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
235 \end_layout
236
237 \begin_layout Standard
238 If you haven't read the 
239 \emph on
240 Introduction
241 \emph default
242  yet, you are definitely in the wrong manual.
243  The 
244 \emph on
245 Introduction
246 \emph default
247  is the first place to go, since it describes the notation and format of
248  all of the manuals.
249  You should also be thoroughly familiar with the 
250 \emph on
251 User's Guide
252 \emph default
253  and all of the basic features of LyX before attempting to read this one.
254 \end_layout
255
256 \begin_layout Standard
257 Since many of the topics in this manual depend heavily on LyX's interaction
258  with LaTeX, this first chapter covers the inner workings of LyX and how
259  to direct LyX to generate exactly the LaTeX code you want.
260  It is obviously for more seasoned LyX users.
261 \end_layout
262
263 \begin_layout Chapter
264 LyX and LaTeX
265 \end_layout
266
267 \begin_layout Section
268 How LyX Uses LaTeX
269 \end_layout
270
271 \begin_layout Standard
272 This chapter is for both TeX-nicians and the LaTeX-curious.
273  In it, we'll explain how LyX and LaTeX work together to produce printable
274  output.
275  This is the only place in any of the manuals where we assume you know something
276  about LaTeX.
277 \end_layout
278
279 \begin_layout Standard
280 At one time, LyX was called a 
281 \begin_inset Quotes eld
282 \end_inset
283
284 WYSIWYM frontend to LaTeX,
285 \begin_inset Quotes erd
286 \end_inset
287
288  but that's no longer true.
289  There are frontends to LaTeX out there.
290 \begin_inset Foot
291 status collapsed
292
293 \begin_layout Plain Layout
294 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
295  There are also the LaTeX modes for vi and emacs, of course.
296 \end_layout
297
298 \end_inset
299
300  These are basically text editors with the ability to run LaTeX and mark
301  any errors in the file you're editing.
302  Although LyX 
303 \emph on
304 is
305 \emph default
306  an editor, and it 
307 \emph on
308 does
309 \emph default
310  run LaTeX, and it also indicates errors in the file, it also does much,
311  much more.
312  For one thing, you don't need to know LaTeX to use LyX effectively.
313  And LyX has added its own extensions to LaTeX.
314  Try the following sometime: select 
315 \begin_inset Flex MenuItem
316 status collapsed
317
318 \begin_layout Plain Layout
319 Export\SpecialChar \menuseparator
320 LaTeX
321 \end_layout
322
323 \end_inset
324
325  from the 
326 \begin_inset Flex MenuItem
327 status collapsed
328
329 \begin_layout Plain Layout
330 File
331 \end_layout
332
333 \end_inset
334
335  menu (or 
336 \begin_inset Flex MenuItem
337 status collapsed
338
339 \begin_layout Plain Layout
340 View\SpecialChar \menuseparator
341 Source
342 \end_layout
343
344 \end_inset
345
346 ), then look at the preamble of the resulting 
347 \begin_inset Flex Code
348 status collapsed
349
350 \begin_layout Plain Layout
351 .tex
352 \end_layout
353
354 \end_inset
355
356  file.
357  You'll notice a variety of new macros defined specifically by LyX.
358  These macros are defined automatically, according to the features you use
359  in the document.
360 \end_layout
361
362 \begin_layout Standard
363 There are several commands that automatically invoke LaTeX.
364  They are:
365 \end_layout
366
367 \begin_layout Itemize
368 \begin_inset Flex MenuItem
369 status collapsed
370
371 \begin_layout Plain Layout
372 View\SpecialChar \menuseparator
373 View
374 \end_layout
375
376 \end_inset
377
378
379 \end_layout
380
381 \begin_layout Itemize
382 \begin_inset Flex MenuItem
383 status collapsed
384
385 \begin_layout Plain Layout
386 View\SpecialChar \menuseparator
387 Update
388 \end_layout
389
390 \end_inset
391
392
393 \end_layout
394
395 \begin_layout Itemize
396 \begin_inset Flex MenuItem
397 status collapsed
398
399 \begin_layout Plain Layout
400 File\SpecialChar \menuseparator
401 Print
402 \end_layout
403
404 \end_inset
405
406
407 \end_layout
408
409 \begin_layout Itemize
410 \begin_inset Flex MenuItem
411 status collapsed
412
413 \begin_layout Plain Layout
414 File\SpecialChar \menuseparator
415 Fax
416 \end_layout
417
418 \end_inset
419
420
421 \end_layout
422
423 \begin_layout Standard
424 They will only invoke LaTeX if the file has changed since the last time
425  LaTeX was run.
426  
427 \end_layout
428
429 \begin_layout Standard
430 When LyX runs LaTeX on the file you're editing, it performs these steps:
431 \end_layout
432
433 \begin_layout Enumerate
434 Convert the document to LaTeX and save to a file with the extension 
435 \begin_inset Flex Code
436 status collapsed
437
438 \begin_layout Plain Layout
439 .tex
440 \end_layout
441
442 \end_inset
443
444  in place of 
445 \begin_inset Flex Code
446 status collapsed
447
448 \begin_layout Plain Layout
449 .lyx
450 \end_layout
451
452 \end_inset
453
454 .
455 \end_layout
456
457 \begin_layout Enumerate
458 Run LaTeX on the 
459 \begin_inset Flex Code
460 status collapsed
461
462 \begin_layout Plain Layout
463 .tex
464 \end_layout
465
466 \end_inset
467
468  file (maybe several times), and run any other commands (such as 
469 \begin_inset Flex Code
470 status collapsed
471
472 \begin_layout Plain Layout
473 bibtex
474 \end_layout
475
476 \end_inset
477
478  or 
479 \begin_inset Flex Code
480 status collapsed
481
482 \begin_layout Plain Layout
483 makeindex
484 \end_layout
485
486 \end_inset
487
488 ) needed to compile the LaTeX file.
489 \end_layout
490
491 \begin_layout Enumerate
492 If there are any errors, show the error log.
493 \end_layout
494
495 \begin_layout Standard
496 If you have run LaTeX using 
497 \begin_inset Flex MenuItem
498 status collapsed
499
500 \begin_layout Plain Layout
501 View
502 \bar under
503 \SpecialChar \menuseparator
504
505 \bar default
506 DVI
507 \end_layout
508
509 \end_inset
510
511 , LyX then runs a DVI viewer to display the DVI-file.
512  If you have used 
513 \begin_inset Flex MenuItem
514 status collapsed
515
516 \begin_layout Plain Layout
517 View
518 \bar under
519 \SpecialChar \menuseparator
520
521 \bar default
522 PostScript
523 \end_layout
524
525 \end_inset
526
527 , LyX performs further steps:
528 \end_layout
529
530 \begin_layout Itemize
531 Run 
532 \begin_inset Flex Code
533 status collapsed
534
535 \begin_layout Plain Layout
536 dvips
537 \end_layout
538
539 \end_inset
540
541  to convert the DVI file to PostScript.
542 \end_layout
543
544 \begin_layout Itemize
545 Run a PostScript viewer, such as 
546 \begin_inset Flex Code
547 status collapsed
548
549 \begin_layout Plain Layout
550 ghostview
551 \end_layout
552
553 \end_inset
554
555 , to display the PostScript file.
556 \end_layout
557
558 \begin_layout Standard
559 LyX does similar things when viewing, or exporting, other formats.
560 \end_layout
561
562 \begin_layout Section
563 Translating LaTeX files into LyX
564 \end_layout
565
566 \begin_layout Standard
567 You can import a LaTeX file into LyX by using the 
568 \begin_inset Flex MenuItem
569 status collapsed
570
571 \begin_layout Plain Layout
572 File\SpecialChar \menuseparator
573 Import\SpecialChar \menuseparator
574 LaTeX
575 \end_layout
576
577 \end_inset
578
579  command in LyX.
580  This will call a program named 
581 \begin_inset Flex Code
582 status collapsed
583
584 \begin_layout Plain Layout
585 tex2lyx
586 \end_layout
587
588 \end_inset
589
590  which will create a file 
591 \begin_inset Flex Code
592 status collapsed
593
594 \begin_layout Plain Layout
595 foo.lyx
596 \end_layout
597
598 \end_inset
599
600  from the file 
601 \begin_inset Flex Code
602 status collapsed
603
604 \begin_layout Plain Layout
605 foo.tex
606 \end_layout
607
608 \end_inset
609
610 .
611  LyX will then open that file.
612 \begin_inset Foot
613 status collapsed
614
615 \begin_layout Plain Layout
616 \begin_inset Flex Code
617 status collapsed
618
619 \begin_layout Plain Layout
620 tex2lyx
621 \end_layout
622
623 \end_inset
624
625  can also be run from the command line, of course.
626 \end_layout
627
628 \end_inset
629
630
631 \end_layout
632
633 \begin_layout Standard
634 \begin_inset Flex Code
635 status collapsed
636
637 \begin_layout Plain Layout
638 tex2lyx
639 \end_layout
640
641 \end_inset
642
643  will translate most legal LaTeX, but not everything.
644  It will put things it doesn't understand into TeX code, so after translating
645  a file with 
646 \begin_inset Flex Code
647 status collapsed
648
649 \begin_layout Plain Layout
650 tex2lyx
651 \end_layout
652
653 \end_inset
654
655 , you can look for TeX code and hand-edit it until it looks right.
656 \end_layout
657
658 \begin_layout Standard
659 If you don't know what TeX code is, read the next section.
660 \end_layout
661
662 \begin_layout Section
663 \begin_inset CommandInset label
664 LatexCommand label
665 name "sec:Inserting-TeX-Code"
666
667 \end_inset
668
669 Inserting TeX Code into LyX Documents 
670 \end_layout
671
672 \begin_layout Standard
673 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
674  You can always insert TeX code into any LyX document.
675  LyX cannot, and will never be able to, display every possible LaTeX construct.
676  If ever you need to insert LaTeX commands into your LyX document, you can
677  use the 
678 \begin_inset Flex Code
679 status collapsed
680
681 \begin_layout Plain Layout
682 TeX Code
683 \end_layout
684
685 \end_inset
686
687  box, which you can insert into your document with 
688 \begin_inset Flex MenuItem
689 status collapsed
690
691 \begin_layout Plain Layout
692 Insert\SpecialChar \menuseparator
693 TeX Code
694 \end_layout
695
696 \end_inset
697
698  or the keyboard shortcut 
699 \begin_inset Info
700 type  "shortcut"
701 arg   "ert-insert"
702 \end_inset
703
704 .
705 \end_layout
706
707 \begin_layout Standard
708 Here's an example of inserting LaTeX commands in a LyX document.
709  The code looks like this:
710 \end_layout
711
712 \begin_layout LyX-Code
713
714 \backslash
715 begin{tabular}{ll}
716 \begin_inset Newline newline
717 \end_inset
718
719
720 \backslash
721 begin{minipage}{5cm}
722 \begin_inset Newline newline
723 \end_inset
724
725 This is an example of a minipage environment.
726  You 
727 \begin_inset Newline newline
728 \end_inset
729
730 can put nearly everything in it, even (non-floating) 
731 \begin_inset Newline newline
732 \end_inset
733
734 figures and tables.
735  
736 \begin_inset Newline newline
737 \end_inset
738
739
740 \backslash
741 end{minipage}
742 \begin_inset Newline newline
743 \end_inset
744
745 &
746 \begin_inset Newline newline
747 \end_inset
748
749
750 \backslash
751 begin{minipage}{5cm}
752 \begin_inset Newline newline
753 \end_inset
754
755
756 \backslash
757 begin{verbatim}
758 \begin_inset Newline newline
759 \end_inset
760
761
762 \backslash
763 begin{minipage}{5cm}
764 \begin_inset Newline newline
765 \end_inset
766
767 This ...
768  
769 \begin_inset Newline newline
770 \end_inset
771
772
773 \backslash
774 end{minipage}
775 \begin_inset Newline newline
776 \end_inset
777
778
779 \backslash
780 end{verbatim}
781 \begin_inset Newline newline
782 \end_inset
783
784
785 \backslash
786 end{minipage}
787 \begin_inset Newline newline
788 \end_inset
789
790
791 \backslash
792 end{tabular}
793 \end_layout
794
795 \begin_layout LyX-Code
796
797 \end_layout
798
799 \begin_layout Standard
800 The 
801 \begin_inset Flex Code
802 status collapsed
803
804 \begin_layout Plain Layout
805 TeX Code
806 \end_layout
807
808 \end_inset
809
810  box containing this text is directly after this paragraph.
811  Those of you reading the manual in LyX will only see the TeX code inset.
812  Those reading a printed version of the manuals will see the actual results:
813 \begin_inset VSpace bigskip
814 \end_inset
815
816
817 \end_layout
818
819 \begin_layout Standard
820 \begin_inset ERT
821 status open
822
823 \begin_layout Plain Layout
824
825
826 \backslash
827 begin{tabular}{ll}
828 \end_layout
829
830 \begin_layout Plain Layout
831
832
833 \backslash
834 begin{minipage}{5cm}
835 \end_layout
836
837 \begin_layout Plain Layout
838
839 This is an example of a minipage environment.
840  You can put nearly everything in it, even (non-floating) figures and tables.
841  
842 \end_layout
843
844 \begin_layout Plain Layout
845
846
847 \backslash
848 end{minipage}
849 \end_layout
850
851 \begin_layout Plain Layout
852
853 &
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
866 \backslash
867 begin{verbatim}
868 \end_layout
869
870 \begin_layout Plain Layout
871
872
873 \backslash
874 begin{minipage}{5cm}
875 \end_layout
876
877 \begin_layout Plain Layout
878
879 This ...
880  
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{verbatim}
895 \end_layout
896
897 \begin_layout Plain Layout
898
899
900 \backslash
901 end{minipage}
902 \end_layout
903
904 \begin_layout Plain Layout
905
906
907 \backslash
908 end{tabular}
909 \end_layout
910
911 \end_inset
912
913
914 \begin_inset VSpace bigskip
915 \end_inset
916
917
918 \end_layout
919
920 \begin_layout Standard
921 In addition to using TeX code, you can also create a separate file containing
922  some complex LaTeX structure and then use 
923 \begin_inset Flex MenuItem
924 status collapsed
925
926 \begin_layout Plain Layout
927 Insert\SpecialChar \menuseparator
928 Child
929 \begin_inset space ~
930 \end_inset
931
932 Document
933 \end_layout
934
935 \end_inset
936
937  to include your file (you should select the type 
938 \begin_inset Flex Code
939 status collapsed
940
941 \begin_layout Plain Layout
942 Input
943 \end_layout
944
945 \end_inset
946
947 ).
948  We recommend that you only do this if you have a 
949 \begin_inset Flex Code
950 status collapsed
951
952 \begin_layout Plain Layout
953 .tex
954 \end_layout
955
956 \end_inset
957
958  file which you 
959 \emph on
960 know
961 \emph default
962  works already.
963  Otherwise, you'll have a big job tracking down LaTeX errors.
964 \end_layout
965
966 \begin_layout Standard
967 There are a few last points to emphasize:
968 \end_layout
969
970 \begin_layout Itemize
971 LyX 
972 \emph on
973 does not
974 \emph default
975  check if your LaTeX code is correct.
976 \end_layout
977
978 \begin_layout Itemize
979 Beware of reinventing the wheel.
980 \end_layout
981
982 \begin_layout Standard
983 On that last point, LyX does have quite a few features tucked into it, and
984  more are coming.
985  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
986  feature before you decide you have to do it by hand.
987  Moreover, there are numerous LaTeX packages out there to do all sorts of
988  things, from labels to envelopes to fancy multipage tables.
989  Check out 
990 \begin_inset CommandInset href
991 LatexCommand href
992 name "CTAN"
993 target "http://www.ctan.org/"
994
995 \end_inset
996
997  for details.
998 \end_layout
999
1000 \begin_layout Standard
1001 If you do need to do some wild and fancy things within your document, be
1002  sure to check out a good LaTeX book for assistance.
1003  There are a number of them listed in the bibliography of the 
1004 \emph on
1005 User's Guide
1006 \emph default
1007 .
1008 \end_layout
1009
1010 \begin_layout Section
1011 LyX and the LaTeX Preamble
1012 \end_layout
1013
1014 \begin_layout Subsection
1015 About the LaTeX Preamble
1016 \end_layout
1017
1018 \begin_layout Standard
1019 If you already know LaTeX, there is no need to explain here what the preamble
1020  is good for.
1021  If you don't, the following will give you some ideas—we recommend again
1022  that you consult a LaTeX book for further information.
1023  In any case, you should read the points below, because they explain what
1024  you can do and what you don't need to do in the LaTeX preamble of a LyX
1025  document.
1026 \end_layout
1027
1028 \begin_layout Standard
1029 The LaTeX preamble comes at the very beginning of a document, 
1030 \emph on
1031 before
1032 \emph default
1033  the text.
1034  It serves to:
1035 \end_layout
1036
1037 \begin_layout Itemize
1038 Declare the document class.
1039  
1040 \begin_inset Newline newline
1041 \end_inset
1042
1043 LyX already does this for you.
1044  If you're a seasoned LaTeX-nician, and you have a custom document class
1045  you want to use, check out the 
1046 \emph on
1047 Customization Manual
1048 \emph default
1049  for information on how to make LyX interface to it.
1050 \end_layout
1051
1052 \begin_layout Itemize
1053 Declare the usage of packages.
1054  
1055 \begin_inset Newline newline
1056 \end_inset
1057
1058 LaTeX packages provide special commands, which are only available within
1059  a document when the package has been declared in the preamble.
1060  In addition to providing special commands, the inclusion of a package can
1061  change the document.
1062  For example, the package 
1063 \begin_inset Flex Code
1064 status collapsed
1065
1066 \begin_layout Plain Layout
1067 indentfirst
1068 \end_layout
1069
1070 \end_inset
1071
1072  forces all paragraphs to be indented.
1073  There are other packages for labels, envelopes, margins, etc.
1074  
1075 \end_layout
1076
1077 \begin_layout Itemize
1078 Set counters, variables, lengths and widths.
1079  
1080 \begin_inset Newline newline
1081 \end_inset
1082
1083 There are several LaTeX counters and variables that 
1084 \emph on
1085 must
1086 \emph default
1087  be set globally from within the preamble in order to have the desired effect.
1088  (There are variables that you can set and reset inside the document, too.)
1089  Margins are a good example of something that must be set in the preamble.
1090  Another example is the label format for lists.
1091  You can actually set these just about anywhere, but it's best to do it
1092  just once, inside the preamble.
1093 \end_layout
1094
1095 \begin_layout Itemize
1096 Declare user defined commands (with 
1097 \begin_inset Flex Code
1098 status collapsed
1099
1100 \begin_layout Plain Layout
1101
1102 \backslash
1103 newcommand
1104 \end_layout
1105
1106 \end_inset
1107
1108  or 
1109 \begin_inset Flex Code
1110 status collapsed
1111
1112 \begin_layout Plain Layout
1113
1114 \backslash
1115 renewcommand
1116 \end_layout
1117
1118 \end_inset
1119
1120 ).
1121 \begin_inset Newline newline
1122 \end_inset
1123
1124 These are abbreviations for LaTeX commands which appear very often inside
1125  a document.
1126  Although the preamble is a good place to declare such commands, they 
1127 \emph on
1128 can
1129 \emph default
1130  be declared anywhere (before they are used for the first time, of course).
1131  This can be useful if there is a lot of raw LaTeX code in your document,
1132  which normally should not be the case.
1133 \end_layout
1134
1135 \begin_layout Standard
1136 LyX adds its own set of definitions to the preamble of the 
1137 \begin_inset Flex Code
1138 status collapsed
1139
1140 \begin_layout Plain Layout
1141 .tex
1142 \end_layout
1143
1144 \end_inset
1145
1146  file it produces.
1147  This makes LaTeX files generated by LyX portable.
1148 \end_layout
1149
1150 \begin_layout Subsection
1151 Changing the Preamble
1152 \end_layout
1153
1154 \begin_layout Standard
1155 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1156  can't change them without patching LyX itself.
1157  You can, however, add your own stuff to the preamble by selecting 
1158 \begin_inset Flex MenuItem
1159 status collapsed
1160
1161 \begin_layout Plain Layout
1162 LaTeX
1163 \begin_inset space ~
1164 \end_inset
1165
1166 Preamble
1167 \end_layout
1168
1169 \end_inset
1170
1171  in the 
1172 \begin_inset Flex MenuItem
1173 status collapsed
1174
1175 \begin_layout Plain Layout
1176 Document\SpecialChar \menuseparator
1177 Settings
1178 \end_layout
1179
1180 \end_inset
1181
1182  dialog.
1183  LyX adds anything in the 
1184 \begin_inset Flex MenuItem
1185 status collapsed
1186
1187 \begin_layout Plain Layout
1188 Preamble
1189 \end_layout
1190
1191 \end_inset
1192
1193  dialog to its own built-in preamble.
1194  Before adding your own declarations in the preamble, you should make sure
1195  that LyX doesn't already support what you want to do.
1196  (Remember what we said about reinventing the wheel?) Also, 
1197 \emph on
1198 make sure your preamble code is correct
1199 \emph default
1200 .
1201  LyX doesn't check it for you.
1202  If there is an error, you're likely to get an error like 
1203 \begin_inset Quotes eld
1204 \end_inset
1205
1206
1207 \begin_inset Flex Code
1208 status collapsed
1209
1210 \begin_layout Plain Layout
1211 Missing 
1212 \backslash
1213 begin{document}
1214 \end_layout
1215
1216 \end_inset
1217
1218
1219 \begin_inset Quotes erd
1220 \end_inset
1221
1222 .
1223  If you see this error, check your preamble.
1224 \end_layout
1225
1226 \begin_layout Subsection
1227 Examples
1228 \end_layout
1229
1230 \begin_layout Standard
1231 Here are some examples of what you can add to a preamble, and what they
1232  do.
1233 \end_layout
1234
1235 \begin_layout Subsubsection
1236 Example #1: Offsets
1237 \end_layout
1238
1239 \begin_layout Standard
1240 There are two variables under LaTeX that control page position: 
1241 \begin_inset Flex Code
1242 status collapsed
1243
1244 \begin_layout Plain Layout
1245
1246 \backslash
1247 hoffset
1248 \end_layout
1249
1250 \end_inset
1251
1252  and 
1253 \begin_inset Flex Code
1254 status collapsed
1255
1256 \begin_layout Plain Layout
1257
1258 \backslash
1259 voffset
1260 \end_layout
1261
1262 \end_inset
1263
1264 .
1265  Their names should be self-explanatory.
1266  These variables are useful if you think for a moment about computer labels.
1267  Sometimes, the size of a print medium and the area of the medium that you
1268  can actually print on aren't the same.
1269  This is where 
1270 \begin_inset Flex Code
1271 status collapsed
1272
1273 \begin_layout Plain Layout
1274
1275 \backslash
1276 hoffset
1277 \end_layout
1278
1279 \end_inset
1280
1281  and 
1282 \begin_inset Flex Code
1283 status collapsed
1284
1285 \begin_layout Plain Layout
1286
1287 \backslash
1288 voffset
1289 \end_layout
1290
1291 \end_inset
1292
1293  come in.
1294 \end_layout
1295
1296 \begin_layout Standard
1297 The default values for 
1298 \begin_inset Flex Code
1299 status collapsed
1300
1301 \begin_layout Plain Layout
1302
1303 \backslash
1304 hoffset
1305 \end_layout
1306
1307 \end_inset
1308
1309  and 
1310 \begin_inset Flex Code
1311 status collapsed
1312
1313 \begin_layout Plain Layout
1314
1315 \backslash
1316 voffset
1317 \end_layout
1318
1319 \end_inset
1320
1321  are both 0
1322 \begin_inset space \thinspace{}
1323 \end_inset
1324
1325 points, i.
1326 \begin_inset space \thinspace{}
1327 \end_inset
1328
1329 e.
1330 \begin_inset space \space{}
1331 \end_inset
1332
1333 the page isn't shifted.
1334  Unfortunately, some DVI drivers always seem to shift the page.
1335  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1336  If you're using LyX on a system that you don't personally maintain, and
1337  your sysadmin is a doofus, 
1338 \begin_inset Flex Code
1339 status collapsed
1340
1341 \begin_layout Plain Layout
1342
1343 \backslash
1344 hoffset
1345 \end_layout
1346
1347 \end_inset
1348
1349  and 
1350 \begin_inset Flex Code
1351 status collapsed
1352
1353 \begin_layout Plain Layout
1354
1355 \backslash
1356 voffset
1357 \end_layout
1358
1359 \end_inset
1360
1361  can save the day.
1362  Suppose your left and top margins are always 0.5
1363 \begin_inset space \thinspace{}
1364 \end_inset
1365
1366 inches too big.
1367  You can add this to the preamble:
1368 \end_layout
1369
1370 \begin_layout LyX-Code
1371
1372 \backslash
1373 setlength{
1374 \backslash
1375 hoffset}{-0.5 in}
1376 \end_layout
1377
1378 \begin_layout LyX-Code
1379
1380 \backslash
1381 setlength{
1382 \backslash
1383 voffset}{-0.5 in}
1384 \end_layout
1385
1386 \begin_layout Standard
1387 and your margins should now be correct.
1388 \end_layout
1389
1390 \begin_layout Subsubsection
1391 Example #2: Labels
1392 \end_layout
1393
1394 \begin_layout Standard
1395 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1396  There's a rather nice package, available at your nearest CTAN archive,
1397  for printing sheets of labels: 
1398 \begin_inset Flex Code
1399 status collapsed
1400
1401 \begin_layout Plain Layout
1402 labels.sty
1403 \end_layout
1404
1405 \end_inset
1406
1407 .
1408  Now, your system may not have this package installed by default.
1409  We leave that up to you to check.
1410  You'll also want to read the documentation for it; we're not going to do
1411  that for you.
1412  Since this is an example, however, we'll give you an example of how you
1413  use this package.
1414 \end_layout
1415
1416 \begin_layout Standard
1417 First, make sure you're using the 
1418 \begin_inset Flex Code
1419 status collapsed
1420
1421 \begin_layout Plain Layout
1422 article
1423 \end_layout
1424
1425 \end_inset
1426
1427  document class.
1428  Next, you need to put the following in your preamble:
1429 \end_layout
1430
1431 \begin_layout LyX-Code
1432
1433 \backslash
1434 usepackage{labels}
1435 \end_layout
1436
1437 \begin_layout LyX-Code
1438
1439 \backslash
1440 LabelCols=3
1441 \end_layout
1442
1443 \begin_layout LyX-Code
1444
1445 \backslash
1446 LabelRows=7
1447 \end_layout
1448
1449 \begin_layout LyX-Code
1450
1451 \backslash
1452 LeftBorder=8mm
1453 \end_layout
1454
1455 \begin_layout LyX-Code
1456
1457 \backslash
1458 RightBorder=8mm
1459 \end_layout
1460
1461 \begin_layout LyX-Code
1462
1463 \backslash
1464 TopBorder=9mm
1465 \end_layout
1466
1467 \begin_layout LyX-Code
1468
1469 \backslash
1470 BottomBorder=2mm
1471 \end_layout
1472
1473 \begin_layout Standard
1474 This sets things up for Avery label sheets, stock #5360.
1475  You're now ready to print labels, but you'll need to insert LaTeX code,
1476  placing the commands 
1477 \begin_inset Flex Code
1478 status collapsed
1479
1480 \begin_layout Plain Layout
1481
1482 \backslash
1483 begin{labels}
1484 \end_layout
1485
1486 \end_inset
1487
1488  and 
1489 \begin_inset Flex Code
1490 status collapsed
1491
1492 \begin_layout Plain Layout
1493
1494 \backslash
1495 end{labels}
1496 \end_layout
1497
1498 \end_inset
1499
1500  around each label text.
1501  This and other special features of 
1502 \begin_inset Flex Code
1503 status collapsed
1504
1505 \begin_layout Plain Layout
1506 labels.sty
1507 \end_layout
1508
1509 \end_inset
1510
1511  are explained in its documentation.
1512 \end_layout
1513
1514 \begin_layout Standard
1515 Someday, someone may write a LyX layout file to support this package directly.
1516  Maybe that someone is you.
1517 \end_layout
1518
1519 \begin_layout Subsubsection
1520 Example #3: Paragraph Indentation
1521 \end_layout
1522
1523 \begin_layout Standard
1524 Americans are trained to indent the first line of 
1525 \emph on
1526 every
1527 \emph default
1528  paragraph.
1529  As with all of their other weird quirks, most Americans will whine and
1530  moan until they can have their way and indent the first line of all paragraphs.
1531  (Yes, we're joking.
1532  (We are?) 
1533 \emph on
1534 Yeah
1535 \emph default
1536 , we are.)
1537 \end_layout
1538
1539 \begin_layout Standard
1540 Of course, this behavior isn't standard typography.
1541  In books, you typically only indent the first line of a paragraph 
1542 \emph on
1543 if
1544 \emph default
1545  it follows another one.
1546  The idea behind indenting the first line of a paragraph is to distinguish
1547  neighboring paragraphs from one another.
1548  If there is no previous paragraph—for example, if it follows a figure or
1549  is the first paragraph in a section—then there is no need for indentation.
1550  
1551 \end_layout
1552
1553 \begin_layout Standard
1554 If you're a typical American (we're still joking!), though, you don't care
1555  about such esoteric things; you want your indentation! Add this to the
1556  preamble:
1557 \end_layout
1558
1559 \begin_layout LyX-Code
1560
1561 \backslash
1562 usepackage{indentfirst}
1563 \end_layout
1564
1565 \begin_layout Standard
1566 If your TeX distribution isn't braindead, you'll have this package, and
1567  all of your paragraphs will get the indentation the Founding Fathers intended
1568  they should have.
1569 \end_layout
1570
1571 \begin_layout Subsubsection
1572 Example #4: This Document
1573 \end_layout
1574
1575 \begin_layout Standard
1576 You can also check out the preamble of this document to get an idea of some
1577  of the advanced things you can do.
1578 \end_layout
1579
1580 \begin_layout Section
1581 LyX and LaTeX Errors
1582 \end_layout
1583
1584 \begin_layout Standard
1585 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1586  going.
1587  It then uses the logfile from the LaTeX run to do a post-mortem.
1588  After analyzing the logfile, LyX displays a dialog listing the errors.
1589  Clicking on any one of them will take you to the position in your LyX file
1590  where the error occurred.
1591 \begin_inset Foot
1592 status collapsed
1593
1594 \begin_layout Plain Layout
1595 Well, usually.
1596  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1597  right line.
1598  There are also cases where LaTeX reports the error on one line, but the
1599  actual error is earlier.
1600  This is not unlike forgetting a closing brace in a program: You'll get
1601  an error, but only later.
1602 \end_layout
1603
1604 \end_inset
1605
1606
1607 \end_layout
1608
1609 \begin_layout Standard
1610 Some folks also like to look at the log file directly: It is available from
1611  
1612 \begin_inset Flex MenuItem
1613 status collapsed
1614
1615 \begin_layout Plain Layout
1616 Document
1617 \bar under
1618 \SpecialChar \menuseparator
1619
1620 \bar default
1621 Latex
1622 \begin_inset space ~
1623 \end_inset
1624
1625 Log
1626 \end_layout
1627
1628 \end_inset
1629
1630 .
1631  There are some fairly common error messages and warnings.
1632  We'll cover those here.
1633  You should look at a good LaTeX book for a complete listing.
1634 \end_layout
1635
1636 \begin_layout Itemize
1637 \begin_inset Flex Code
1638 status collapsed
1639
1640 \begin_layout Plain Layout
1641 LaTeX Warning
1642 \end_layout
1643
1644 \end_inset
1645
1646
1647 \begin_inset Newline newline
1648 \end_inset
1649
1650 Anything beginning with these words is a warning message for the purpose
1651  of 
1652 \begin_inset Quotes eld
1653 \end_inset
1654
1655 debugging
1656 \begin_inset Quotes erd
1657 \end_inset
1658
1659  the LaTeX code itself.
1660  You'll get messages like this if you added or changed cross-references
1661  or bibliography entries, in which case, LaTeX is trying to tell you that
1662  you need to make another run.
1663  You can by-and-large ignore these.
1664 \end_layout
1665
1666 \begin_layout Itemize
1667 \begin_inset Flex Code
1668 status collapsed
1669
1670 \begin_layout Plain Layout
1671 LaTeX Font Warning
1672 \end_layout
1673
1674 \end_inset
1675
1676
1677 \begin_inset Newline newline
1678 \end_inset
1679
1680 Another warning message, this time about fonts which LaTeX couldn't find.
1681  The rest of the message will often say something about a replacement font
1682  that LaTeX used.
1683  You can safely ignore these, too.
1684 \end_layout
1685
1686 \begin_layout Itemize
1687 \begin_inset Flex Code
1688 status collapsed
1689
1690 \begin_layout Plain Layout
1691 Overfull 
1692 \backslash
1693 hbox
1694 \end_layout
1695
1696 \end_inset
1697
1698
1699 \begin_inset Newline newline
1700 \end_inset
1701
1702 LaTeX absolutely 
1703 \emph on
1704 loves
1705 \emph default
1706  to spew these out.
1707  They are warnings about lines that were too long and run past the right
1708  margin.
1709  Almost always, this is unnoticeable in the final output.
1710  (It can be just a point or two.) Or, only one or two characters extend past
1711  the margin.
1712  LaTeX seems to generate at least one of these messages for just about any
1713  document you write.
1714 \begin_inset Newline newline
1715 \end_inset
1716
1717 You can ignore these messages.
1718  Your eyes will tell you if there's a problem with something that's too
1719  wide; just look at the output.
1720 \begin_inset Foot
1721 status collapsed
1722
1723 \begin_layout Plain Layout
1724 You can also enable the `draft' option in 
1725 \begin_inset Flex MenuItem
1726 status collapsed
1727
1728 \begin_layout Plain Layout
1729 Document
1730 \bar under
1731 \SpecialChar \menuseparator
1732
1733 \bar default
1734 Settings
1735 \end_layout
1736
1737 \end_inset
1738
1739 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1740 \end_layout
1741
1742 \end_inset
1743
1744
1745 \end_layout
1746
1747 \begin_layout Itemize
1748 \begin_inset Flex Code
1749 status collapsed
1750
1751 \begin_layout Plain Layout
1752 Underfull 
1753 \backslash
1754 hbox
1755 \end_layout
1756
1757 \end_inset
1758
1759
1760 \begin_inset Newline newline
1761 \end_inset
1762
1763 Not quite as common as its cousin.
1764  LaTeX seems to like to print lines that are a bit too wide as opposed to
1765  ones that are a bit too narrow.
1766  We have no idea why.
1767 \end_layout
1768
1769 \begin_layout Itemize
1770 \begin_inset Flex Code
1771 status collapsed
1772
1773 \begin_layout Plain Layout
1774 Overfull 
1775 \backslash
1776 vbox
1777 \end_layout
1778
1779 \end_inset
1780
1781  and 
1782 \begin_inset Flex Code
1783 status collapsed
1784
1785 \begin_layout Plain Layout
1786 Underfull 
1787 \backslash
1788 vbox
1789 \end_layout
1790
1791 \end_inset
1792
1793
1794 \begin_inset Newline newline
1795 \end_inset
1796
1797 Warnings about troubles breaking the page.
1798  Once again, just look at the output.
1799  Your eyes will tell you where something has gone wrong.
1800 \end_layout
1801
1802 \begin_layout Itemize
1803 \begin_inset Flex Code
1804 status collapsed
1805
1806 \begin_layout Plain Layout
1807 LaTeX Error: File 
1808 \begin_inset Quotes els
1809 \end_inset
1810
1811 Xxxx
1812 \begin_inset Quotes ers
1813 \end_inset
1814
1815  not found
1816 \end_layout
1817
1818 \end_inset
1819
1820
1821 \begin_inset Newline newline
1822 \end_inset
1823
1824 The file 
1825 \begin_inset Quotes eld
1826 \end_inset
1827
1828 Xxxx
1829 \begin_inset Quotes erd
1830 \end_inset
1831
1832  isn't installed on this system.
1833  This usually appears because some package your document needs isn't installed.
1834  If you didn't touch the preamble or didn't use the 
1835 \begin_inset Flex Code
1836 status collapsed
1837
1838 \begin_layout Plain Layout
1839
1840 \backslash
1841 usepackage{}
1842 \end_layout
1843
1844 \end_inset
1845
1846  command, then one of the packages LyX tried to load is missing.
1847  Use 
1848 \begin_inset Flex MenuItem
1849 status collapsed
1850
1851 \begin_layout Plain Layout
1852 Help\SpecialChar \menuseparator
1853 LaTeX Configuration
1854 \end_layout
1855
1856 \end_inset
1857
1858  to get a list of packages that LyX knows about.
1859  This file is updated whenever you reconfigure LyX (using 
1860 \begin_inset Flex MenuItem
1861 status collapsed
1862
1863 \begin_layout Plain Layout
1864 Tools\SpecialChar \menuseparator
1865 Reconfigure
1866 \end_layout
1867
1868 \end_inset
1869
1870 ) and tells you which packages have been detected and what they do.
1871 \begin_inset Newline newline
1872 \end_inset
1873
1874 If you did use the 
1875 \begin_inset Flex Code
1876 status collapsed
1877
1878 \begin_layout Plain Layout
1879
1880 \backslash
1881 usepackage{}
1882 \end_layout
1883
1884 \end_inset
1885
1886  command and the package in question isn't installed, then you'll need to
1887  install it yourself.
1888 \end_layout
1889
1890 \begin_layout Itemize
1891 \begin_inset Flex Code
1892 status collapsed
1893
1894 \begin_layout Plain Layout
1895 LaTeX Error: Unknown option
1896 \end_layout
1897
1898 \end_inset
1899
1900
1901 \begin_inset Newline newline
1902 \end_inset
1903
1904 Error messages beginning with this are trying to tell you that you specified
1905  a bad or undefined option to a package.
1906  Check the package's documentation.
1907 \end_layout
1908
1909 \begin_layout Itemize
1910 \begin_inset Flex Code
1911 status collapsed
1912
1913 \begin_layout Plain Layout
1914 Undefined control sequence
1915 \end_layout
1916
1917 \end_inset
1918
1919
1920 \begin_inset Newline newline
1921 \end_inset
1922
1923 If you've inserted LaTeX code into your document, but made a typo, you'll
1924  get one of these.
1925  You may have forgotten to load a package.
1926  In any case, this error message usually means that you used an undefined
1927  command.
1928  
1929 \end_layout
1930
1931 \begin_layout Standard
1932 There are other error and warning messages.
1933  Some are self-explanatory.
1934  These are usually LaTeX messages.
1935  Others are downright cryptic.
1936  These are usually TeX error messages, and we really have 
1937 \emph on
1938 no clue
1939 \emph default
1940  what they mean or how to decipher them.
1941  No-one does.
1942 \end_layout
1943
1944 \begin_layout Standard
1945 There's a general sequence you should follow if you get error messages:
1946 \end_layout
1947
1948 \begin_layout Enumerate
1949 Look at the LaTeX code you inserted for typos.
1950 \end_layout
1951
1952 \begin_layout Enumerate
1953 If there are no typos, check that you used the command(s) correctly.
1954 \end_layout
1955
1956 \begin_layout Enumerate
1957 If you get a bunch of error boxes piled up at the very top of the document—and
1958  especially if you see a 
1959 \begin_inset Quotes eld
1960 \end_inset
1961
1962
1963 \begin_inset Flex Code
1964 status collapsed
1965
1966 \begin_layout Plain Layout
1967 Missing 
1968 \backslash
1969 begin{document}
1970 \end_layout
1971
1972 \end_inset
1973
1974
1975 \begin_inset Quotes erd
1976 \end_inset
1977
1978  error—it means that there are errors in the preamble.
1979  Start debugging your preamble.
1980 \end_layout
1981
1982 \begin_layout Enumerate
1983 If you didn't add anything to the preamble and didn't add any LaTeX code
1984  to the document, the first suspect is your LaTeX distribution itself.
1985  Check for missing packages and install them.
1986 \end_layout
1987
1988 \begin_layout Enumerate
1989 Okay, so there are no missing packages.
1990  Did you use any of the fine-tuning options in LyX? Specifically, did you
1991  
1992 \emph on
1993 misuse
1994 \emph default
1995  any of them, like trying to manually insert lots of 
1996 \begin_inset Flex Code
1997 status collapsed
1998
1999 \begin_layout Plain Layout
2000 Protected
2001 \begin_inset space ~
2002 \end_inset
2003
2004 Blanks
2005 \end_layout
2006
2007 \end_inset
2008
2009
2010 \begin_inset Flex Code
2011 status collapsed
2012
2013 \begin_layout Plain Layout
2014 Linebreaks
2015 \end_layout
2016
2017 \end_inset
2018
2019 , or 
2020 \begin_inset Flex Code
2021 status collapsed
2022
2023 \begin_layout Plain Layout
2024 Pagebreaks
2025 \end_layout
2026
2027 \end_inset
2028
2029 ? Did you try to kludge something together with these instead of using the
2030  appropriate paragraph environment?
2031 \end_layout
2032
2033 \begin_layout Enumerate
2034 All right, you didn't use any of the fine-tuning options, you played by
2035  the rules.
2036  Did you try to pull a fancy maneuver? Did you do something funky inside
2037  a table or an equation, like inserting a graphic into a table cell?
2038 \end_layout
2039
2040 \begin_layout Enumerate
2041 Do you have long sections of text where LaTeX cannot find a place to break
2042  a line? By default, LaTeX is rather strict about how much extra inter-word
2043  spacing it will add in order to break a line.
2044  Preferably, you should rework the paragraph to avoid the problem.
2045  If this isn't an option, you can wrap your text in 
2046 \begin_inset Flex Code
2047 status collapsed
2048
2049 \begin_layout Plain Layout
2050
2051 \backslash
2052 sloppypar
2053 \end_layout
2054
2055 \end_inset
2056
2057  to make LaTeX's line breaking more, well, sloppy.
2058 \end_layout
2059
2060 \begin_layout Enumerate
2061 Did you go overboard with the nesting? LyX (currently) doesn't check to
2062  make sure you're in the limits for nesting environments.
2063  If you nested a bunch of environments to the 
2064 \begin_inset Formula $17^{\mathrm{th}}$
2065 \end_inset
2066
2067  level, that's the problem.
2068  (The limit in LaTeX is five.)
2069 \end_layout
2070
2071 \begin_layout Enumerate
2072 Okay, you didn't get any error messages, but your output looks awful.
2073  If you have a table or figure that's too wide or long for the page, you
2074  need to:
2075 \end_layout
2076
2077 \begin_deeper
2078 \begin_layout Enumerate
2079 rescale the figure so it fits.
2080 \end_layout
2081
2082 \begin_layout Enumerate
2083 trim down the table so it fits.
2084 \end_layout
2085
2086 \end_deeper
2087 \begin_layout Enumerate
2088 If something else is wrong with the output, and you didn't try to pull anything
2089  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2090 \end_layout
2091
2092 \begin_layout Standard
2093 If all this doesn't help—well, then 
2094 \emph on
2095 perhaps
2096 \emph default
2097  you might have found a bug in LyX\SpecialChar \ldots{}
2098 .
2099 \end_layout
2100
2101 \begin_layout Chapter
2102 Supplemental Tools
2103 \end_layout
2104
2105 \begin_layout Section
2106 Customizing Bibliographies with BibTeX
2107 \end_layout
2108
2109 \begin_layout Standard
2110 The most basic information about how to use BibTeX with LyX is contained
2111  in the section 
2112 \emph on
2113 Bibliography databases (BibTeX)
2114 \emph default
2115  of the 
2116 \emph on
2117 User's Guide
2118 \emph default
2119 .
2120  The following subsections explain special bibliography features supported
2121  by LyX.
2122 \end_layout
2123
2124 \begin_layout Subsection
2125 Alternative Citation Styles
2126 \end_layout
2127
2128 \begin_layout Standard
2129 Standard BibTeX uses numbers (e.
2130 \begin_inset space \thinspace{}
2131 \end_inset
2132
2133 g.
2134 \begin_inset space \space{}
2135 \end_inset
2136
2137
2138 \begin_inset Quotes eld
2139 \end_inset
2140
2141 [12]
2142 \begin_inset Quotes erd
2143 \end_inset
2144
2145 ) to refer to a cited work.
2146  However, in many scientific disciplines, other citation styles are in use.
2147  The most common one is the author-year style (e.
2148 \begin_inset space \thinspace{}
2149 \end_inset
2150
2151 g.
2152 \begin_inset space \space{}
2153 \end_inset
2154
2155
2156 \begin_inset Quotes eld
2157 \end_inset
2158
2159 Knuth 1984a
2160 \begin_inset Quotes erd
2161 \end_inset
2162
2163 ).
2164  LyX supports two packages that provide this style, 
2165 \begin_inset Flex Code
2166 status collapsed
2167
2168 \begin_layout Plain Layout
2169 natbib
2170 \end_layout
2171
2172 \end_inset
2173
2174  and 
2175 \begin_inset Flex Code
2176 status collapsed
2177
2178 \begin_layout Plain Layout
2179 jurabib
2180 \end_layout
2181
2182 \end_inset
2183
2184 .
2185  Both packages have their pros and cons, which cannot be listed in detail.
2186  If you only want to have simple author-year (or author-numerical) style,
2187  or if you want to use one of the countless style files for 
2188 \begin_inset Flex Code
2189 status collapsed
2190
2191 \begin_layout Plain Layout
2192 natbib
2193 \end_layout
2194
2195 \end_inset
2196
2197 , then the established 
2198 \begin_inset Flex Code
2199 status collapsed
2200
2201 \begin_layout Plain Layout
2202 natbib
2203 \end_layout
2204
2205 \end_inset
2206
2207  package is probably your choice.
2208  If you need special features like short title references, ibidem etc., you
2209  might consider the 
2210 \begin_inset Flex Code
2211 status collapsed
2212
2213 \begin_layout Plain Layout
2214 jurabib
2215 \end_layout
2216
2217 \end_inset
2218
2219  package.
2220 \end_layout
2221
2222 \begin_layout Standard
2223 The handling of both packages in LyX is basically the same.
2224  Go to 
2225 \begin_inset Flex MenuItem
2226 status collapsed
2227
2228 \begin_layout Plain Layout
2229 Document\SpecialChar \menuseparator
2230 Settings
2231 \end_layout
2232
2233 \end_inset
2234
2235  and select under 
2236 \begin_inset Flex MenuItem
2237 status collapsed
2238
2239 \begin_layout Plain Layout
2240 Bibliography
2241 \end_layout
2242
2243 \end_inset
2244
2245  the option 
2246 \begin_inset Flex MenuItem
2247 status collapsed
2248
2249 \begin_layout Plain Layout
2250 Natbib
2251 \end_layout
2252
2253 \end_inset
2254
2255  or 
2256 \begin_inset Flex MenuItem
2257 status collapsed
2258
2259 \begin_layout Plain Layout
2260 Jurabib
2261 \end_layout
2262
2263 \end_inset
2264
2265 .
2266  With both packages, you will get some extra features in the citation dialog
2267  and you can select the style of the reference (
2268 \begin_inset Quotes eld
2269 \end_inset
2270
2271 Knuth 1984
2272 \begin_inset Quotes erd
2273 \end_inset
2274
2275
2276 \begin_inset Quotes eld
2277 \end_inset
2278
2279 Knuth (1984)
2280 \begin_inset Quotes erd
2281 \end_inset
2282
2283
2284 \begin_inset Quotes eld
2285 \end_inset
2286
2287 Knuth, 1984
2288 \begin_inset Quotes erd
2289 \end_inset
2290
2291
2292 \begin_inset Quotes eld
2293 \end_inset
2294
2295 1984
2296 \begin_inset Quotes erd
2297 \end_inset
2298
2299  etc.).
2300  Note that both packages need specifically designed style files.
2301  They both ship their own, but there are lots of additional style files,
2302  and there is even an interactive style file builder
2303 \begin_inset Foot
2304 status collapsed
2305
2306 \begin_layout Plain Layout
2307 See 
2308 \begin_inset Flex URL
2309 status open
2310
2311 \begin_layout Plain Layout
2312
2313 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2314 \end_layout
2315
2316 \end_inset
2317
2318
2319 \end_layout
2320
2321 \end_inset
2322
2323  for 
2324 \begin_inset Flex Code
2325 status collapsed
2326
2327 \begin_layout Plain Layout
2328 natbib
2329 \end_layout
2330
2331 \end_inset
2332
2333 .
2334 \end_layout
2335
2336 \begin_layout Subsection
2337 Sectioned Bibliographies
2338 \end_layout
2339
2340 \begin_layout Standard
2341 Sometimes you might need to divide your bibliography into several sections.
2342  If you are for instance a historian, the possibility to separate sources
2343  and scientific works is most likely a 
2344 \begin_inset Quotes eld
2345 \end_inset
2346
2347 must have
2348 \begin_inset Quotes erd
2349 \end_inset
2350
2351 .
2352  Unfortunately, BibTeX itself does not allow you to do this.
2353  But with the help of some LaTeX packages, BibTeX can be extended to fit
2354  your needs.
2355 \end_layout
2356
2357 \begin_layout Standard
2358 LyX provides native support for one of these packages, 
2359 \family typewriter
2360 bibtopic
2361 \family default
2362 .
2363 \begin_inset Foot
2364 status collapsed
2365
2366 \begin_layout Plain Layout
2367 Available from 
2368 \begin_inset Flex URL
2369 status open
2370
2371 \begin_layout Plain Layout
2372
2373 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2374 \end_layout
2375
2376 \end_inset
2377
2378
2379 \end_layout
2380
2381 \end_inset
2382
2383  The advantage of this package (compared to other packages like 
2384 \family typewriter
2385 multibib
2386 \family default
2387 ) is that you don't need to define new citation commands.
2388  Instead, you need to prepare different bibliographic databases which include
2389  the entries for the different sections of the bibliography.
2390  For example: If you want to divide your bibliography into the sections
2391  
2392 \begin_inset Quotes eld
2393 \end_inset
2394
2395 Sources
2396 \begin_inset Quotes erd
2397 \end_inset
2398
2399  and 
2400 \begin_inset Quotes eld
2401 \end_inset
2402
2403 Scientific works
2404 \begin_inset Quotes erd
2405 \end_inset
2406
2407 , you first need to create two bibliographic databases, e.
2408 \begin_inset space \thinspace{}
2409 \end_inset
2410
2411 g.
2412 \begin_inset space \space{}
2413 \end_inset
2414
2415
2416 \begin_inset Flex Code
2417 status collapsed
2418
2419 \begin_layout Plain Layout
2420 sources.bib
2421 \end_layout
2422
2423 \end_inset
2424
2425  and 
2426 \begin_inset Flex Code
2427 status collapsed
2428
2429 \begin_layout Plain Layout
2430 scientific.bib
2431 \end_layout
2432
2433 \end_inset
2434
2435 .
2436  
2437 \end_layout
2438
2439 \begin_layout Standard
2440 Go to 
2441 \begin_inset Flex MenuItem
2442 status collapsed
2443
2444 \begin_layout Plain Layout
2445 Document\SpecialChar \menuseparator
2446 Settings
2447 \end_layout
2448
2449 \end_inset
2450
2451  and check under 
2452 \begin_inset Flex MenuItem
2453 status collapsed
2454
2455 \begin_layout Plain Layout
2456 Bibliography
2457 \end_layout
2458
2459 \end_inset
2460
2461  the option 
2462 \begin_inset Flex MenuItem
2463 status collapsed
2464
2465 \begin_layout Plain Layout
2466 Sectioned bibliography
2467 \end_layout
2468
2469 \end_inset
2470
2471 .
2472  Now you can insert multiple BibTeX bibliographies, one for each section
2473  of your bibliography.
2474  Returning to our example: Insert the BibTeX bibliography 
2475 \begin_inset Flex Code
2476 status collapsed
2477
2478 \begin_layout Plain Layout
2479 sources.bib
2480 \end_layout
2481
2482 \end_inset
2483
2484  and a second one for the database 
2485 \begin_inset Flex Code
2486 status collapsed
2487
2488 \begin_layout Plain Layout
2489 scientific.bib
2490 \end_layout
2491
2492 \end_inset
2493
2494 .
2495  You are free to use the same or different styles for each section.
2496  Additionally, you can choose if the bibliography section should contain
2497  
2498 \begin_inset Quotes eld
2499 \end_inset
2500
2501 all cited references
2502 \begin_inset Quotes erd
2503 \end_inset
2504
2505  of the specified database(s) (which is the default), 
2506 \begin_inset Quotes eld
2507 \end_inset
2508
2509 all uncited references
2510 \begin_inset Quotes erd
2511 \end_inset
2512
2513  or even 
2514 \begin_inset Quotes eld
2515 \end_inset
2516
2517 all references
2518 \begin_inset Quotes erd
2519 \end_inset
2520
2521 .
2522  This might be useful if you would like to separate your bibliography into
2523  three sections: 
2524 \begin_inset Quotes eld
2525 \end_inset
2526
2527 Cited sources
2528 \begin_inset Quotes erd
2529 \end_inset
2530
2531
2532 \begin_inset Quotes eld
2533 \end_inset
2534
2535 Uncited sources
2536 \begin_inset Quotes erd
2537 \end_inset
2538
2539 , and 
2540 \begin_inset Quotes eld
2541 \end_inset
2542
2543 Scientific works
2544 \begin_inset Quotes erd
2545 \end_inset
2546
2547 .
2548  The titles for the sections can be added as ordinary sections or subsections.
2549  Since 
2550 \begin_inset Flex Code
2551 status collapsed
2552
2553 \begin_layout Plain Layout
2554 bibtopic
2555 \end_layout
2556
2557 \end_inset
2558
2559  removes the bibliography title, you have to manually re-add that, too (as
2560  a chapter* or section*, for instance).
2561 \end_layout
2562
2563 \begin_layout Subsection
2564 Multiple Bibliographies
2565 \end_layout
2566
2567 \begin_layout Standard
2568 Multiple bibliographies, e.
2569 \begin_inset space \thinspace{}
2570 \end_inset
2571
2572 g.
2573 \begin_inset space \space{}
2574 \end_inset
2575
2576 a bibliography for each section or chapter of the document, are not supported
2577  by BibTeX itself.
2578  But the 
2579 \begin_inset Flex Code
2580 status collapsed
2581
2582 \begin_layout Plain Layout
2583 bibtopic
2584 \end_layout
2585
2586 \end_inset
2587
2588  package, which is used for the creation of sectioned bibliographies in
2589  LyX (see the previous section), provides an easy way to solve this task,
2590  if you are willing to use some 
2591 \begin_inset Flex MenuItem
2592 status collapsed
2593
2594 \begin_layout Plain Layout
2595 TeX Code
2596 \end_layout
2597
2598 \end_inset
2599
2600  (see section
2601 \begin_inset space ~
2602 \end_inset
2603
2604
2605 \begin_inset CommandInset ref
2606 LatexCommand ref
2607 reference "sec:Inserting-TeX-Code"
2608
2609 \end_inset
2610
2611 ).
2612 \begin_inset Foot
2613 status collapsed
2614
2615 \begin_layout Plain Layout
2616 An alternative approach is to use the 
2617 \begin_inset Flex Code
2618 status collapsed
2619
2620 \begin_layout Plain Layout
2621 chapterbib
2622 \end_layout
2623
2624 \end_inset
2625
2626  or 
2627 \begin_inset Flex Code
2628 status collapsed
2629
2630 \begin_layout Plain Layout
2631 bibunits
2632 \end_layout
2633
2634 \end_inset
2635
2636  package, respectively.
2637 \end_layout
2638
2639 \end_inset
2640
2641
2642 \end_layout
2643
2644 \begin_layout Standard
2645 First go to 
2646 \begin_inset Flex MenuItem
2647 status collapsed
2648
2649 \begin_layout Plain Layout
2650 Document\SpecialChar \menuseparator
2651 Settings
2652 \end_layout
2653
2654 \end_inset
2655
2656  and under 
2657 \begin_inset Flex MenuItem
2658 status collapsed
2659
2660 \begin_layout Plain Layout
2661 Bibliography
2662 \end_layout
2663
2664 \end_inset
2665
2666  check 
2667 \begin_inset Flex MenuItem
2668 status collapsed
2669
2670 \begin_layout Plain Layout
2671 Sectioned bibliography
2672 \end_layout
2673
2674 \end_inset
2675
2676 .
2677  In the document, you have to enclose the sections, which shall contain
2678  their own bibliography (including the BibTeX bibliography itself), between
2679  
2680 \begin_inset Flex Code
2681 status collapsed
2682
2683 \begin_layout Plain Layout
2684
2685 \backslash
2686 begin{btUnit}
2687 \end_layout
2688
2689 \end_inset
2690
2691  and 
2692 \begin_inset Flex Code
2693 status collapsed
2694
2695 \begin_layout Plain Layout
2696
2697 \backslash
2698 end{btUnit}
2699 \end_layout
2700
2701 \end_inset
2702
2703  (those commands have to be inserted as TeX code).
2704  The bibliography will contain all references that have been cited in the
2705  current 
2706 \begin_inset Flex Code
2707 status collapsed
2708
2709 \begin_layout Plain Layout
2710 btUnit
2711 \end_layout
2712
2713 \end_inset
2714
2715 .
2716  
2717 \series bold
2718 Note:
2719 \series default
2720  If you are using this approach, then every citation reference has to be
2721  inside some 
2722 \begin_inset Flex Code
2723 status collapsed
2724
2725 \begin_layout Plain Layout
2726 btUnit
2727 \end_layout
2728
2729 \end_inset
2730
2731 .
2732  Also, the 
2733 \begin_inset Flex Code
2734 status collapsed
2735
2736 \begin_layout Plain Layout
2737 btUnit
2738 \end_layout
2739
2740 \end_inset
2741
2742 s cannot be nested.
2743 \end_layout
2744
2745 \begin_layout Section
2746 Multipart Documents
2747 \end_layout
2748
2749 \begin_layout Subsection
2750 General Operation
2751 \end_layout
2752
2753 \begin_layout Standard
2754 When you are working on a large file with many sections, it is often convenient
2755  to break up the document into several files, or perhaps you have something
2756  where a table may change from time to time, but the preceding text does
2757  not.
2758  In these cases, you should seriously consider using multipart documents.
2759  For example, scientific papers often have five major sections: the introduction
2760 , observations, results, discussion, and conclusion.
2761  Each of these could be its own separate LyX file, with one 
2762 \begin_inset Quotes eld
2763 \end_inset
2764
2765 master
2766 \begin_inset Quotes erd
2767 \end_inset
2768
2769  file which contains the title, authors, abstract, references, etc., plus
2770  the five included files.
2771  It is important to note that each of these files is a full LyX file which
2772  can be formatted and printed on its own, as well as included in a master
2773  file.
2774  Each of these files must have the same document class, however—don't attempt
2775  to mix book classes with article classes.
2776  You may also include LaTeX files; however, these files must not have their
2777  own preamble (i.
2778 \begin_inset space \thinspace{}
2779 \end_inset
2780
2781 e.
2782 \begin_inset space \space{}
2783 \end_inset
2784
2785 everything up to and including the 
2786 \begin_inset Flex Code
2787 status collapsed
2788
2789 \begin_layout Plain Layout
2790
2791 \backslash
2792 begin{document}
2793 \end_layout
2794
2795 \end_inset
2796
2797  line as well as the 
2798 \begin_inset Flex Code
2799 status collapsed
2800
2801 \begin_layout Plain Layout
2802
2803 \backslash
2804 end{document}
2805 \end_layout
2806
2807 \end_inset
2808
2809  line must be deleted) or else errors will be generated when you try to
2810  make a DVI file.
2811 \end_layout
2812
2813 \begin_layout Standard
2814 LyX allows you to include files quite easily with 
2815 \begin_inset Flex MenuItem
2816 status collapsed
2817
2818 \begin_layout Plain Layout
2819 Insert\SpecialChar \menuseparator
2820 ChiId
2821 \begin_inset space ~
2822 \end_inset
2823
2824 Document
2825 \end_layout
2826
2827 \end_inset
2828
2829 .
2830  When you click on this selection a small box is inserted into the file
2831  at the current cursor location.
2832  Clicking on the box raises a dialog which allows you to select the file
2833  to be included, and the method of its inclusion.
2834  
2835 \end_layout
2836
2837 \begin_layout Standard
2838 The file selection box should by now be obvious.
2839  The three inclusion methods are 
2840 \begin_inset Quotes eld
2841 \end_inset
2842
2843 include
2844 \begin_inset Quotes erd
2845 \end_inset
2846
2847
2848 \begin_inset Quotes eld
2849 \end_inset
2850
2851 input
2852 \begin_inset Quotes erd
2853 \end_inset
2854
2855 , and 
2856 \begin_inset Quotes eld
2857 \end_inset
2858
2859 verbatim
2860 \begin_inset Quotes erd
2861 \end_inset
2862
2863 .
2864  The difference between 
2865 \begin_inset Quotes eld
2866 \end_inset
2867
2868 include
2869 \begin_inset Quotes erd
2870 \end_inset
2871
2872  and 
2873 \begin_inset Quotes eld
2874 \end_inset
2875
2876 input
2877 \begin_inset Quotes erd
2878 \end_inset
2879
2880  is really only meaningful to LaTeXperts, but the practical difference is
2881  that files that are 
2882 \begin_inset Quotes eld
2883 \end_inset
2884
2885 included
2886 \begin_inset Quotes erd
2887 \end_inset
2888
2889  are typeset beginning on a new page, while files that are 
2890 \begin_inset Quotes eld
2891 \end_inset
2892
2893 inputted
2894 \begin_inset Quotes erd
2895 \end_inset
2896
2897  are typeset starting on the current page.
2898 \end_layout
2899
2900 \begin_layout Standard
2901 Generally, the master file is converted into a full LaTeX file before typesettin
2902 g, while the included files are converted to LaTeX files that do not have
2903  all the preamble information.
2904 \end_layout
2905
2906 \begin_layout Standard
2907
2908 \begin_inset Quotes eld
2909 \end_inset
2910
2911 verbatim
2912 \begin_inset Quotes erd
2913 \end_inset
2914
2915  included file allows you to include a file typeset exactly as it appears
2916  in the file, i.
2917 \begin_inset space \thinspace{}
2918 \end_inset
2919
2920 e.
2921 \begin_inset space \space{}
2922 \end_inset
2923
2924 in 
2925 \begin_inset Flex Code
2926 status collapsed
2927
2928 \begin_layout Plain Layout
2929 verbatim
2930 \end_layout
2931
2932 \end_inset
2933
2934  mode, with the characters set in a fixed-width typewriter font.
2935  Normally, spaces in this file are invisible, though two consecutive spaces
2936  are conserved, unlike LyX's normal treatment of spaces.
2937  However, setting the 
2938 \begin_inset Flex MenuItem
2939 status collapsed
2940
2941 \begin_layout Plain Layout
2942 Mark
2943 \begin_inset space ~
2944 \end_inset
2945
2946 spaces
2947 \begin_inset space ~
2948 \end_inset
2949
2950 in
2951 \begin_inset space ~
2952 \end_inset
2953
2954 output
2955 \end_layout
2956
2957 \end_inset
2958
2959  checkbox typesets a mark to unambiguously define the presence of a space.
2960  
2961 \end_layout
2962
2963 \begin_layout Subsection
2964 Cross-References Between Files
2965 \end_layout
2966
2967 \begin_layout Standard
2968 \begin_inset Box Shadowbox
2969 position "t"
2970 hor_pos "c"
2971 has_inner_box 1
2972 inner_pos "t"
2973 use_parbox 0
2974 use_makebox 0
2975 width "100col%"
2976 special "none"
2977 height "1in"
2978 height_special "totalheight"
2979 status open
2980
2981 \begin_layout Plain Layout
2982 This section is somewhat out of date.
2983  Need to describe default master documents and how children are opened when
2984  the master is.
2985  [[FIXME]]
2986 \end_layout
2987
2988 \end_inset
2989
2990
2991 \end_layout
2992
2993 \begin_layout Standard
2994 It is possible to set up cross-references between the different files.
2995  First, open all the files in question: let's call them A and B in a two
2996  file example, where B is included in A.
2997  Let's say you insert a label in A, then want to reference it in B.
2998  Open the cross-reference dialog whilst in document B, and you can select
2999  the 
3000 \begin_inset Quotes eld
3001 \end_inset
3002
3003 buffer
3004 \begin_inset Quotes erd
3005 \end_inset
3006
3007  to use.
3008 \end_layout
3009
3010 \begin_layout Subsection
3011 Bibliography Lists in all Subdocuments
3012 \end_layout
3013
3014 \begin_layout Standard
3015 \begin_inset Box Frameless
3016 position "t"
3017 hor_pos "c"
3018 has_inner_box 1
3019 inner_pos "t"
3020 use_parbox 0
3021 use_makebox 0
3022 width "100col%"
3023 special "none"
3024 height "1in"
3025 height_special "totalheight"
3026 status open
3027
3028 \begin_layout Plain Layout
3029 This section also needs updating.
3030  There is now material about this on the wiki, and it could be copied here.
3031 \end_layout
3032
3033 \end_inset
3034
3035
3036 \end_layout
3037
3038 \begin_layout Standard
3039 Copy the bibliography list with all entries to all subdocuments and transform
3040  them to a comment.
3041  This way LyX will find the 
3042 \begin_inset Flex Code
3043 status collapsed
3044
3045 \begin_layout Plain Layout
3046 .bib
3047 \end_layout
3048
3049 \end_inset
3050
3051 -files and you can easily insert references without making the bibliography
3052  list visible.
3053 \end_layout
3054
3055 \begin_layout Standard
3056 As the bibliography list is in a comment, LaTeX won't use use it and the
3057  references will look like this: [?], instead of like this: [1].
3058  One solution is to use the LaTeX-package 
3059 \begin_inset Flex Code
3060 status collapsed
3061
3062 \begin_layout Plain Layout
3063 comment
3064 \end_layout
3065
3066 \end_inset
3067
3068  that will only include comments by processing the files separately.
3069  To do this, add in the LaTeX preamble of every subdocument the following:
3070 \end_layout
3071
3072 \begin_layout LyX-Code
3073
3074 \backslash
3075 usepackage{comment}
3076 \end_layout
3077
3078 \begin_layout LyX-Code
3079
3080 \backslash
3081 includecomment{comment}
3082 \end_layout
3083
3084 \begin_layout Standard
3085 See also 
3086 \begin_inset Flex URL
3087 status collapsed
3088
3089 \begin_layout Plain Layout
3090
3091 http://wiki.lyx.org/FAQ/Unsorted#toc31
3092 \end_layout
3093
3094 \end_inset
3095
3096 .
3097 \end_layout
3098
3099 \begin_layout Section
3100 LyX Archives
3101 \end_layout
3102
3103 \begin_layout Standard
3104 Users sometimes need to be able to 
3105 \begin_inset Quotes eld
3106 \end_inset
3107
3108 bundle
3109 \begin_inset Quotes erd
3110 \end_inset
3111
3112  a LyX file together with all the images (and other files) on which it depends,
3113  either for sending to a publisher or for sharing with a co-author.
3114  LyX 2.0 includes a Python script (
3115 \begin_inset Flex Code
3116 status collapsed
3117
3118 \begin_layout Plain Layout
3119 lyxpak.py
3120 \end_layout
3121
3122 \end_inset
3123
3124 ) that automates this process.
3125  To use it, you must have either the 
3126 \begin_inset Flex Code
3127 status collapsed
3128
3129 \begin_layout Plain Layout
3130 zipfile
3131 \end_layout
3132
3133 \end_inset
3134
3135  or 
3136 \begin_inset Flex Code
3137 status collapsed
3138
3139 \begin_layout Plain Layout
3140 tarfile
3141 \end_layout
3142
3143 \end_inset
3144
3145  python modules installed on your system.
3146  By default, the script prefers the 
3147 \begin_inset Flex Code
3148 status collapsed
3149
3150 \begin_layout Plain Layout
3151 gzip
3152 \end_layout
3153
3154 \end_inset
3155
3156 -compressed 
3157 \begin_inset Flex Code
3158 status collapsed
3159
3160 \begin_layout Plain Layout
3161 tar
3162 \end_layout
3163
3164 \end_inset
3165
3166  format on Unix-like systems and the 
3167 \begin_inset Flex Code
3168 status collapsed
3169
3170 \begin_layout Plain Layout
3171 zip
3172 \end_layout
3173
3174 \end_inset
3175
3176  format on Windows.
3177 \end_layout
3178
3179 \begin_layout Standard
3180 LyX's configuration process will set the script up to export a `LyX Archive',
3181  and this format will then be available under 
3182 \begin_inset Flex Code
3183 status collapsed
3184
3185 \begin_layout Plain Layout
3186 File\SpecialChar \menuseparator
3187 Export
3188 \end_layout
3189
3190 \end_inset
3191
3192 .
3193 \end_layout
3194
3195 \begin_layout Standard
3196 Independently of the platform, the generation of a particular archive format
3197  can be forced by adding either the 
3198 \begin_inset Flex Code
3199 status collapsed
3200
3201 \begin_layout Plain Layout
3202 -t
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 tar
3213 \end_layout
3214
3215 \end_inset
3216
3217  format) or 
3218 \begin_inset Flex Code
3219 status collapsed
3220
3221 \begin_layout Plain Layout
3222 -z
3223 \end_layout
3224
3225 \end_inset
3226
3227  (for the 
3228 \begin_inset Flex Code
3229 status collapsed
3230
3231 \begin_layout Plain Layout
3232 zip
3233 \end_layout
3234
3235 \end_inset
3236
3237  format) switch to the 
3238 \begin_inset Flex Code
3239 status collapsed
3240
3241 \begin_layout Plain Layout
3242 LyX\SpecialChar \menuseparator
3243 LyX Archive
3244 \end_layout
3245
3246 \end_inset
3247
3248  converter in 
3249 \begin_inset Flex Code
3250 status collapsed
3251
3252 \begin_layout Plain Layout
3253 Tools\SpecialChar \menuseparator
3254 Preferences\SpecialChar \menuseparator
3255 File Handling\SpecialChar \menuseparator
3256 Converters
3257 \end_layout
3258
3259 \end_inset
3260
3261 .
3262  (Make sure you add the switch after the script name, not before it.)
3263 \end_layout
3264
3265 \begin_layout Section
3266 Fancy Headers and Footers
3267 \end_layout
3268
3269 \begin_layout Standard
3270 The default page layout is rather plain; for an 
3271 \begin_inset Flex Code
3272 status collapsed
3273
3274 \begin_layout Plain Layout
3275 article
3276 \end_layout
3277
3278 \end_inset
3279
3280  document class, all you get is a centered page number at the bottom of
3281  the page.
3282  This document uses KOMA-script's book class, so it appears to be a bit
3283  fancier.
3284  But to really put on a show, you need to set the document page style to
3285  
3286 \begin_inset Quotes eld
3287 \end_inset
3288
3289 fancy
3290 \begin_inset Quotes erd
3291 \end_inset
3292
3293 , as mentioned in the 
3294 \emph on
3295 User Guide
3296 \emph default
3297 .
3298  This section describes the LaTeX code you need to insert in your LaTeX
3299  preamble in order to get the desired effects.
3300 \end_layout
3301
3302 \begin_layout Standard
3303 For more information on fancy headers, see the 
3304 \begin_inset Flex Code
3305 status collapsed
3306
3307 \begin_layout Plain Layout
3308 fancyhdr
3309 \end_layout
3310
3311 \end_inset
3312
3313  package documentation.
3314  (
3315 \begin_inset Flex URL
3316 status collapsed
3317
3318 \begin_layout Plain Layout
3319
3320 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3321 \end_layout
3322
3323 \end_inset
3324
3325 )
3326 \end_layout
3327
3328 \begin_layout Standard
3329 The page header is divided into three fields, not surprisingly labeled 
3330 \begin_inset Quotes eld
3331 \end_inset
3332
3333 left
3334 \begin_inset Quotes erd
3335 \end_inset
3336
3337
3338 \begin_inset Quotes eld
3339 \end_inset
3340
3341 center
3342 \begin_inset Quotes erd
3343 \end_inset
3344
3345 , and 
3346 \begin_inset Quotes eld
3347 \end_inset
3348
3349 right
3350 \begin_inset Quotes erd
3351 \end_inset
3352
3353 .
3354  The footer is also divided into these three fields.
3355  The LaTeX commands to set these fields in the simplest manner are 
3356 \begin_inset Flex Code
3357 status collapsed
3358
3359 \begin_layout Plain Layout
3360
3361 \backslash
3362 lhead
3363 \end_layout
3364
3365 \end_inset
3366
3367
3368 \begin_inset Flex Code
3369 status collapsed
3370
3371 \begin_layout Plain Layout
3372
3373 \backslash
3374 chead
3375 \end_layout
3376
3377 \end_inset
3378
3379
3380 \begin_inset Flex Code
3381 status collapsed
3382
3383 \begin_layout Plain Layout
3384
3385 \backslash
3386 rhead
3387 \end_layout
3388
3389 \end_inset
3390
3391
3392 \begin_inset Flex Code
3393 status collapsed
3394
3395 \begin_layout Plain Layout
3396
3397 \backslash
3398 lfoot
3399 \end_layout
3400
3401 \end_inset
3402
3403 , etc.
3404  Suppose you wish to put your name in the upper left hand corner of each
3405  page.
3406  Simply insert the following command in the preamble: 
3407 \end_layout
3408
3409 \begin_layout Standard
3410
3411 \family typewriter
3412
3413 \backslash
3414 lhead{John Q.
3415  DocWriter}
3416 \end_layout
3417
3418 \begin_layout Standard
3419 You will now see your name in the upper left.
3420  If a field has a default entry that you would like to get rid of (often
3421  the page number appears in the central footer) simply include a command
3422  with a blank argument, e.
3423 \begin_inset space \thinspace{}
3424 \end_inset
3425
3426 g.:
3427 \end_layout
3428
3429 \begin_layout Standard
3430
3431 \family typewriter
3432
3433 \backslash
3434 cfoot{}
3435 \end_layout
3436
3437 \begin_layout Standard
3438 Let's get really fancy: lets put the section number with the word 
3439 \begin_inset Quotes eld
3440 \end_inset
3441
3442 Section
3443 \begin_inset Quotes erd
3444 \end_inset
3445
3446  (e.
3447 \begin_inset space \thinspace{}
3448 \end_inset
3449
3450 g.
3451 \begin_inset space \space{}
3452 \end_inset
3453
3454 Section 3) in the upper left, the page number (e.
3455 \begin_inset space \thinspace{}
3456 \end_inset
3457
3458 g.
3459 \begin_inset space \space{}
3460 \end_inset
3461
3462 Page 4) in the upper right, your name in the lower left, and the date in
3463  the lower right.
3464  The following commands should now appear in the preamble:
3465 \end_layout
3466
3467 \begin_layout Standard
3468
3469 \family typewriter
3470
3471 \backslash
3472 lhead{Section 
3473 \backslash
3474 thesection}
3475 \end_layout
3476
3477 \begin_layout Standard
3478
3479 \family typewriter
3480
3481 \backslash
3482 chead{}
3483 \end_layout
3484
3485 \begin_layout Standard
3486
3487 \family typewriter
3488
3489 \backslash
3490 rhead{Page 
3491 \backslash
3492 thepage}
3493 \end_layout
3494
3495 \begin_layout Standard
3496
3497 \family typewriter
3498
3499 \backslash
3500 lfoot{John Q.
3501  DocWriter}
3502 \end_layout
3503
3504 \begin_layout Standard
3505
3506 \family typewriter
3507
3508 \backslash
3509 cfoot{}
3510 \end_layout
3511
3512 \begin_layout Standard
3513
3514 \family typewriter
3515
3516 \backslash
3517 rfoot{
3518 \backslash
3519 today}
3520 \end_layout
3521
3522 \begin_layout Standard
3523 The commands 
3524 \begin_inset Flex Code
3525 status collapsed
3526
3527 \begin_layout Plain Layout
3528
3529 \backslash
3530 thesection
3531 \end_layout
3532
3533 \end_inset
3534
3535  and 
3536 \begin_inset Flex Code
3537 status collapsed
3538
3539 \begin_layout Plain Layout
3540
3541 \backslash
3542 thepage
3543 \end_layout
3544
3545 \end_inset
3546
3547  access LaTeX's section and page counters, and so print out the current
3548  section and page numbers.
3549  
3550 \begin_inset Flex Code
3551 status collapsed
3552
3553 \begin_layout Plain Layout
3554
3555 \backslash
3556 today
3557 \end_layout
3558
3559 \end_inset
3560
3561  simply prints out today's date.
3562 \end_layout
3563
3564 \begin_layout Standard
3565 The thicknesses of the horizontal rules drawn beneath the header and above
3566  the footer can also be modified.
3567  If you don't want one of the rules, set its thickness to 0.
3568  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3569  Use commands
3570 \family typewriter
3571  
3572 \family default
3573 like 
3574 \begin_inset Flex Code
3575 status collapsed
3576
3577 \begin_layout Plain Layout
3578
3579 \backslash
3580 renewcommand{
3581 \backslash
3582 headrulewidth}{0.4pt}
3583 \end_layout
3584
3585 \end_inset
3586
3587  and 
3588 \begin_inset Flex Code
3589 status collapsed
3590
3591 \begin_layout Plain Layout
3592
3593 \backslash
3594 renewcommand{
3595 \backslash
3596 footrulewidth}{0.4pt}
3597 \end_layout
3598
3599 \end_inset
3600
3601  to set the thicknesses.
3602 \end_layout
3603
3604 \begin_layout Standard
3605 You can switch the header/footer settings on and off for individual pages
3606  using commands like 
3607 \begin_inset Flex Code
3608 status collapsed
3609
3610 \begin_layout Plain Layout
3611
3612 \backslash
3613 thispagestyle{empty}
3614 \end_layout
3615
3616 \end_inset
3617
3618
3619 \begin_inset Flex Code
3620 status collapsed
3621
3622 \begin_layout Plain Layout
3623
3624 \backslash
3625 thispagestyle{plain}
3626 \end_layout
3627
3628 \end_inset
3629
3630 , and 
3631 \begin_inset Flex Code
3632 status collapsed
3633
3634 \begin_layout Plain Layout
3635
3636 \backslash
3637 thispagestyle{fancy}
3638 \end_layout
3639
3640 \end_inset
3641
3642 .
3643  Simply insert them in the text on the page you want changed and mark them
3644  as TeX code.
3645  In fact, title pages are marked as plain by default, while following pages
3646  are marked fancy when using the global fancy setting.
3647 \end_layout
3648
3649 \begin_layout Standard
3650 As a final example, it is possible to include an image in the header or
3651  footer.
3652  Suppose you want to put a company logo in the upper lefthand corner.
3653  You might try something like
3654 \end_layout
3655
3656 \begin_layout Standard
3657
3658 \family typewriter
3659
3660 \backslash
3661 lhead{
3662 \backslash
3663 resizebox{1in}{!}{
3664 \backslash
3665 includegraphics{logo.eps}}}
3666 \end_layout
3667
3668 \begin_layout Standard
3669 \noindent
3670 (you may need to preface this with 
3671 \begin_inset Flex Code
3672 status collapsed
3673
3674 \begin_layout Plain Layout
3675 \noindent
3676
3677 \backslash
3678 usepackage{graphics}
3679 \end_layout
3680
3681 \end_inset
3682
3683  if you don't include graphics elsewhere in your document).
3684 \end_layout
3685
3686 \begin_layout Section
3687 Itemize Bullet Selection
3688 \begin_inset CommandInset label
3689 LatexCommand label
3690 name "sec:bullet"
3691
3692 \end_inset
3693
3694
3695 \end_layout
3696
3697 \begin_layout Standard
3698 by
3699 \noun on
3700  Allan Rae
3701 \end_layout
3702
3703 \begin_layout Subsection
3704 Introduction
3705 \end_layout
3706
3707 \begin_layout Standard
3708 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3709  Using this dialog you can easily specify what bullet shape to use at each
3710  level of an itemized list.
3711  These settings are document-wide so you won't be able to specify different
3712  sets of bullets for different paragraphs.
3713 \begin_inset Foot
3714 status collapsed
3715
3716 \begin_layout Plain Layout
3717 Well, actually you can but you'll have to do it by hand.
3718 \end_layout
3719
3720 \end_inset
3721
3722
3723 \end_layout
3724
3725 \begin_layout Subsection
3726 How it looks
3727 \end_layout
3728
3729 \begin_layout Standard
3730 Open the dialog by selecting the 
3731 \begin_inset Flex MenuItem
3732 status collapsed
3733
3734 \begin_layout Plain Layout
3735 Document\SpecialChar \menuseparator
3736 Settings
3737 \end_layout
3738
3739 \end_inset
3740
3741  menu item and then select the 
3742 \begin_inset Flex MenuItem
3743 status collapsed
3744
3745 \begin_layout Plain Layout
3746 Bullets
3747 \end_layout
3748
3749 \end_inset
3750
3751  tab.
3752 \end_layout
3753
3754 \begin_layout Standard
3755 The dialog provides you with a table of bullet shapes.
3756  A column of buttons on the left of the table provides access to the six
3757  different panels of bullet shapes.
3758  The row of buttons across the top is used to select which bullet depth
3759  you are changing.
3760  A text entry under the table shows the currently selected bullet shape's
3761  LaTeX equivalent and this can be edited if desired.
3762  If you do modify the text you will also need to specify any needed packages
3763  in the LaTeX preamble.
3764 \end_layout
3765
3766 \begin_layout Standard
3767 The six panels are divided up by the packages they require.
3768  The following table shows the mappings from button name to LaTeX package.
3769 \end_layout
3770
3771 \begin_layout Standard
3772 \align center
3773 \begin_inset Tabular
3774 <lyxtabular version="3" rows="7" columns="2">
3775 <features rotate="0" tabularvalignment="middle">
3776 <column alignment="center" valignment="top" width="0pt">
3777 <column alignment="center" valignment="top" width="0pt">
3778 <row>
3779 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3780 \begin_inset Text
3781
3782 \begin_layout Plain Layout
3783
3784 \family roman
3785 \series medium
3786 \shape up
3787 \size normal
3788 \emph off
3789 \bar no
3790 \noun off
3791 \color none
3792 Button
3793 \end_layout
3794
3795 \end_inset
3796 </cell>
3797 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3798 \begin_inset Text
3799
3800 \begin_layout Plain Layout
3801
3802 \family roman
3803 \series medium
3804 \shape up
3805 \size normal
3806 \emph off
3807 \bar no
3808 \noun off
3809 \color none
3810 Packages Required
3811 \end_layout
3812
3813 \end_inset
3814 </cell>
3815 </row>
3816 <row>
3817 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3818 \begin_inset Text
3819
3820 \begin_layout Plain Layout
3821
3822 \family sans
3823 \series medium
3824 \shape up
3825 \size normal
3826 \emph off
3827 \bar no
3828 \noun off
3829 \color none
3830 Standard
3831 \end_layout
3832
3833 \end_inset
3834 </cell>
3835 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3836 \begin_inset Text
3837
3838 \begin_layout Plain Layout
3839
3840 \series medium
3841 \shape up
3842 \size normal
3843 \emph off
3844 \bar no
3845 \noun off
3846 \color none
3847 base LaTeX
3848 \end_layout
3849
3850 \end_inset
3851 </cell>
3852 </row>
3853 <row>
3854 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3855 \begin_inset Text
3856
3857 \begin_layout Plain Layout
3858
3859 \family sans
3860 \series medium
3861 \shape up
3862 \size normal
3863 \emph off
3864 \bar no
3865 \noun off
3866 \color none
3867 Maths
3868 \end_layout
3869
3870 \end_inset
3871 </cell>
3872 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3873 \begin_inset Text
3874
3875 \begin_layout Plain Layout
3876
3877 \family typewriter
3878 \series medium
3879 \shape up
3880 \size normal
3881 \emph off
3882 \bar no
3883 \noun off
3884 \color none
3885 amssymb.sty
3886 \end_layout
3887
3888 \end_inset
3889 </cell>
3890 </row>
3891 <row>
3892 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3893 \begin_inset Text
3894
3895 \begin_layout Plain Layout
3896
3897 \family sans
3898 \series medium
3899 \shape up
3900 \size normal
3901 \emph off
3902 \bar no
3903 \noun off
3904 \color none
3905 Ding1
3906 \end_layout
3907
3908 \end_inset
3909 </cell>
3910 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3911 \begin_inset Text
3912
3913 \begin_layout Plain Layout
3914
3915 \family typewriter
3916 \series medium
3917 \shape up
3918 \size normal
3919 \emph off
3920 \bar no
3921 \noun off
3922 \color none
3923 pifont.sty
3924 \end_layout
3925
3926 \end_inset
3927 </cell>
3928 </row>
3929 <row>
3930 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3931 \begin_inset Text
3932
3933 \begin_layout Plain Layout
3934
3935 \family sans
3936 \series medium
3937 \shape up
3938 \size normal
3939 \emph off
3940 \bar no
3941 \noun off
3942 \color none
3943 Ding2
3944 \end_layout
3945
3946 \end_inset
3947 </cell>
3948 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3949 \begin_inset Text
3950
3951 \begin_layout Plain Layout
3952
3953 \family typewriter
3954 \series medium
3955 \shape up
3956 \size normal
3957 \emph off
3958 \bar no
3959 \noun off
3960 \color none
3961 pifont.sty
3962 \end_layout
3963
3964 \end_inset
3965 </cell>
3966 </row>
3967 <row>
3968 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3969 \begin_inset Text
3970
3971 \begin_layout Plain Layout
3972
3973 \family sans
3974 \series medium
3975 \shape up
3976 \size normal
3977 \emph off
3978 \bar no
3979 \noun off
3980 \color none
3981 Ding3
3982 \end_layout
3983
3984 \end_inset
3985 </cell>
3986 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3987 \begin_inset Text
3988
3989 \begin_layout Plain Layout
3990
3991 \family typewriter
3992 \series medium
3993 \shape up
3994 \size normal
3995 \emph off
3996 \bar no
3997 \noun off
3998 \color none
3999 pifont.sty
4000 \end_layout
4001
4002 \end_inset
4003 </cell>
4004 </row>
4005 <row>
4006 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4007 \begin_inset Text
4008
4009 \begin_layout Plain Layout
4010
4011 \family sans
4012 \series medium
4013 \shape up
4014 \size normal
4015 \emph off
4016 \bar no
4017 \noun off
4018 \color none
4019 Ding4
4020 \end_layout
4021
4022 \end_inset
4023 </cell>
4024 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4025 \begin_inset Text
4026
4027 \begin_layout Plain Layout
4028
4029 \family typewriter
4030 \series medium
4031 \shape up
4032 \size normal
4033 \emph off
4034 \bar no
4035 \noun off
4036 \color none
4037 pifont.sty
4038 \end_layout
4039
4040 \end_inset
4041 </cell>
4042 </row>
4043 </lyxtabular>
4044
4045 \end_inset
4046
4047
4048 \end_layout
4049
4050 \begin_layout Standard
4051 LyX doesn't stop you using bullets from packages you don't have.
4052  If you get errors from LaTeX when you try to view or print the file, then
4053  it is likely you are missing a package.
4054 \begin_inset Foot
4055 status collapsed
4056
4057 \begin_layout Plain Layout
4058 LyX doesn't restrict your use since you may be editing locally and exporting
4059  elsewhere.
4060 \end_layout
4061
4062 \end_inset
4063
4064
4065 \end_layout
4066
4067 \begin_layout Subsection
4068 How to use it
4069 \end_layout
4070
4071 \begin_layout Standard
4072 Select which bullet depth you want to change then select the bullet shape
4073  and size.
4074  Any changes will not be visible in LyX, but are visible when viewing the
4075  document.
4076 \end_layout
4077
4078 \begin_layout Standard
4079 You can reset a bullet shape to the default simply by clicking your right
4080  mouse button on the appropriate bullet depth button.
4081 \begin_inset Foot
4082 status collapsed
4083
4084 \begin_layout Plain Layout
4085 If you 
4086 \emph on
4087 really
4088 \emph default
4089  want to have multiple sets of paragraphs with different sets of bullets
4090  in each, then you're going to have to get your hands dirty with TeX code.
4091  The bullet selection dialog can help though because it provides you with
4092  the LaTeX code for a wide range of bullet shapes.
4093  To make your own custom paragraphs you have the following options:
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 let
4105 \backslash
4106 savelabelitemi=
4107 \backslash
4108 labelitemi
4109 \end_layout
4110
4111 \end_inset
4112
4113
4114 \end_layout
4115
4116 \begin_layout Plain Layout
4117 \begin_inset ERT
4118 status open
4119
4120 \begin_layout Plain Layout
4121
4122
4123 \backslash
4124 renewcommand
4125 \backslash
4126 labelitemi[0]{
4127 \backslash
4128 small
4129 \backslash
4130 (
4131 \backslash
4132 sharp
4133 \backslash
4134 )}
4135 \end_layout
4136
4137 \end_inset
4138
4139
4140 \end_layout
4141
4142 \begin_layout Itemize
4143 Use the LaTeX command 
4144 \begin_inset Flex Code
4145 status collapsed
4146
4147 \begin_layout Plain Layout
4148
4149 \backslash
4150 renewcommand{}{}
4151 \end_layout
4152
4153 \end_inset
4154
4155  to specify a new bullet shape for a given depth.
4156  You'll also need to save the current bullet shape so you can restore it
4157  again afterwards.
4158  In this itemized list the following LaTeX code was used to change the bullet
4159  used for the first depth.
4160 \end_layout
4161
4162 \begin_deeper
4163 \begin_layout LyX-Code
4164
4165 \backslash
4166 let
4167 \backslash
4168 savelabelitemi=
4169 \backslash
4170 labelitemi 
4171 \end_layout
4172
4173 \begin_layout LyX-Code
4174
4175 \backslash
4176 renewcommand
4177 \backslash
4178 labelitemi[0]{
4179 \backslash
4180 small
4181 \backslash
4182 (
4183 \backslash
4184 sharp
4185 \backslash
4186 )}
4187 \end_layout
4188
4189 \end_deeper
4190 \begin_layout Itemize
4191 Note that the itemize depth is specified in Roman numerals as part of the
4192  
4193 \family typewriter
4194
4195 \backslash
4196 labelitem
4197 \family default
4198  command.
4199 \end_layout
4200
4201 \begin_layout Itemize
4202 \begin_inset ERT
4203 status open
4204
4205 \begin_layout Plain Layout
4206
4207 [
4208 \backslash
4209 (
4210 \backslash
4211 star
4212 \backslash
4213 )]
4214 \end_layout
4215
4216 \end_inset
4217
4218  Specify each individual entry by starting each item with the bullet shape
4219  enclosed in square brackets and set as 
4220 \begin_inset Flex MenuItem
4221 status collapsed
4222
4223 \begin_layout Plain Layout
4224 TeX Code
4225 \end_layout
4226
4227 \end_inset
4228
4229 .
4230  For example, this item was started with 
4231 \begin_inset Flex Code
4232 status collapsed
4233
4234 \begin_layout Plain Layout
4235 [
4236 \backslash
4237 (
4238 \backslash
4239 star
4240 \backslash
4241 )]
4242 \end_layout
4243
4244 \end_inset
4245
4246 .
4247 \end_layout
4248
4249 \begin_layout Plain Layout
4250 \begin_inset ERT
4251 status open
4252
4253 \begin_layout Plain Layout
4254
4255
4256 \backslash
4257 renewcommand
4258 \backslash
4259 labelitemi[0]{
4260 \backslash
4261 savelabelitemi}
4262 \end_layout
4263
4264 \end_inset
4265
4266
4267 \end_layout
4268
4269 \begin_layout Plain Layout
4270 You'll also need to revert the labelitem back to its previous setting for
4271  the global bullet shape settings to remain in effect.
4272  The way used here was:
4273 \end_layout
4274
4275 \begin_layout LyX-Code
4276
4277 \backslash
4278 renewcommand
4279 \backslash
4280 labelitemi[0]{
4281 \backslash
4282 savelabelitemi}
4283 \end_layout
4284
4285 \end_inset
4286
4287
4288 \end_layout
4289
4290 \begin_layout Chapter
4291 LyX and the World Wide Web
4292 \end_layout
4293
4294 \begin_layout Standard
4295 LyX has long supported the export of documents to various web-friendly formats,
4296  such as HTML.
4297  Before verson 2.0, however, HTML export was always accomplished by the use
4298  of external converters.
4299 \begin_inset Foot
4300 status collapsed
4301
4302 \begin_layout Plain Layout
4303 For details on the use of external converters with LyX, see the 
4304 \emph on
4305 Converters
4306 \emph default
4307  section of the Customization manual.
4308 \end_layout
4309
4310 \end_inset
4311
4312  These fall into two large groups: there are converters that use LaTeX as
4313  an intermediate format, such as 
4314 \begin_inset Flex Code
4315 status collapsed
4316
4317 \begin_layout Plain Layout
4318 htlatex
4319 \end_layout
4320
4321 \end_inset
4322
4323
4324 \begin_inset Flex Code
4325 status collapsed
4326
4327 \begin_layout Plain Layout
4328 html2latex
4329 \end_layout
4330
4331 \end_inset
4332
4333 , and 
4334 \begin_inset Flex Code
4335 status collapsed
4336
4337 \begin_layout Plain Layout
4338 plastex
4339 \end_layout
4340
4341 \end_inset
4342
4343 , relying upon LyX to produce the LaTeX; and there is a converter that works
4344  directly on LyX files, 
4345 \begin_inset Flex Code
4346 status collapsed
4347
4348 \begin_layout Plain Layout
4349 eLyXer
4350 \end_layout
4351
4352 \end_inset
4353
4354 .
4355  All of these have different advantages and disadvantages.
4356  
4357 \end_layout
4358
4359 \begin_layout Standard
4360 The LaTeX-based converters have the advantage that, in principle, they know
4361  everything about the exported document that LaTeX does.
4362  Such converters do not care, for example, if a certain block of code was
4363  produced by LyX or was Evil Red Text.
4364  These converters know about 
4365 \begin_inset Flex Code
4366 status collapsed
4367
4368 \begin_layout Plain Layout
4369 aux
4370 \end_layout
4371
4372 \end_inset
4373
4374  files, counters, and references, and can often make use of the 
4375 \begin_inset Flex Code
4376 status collapsed
4377
4378 \begin_layout Plain Layout
4379 bbl
4380 \end_layout
4381
4382 \end_inset
4383
4384  files generated by BibTeX.
4385  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4386  said that only TeX itself understands TeX---and LaTeX-based converters
4387  will often choke on what seem to be quite simple constructs; complex ones
4388  can throw them completely, and as of this writing, for example, the 
4389 \emph on
4390 Embedded Objects
4391 \emph default
4392  manual will not export with 
4393 \begin_inset Flex Code
4394 status collapsed
4395
4396 \begin_layout Plain Layout
4397 htlatex
4398 \end_layout
4399
4400 \end_inset
4401
4402 , though the others will.
4403  The other issue concerns how math is handled.
4404  These converters typically convert the formulae into little pictures that
4405  are then linked from the HTML document.
4406  Since these are actually generated by LaTeX, they are accurate.
4407  But they do not scale well, and just getting them to look as if they are
4408  actually meant to be in your document---so that the font sizes seem to
4409  be roughly the same---can be a challenge.
4410 \end_layout
4411
4412 \begin_layout Standard
4413 Alex Fernandez's 
4414 \begin_inset Flex Code
4415 status collapsed
4416
4417 \begin_layout Plain Layout
4418 eLyXer
4419 \end_layout
4420
4421 \end_inset
4422
4423  (
4424 \begin_inset CommandInset href
4425 LatexCommand href
4426 name "http://elyxer.nongnu.org/"
4427 target "http://elyxer.nongnu.org/"
4428
4429 \end_inset
4430
4431 ) solves some of these problems.
4432  In particular, the formulae it produces scale perfectly, since it renders
4433  math using a combination of HTML and CSS rather than converting the formulae
4434  to images.
4435  But even moderately complex formula are rendered less well than with 
4436 \begin_inset Flex Code
4437 status collapsed
4438
4439 \begin_layout Plain Layout
4440 htlatex
4441 \end_layout
4442
4443 \end_inset
4444
4445 ; this reflects the limitations of HTML.
4446 \begin_inset Foot
4447 status collapsed
4448
4449 \begin_layout Plain Layout
4450 That said, 
4451 \begin_inset Flex Code
4452 status collapsed
4453
4454 \begin_layout Plain Layout
4455 eLyXer
4456 \end_layout
4457
4458 \end_inset
4459
4460  can also use jsMath and MathJax for equations, but this setting is only
4461  available globally and requires one to have access to a server that runs
4462  the backend.
4463 \end_layout
4464
4465 \end_inset
4466
4467  More importantly (as of version 1.1.1, at least), 
4468 \begin_inset Flex Code
4469 status collapsed
4470
4471 \begin_layout Plain Layout
4472 eLyXer
4473 \end_layout
4474
4475 \end_inset
4476
4477  has limited support for math macros and no support for user-defined paragraph
4478  or character styles.
4479  These limitations make 
4480 \begin_inset Flex Code
4481 status collapsed
4482
4483 \begin_layout Plain Layout
4484 eLyXer
4485 \end_layout
4486
4487 \end_inset
4488
4489  unsuitable for many of the documents LyX users produce.
4490  In principle, of course, these problems could be solved, but the LyX developers
4491  have decided to follow a different path and have made LyX itself capable
4492  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4493  plaintext.
4494 \end_layout
4495
4496 \begin_layout Standard
4497 As of this writing, XHTML output remains under development and should probably
4498  be regarded as 
4499 \begin_inset Quotes eld
4500 \end_inset
4501
4502 experimental
4503 \begin_inset Quotes erd
4504 \end_inset
4505
4506 .
4507 \begin_inset Foot
4508 status collapsed
4509
4510 \begin_layout Plain Layout
4511 The file 
4512 \begin_inset Flex Code
4513 status collapsed
4514
4515 \begin_layout Plain Layout
4516 development/HTML.notes
4517 \end_layout
4518
4519 \end_inset
4520
4521 , which can be found in the LyX source tree or 
4522 \begin_inset CommandInset href
4523 LatexCommand href
4524 name "accessed online"
4525 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4526
4527 \end_inset
4528
4529 , usually contains up-to-date information about the state of XHTML output.
4530  See also the list of XHTML bugs on 
4531 \begin_inset CommandInset href
4532 LatexCommand href
4533 name "the bug tracker"
4534 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"
4535
4536 \end_inset
4537
4538 .
4539 \end_layout
4540
4541 \end_inset
4542
4543  Still, the developers have chosen this approach because it has several
4544  potential advantages over the other two.
4545 \end_layout
4546
4547 \begin_layout Standard
4548 These advantages are primarily due to the fact that the XHTML output routines,
4549  since they are part of LyX, know everything LyX knows about the document
4550  being exported.
4551 \begin_inset Foot
4552 status collapsed
4553
4554 \begin_layout Plain Layout
4555 Another advantage is that, since these routines are internal to LyX, they
4556  are immune to changes in LyX's file format, or to changes in the semantics
4557  of existing insets.
4558 \end_layout
4559
4560 \end_inset
4561
4562  So they know about the table of contents (as displayed in the outline),
4563  about the counters associated with different paragraph styles, and about
4564  user-defined styles.
4565  The XHTML output routines know what LyX knows about internationalization,
4566  too, so they will output 
4567 \begin_inset Quotes eld
4568 \end_inset
4569
4570 Chapter 1
4571 \begin_inset Quotes erd
4572 \end_inset
4573
4574  or 
4575 \begin_inset Quotes eld
4576 \end_inset
4577
4578
4579 \lang ngerman
4580 Kapitel
4581 \lang english
4582  1
4583 \begin_inset Quotes erd
4584 \end_inset
4585
4586 , depending upon the language in effect at the time.
4587  
4588 \end_layout
4589
4590 \begin_layout Standard
4591 Quite generally, the output routines know what LyX knows about document
4592  layout, that is, about how the document is to be rendered on screen.
4593  We use this information when we output the document as XHTML.
4594  In particular, LyX 
4595 \emph on
4596 automatically
4597 \emph default
4598  generates CSS style information corresponding to the layout information
4599  it uses to render the document on screen: if section headings are supposed
4600  to be sans-serif and bold as seen in LyX, then (by default) they will be
4601  sans-serif and bold when viewed in a web browser, too.
4602  And this is true not just for pre-defined styles, like Section, but for
4603  any style, including user-defined styles.
4604  Indeed, the XHTML output routines make no distinction between user-defined
4605  paragraph and character styles and LyX's own pre-defined styles: in each
4606  case, everything LyX knows about the styles is contained in the layout
4607  files.
4608  And much the same is true as regards pre-defined textual insets, such as
4609  footnotes, and various custom insets.
4610  
4611 \end_layout
4612
4613 \begin_layout Standard
4614 The result is that XHTML output can be customized and extended in exactly
4615  the same way LaTeX output can be customized and extended: through layout
4616  files and modules.
4617  See chapter five of the 
4618 \emph on
4619 Customization 
4620 \emph default
4621 manual for the details.
4622 \end_layout
4623
4624 \begin_layout Standard
4625 The remainder of this chapter contains more detailed information on XHTML
4626  output, its limitations, and ways to work around those limitations.
4627 \end_layout
4628
4629 \begin_layout Section
4630 Math Output in XHTML
4631 \end_layout
4632
4633 \begin_layout Standard
4634 LyX offers four choices for how math is rendered.
4635  These have various advantages and disadvantages:
4636 \end_layout
4637
4638 \begin_layout Itemize
4639 MathML
4640 \begin_inset Newline newline
4641 \end_inset
4642
4643 MathML is a dialect of XML designed specifically for mathematics on the
4644  web, and it typically renders very well in browsers that support it.
4645  The disadvantage is that not all browsers support MathML, and support is
4646  not complete even in the Gecko-based browsers, such as Firefox.
4647 \begin_inset Newline newline
4648 \end_inset
4649
4650 If LyX is unable to render a formula as MathML---for example, if the formula
4651  uses the 
4652 \begin_inset Flex Code
4653 status collapsed
4654
4655 \begin_layout Plain Layout
4656 xymatrix
4657 \end_layout
4658
4659 \end_inset
4660
4661  package or ERT---then it will instead output the formula as an image.
4662  
4663 \end_layout
4664
4665 \begin_layout Itemize
4666 HTML
4667 \begin_inset Newline newline
4668 \end_inset
4669
4670 As mentioned above, 
4671 \begin_inset Flex Code
4672 status collapsed
4673
4674 \begin_layout Plain Layout
4675 elyxer
4676 \end_layout
4677
4678 \end_inset
4679
4680  outputs math as HTML, styled by CSS.
4681 \begin_inset Foot
4682 status collapsed
4683
4684 \begin_layout Plain Layout
4685 LyX has borrowed some of the CSS for its HTML output from 
4686 \begin_inset Flex Code
4687 status collapsed
4688
4689 \begin_layout Plain Layout
4690 elyxer
4691 \end_layout
4692
4693 \end_inset
4694
4695 .
4696 \end_layout
4697
4698 \end_inset
4699
4700  For simple formulae, this can work quite well, though with more complicated
4701  formulae it tends to break down.
4702  Still, this method has the advantage that it is very widely supported and
4703  so it may be appropriate for documents that contain only a little, fairly
4704  simple math.
4705 \begin_inset Newline newline
4706 \end_inset
4707
4708 If Lyx is unable to render a formula as HTML---for example, if the formula
4709  uses the 
4710 \begin_inset Flex Code
4711 status collapsed
4712
4713 \begin_layout Plain Layout
4714 xymatrix
4715 \end_layout
4716
4717 \end_inset
4718
4719  package or ERT---then it will instead output the formula as an image.
4720  
4721 \end_layout
4722
4723 \begin_layout Itemize
4724 Images
4725 \begin_inset Newline newline
4726 \end_inset
4727
4728 Like 
4729 \begin_inset Flex Code
4730 status collapsed
4731
4732 \begin_layout Plain Layout
4733 htlatex
4734 \end_layout
4735
4736 \end_inset
4737
4738 , LyX will output formulae as images, the very same images, in fact, that
4739  are used for instant preview.
4740 \begin_inset Foot
4741 status collapsed
4742
4743 \begin_layout Plain Layout
4744 Instant preview does 
4745 \emph on
4746 not 
4747 \emph default
4748 have to be on for images to be output, however.
4749 \end_layout
4750
4751 \end_inset
4752
4753  The advantage to this method is that the images are simply generated by
4754  LaTeX, so they are very accurate.
4755  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4756  so they do not scale terribly well, and one cannot copy them, etc.
4757  (As of this writing, there are also problems about equation numbering.
4758  See 
4759 \begin_inset CommandInset href
4760 LatexCommand href
4761 name "bug 6894"
4762 target "http://www.lyx.org/trac/ticket/6894"
4763
4764 \end_inset
4765
4766 .)
4767 \begin_inset Newline newline
4768 \end_inset
4769
4770 The size of the images can be controlled by setting the 
4771 \begin_inset Quotes eld
4772 \end_inset
4773
4774 Math Images Scaling
4775 \begin_inset Quotes erd
4776 \end_inset
4777
4778  parameter under 
4779 \begin_inset Flex MenuItem
4780 status collapsed
4781
4782 \begin_layout Plain Layout
4783 Document\SpecialChar \menuseparator
4784 Settings\SpecialChar \menuseparator
4785 Output
4786 \end_layout
4787
4788 \end_inset
4789
4790 .
4791 \begin_inset Foot
4792 status collapsed
4793
4794 \begin_layout Plain Layout
4795 For those who want to know, this controls the resolution of the image in
4796  dots per inch and is based upon a default of 75 dpi.
4797 \end_layout
4798
4799 \end_inset
4800
4801
4802 \begin_inset Newline newline
4803 \end_inset
4804
4805 If LyX for some reason fails to create an image for a formula (e.g., if a
4806  required LaTeX package is not installed), then it will fall back to outputing
4807  the raw LaTeX.
4808 \end_layout
4809
4810 \begin_layout Itemize
4811 LaTeX
4812 \begin_inset Newline newline
4813 \end_inset
4814
4815 Finally, LyX will happily output math as LaTeX.
4816  As well as being the output of last resort, this method can be used with
4817  such tools as 
4818 \begin_inset CommandInset href
4819 LatexCommand href
4820 name "jsMath"
4821 target "http://www.math.union.edu/~dpvc/jsMath/"
4822
4823 \end_inset
4824
4825 , which uses JavaScript to render LaTeX embedded in HTML documents.
4826  LyX wraps the LaTeX in either a 
4827 \begin_inset Flex Code
4828 status collapsed
4829
4830 \begin_layout Plain Layout
4831 span
4832 \end_layout
4833
4834 \end_inset
4835
4836  (for inline formulas) or 
4837 \begin_inset Flex Code
4838 status collapsed
4839
4840 \begin_layout Plain Layout
4841 div
4842 \end_layout
4843
4844 \end_inset
4845
4846  (for displayed formulas) with 
4847 \begin_inset Flex Code
4848 status collapsed
4849
4850 \begin_layout Plain Layout
4851 class='math'
4852 \end_layout
4853
4854 \end_inset
4855
4856 , as is required for jsMath.
4857 \end_layout
4858
4859 \begin_layout Standard
4860 One of these output methods must be selected under 
4861 \begin_inset Flex MenuItem
4862 status collapsed
4863
4864 \begin_layout Plain Layout
4865 Document\SpecialChar \menuseparator
4866 Settings\SpecialChar \menuseparator
4867 Output
4868 \end_layout
4869
4870 \end_inset
4871
4872 .
4873  By default, LyX outputs MathML.
4874  This is a document-wide setting, therefore.
4875 \end_layout
4876
4877 \begin_layout Standard
4878 Eventually, LyX will offer the user the option to select an alternate output
4879  method for a particular inset, say, one that isn't being rendered very
4880  well by MathML.
4881 \begin_inset Foot
4882 status collapsed
4883
4884 \begin_layout Plain Layout
4885 That said, since LyX falls back to images if the inset contains ERT, then
4886  one can force output as an image by putting some harmless ERT into the
4887  math, for example: 
4888 \begin_inset Formula $a=b\relax$
4889 \end_inset
4890
4891 .
4892 \end_layout
4893
4894 \end_inset
4895
4896
4897 \end_layout
4898
4899 \begin_layout Section
4900 Bibliography and Citations
4901 \end_layout
4902
4903 \begin_layout Standard
4904 XHTML output fully supports bibliographies and citations.
4905  
4906 \end_layout
4907
4908 \begin_layout Standard
4909 Citation labels are generated by the same machinery that generates LyX's
4910  on-screen labels, so the labels will look in the output much as they do
4911  in LyX, though better.
4912  If you are using numerical citations, then LyX will output numerical labels,
4913  such as [1] or [17], rather than simply showing the citation key in square
4914  brackets, as it does on-screen.
4915  If you are using author-year citations, then LyX will add lowercase letters
4916  to the years, just as BibTeX does, if it finds more than one citation for
4917  a given author-year combination.
4918  The labels will be printed with the bibliography entries.
4919  Note that there is, at present, no way to customize the appearance of the
4920  labels, for example, to choose between square brackets and parentheses.
4921 \end_layout
4922
4923 \begin_layout Standard
4924 Bibliography output is handled by the same machinery that handles the presentati
4925 on of reference information in the citation dialog, so you will see in the
4926  XHTML output pretty much what you would see if you were to look at a given
4927  entry in the citation dialog.
4928  The formatting can be customized in your layout file or, preferably, in
4929  a module.
4930  See the 
4931 \emph on
4932 Customization
4933 \emph default
4934  manual for the details.
4935 \end_layout
4936
4937 \begin_layout Standard
4938 The main defect at present is that cross-referenced information is printed
4939  with every entry with which it is associated.
4940  So you can see things like this:
4941 \end_layout
4942
4943 \begin_layout Quote
4944 Jason Stanley, 
4945 \begin_inset Quotes eld
4946 \end_inset
4947
4948 Context and Logical Form
4949 \begin_inset Quotes erd
4950 \end_inset
4951
4952 , in 
4953 \emph on
4954 Language in Context: Selected Essays
4955 \emph default
4956  (Oxford: Oxford University Press, 2007), pp.
4957  30--68.
4958 \end_layout
4959
4960 \begin_layout Quote
4961 Jason Stanley, 
4962 \begin_inset Quotes eld
4963 \end_inset
4964
4965 Semantics in Context
4966 \begin_inset Quotes erd
4967 \end_inset
4968
4969 , in 
4970 \emph on
4971 Language in Context: Selected Essays
4972 \emph default
4973  (Oxford: Oxford University Press, 2007), pp.
4974  201--30.
4975 \end_layout
4976
4977 \begin_layout Standard
4978 This should be fixed before long.
4979 \end_layout
4980
4981 \begin_layout Standard
4982 There is no support at present for sectioned bibliographies.
4983  If you have multiple bibliographies, then LyX will print the same bibliography
4984  over and over.
4985 \end_layout
4986
4987 \begin_layout Section
4988 Indexes
4989 \end_layout
4990
4991 \begin_layout Standard
4992 LyX will happily export indexes as XHTML, but with certain limitations at
4993  the moment.
4994 \end_layout
4995
4996 \begin_layout Standard
4997 Index export will be most reliable when you do not attempt to use the fancy
4998  constructs that are described in the section on indexes in the 
4999 \emph on
5000 User's Guide
5001 \emph default
5002 .
5003 \begin_inset Foot
5004 status collapsed
5005
5006 \begin_layout Plain Layout
5007 The main issue here is that LyX itself does not really handle these.
5008  It just lets you enter what you would have to enter in raw LaTeX.
5009 \end_layout
5010
5011 \end_inset
5012
5013  We'll describe how they are handled using the subsection headings from
5014  that section.
5015 \end_layout
5016
5017 \begin_layout Itemize
5018 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5019  these, but the entries must be separated by 
5020 \begin_inset Quotes eld
5021 \end_inset
5022
5023  ! 
5024 \begin_inset Quotes erd
5025 \end_inset
5026
5027 , that is, there must be spaces around the exclamation point.
5028  This is because it is otherwise too difficult to check for escaped exclamation
5029  points, ones in math, and so forth.
5030 \end_layout
5031
5032 \begin_layout Itemize
5033 Page Ranges: There is no support at all for page ranges, since these make
5034  no sense with XHMTL.
5035  Instead, you will just get two index entries, one at either end.
5036 \end_layout
5037
5038 \begin_layout Itemize
5039 Cross-referencing: There is no support for cross-referencing.
5040  If LyX finds an entry containing the 
5041 \begin_inset Quotes eld
5042 \end_inset
5043
5044 |see\SpecialChar \ldots{}
5045
5046 \begin_inset Quotes erd
5047 \end_inset
5048
5049  construct, it is just dropped, and the rest is treated as an ordinary index
5050  entry.
5051 \end_layout
5052
5053 \begin_layout Itemize
5054 Index Entry Order: LyX does support attempts to fix the sorting order.
5055  It will take what is before the first `@' it finds and use that for sorting,
5056  taking what follows the first `@' to be the actual entry.
5057  At present, LyX does not check for escaped `@', so do not try to index
5058  email addresses.
5059 \end_layout
5060
5061 \begin_layout Itemize
5062 Index Entry Layout: You can format entries by using the text style dialog,
5063  or by using any other method available within LyX itself.
5064  There is no support for constructs like: 
5065 \begin_inset Quotes eld
5066 \end_inset
5067
5068 entry|textbf
5069 \begin_inset Quotes erd
5070 \end_inset
5071
5072 .
5073  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5074  and everything that follows it.
5075 \end_layout
5076
5077 \begin_layout Itemize
5078 Multiple Indexes: There is no support for multiple indexes.
5079  Rather, all index entries will be printed as one large index.
5080  To avoid our printing several versions of the index, we print only the
5081  main index, so make sure you have one.
5082 \end_layout
5083
5084 \begin_layout Section
5085 Nomenclature and Glossary
5086 \end_layout
5087
5088 \begin_layout Standard
5089 There is at present no support for glossaries.
5090  Adding it would be fairly trivial, and welcome.
5091 \end_layout
5092
5093 \begin_layout Chapter
5094 The LyX Server
5095 \end_layout
5096
5097 \begin_layout Section
5098 Introduction
5099 \end_layout
5100
5101 \begin_layout Standard
5102 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5103  and retrieve information about the LyX internal state.
5104  This is only intended for advanced users, but they should find it useful.
5105  It is by writing to the LyX server, for example, that bibliography managers,
5106  such as JabRef, are able to 
5107 \begin_inset Quotes eld
5108 \end_inset
5109
5110 push
5111 \begin_inset Quotes erd
5112 \end_inset
5113
5114  citations to LyX.
5115 \end_layout
5116
5117 \begin_layout Section
5118 Starting the LyX Server
5119 \end_layout
5120
5121 \begin_layout Standard
5122 The LyX server works through the use of a pair of named pipes.
5123  These are usually located in 
5124 \begin_inset Flex Code
5125 status collapsed
5126
5127 \begin_layout Plain Layout
5128 UserDir
5129 \end_layout
5130
5131 \end_inset
5132
5133 , (except on Windows, where 
5134 \emph on
5135 local
5136 \emph default
5137  named pipes are special objects located in 
5138 \begin_inset Flex Code
5139 status collapsed
5140
5141 \begin_layout Plain Layout
5142
5143 \backslash
5144
5145 \backslash
5146 .
5147 \backslash
5148 pipe
5149 \end_layout
5150
5151 \end_inset
5152
5153 ) and have the names 
5154 \begin_inset Quotes eld
5155 \end_inset
5156
5157
5158 \begin_inset Flex Code
5159 status collapsed
5160
5161 \begin_layout Plain Layout
5162 lyxpipe.in
5163 \end_layout
5164
5165 \end_inset
5166
5167
5168 \begin_inset Quotes erd
5169 \end_inset
5170
5171  and 
5172 \begin_inset Quotes eld
5173 \end_inset
5174
5175
5176 \begin_inset Flex Code
5177 status collapsed
5178
5179 \begin_layout Plain Layout
5180 lyxpipe.out
5181 \end_layout
5182
5183 \end_inset
5184
5185
5186 \begin_inset Quotes erd
5187 \end_inset
5188
5189 .
5190  External programs write into 
5191 \begin_inset Flex Code
5192 status collapsed
5193
5194 \begin_layout Plain Layout
5195 lyxpipe.in
5196 \end_layout
5197
5198 \end_inset
5199
5200  and read back data from 
5201 \begin_inset Flex Code
5202 status collapsed
5203
5204 \begin_layout Plain Layout
5205 lyxpipe.out
5206 \end_layout
5207
5208 \end_inset
5209
5210 .
5211  The stem of the pipe names can be defined in the 
5212 \begin_inset Flex MenuItem
5213 status collapsed
5214
5215 \begin_layout Plain Layout
5216 Tools\SpecialChar \menuseparator
5217 Preferences
5218 \end_layout
5219
5220 \end_inset
5221
5222  dialog, for example 
5223 \begin_inset Flex Code
5224 status collapsed
5225
5226 \begin_layout Plain Layout
5227 "/home/myhome/lyxpipe"
5228 \end_layout
5229
5230 \end_inset
5231
5232 , or 
5233 \begin_inset Flex Code
5234 status collapsed
5235
5236 \begin_layout Plain Layout
5237 "
5238 \backslash
5239
5240 \backslash
5241 .
5242 \backslash
5243 pipe
5244 \backslash
5245 lyxpipe"
5246 \end_layout
5247
5248 \end_inset
5249
5250  on Windows (but any working path can be used).
5251  You 
5252 \emph on
5253 must
5254 \emph default
5255  configure this manually in order for the server to start.
5256 \end_layout
5257
5258 \begin_layout Standard
5259 LyX will add the '
5260 \begin_inset Flex Code
5261 status collapsed
5262
5263 \begin_layout Plain Layout
5264 .in
5265 \end_layout
5266
5267 \end_inset
5268
5269 ' and '
5270 \begin_inset Flex Code
5271 status collapsed
5272
5273 \begin_layout Plain Layout
5274 .out
5275 \end_layout
5276
5277 \end_inset
5278
5279 ' to create the pipes.
5280  If one of the pipes already exists, LyX will assume that another LyX process
5281  is already running and will not start the server.
5282  On POSIX (Unix like) systems, if for some other reason, an unused 
5283 \begin_inset Quotes eld
5284 \end_inset
5285
5286 stale
5287 \begin_inset Quotes erd
5288 \end_inset
5289
5290  pipe is left in existence when LyX closes, then LyX will try to delete
5291  it.
5292  If this fails for some reason, you will need to delete the pipes manually
5293  and then restart LyX.
5294  On Windows, pipes are deleted by the OS on program termination or crash,
5295  so 
5296 \begin_inset Quotes eld
5297 \end_inset
5298
5299 stale
5300 \begin_inset Quotes erd
5301 \end_inset
5302
5303  pipes should not be possible.
5304 \end_layout
5305
5306 \begin_layout Standard
5307 To have several LyX processes with servers at the same time, you have to
5308  use different configurations, perhaps by using separate user directories,
5309  each with its own 
5310 \begin_inset Flex Code
5311 status collapsed
5312
5313 \begin_layout Plain Layout
5314 preferences
5315 \end_layout
5316
5317 \end_inset
5318
5319  file, for each process.
5320 \end_layout
5321
5322 \begin_layout Standard
5323 If you are developing a client program, you might find it useful to enable
5324  debugging information from the LyX server.
5325  Do this by starting LyX as 
5326 \begin_inset Flex Code
5327 status collapsed
5328
5329 \begin_layout Plain Layout
5330 lyx -dbg lyxserver
5331 \end_layout
5332
5333 \end_inset
5334
5335 .
5336 \end_layout
5337
5338 \begin_layout Standard
5339 You can find a complete example client written in C in the source distribution
5340  as 
5341 \begin_inset Flex Code
5342 status collapsed
5343
5344 \begin_layout Plain Layout
5345 development/lyxserver/server_monitor.c
5346 \end_layout
5347
5348 \end_inset
5349
5350 .
5351 \end_layout
5352
5353 \begin_layout Standard
5354 Another useful tool is the command-line based clientfound in 
5355 \begin_inset Flex Code
5356 status collapsed
5357
5358 \begin_layout Plain Layout
5359 src/client/lyxclient
5360 \end_layout
5361
5362 \end_inset
5363
5364 .
5365 \end_layout
5366
5367 \begin_layout Section
5368 Normal communication
5369 \end_layout
5370
5371 \begin_layout Standard
5372 To issue a LyX call, the client writes a line of ASCII text into the input
5373  pipe.
5374  This line has the following format:
5375 \end_layout
5376
5377 \begin_layout Quote
5378 LYXCMD:
5379 \emph on
5380 clientname
5381 \emph default
5382 :
5383 \emph on
5384 function
5385 \emph default
5386 :
5387 \emph on
5388 argument
5389 \end_layout
5390
5391 \begin_layout Description
5392 clientname is a name that the client can choose arbitrarily.
5393  Its only use is that LyX will echo it if it sends an answer—so a client
5394  can dispatch results from different requesters.
5395 \end_layout
5396
5397 \begin_layout Description
5398 function is the function you want LyX to perform.
5399  It is the same as the commands you'd use in the minibuffer.
5400 \end_layout
5401
5402 \begin_layout Description
5403 argument is an optional argument which is meaningful only to some functions
5404  (for instance, the 
5405 \begin_inset Quotes eld
5406 \end_inset
5407
5408 self-insert
5409 \begin_inset Quotes erd
5410 \end_inset
5411
5412  LFUN will insert the argument as text at the cursor position).
5413 \end_layout
5414
5415 \begin_layout Standard
5416 The answer from LyX will arrive in the output pipe and be of the form
5417 \end_layout
5418
5419 \begin_layout Quote
5420 INFO:
5421 \emph on
5422 clientname
5423 \emph default
5424 :
5425 \emph on
5426 function
5427 \emph default
5428 :
5429 \emph on
5430 data
5431 \end_layout
5432
5433 \begin_layout Standard
5434 where 
5435 \emph on
5436 clientname
5437 \emph default
5438  and 
5439 \emph on
5440 function
5441 \emph default
5442  are just echoed from the command request, while 
5443 \emph on
5444 data
5445 \emph default
5446  is more or less useful information filled according to how the command
5447  execution worked out.
5448  Some commands, such as 
5449 \begin_inset Quotes eld
5450 \end_inset
5451
5452 font-state
5453 \begin_inset Quotes erd
5454 \end_inset
5455
5456 , will return information about the internal state of LyX, while other will
5457  return an empty data-response.
5458  This means that the command execution went fine.
5459 \end_layout
5460
5461 \begin_layout Standard
5462 In case of errors, the response from LyX will have this form
5463 \end_layout
5464
5465 \begin_layout Quote
5466 ERROR:
5467 \emph on
5468 clientname
5469 \emph default
5470 :
5471 \emph on
5472 function
5473 \emph default
5474 :
5475 \emph on
5476 error message
5477 \end_layout
5478
5479 \begin_layout Standard
5480 where the 
5481 \emph on
5482 error message
5483 \emph default
5484  should contain an explanation of why the command failed.
5485 \end_layout
5486
5487 \begin_layout Standard
5488 Examples:
5489 \end_layout
5490
5491 \begin_layout LyX-Code
5492 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5493 \begin_inset Newline newline
5494 \end_inset
5495
5496 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5497 \begin_inset Newline newline
5498 \end_inset
5499
5500 read a <~/.lyxpipe.out
5501 \begin_inset Newline newline
5502 \end_inset
5503
5504 echo $a
5505 \end_layout
5506
5507 \begin_layout Section
5508 Notification
5509 \end_layout
5510
5511 \begin_layout Standard
5512 LyX can notify clients of events going on asynchronously.
5513  Currently it will only do this if the user binds a key sequence with the
5514  function 
5515 \begin_inset Quotes eld
5516 \end_inset
5517
5518 notify
5519 \begin_inset Quotes erd
5520 \end_inset
5521
5522 .
5523  The format of the string LyX sends is as follows:
5524 \end_layout
5525
5526 \begin_layout Quote
5527 \begin_inset Flex Code
5528 status collapsed
5529
5530 \begin_layout Plain Layout
5531 NOTIFY:
5532 \end_layout
5533
5534 \end_inset
5535
5536
5537 \emph on
5538 key-sequence
5539 \end_layout
5540
5541 \begin_layout Standard
5542 where 
5543 \emph on
5544 key-sequence
5545 \emph default
5546  is the printed representation of the key sequence that was actually typed
5547  by the user.
5548 \end_layout
5549
5550 \begin_layout Standard
5551 This mechanism can be used to extend LyX's command set and implement macros.
5552  Bind some key sequence to 
5553 \begin_inset Quotes eld
5554 \end_inset
5555
5556 notify
5557 \begin_inset Quotes erd
5558 \end_inset
5559
5560 .
5561  Then start a client that listens on the output pipe, dispatches the command
5562  according to the sequence, and starts a function that may use LyX calls
5563  and LyX requests to issue a command or a series of commands to LyX.
5564 \end_layout
5565
5566 \begin_layout Section
5567 The simple LyX Server Protocol
5568 \end_layout
5569
5570 \begin_layout Standard
5571 LyX implements a simple protocol that can be used for session management.
5572  All messages are of the form
5573 \end_layout
5574
5575 \begin_layout Quote
5576 LYXSRV:
5577 \emph on
5578 clientname
5579 \emph default
5580 :
5581 \emph on
5582 protocol message
5583 \end_layout
5584
5585 \begin_layout Standard
5586 where 
5587 \emph on
5588 protocol message
5589 \emph default
5590  can be 
5591 \begin_inset Quotes eld
5592 \end_inset
5593
5594 hello
5595 \begin_inset Quotes erd
5596 \end_inset
5597
5598  or 
5599 \begin_inset Quotes eld
5600 \end_inset
5601
5602 bye
5603 \begin_inset Quotes erd
5604 \end_inset
5605
5606 .
5607  If 
5608 \begin_inset Quotes eld
5609 \end_inset
5610
5611 hello
5612 \begin_inset Quotes erd
5613 \end_inset
5614
5615  is received from a client, LyX will report back to inform the client that
5616  it's listening to it's messages, while 
5617 \begin_inset Quotes eld
5618 \end_inset
5619
5620 bye
5621 \begin_inset Quotes erd
5622 \end_inset
5623
5624  sent from LyX will inform clients that LyX is closing.
5625 \end_layout
5626
5627 \begin_layout Section
5628 Reverse DVI/PDF search
5629 \end_layout
5630
5631 \begin_layout Standard
5632 Some DVI/PDF viewers
5633 \begin_inset Foot
5634 status collapsed
5635
5636 \begin_layout Plain Layout
5637 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5638  Skim on Mac OSX and SumatraPDF on Windows.
5639 \end_layout
5640
5641 \end_inset
5642
5643  provide 
5644 \emph on
5645 reverse search
5646 \emph default
5647  facility (also called 
5648 \emph on
5649 inverse search
5650 \emph default
5651 ).
5652  This means that you can tell LyX to put the cursor to a specific line in
5653  the document by clicking at the respective position in the DVI/PDF output.
5654  To achieve this, the viewer must be able to communicate with LyX.
5655  This is done via the LyX server either by using the named pipe (
5656 \emph on
5657 lyxpipe
5658 \emph default
5659 ), or the UNIX domain socket (
5660 \emph on
5661 lyxsocket
5662 \emph default
5663 ) that LyX creates in its temporary directory (this is the way the 
5664 \begin_inset Flex Code
5665 status collapsed
5666
5667 \begin_layout Plain Layout
5668 lyxclient
5669 \end_layout
5670
5671 \end_inset
5672
5673  program communicates with LyX).
5674  In some cases, you need a helper script that mediates between the viewer
5675  and LyX, in others, the viewer can communicate with LyX directly.
5676  This depends on the selected viewer and on your operating system.
5677  The same applies to the way viewers need to be configured and the way the
5678  reverse search is actually performed.
5679  In what follows, we will thus describe how to setup reverse search for
5680  specific viewers.
5681  Before we turn to this, though, we will explain what needs to be done generally
5682  to enable reverse search in the DVI/PDF output.
5683 \end_layout
5684
5685 \begin_layout Subsection
5686 Automatic setup
5687 \begin_inset CommandInset label
5688 LatexCommand label
5689 name "sub:rev-search"
5690
5691 \end_inset
5692
5693
5694 \end_layout
5695
5696 \begin_layout Standard
5697 In most cases LyX will do the work for you by enabling the option 
5698 \begin_inset Flex MenuItem
5699 status collapsed
5700
5701 \begin_layout Plain Layout
5702 Synchronize with Output
5703 \end_layout
5704
5705 \end_inset
5706
5707  in the menu 
5708 \begin_inset Flex MenuItem
5709 status collapsed
5710
5711 \begin_layout Plain Layout
5712 Document\SpecialChar \menuseparator
5713 Settings\SpecialChar \menuseparator
5714 Output
5715 \end_layout
5716
5717 \end_inset
5718
5719 .
5720  In such a case LyX will automatically insert the necessary SyncTeX macro
5721  (for PDF) or load the srcltx package (for DVI) respectively.
5722  This option can be easily reached also on 
5723 \begin_inset Flex Code
5724 status collapsed
5725
5726 \begin_layout Plain Layout
5727 View/Update
5728 \end_layout
5729
5730 \end_inset
5731
5732  Toolbar.
5733 \end_layout
5734
5735 \begin_layout Standard
5736 If you need a different setting, you can select or input a custom macro
5737  from the drop down box just below 
5738 \begin_inset Flex MenuItem
5739 status collapsed
5740
5741 \begin_layout Plain Layout
5742 Document\SpecialChar \menuseparator
5743 Settings\SpecialChar \menuseparator
5744 Output\SpecialChar \menuseparator
5745 Synchronize with Output
5746 \end_layout
5747
5748 \end_inset
5749
5750 .
5751 \end_layout
5752
5753 \begin_layout Standard
5754 Note that the method 
5755 \begin_inset Flex Code
5756 status collapsed
5757
5758 \begin_layout Plain Layout
5759
5760 \backslash
5761 synctex=1
5762 \end_layout
5763
5764 \end_inset
5765
5766  enables gzip compression.
5767  If your viewer does not support it, you should instead use 
5768 \begin_inset Flex Code
5769 status collapsed
5770
5771 \begin_layout Plain Layout
5772
5773 \backslash
5774 synctex=-1
5775 \end_layout
5776
5777 \end_inset
5778
5779 .
5780 \end_layout
5781
5782 \begin_layout Standard
5783 Please aöso note that including the 
5784 \begin_inset Flex Code
5785 status collapsed
5786
5787 \begin_layout Plain Layout
5788 srcltx
5789 \end_layout
5790
5791 \end_inset
5792
5793  package or 
5794 \begin_inset Flex Code
5795 status collapsed
5796
5797 \begin_layout Plain Layout
5798 src-specials
5799 \end_layout
5800
5801 \end_inset
5802
5803  sometimes has an undesired impact on the typesetting.
5804  Thus, you should switch output synchronization off for the final typesetting
5805  if you use the 
5806 \begin_inset Flex Code
5807 status collapsed
5808
5809 \begin_layout Plain Layout
5810 srcltx
5811 \end_layout
5812
5813 \end_inset
5814
5815  package or 
5816 \begin_inset Flex Code
5817 status collapsed
5818
5819 \begin_layout Plain Layout
5820 src-specials
5821 \end_layout
5822
5823 \end_inset
5824
5825 .
5826  
5827 \end_layout
5828
5829 \begin_layout Standard
5830 In case you need some more special settings that are not covered by the
5831  automatic settings, read the next section about how to set up output synchroniz
5832 ation manually.
5833  If the automatic setup suits your needs, you can readily jump to section
5834 \begin_inset space ~
5835 \end_inset
5836
5837
5838 \begin_inset CommandInset ref
5839 LatexCommand ref
5840 reference "sub:configuring-viewers"
5841
5842 \end_inset
5843
5844 , where the necessary configuration steps in your viewer -- needed both
5845  with the automatic and the manual setup -- are described.
5846 \end_layout
5847
5848 \begin_layout Subsection
5849 Manual setup
5850 \end_layout
5851
5852 \begin_layout Standard
5853 LaTeX provides several different methods for reverse search.
5854  Some are built-in in the 
5855 \begin_inset Flex Code
5856 status collapsed
5857
5858 \begin_layout Plain Layout
5859 latex/pdflatex
5860 \end_layout
5861
5862 \end_inset
5863
5864  program, some are provided by external packages.
5865  Your choice depends on whether your LaTeX distribution already provides
5866  a given method (the built-in methods are rather new) and whether your viewer
5867  can cope with it.
5868  The available methods are described in the following.
5869 \end_layout
5870
5871 \begin_layout Subsubsection*
5872 Built-in DVI-search via src-specials (DVI only) 
5873 \end_layout
5874
5875 \begin_layout Standard
5876 This method provides the DVI file with the necessary information for reverse
5877  search.
5878  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5879  distribution should include it), and it works reliably.
5880  To enable it, change the 
5881 \begin_inset Flex MenuItem
5882 status collapsed
5883
5884 \begin_layout Plain Layout
5885 LaT
5886 \begin_inset ERT
5887 status collapsed
5888
5889 \begin_layout Plain Layout
5890
5891 {}
5892 \end_layout
5893
5894 \end_inset
5895
5896 eX (plain)->DVI
5897 \end_layout
5898
5899 \end_inset
5900
5901  or 
5902 \begin_inset Flex MenuItem
5903 status collapsed
5904
5905 \begin_layout Plain Layout
5906 LaT
5907 \begin_inset ERT
5908 status collapsed
5909
5910 \begin_layout Plain Layout
5911
5912 {}
5913 \end_layout
5914
5915 \end_inset
5916
5917 eX (plain)->DraftDVI
5918 \end_layout
5919
5920 \end_inset
5921
5922  converter in 
5923 \begin_inset Flex MenuItem
5924 status collapsed
5925
5926 \begin_layout Plain Layout
5927 Preferences\SpecialChar \menuseparator
5928 File Handling\SpecialChar \menuseparator
5929 Converters
5930 \end_layout
5931
5932 \end_inset
5933
5934  to 
5935 \begin_inset Flex Code
5936 status collapsed
5937
5938 \begin_layout Plain Layout
5939 latex -src-specials $$i
5940 \end_layout
5941
5942 \end_inset
5943
5944 .
5945  If this doesn't work, check if your TeX engine needs different options
5946  (the syntax might differ in some distributions).
5947 \end_layout
5948
5949 \begin_layout Subsubsection*
5950 External Packages (PDFSync and scrltx) 
5951 \end_layout
5952
5953 \begin_layout Standard
5954 The packages 
5955 \emph on
5956 pdfsync
5957 \emph default
5958  and 
5959 \emph on
5960 scrltx
5961 \emph default
5962  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5963  respectively.
5964  In order to enable it, load the packages in the LyX preamble: 
5965 \end_layout
5966
5967 \begin_layout Itemize
5968 \begin_inset Flex Code
5969 status collapsed
5970
5971 \begin_layout Plain Layout
5972
5973 \backslash
5974 usepackage{pdfsync}
5975 \end_layout
5976
5977 \end_inset
5978
5979  for reverse PDF search,
5980 \end_layout
5981
5982 \begin_layout Itemize
5983 \begin_inset Flex Code
5984 status collapsed
5985
5986 \begin_layout Plain Layout
5987
5988 \backslash
5989 usepackage[active]{srcltx}
5990 \end_layout
5991
5992 \end_inset
5993
5994  for reverse DVI search.
5995 \end_layout
5996
5997 \begin_layout Standard
5998 If you want to be able to perform both DVI and PDF reverse searches, you
5999  can also insert in the preamble the following lines
6000 \end_layout
6001
6002 \begin_layout LyX-Code
6003
6004 \backslash
6005 usepackage{ifpdf}
6006 \begin_inset Newline newline
6007 \end_inset
6008
6009
6010 \backslash
6011 ifpdf
6012 \begin_inset Newline newline
6013 \end_inset
6014
6015   
6016 \backslash
6017 usepackage{pdfsync}
6018 \begin_inset Newline newline
6019 \end_inset
6020
6021
6022 \backslash
6023 else
6024 \begin_inset Newline newline
6025 \end_inset
6026
6027   
6028 \backslash
6029 usepackage[active]{srcltx}
6030 \begin_inset Newline newline
6031 \end_inset
6032
6033
6034 \backslash
6035 fi
6036 \end_layout
6037
6038 \begin_layout Standard
6039 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6040  right package will be used.
6041 \end_layout
6042
6043 \begin_layout Standard
6044 Note that PDFSync might affect the output layout of your document.
6045  It is therefore advised to disable PDFsync for final documents.
6046 \end_layout
6047
6048 \begin_layout Subsubsection*
6049 Built-in reverse search via SyncTeX (DVI and PDF) 
6050 \end_layout
6051
6052 \begin_layout Standard
6053 Recent versions of 
6054 \begin_inset Flex Code
6055 status collapsed
6056
6057 \begin_layout Plain Layout
6058 (pdf)latex
6059 \end_layout
6060
6061 \end_inset
6062
6063  have built-in support for both PDF and DVI reverse search.
6064  This so-called 
6065 \emph on
6066 SyncTeX
6067 \emph default
6068  facility is basically the result of the integration of the PDFSync package
6069  to the pdftex program and its merge with the 
6070 \emph on
6071 scr-specials
6072 \emph default
6073  approach.
6074  You need at least TeXLive 2008 or a recent MikTeX distribution in order
6075  to use it.
6076  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6077  already provide SyncTeX support.
6078 \end_layout
6079
6080 \begin_layout Standard
6081 To enable SyncTeX for DVI output, change the 
6082 \begin_inset Flex MenuItem
6083 status collapsed
6084
6085 \begin_layout Plain Layout
6086 LaT
6087 \begin_inset ERT
6088 status collapsed
6089
6090 \begin_layout Plain Layout
6091
6092 {}
6093 \end_layout
6094
6095 \end_inset
6096
6097 eX (plain) -> DVI
6098 \end_layout
6099
6100 \end_inset
6101
6102  or 
6103 \begin_inset Flex MenuItem
6104 status collapsed
6105
6106 \begin_layout Plain Layout
6107 LaT
6108 \begin_inset ERT
6109 status collapsed
6110
6111 \begin_layout Plain Layout
6112
6113 {}
6114 \end_layout
6115
6116 \end_inset
6117
6118 eX (plain) -> DraftDVI
6119 \end_layout
6120
6121 \end_inset
6122
6123  converter in 
6124 \begin_inset Flex MenuItem
6125 status collapsed
6126
6127 \begin_layout Plain Layout
6128 Preferences\SpecialChar \menuseparator
6129 File Handling\SpecialChar \menuseparator
6130 Converters
6131 \end_layout
6132
6133 \end_inset
6134
6135  to 
6136 \begin_inset Flex Code
6137 status collapsed
6138
6139 \begin_layout Plain Layout
6140 latex -synctex=1 $$i
6141 \end_layout
6142
6143 \end_inset
6144
6145 , and for PDF output, change the 
6146 \begin_inset Flex MenuItem
6147 status collapsed
6148
6149 \begin_layout Plain Layout
6150 LaT
6151 \begin_inset ERT
6152 status collapsed
6153
6154 \begin_layout Plain Layout
6155
6156 {}
6157 \end_layout
6158
6159 \end_inset
6160
6161 eX (pdflatex) -> PDF (pdflatex)
6162 \end_layout
6163
6164 \end_inset
6165
6166  or converter to 
6167 \begin_inset Flex Code
6168 status collapsed
6169
6170 \begin_layout Plain Layout
6171 pdflatex -synctex=1 $$i
6172 \end_layout
6173
6174 \end_inset
6175
6176 .
6177  Check the documentation of your viewer whether the viewer needs to be configure
6178 d for the use with SyncTeX.
6179 \begin_inset Foot
6180 status collapsed
6181
6182 \begin_layout Plain Layout
6183 Note that the option 
6184 \begin_inset Flex Code
6185 status collapsed
6186
6187 \begin_layout Plain Layout
6188 -synctex=1
6189 \end_layout
6190
6191 \end_inset
6192
6193  option enables gzip compression.
6194  If your viewer does not support it, you should instead use 
6195 \begin_inset Flex Code
6196 status collapsed
6197
6198 \begin_layout Plain Layout
6199 -synctex=-1
6200 \end_layout
6201
6202 \end_inset
6203
6204 .
6205 \end_layout
6206
6207 \end_inset
6208
6209
6210 \end_layout
6211
6212 \begin_layout Subsection
6213 Configuring and using specific viewers
6214 \begin_inset CommandInset label
6215 LatexCommand label
6216 name "sub:configuring-viewers"
6217
6218 \end_inset
6219
6220
6221 \end_layout
6222
6223 \begin_layout Subsubsection*
6224 Xdvi (all platforms)
6225 \end_layout
6226
6227 \begin_layout Standard
6228 If you use 
6229 \begin_inset Flex Code
6230 status collapsed
6231
6232 \begin_layout Plain Layout
6233 xdvi
6234 \end_layout
6235
6236 \end_inset
6237
6238 , you don't need to do anything else for performing a reverse DVI search,
6239  as LyX already provides the necessary hooks for automatically using the
6240  
6241 \begin_inset Flex Code
6242 status collapsed
6243
6244 \begin_layout Plain Layout
6245 lyxclient
6246 \end_layout
6247
6248 \end_inset
6249
6250  program.
6251  Just setup your document as described above (reverse search is triggered
6252  by Ctrl-click or Alt-click on Mac OSX, respectively).
6253 \end_layout
6254
6255 \begin_layout Standard
6256 However, if for whatever reason you want to use the named pipe instead of
6257  the socket for communicating with LyX, simply change the DVI viewer in
6258  
6259 \begin_inset Flex MenuItem
6260 status collapsed
6261
6262 \begin_layout Plain Layout
6263 Preferences\SpecialChar \menuseparator
6264 File Handling\SpecialChar \menuseparator
6265 File formats
6266 \end_layout
6267
6268 \end_inset
6269
6270  to
6271 \begin_inset Foot
6272 status collapsed
6273
6274 \begin_layout Plain Layout
6275 On Mac OSX you have to use 
6276 \begin_inset Flex Code
6277 status collapsed
6278
6279 \begin_layout Plain Layout
6280 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6281 \end_layout
6282
6283 \end_inset
6284
6285
6286 \end_layout
6287
6288 \end_inset
6289
6290  
6291 \begin_inset Flex Code
6292 status collapsed
6293
6294 \begin_layout Plain Layout
6295 xdvi -editor 'lyxeditor.sh %f %l'
6296 \end_layout
6297
6298 \end_inset
6299
6300 , where 
6301 \begin_inset Flex Code
6302 status collapsed
6303
6304 \begin_layout Plain Layout
6305 lyxeditor.sh
6306 \end_layout
6307
6308 \end_inset
6309
6310  is a suitable script.
6311  For example, a minimal shell script is the following one:
6312 \end_layout
6313
6314 \begin_layout LyX-Code
6315 #!/bin/sh
6316 \begin_inset Newline newline
6317 \end_inset
6318
6319 LYXPIPE="/path/to/lyxpipe"
6320 \begin_inset Newline newline
6321 \end_inset
6322
6323 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6324 \begin_inset Newline newline
6325 \end_inset
6326
6327 echo "$COMMAND" > "${LYXPIPE}".in || exit
6328 \begin_inset Newline newline
6329 \end_inset
6330
6331 read < "${LYXPIPE}".out || exit
6332 \end_layout
6333
6334 \begin_layout Standard
6335 where 
6336 \begin_inset Flex Code
6337 status collapsed
6338
6339 \begin_layout Plain Layout
6340 /path/to/lyxpipe
6341 \end_layout
6342
6343 \end_inset
6344
6345  is the Ly
6346 \begin_inset ERT
6347 status collapsed
6348
6349 \begin_layout Plain Layout
6350
6351 {}
6352 \end_layout
6353
6354 \end_inset
6355
6356 XServer pipe path specified in 
6357 \begin_inset Flex MenuItem
6358 status collapsed
6359
6360 \begin_layout Plain Layout
6361 Preferences\SpecialChar \menuseparator
6362 Paths
6363 \end_layout
6364
6365 \end_inset
6366
6367 .
6368 \begin_inset Foot
6369 status collapsed
6370
6371 \begin_layout Plain Layout
6372 In the 
6373 \begin_inset Flex Code
6374 status collapsed
6375
6376 \begin_layout Plain Layout
6377 development/tools
6378 \end_layout
6379
6380 \end_inset
6381
6382  folder of a source distribution you can find a 
6383 \begin_inset Flex Code
6384 status collapsed
6385
6386 \begin_layout Plain Layout
6387 lyxeditor
6388 \end_layout
6389
6390 \end_inset
6391
6392  script which is able to locate the 
6393 \emph on
6394 lyxpipe
6395 \emph default
6396  based on your preferences.
6397 \end_layout
6398
6399 \end_inset
6400
6401
6402 \end_layout
6403
6404 \begin_layout Subsubsection*
6405 MacDviX (Mac OSX)
6406 \end_layout
6407
6408 \begin_layout Standard
6409 At the end of 
6410 \begin_inset Flex Code
6411 status collapsed
6412
6413 \begin_layout Plain Layout
6414 /Applications/MacDviX_Folder/calleditor.script
6415 \end_layout
6416
6417 \end_inset
6418
6419 , add the following lines:
6420 \end_layout
6421
6422 \begin_layout LyX-Code
6423 /Applications/Ly
6424 \begin_inset ERT
6425 status collapsed
6426
6427 \begin_layout Plain Layout
6428
6429 {}
6430 \end_layout
6431
6432 \end_inset
6433
6434 X.app/Contents/MacOS/lyxeditor "$2" $1
6435 \begin_inset Newline newline
6436 \end_inset
6437
6438 exit 1
6439 \end_layout
6440
6441 \begin_layout Standard
6442 Modify the lines accordingly if you install LyX somewhere else than in the
6443  Applications folder.
6444 \end_layout
6445
6446 \begin_layout Standard
6447 Reverse search is triggered by Alt-click (OPTION-click).
6448 \end_layout
6449
6450 \begin_layout Subsubsection*
6451 Skim (Mac OSX)
6452 \end_layout
6453
6454 \begin_layout Standard
6455 Enter 
6456 \begin_inset Flex Code
6457 status collapsed
6458
6459 \begin_layout Plain Layout
6460 open -a Skim.app $$i
6461 \end_layout
6462
6463 \end_inset
6464
6465  to the viewer setting in 
6466 \begin_inset Flex MenuItem
6467 status collapsed
6468
6469 \begin_layout Plain Layout
6470 Preferences\SpecialChar \menuseparator
6471 File Handling\SpecialChar \menuseparator
6472 File formats\SpecialChar \menuseparator
6473 PDF (pdflatex)
6474 \end_layout
6475
6476 \end_inset
6477
6478 , and then in 
6479 \begin_inset Flex MenuItem
6480 status collapsed
6481
6482 \begin_layout Plain Layout
6483 Skim\SpecialChar \menuseparator
6484 Preferences\SpecialChar \menuseparator
6485 Sync
6486 \end_layout
6487
6488 \end_inset
6489
6490  select Ly
6491 \begin_inset ERT
6492 status collapsed
6493
6494 \begin_layout Plain Layout
6495
6496 {}
6497 \end_layout
6498
6499 \end_inset
6500
6501 X.
6502 \end_layout
6503
6504 \begin_layout Standard
6505 Reverse search is triggered by COMMAND-SHIFT-click
6506 \end_layout
6507
6508 \begin_layout Subsubsection*
6509 Okular (KDE)
6510 \end_layout
6511
6512 \begin_layout Standard
6513 Go to 
6514 \begin_inset Flex MenuItem
6515 status collapsed
6516
6517 \begin_layout Plain Layout
6518 Settings\SpecialChar \menuseparator
6519 Configure Okular\SpecialChar \ldots{}
6520 \SpecialChar \menuseparator
6521 Editor
6522 \end_layout
6523
6524 \end_inset
6525
6526 , select 
6527 \begin_inset Quotes eld
6528 \end_inset
6529
6530 Custom Text Editor
6531 \begin_inset Quotes erd
6532 \end_inset
6533
6534  and add the command 
6535 \begin_inset Flex Code
6536 status collapsed
6537
6538 \begin_layout Plain Layout
6539 lyxclient -g %f %l
6540 \end_layout
6541
6542 \end_inset
6543
6544 .
6545 \end_layout
6546
6547 \begin_layout Standard
6548 Reverse search is triggered by SHIFT-click.
6549 \end_layout
6550
6551 \begin_layout Subsubsection*
6552 YAP (Windows)
6553 \end_layout
6554
6555 \begin_layout Standard
6556 Launch yap, choose its 
6557 \begin_inset Flex MenuItem
6558 status collapsed
6559
6560 \begin_layout Plain Layout
6561 View\SpecialChar \menuseparator
6562 Options
6563 \end_layout
6564
6565 \end_inset
6566
6567  menu and select the 
6568 \begin_inset Quotes eld
6569 \end_inset
6570
6571 Inverse DVI Search
6572 \begin_inset Quotes erd
6573 \end_inset
6574
6575  tab.
6576  Click on the 
6577 \begin_inset Quotes eld
6578 \end_inset
6579
6580 New\SpecialChar \ldots{}
6581
6582 \begin_inset Quotes erd
6583 \end_inset
6584
6585  button and, in the window that opens, enter 
6586 \begin_inset Quotes eld
6587 \end_inset
6588
6589 LyX Editor
6590 \begin_inset Quotes erd
6591 \end_inset
6592
6593  (or any other name you like) in the 
6594 \begin_inset Quotes eld
6595 \end_inset
6596
6597 Name:
6598 \begin_inset Quotes erd
6599 \end_inset
6600
6601  field.
6602  Now click on the button labeled 
6603 \begin_inset Quotes eld
6604 \end_inset
6605
6606 \SpecialChar \ldots{}
6607
6608 \begin_inset Quotes erd
6609 \end_inset
6610
6611  to open a file dialog and navigate to the directory containing the batch
6612  file 
6613 \begin_inset Flex Code
6614 status collapsed
6615
6616 \begin_layout Plain Layout
6617 lyxeditor.bat
6618 \end_layout
6619
6620 \end_inset
6621
6622  (see below).
6623  Select 
6624 \begin_inset Flex Code
6625 status collapsed
6626
6627 \begin_layout Plain Layout
6628 lyxeditor.bat
6629 \end_layout
6630
6631 \end_inset
6632
6633  and then specify the program arguments as 
6634 \begin_inset Flex Code
6635 status collapsed
6636
6637 \begin_layout Plain Layout
6638 %f %l
6639 \end_layout
6640
6641 \end_inset
6642
6643 .
6644  The 
6645 \begin_inset Flex Code
6646 status collapsed
6647
6648 \begin_layout Plain Layout
6649 lyxeditor.bat
6650 \end_layout
6651
6652 \end_inset
6653
6654  wrapper is used for communicating with LyX through the 
6655 \emph on
6656 lyxpipe
6657 \emph default
6658  and is as follows:
6659 \end_layout
6660
6661 \begin_layout LyX-Code
6662 @echo off
6663 \begin_inset Newline newline
6664 \end_inset
6665
6666 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6667 \backslash
6668
6669 \backslash
6670 .
6671 \backslash
6672 pipe
6673 \backslash
6674 lyxpipe.in
6675 \begin_inset Newline newline
6676 \end_inset
6677
6678 type 
6679 \backslash
6680
6681 \backslash
6682 .
6683 \backslash
6684 pipe
6685 \backslash
6686 lyxpipe.out
6687 \end_layout
6688
6689 \begin_layout Standard
6690 Make sure that the LyXServer pipe path you specified in LyX is 
6691 \begin_inset Flex Code
6692 status collapsed
6693
6694 \begin_layout Plain Layout
6695
6696 \backslash
6697
6698 \backslash
6699 .
6700 \backslash
6701 pipe
6702 \backslash
6703 lyxpipe
6704 \end_layout
6705
6706 \end_inset
6707
6708 , otherwise change the 
6709 \begin_inset Flex Code
6710 status collapsed
6711
6712 \begin_layout Plain Layout
6713 lyxeditor.bat
6714 \end_layout
6715
6716 \end_inset
6717
6718  wrapper accordingly.
6719 \end_layout
6720
6721 \begin_layout Standard
6722 In yap, reverse search is triggered by double-click.
6723 \end_layout
6724
6725 \begin_layout Subsubsection*
6726 SumatraPDF (Windows)
6727 \end_layout
6728
6729 \begin_layout Standard
6730 In order to use SumatraPDF for inverse search, enter 
6731 \begin_inset Flex Code
6732 status collapsed
6733
6734 \begin_layout Plain Layout
6735 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6736 \end_layout
6737
6738 \end_inset
6739
6740  in the viewer setting in 
6741 \begin_inset Flex MenuItem
6742 status collapsed
6743
6744 \begin_layout Plain Layout
6745 Preferences\SpecialChar \menuseparator
6746 File Handling\SpecialChar \menuseparator
6747 File formats\SpecialChar \menuseparator
6748 PDF (pdflatex)
6749 \end_layout
6750
6751 \end_inset
6752
6753 , where 
6754 \begin_inset Flex Code
6755 status collapsed
6756
6757 \begin_layout Plain Layout
6758 lyxeditor.bat
6759 \end_layout
6760
6761 \end_inset
6762
6763  is the previous wrapper.
6764  If SumatraPDF.exe is not in your command PATH, use its full file name.
6765 \end_layout
6766
6767 \begin_layout Standard
6768 Reverse search is triggered by double-click.
6769 \end_layout
6770
6771 \begin_layout Subsubsection*
6772 YAP (Cygwin)
6773 \end_layout
6774
6775 \begin_layout Standard
6776 First of all, make sure that yap is your default DVI viewer in the Windows
6777  environment, then launch it, choose its 
6778 \begin_inset Flex MenuItem
6779 status collapsed
6780
6781 \begin_layout Plain Layout
6782 View\SpecialChar \menuseparator
6783 Options
6784 \end_layout
6785
6786 \end_inset
6787
6788  menu and select the 
6789 \begin_inset Quotes eld
6790 \end_inset
6791
6792 Inverse DVI Search
6793 \begin_inset Quotes erd
6794 \end_inset
6795
6796  tab.
6797  Click on the 
6798 \begin_inset Quotes eld
6799 \end_inset
6800
6801 New\SpecialChar \ldots{}
6802
6803 \begin_inset Quotes erd
6804 \end_inset
6805
6806  button and, in the window that opens, enter 
6807 \begin_inset Quotes eld
6808 \end_inset
6809
6810 LyX Editor
6811 \begin_inset Quotes erd
6812 \end_inset
6813
6814  (or any other name you like) in the 
6815 \begin_inset Quotes eld
6816 \end_inset
6817
6818 Name:
6819 \begin_inset Quotes erd
6820 \end_inset
6821
6822  field.
6823  Now click on the button labeled 
6824 \begin_inset Quotes eld
6825 \end_inset
6826
6827 \SpecialChar \ldots{}
6828
6829 \begin_inset Quotes erd
6830 \end_inset
6831
6832  to open a file dialog and navigate to the directory containing the 
6833 \begin_inset Flex Code
6834 status collapsed
6835
6836 \begin_layout Plain Layout
6837 lyxeditor.exe
6838 \end_layout
6839
6840 \end_inset
6841
6842  program (which is installed by default on Cygwin along with the LyX executable).
6843  Select 
6844 \begin_inset Flex Code
6845 status collapsed
6846
6847 \begin_layout Plain Layout
6848 lyxeditor.exe
6849 \end_layout
6850
6851 \end_inset
6852
6853  and then specify the program arguments as 
6854 \begin_inset Flex Code
6855 status collapsed
6856
6857 \begin_layout Plain Layout
6858 -g %f %l
6859 \end_layout
6860
6861 \end_inset
6862
6863 .
6864  In this way, you will be using the 
6865 \emph on
6866 lyxsocket
6867 \emph default
6868  for communicating with LyX.
6869  If, for whatever reason, you want to use the 
6870 \emph on
6871 lyxpipe
6872 \emph default
6873 , omit the 
6874 \begin_inset Flex Code
6875 status collapsed
6876
6877 \begin_layout Plain Layout
6878 -g
6879 \end_layout
6880
6881 \end_inset
6882
6883  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6884 \end_layout
6885
6886 \begin_layout Standard
6887 In yap, reverse search is triggered by double-click.
6888 \end_layout
6889
6890 \begin_layout Subsubsection*
6891 SumatraPDF (Cygwin)
6892 \end_layout
6893
6894 \begin_layout Standard
6895 In order to use SumatraPDF for inverse search, enter 
6896 \begin_inset Flex Code
6897 status collapsed
6898
6899 \begin_layout Plain Layout
6900 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6901 \end_layout
6902
6903 \end_inset
6904
6905  in the viewer setting in 
6906 \begin_inset Flex MenuItem
6907 status collapsed
6908
6909 \begin_layout Plain Layout
6910 Preferences\SpecialChar \menuseparator
6911 File Handling\SpecialChar \menuseparator
6912 File formats\SpecialChar \menuseparator
6913 PDF (pdflatex)
6914 \end_layout
6915
6916 \end_inset
6917
6918 .
6919  If SumatraPDF.exe is not in your command PATH, use its full posix path.
6920  The 
6921 \begin_inset Flex Code
6922 status collapsed
6923
6924 \begin_layout Plain Layout
6925 -g
6926 \end_layout
6927
6928 \end_inset
6929
6930  enables communication via the 
6931 \emph on
6932 lyxsocket
6933 \emph default
6934 .
6935  Again, omit the 
6936 \begin_inset Flex Code
6937 status collapsed
6938
6939 \begin_layout Plain Layout
6940 -g
6941 \end_layout
6942
6943 \end_inset
6944
6945  option if you want to use the 
6946 \emph on
6947 lyxpipe
6948 \emph default
6949 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6950 \end_layout
6951
6952 \begin_layout Standard
6953 Reverse search is triggered by double-click.
6954 \end_layout
6955
6956 \begin_layout Section
6957 Forward search
6958 \end_layout
6959
6960 \begin_layout Standard
6961 Forward search is, as the name implies, in a sense the 
6962 \begin_inset Quotes eld
6963 \end_inset
6964
6965 opposite
6966 \begin_inset Quotes erd
6967 \end_inset
6968
6969  of reverse search.
6970  It allows you to let the viewer jump to a given position from within LyX.
6971  If forward search is set up (as described in what follows), you can put
6972  the cursor anywhere in your LyX document, and hit 
6973 \begin_inset Flex MenuItem
6974 status collapsed
6975
6976 \begin_layout Plain Layout
6977 Navigate\SpecialChar \menuseparator
6978 Forward search
6979 \end_layout
6980
6981 \end_inset
6982
6983  (or select 
6984 \begin_inset Flex MenuItem
6985 status collapsed
6986
6987 \begin_layout Plain Layout
6988 Forward search
6989 \end_layout
6990
6991 \end_inset
6992
6993  in the context menu via right mouse click), and then the viewer will jump
6994  to that position as well.
6995  This implies, of course, that your viewer supports this function.
6996 \end_layout
6997
6998 \begin_layout Standard
6999 To make forward search possible, you first need to provide the generated
7000  output PDF/DVI file with additional information about the TeX sources.
7001  This can be done via the methods described in the section 
7002 \begin_inset CommandInset ref
7003 LatexCommand ref
7004 reference "sub:rev-search"
7005
7006 \end_inset
7007
7008 .
7009 \end_layout
7010
7011 \begin_layout Standard
7012 Additionally, you need to configure LyX for using your viewers in 
7013 \begin_inset Flex MenuItem
7014 status collapsed
7015
7016 \begin_layout Plain Layout
7017 Tools\SpecialChar \menuseparator
7018 Preferences\SpecialChar \menuseparator
7019 Output\SpecialChar \menuseparator
7020 General
7021 \end_layout
7022
7023 \end_inset
7024
7025 .
7026  We provide a range of tested configurations for some viewers, which you
7027  can select from the drop down list.
7028  If none of these configurations suits you, you have to find out and enter
7029  a suitable configuration yourself.
7030  The definition syntax uses the following placeholders:
7031 \end_layout
7032
7033 \begin_layout Itemize
7034 \noindent
7035 \begin_inset Flex Code
7036 status collapsed
7037
7038 \begin_layout Plain Layout
7039 $$n
7040 \end_layout
7041
7042 \end_inset
7043
7044 : row number
7045 \end_layout
7046
7047 \begin_layout Itemize
7048 \noindent
7049 \begin_inset Flex Code
7050 status collapsed
7051
7052 \begin_layout Plain Layout
7053 $$t
7054 \end_layout
7055
7056 \end_inset
7057
7058 : name of the (temporary) exported .tex file
7059 \end_layout
7060
7061 \begin_layout Itemize
7062 \noindent
7063 \begin_inset Flex Code
7064 status collapsed
7065
7066 \begin_layout Plain Layout
7067 $$o
7068 \end_layout
7069
7070 \end_inset
7071
7072 : name of the exported output file (either dvi or pdf, depending on which
7073  one exists in the temporary directory)
7074 \end_layout
7075
7076 \begin_layout Standard
7077 Note that only some of the viewers provide full forward search functionality,
7078  among them yap, xdvi, okular and Sumatra PDF.
7079 \begin_inset Foot
7080 status collapsed
7081
7082 \begin_layout Plain Layout
7083 For Sumatra CMCDDE is needed --- downloadable from 
7084 \begin_inset CommandInset href
7085 LatexCommand href
7086 target "http://www.istri.fr/zip/CMCDDE.zip"
7087
7088 \end_inset
7089
7090
7091 \end_layout
7092
7093 \end_inset
7094
7095  While many of the widespread PDF viewers (most notably Adobe Reader) do
7096  not support forward search at all, some other viewers -- e.
7097 \begin_inset space \thinspace{}
7098 \end_inset
7099
7100 g.
7101  evince and xpdf -- allow at least to reload the document and jump to a
7102  specific page of the file, so you can at least navigate 
7103 \begin_inset Quotes eld
7104 \end_inset
7105
7106 near
7107 \begin_inset Quotes erd
7108 \end_inset
7109
7110 .
7111  This latter functionality is provided by an external call of synctex (see
7112  the predefined example configurations).
7113  
7114 \end_layout
7115
7116 \begin_layout Standard
7117 Forward search works both with DVI and PDF output.
7118  LyX simply checks which preview format you have used before (i.
7119 \begin_inset space \thinspace{}
7120 \end_inset
7121
7122 e., which format is already there in the temporary directory) and chooses
7123  the appropriate configuration for the respective format.
7124 \end_layout
7125
7126 \begin_layout Chapter
7127 Special Document Classes
7128 \end_layout
7129
7130 \begin_layout Section
7131 A&A Paper
7132 \end_layout
7133
7134 \begin_layout Standard
7135 by 
7136 \noun on
7137 Peter Sütterlin
7138 \end_layout
7139
7140 \begin_layout Subsection
7141 Introduction
7142 \end_layout
7143
7144 \begin_layout Standard
7145 This section describes how LyX can be used to write articles for submission
7146  to the scientific journal 
7147 \emph on
7148 Astronomy and Astrophysics
7149 \emph default
7150  (www.edpsciences.fr/aa/ 
7151 \begin_inset Flex URL
7152 status collapsed
7153
7154 \begin_layout Plain Layout
7155
7156 http://www.edpsciences.fr/aa/
7157 \end_layout
7158
7159 \end_inset
7160
7161 ) using Version 5.01 of the document class 
7162 \family typewriter
7163 aa.cls
7164 \family default
7165 .
7166  This package can be downloaded from the ftp site
7167 \end_layout
7168
7169 \begin_layout Standard
7170 \begin_inset VSpace medskip
7171 \end_inset
7172
7173
7174 \end_layout
7175
7176 \begin_layout Standard
7177 \align center
7178 \begin_inset Flex URL
7179 status collapsed
7180
7181 \begin_layout Plain Layout
7182
7183 ftp://ftp.edpsciences.org/pub/aa/readme.html
7184 \end_layout
7185
7186 \end_inset
7187
7188
7189 \end_layout
7190
7191 \begin_layout Standard
7192 \begin_inset VSpace medskip
7193 \end_inset
7194
7195
7196 \end_layout
7197
7198 \begin_layout Standard
7199 A manual comes together with that package, and this text is not meant to
7200  replace the original manual but is merely a short guide in how to realize
7201  the correct form of your paper.
7202  
7203 \end_layout
7204
7205 \begin_layout Standard
7206 Please note that the publisher of the journal was changed from Springer
7207  to EDP Sciences starting January 1, 2001.
7208  That change involved also some slight changes to the style files, namely
7209  the removal of the thesaurus command.
7210  The LyX class aa supports the newest version of these style files, V 5.01.
7211  If you have an older version installed, please upgrade.
7212  For compatibility, the old (version 4) layout has been kept as 
7213 \family sans
7214 article (A&A V4)
7215 \family default
7216 .
7217  Please refer to the comments in 
7218 \family typewriter
7219 LyXDir/layouts/aapaper.layout
7220 \family default
7221 .
7222 \end_layout
7223
7224 \begin_layout Subsection
7225 Getting started
7226 \end_layout
7227
7228 \begin_layout Standard
7229 It is recommended you start from the example template distributed with LyX.
7230  If you are not using a template, note the following settings:
7231 \end_layout
7232
7233 \begin_layout Itemize
7234 Select 
7235 \family sans
7236 article (A&A)
7237 \family default
7238  in the 
7239 \family sans
7240 Document\SpecialChar \menuseparator
7241 Settings
7242 \family default
7243  dialog (OK, that one was obvious).
7244 \end_layout
7245
7246 \begin_layout Itemize
7247 Don't change the option 
7248 \family sans
7249 Page
7250 \begin_inset space ~
7251 \end_inset
7252
7253 style
7254 \family default
7255 : Leave it set to 
7256 \family sans
7257 default
7258 \family default
7259 .
7260  The whole layout is done by the macros, you shouldn't change anything.
7261 \end_layout
7262
7263 \begin_layout Subsection
7264 The header block
7265 \end_layout
7266
7267 \begin_layout Standard
7268 First thing to enter is the header information.
7269  It consists of seven entries, of which some are optional.
7270  They are
7271 \end_layout
7272
7273 \begin_layout Itemize
7274
7275 \family sans
7276 Title
7277 \family default
7278 : [required] 
7279 \end_layout
7280
7281 \begin_layout Itemize
7282
7283 \family sans
7284 Subtitle
7285 \family default
7286 : [optional] 
7287 \end_layout
7288
7289 \begin_layout Itemize
7290
7291 \family sans
7292 Author
7293 \family default
7294 : [required]
7295 \end_layout
7296
7297 \begin_layout Itemize
7298
7299 \family sans
7300 Address
7301 \family default
7302 : [required]
7303 \end_layout
7304
7305 \begin_layout Itemize
7306
7307 \family sans
7308 Offprints
7309 \family default
7310 : [optional] if more than one author: whom to contact for offprint requests.
7311 \end_layout
7312
7313 \begin_layout Itemize
7314
7315 \family sans
7316 Mail
7317 \family default
7318 : [optional] mail address for contacts.
7319 \end_layout
7320
7321 \begin_layout Itemize
7322
7323 \family sans
7324 Date
7325 \family default
7326 : [required].
7327  Suggested format is 
7328 \family typewriter
7329 Received: <date>; Accepted <date> 
7330 \end_layout
7331
7332 \begin_layout Standard
7333 There is no need to issue the 
7334 \family typewriter
7335
7336 \backslash
7337 maketitle
7338 \family default
7339  command, this is done automatically by LyX when the header is finished.
7340  Although the order of the single header entries doesn't matter it is advised
7341  to keep the above sequence, just to get the best optics and meets the layout
7342  of the real document.
7343 \end_layout
7344
7345 \begin_layout Standard
7346 If you want to place footnotes in the header block, e.
7347 \begin_inset space \thinspace{}
7348 \end_inset
7349
7350 g.
7351 \begin_inset space \space{}
7352 \end_inset
7353
7354 to state your present address, just use the standard footnote via the menu
7355  
7356 \family sans
7357 Insert\SpecialChar \menuseparator
7358 Footnote.
7359
7360 \family default
7361  LyX will automagically use the term 
7362 \family typewriter
7363
7364 \backslash
7365 thanks{}
7366 \family default
7367  in that case.
7368 \end_layout
7369
7370 \begin_layout Standard
7371 In addition to these topics, the macros use three additional LaTeX commands
7372  that have no counterpart in LyX:
7373 \end_layout
7374
7375 \begin_layout Itemize
7376
7377 \family typewriter
7378
7379 \backslash
7380 and
7381 \family default
7382  to separate different names for more than one author and institute, respectivel
7383 y.
7384 \end_layout
7385
7386 \begin_layout Itemize
7387
7388 \family typewriter
7389
7390 \backslash
7391 inst{<nr>}
7392 \family default
7393 to mark corresponding author/institute pairs.
7394  The institutes are numbered sequentially as they appear in the 
7395 \family sans
7396 Address
7397 \family default
7398  field, so you have to put a marker to each author.
7399 \end_layout
7400
7401 \begin_layout Itemize
7402
7403 \family typewriter
7404
7405 \backslash
7406 email{address}
7407 \family default
7408  to supply an email address for fast contact.
7409 \end_layout
7410
7411 \begin_layout Standard
7412 In all cases, the appropriate command has to be entered in LyX and marked
7413  as LaTeX code.
7414  See the examples.
7415  
7416 \end_layout
7417
7418 \begin_layout Subsection
7419 The abstract
7420 \end_layout
7421
7422 \begin_layout Standard
7423 The abstract should immediately follow the header block.
7424  With version 5 the abstract environment was changed to a command, and there
7425  is now a resctriction to only one paragraph.
7426  In addition, it should contain an entry with the keywords.
7427  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7428  command 
7429 \family typewriter
7430
7431 \backslash
7432 keywords{}
7433 \family default
7434  by hand and mark it as LaTeX code.
7435  Refer to the example paper.
7436 \end_layout
7437
7438 \begin_layout Subsection
7439 Supported environments
7440 \end_layout
7441
7442 \begin_layout Standard
7443 The A&A paper layout supports the following environments for structuring
7444  your text:
7445 \end_layout
7446
7447 \begin_layout Itemize
7448
7449 \family sans
7450 Standard
7451 \end_layout
7452
7453 \begin_layout Itemize
7454
7455 \family sans
7456 Section
7457 \end_layout
7458
7459 \begin_layout Itemize
7460
7461 \family sans
7462 Subsection
7463 \end_layout
7464
7465 \begin_layout Itemize
7466
7467 \family sans
7468 Subsubsection
7469 \end_layout
7470
7471 \begin_layout Itemize
7472
7473 \family sans
7474 Itemize
7475 \end_layout
7476
7477 \begin_layout Itemize
7478
7479 \family sans
7480 Enumerate
7481 \end_layout
7482
7483 \begin_layout Itemize
7484
7485 \family sans
7486 Description
7487 \end_layout
7488
7489 \begin_layout Itemize
7490
7491 \family sans
7492 Caption
7493 \end_layout
7494
7495 \begin_layout Itemize
7496
7497 \family sans
7498 Abstract
7499 \end_layout
7500
7501 \begin_layout Itemize
7502
7503 \family sans
7504 Acknowledgment
7505 \end_layout
7506
7507 \begin_layout Itemize
7508
7509 \family sans
7510 Bibliography
7511 \end_layout
7512
7513 \begin_layout Itemize
7514
7515 \family sans
7516 LaTeX
7517 \end_layout
7518
7519 \begin_layout Subsection
7520 Commands not supported by LyX
7521 \end_layout
7522
7523 \begin_layout Standard
7524 Some commands are not yet supported by the 
7525 \family sans
7526 paper (A&A)
7527 \family default
7528  layout for LyX.
7529  Some have already been mentioned.
7530  For the sake of completeness, they are listed all together here:
7531 \end_layout
7532
7533 \begin_layout Itemize
7534
7535 \family typewriter
7536
7537 \backslash
7538 and
7539 \end_layout
7540
7541 \begin_layout Itemize
7542
7543 \family typewriter
7544
7545 \backslash
7546 email
7547 \end_layout
7548
7549 \begin_layout Itemize
7550
7551 \family typewriter
7552
7553 \backslash
7554 appendix
7555 \end_layout
7556
7557 \begin_layout Itemize
7558
7559 \family typewriter
7560
7561 \backslash
7562 authorrunning
7563 \end_layout
7564
7565 \begin_layout Itemize
7566
7567 \family typewriter
7568
7569 \backslash
7570 inst{}
7571 \end_layout
7572
7573 \begin_layout Itemize
7574
7575 \family typewriter
7576
7577 \backslash
7578 keywords{}
7579 \end_layout
7580
7581 \begin_layout Itemize
7582
7583 \family typewriter
7584
7585 \backslash
7586 object{}
7587 \end_layout
7588
7589 \begin_layout Itemize
7590
7591 \family typewriter
7592
7593 \backslash
7594 titlerunning{}
7595 \end_layout
7596
7597 \begin_layout Standard
7598 If you want to use any of these commands, you have to enter them yourself.
7599  
7600 \series bold
7601 Do not forget to mark them as LaTeX code!
7602 \end_layout
7603
7604 \begin_layout Subsection
7605 Figure and Table Floats
7606 \end_layout
7607
7608 \begin_layout Standard
7609 LyX provides support for the necessary float environments 
7610 \family sans
7611 figure, figure*, table
7612 \family default
7613  and 
7614 \family sans
7615 table*
7616 \family default
7617 , therefore we won't tell much about it here.
7618  Refer to the 
7619 \emph on
7620 User's
7621 \begin_inset space ~
7622 \end_inset
7623
7624 Guide
7625 \emph default
7626 .
7627  Just remember that tables should be left-aligned.
7628  For that, select the table and change the alignment in 
7629 \family sans
7630 Edit\SpecialChar \menuseparator
7631 Paragraph
7632 \begin_inset space ~
7633 \end_inset
7634
7635 Settings.
7636 \end_layout
7637
7638 \begin_layout Standard
7639 There is only one special thing: the figures with caption besides the figure.
7640  To create such a figure, you have to do the following:
7641 \end_layout
7642
7643 \begin_layout Enumerate
7644 Create a wide figure float: 
7645 \family sans
7646 Insert\SpecialChar \menuseparator
7647 Float\SpecialChar \menuseparator
7648 Figure
7649 \family default
7650 , then right click in the figure and select 
7651 \family sans
7652 \bar under
7653 S
7654 \bar default
7655 pan
7656 \begin_inset space ~
7657 \end_inset
7658
7659 columns
7660 \family default
7661 .
7662 \end_layout
7663
7664 \begin_layout Enumerate
7665 Enter your caption text.
7666 \end_layout
7667
7668 \begin_layout Enumerate
7669 Press 
7670 \family sans
7671 Return
7672 \family default
7673  to move the cursor above the caption.
7674 \end_layout
7675
7676 \begin_layout Enumerate
7677 Insert your figure
7678 \end_layout
7679
7680 \begin_layout Enumerate
7681 Position the cursor behind the figure and insert a horizontal fill: 
7682 \family sans
7683 Insert\SpecialChar \menuseparator
7684 Special
7685 \begin_inset space ~
7686 \end_inset
7687
7688 Character\SpecialChar \menuseparator
7689 Horizontal
7690 \begin_inset space ~
7691 \end_inset
7692
7693 Fill
7694 \family default
7695 .
7696 \end_layout
7697
7698 \begin_layout Enumerate
7699 Switch to LaTeX mode: 
7700 \family sans
7701 M-c
7702 \begin_inset space ~
7703 \end_inset
7704
7705 t
7706 \family default
7707 .
7708 \end_layout
7709
7710 \begin_layout Enumerate
7711 Enter 
7712 \family typewriter
7713
7714 \backslash
7715 parbox[b]{55mm}{
7716 \family default
7717 .
7718  
7719 \series bold
7720 Do not close the brace!
7721 \end_layout
7722
7723 \begin_layout Enumerate
7724 Position the cursor behind the caption text, switch to LaTeX mode and insert
7725  the closing brace: 
7726 \family sans
7727 M-c
7728 \begin_inset space ~
7729 \end_inset
7730
7731 t
7732 \family default
7733  
7734 \family typewriter
7735 }
7736 \family default
7737 .
7738 \end_layout
7739
7740 \begin_layout Standard
7741 Also, refer to the figures in the example paper.
7742 \end_layout
7743
7744 \begin_layout Subsection
7745 Referee layout
7746 \end_layout
7747
7748 \begin_layout Standard
7749 For submission, the paper has to be formated in a special double-spacing
7750  layout.
7751  For this purpose, you have to give the option 
7752 \family typewriter
7753 referee
7754 \family default
7755  to the documentclass.
7756  This must be done using the extra class options field in the 
7757 \family sans
7758 Document\SpecialChar \menuseparator
7759 Settings
7760 \family default
7761  dialog.
7762  Just enter the string 
7763 \family typewriter
7764 referee
7765 \family default
7766  there.
7767 \end_layout
7768
7769 \begin_layout Subsection
7770 The example paper
7771 \end_layout
7772
7773 \begin_layout Standard
7774 The 
7775 \family sans
7776 Examples
7777 \family default
7778  directory contains an example paper written with LyX.
7779  It is the example paper from the original macro package, translated to
7780  LyX.
7781  Use it for inspiration, and compare the original LaTeX code with LyX way
7782  of writing.
7783 \end_layout
7784
7785 \begin_layout Section
7786 AASTeX
7787 \end_layout
7788
7789 \begin_layout Standard
7790 by 
7791 \noun on
7792 Mike Ressler
7793 \end_layout
7794
7795 \begin_layout Subsection
7796 Introduction
7797 \end_layout
7798
7799 \begin_layout Standard
7800 AASTeX is a set of macros produced by the American Astronomical Society
7801  to facilitate electronic manuscript submission to the three journals they
7802  publish: the Astrophysical Journal (including the Letters and Supplement),
7803  the Astronomical Journal, and the Publications of the Astronomical Society
7804  of the Pacific.
7805  LyX has proven to be an excellent tool for generating these documents,
7806  especially given its equation, citation, and figure handling capabilities.
7807  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7808  is the version described here, or higher.
7809  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7810  incompatible with LyX.
7811  The AASTeX package may be downloaded from the AASTeX Web site
7812 \end_layout
7813
7814 \begin_layout Standard
7815 \begin_inset VSpace medskip
7816 \end_inset
7817
7818
7819 \end_layout
7820
7821 \begin_layout Standard
7822 \align center
7823 \begin_inset Flex URL
7824 status collapsed
7825
7826 \begin_layout Plain Layout
7827
7828 http://www.journals.uchicago.edu/AAS/AASTeX
7829 \end_layout
7830
7831 \end_inset
7832
7833
7834 \end_layout
7835
7836 \begin_layout Standard
7837 \begin_inset VSpace medskip
7838 \end_inset
7839
7840
7841 \end_layout
7842
7843 \begin_layout Standard
7844 A complete user guide is contained in that package and you should familiarize
7845  yourself with it thoroughly before embarking on writing a paper in LyX.
7846  LyX will not reduce the need to figure out all the AASTeX commands, it
7847  will only reduce the drudgery of typing everything in.
7848  It is your responsibility to ensure that the final exported LaTeX document
7849  conforms completely to the requirements of the journal to which you are
7850  submitting your paper.
7851 \end_layout
7852
7853 \begin_layout Subsection
7854 Starting a New Paper
7855 \end_layout
7856
7857 \begin_layout Standard
7858 I strongly suggest that you start with the AASTeX template file.
7859  Click on 
7860 \family sans
7861 File\SpecialChar \menuseparator
7862 New from
7863 \family default
7864  
7865 \family sans
7866 Template
7867 \family default
7868 , enter the new file name, then choose the 
7869 \family typewriter
7870 aastex.lyx
7871 \family default
7872  template.
7873  This will show the most common fields found in a manuscript.
7874  Simply overwrite the existing text (including the brackets, 
7875 \family typewriter
7876 <>
7877 \family default
7878 ) with the correct information.
7879  Many of the AASTeX commands and environments can be implemented directly
7880  in LyX, but some cannot: most noticeably 
7881 \family typewriter
7882
7883 \backslash
7884 altaffilmark
7885 \family default
7886  and 
7887 \family typewriter
7888
7889 \backslash
7890 altaffiltext
7891 \family default
7892 , which should stick out like a sore thumb if you actually just opened the
7893  template file.
7894  For commands such as these, the LaTeX code must be entered directly and
7895  marked as such.
7896  Such commands are referred to as TeX code, or Evil Red Text.
7897  I tried to minimize the amount of TeX code needed in an AASTeX document,
7898  but there is still a bit more required than any of us would like.
7899 \end_layout
7900
7901 \begin_layout Subsection
7902 Finishing Your Paper
7903 \end_layout
7904
7905 \begin_layout Standard
7906 When the paper is finished to your satisfaction and previews/prints correctly,
7907  there are a few 
7908 \begin_inset Quotes eld
7909 \end_inset
7910
7911 postprocessing
7912 \begin_inset Quotes erd
7913 \end_inset
7914
7915  actions which need to be done before you submit it to the journals.
7916  
7917 \end_layout
7918
7919 \begin_layout Enumerate
7920 Export your paper as a LaTeX file (
7921 \family sans
7922 File\SpecialChar \menuseparator
7923 Export\SpecialChar \menuseparator
7924 LaTeX
7925 \family default
7926 ).
7927  
7928 \end_layout
7929
7930 \begin_layout Enumerate
7931 Edit the resulting 
7932 \family typewriter
7933 .tex
7934 \family default
7935  file with your favorite text editor
7936 \end_layout
7937
7938 \begin_deeper
7939 \begin_layout Enumerate
7940 remove the comment lines before the 
7941 \family typewriter
7942
7943 \backslash
7944 documentclass
7945 \family default
7946  command
7947 \end_layout
7948
7949 \begin_layout Enumerate
7950 remove the 
7951 \family typewriter
7952
7953 \backslash
7954 usepackage...{fontenc}
7955 \family default
7956  line if it appears (usually just after 
7957 \family typewriter
7958
7959 \backslash
7960 documentclass
7961 \family default
7962 }; also remove the 
7963 \family typewriter
7964
7965 \backslash
7966 secnumdepth
7967 \family default
7968  line if it appears.
7969 \end_layout
7970
7971 \begin_layout Enumerate
7972 remove everything between (and including) the 
7973 \family typewriter
7974
7975 \backslash
7976 makeatletter
7977 \family default
7978  and 
7979 \family typewriter
7980
7981 \backslash
7982 makeatother
7983 \family default
7984  commands, except for any commands you specifically put into the LaTeX preamble
7985  (which should appear immediately after the 
7986 \begin_inset Quotes eld
7987 \end_inset
7988
7989 User specified LaTeX commands
7990 \begin_inset Quotes erd
7991 \end_inset
7992
7993  comment in the 
7994 \family typewriter
7995 .tex
7996 \family default
7997  file).
7998 \end_layout
7999
8000 \end_deeper
8001 \begin_layout Enumerate
8002 Run the resulting file through LaTeX to make sure it still processes correctly.
8003 \end_layout
8004
8005 \begin_layout Enumerate
8006 Reread the journal requirements to make sure your filenames and formats
8007  are correct.
8008 \end_layout
8009
8010 \begin_layout Enumerate
8011 Submit it.
8012 \end_layout
8013
8014 \begin_layout Subsection
8015 Comments On Specific Commands
8016 \end_layout
8017
8018 \begin_layout Standard
8019 I will not describe the detailed usage of the individual AASTeX commands:
8020  the AASTeX User Guide (
8021 \family typewriter
8022 aasguide.tex
8023 \family default
8024 ) gives a good description of each.
8025  Thus it's probably easiest for me to go down the list as found in the guide
8026  and offer comments where necessary.
8027  So let's begin \SpecialChar \ldots{}
8028
8029 \end_layout
8030
8031 \begin_layout Subsubsection
8032 Things that work as expected
8033 \end_layout
8034
8035 \begin_layout Standard
8036 Because they work as you might expect, I simply list them and the section
8037  they are found in: 
8038 \family typewriter
8039
8040 \backslash
8041 documentclass
8042 \family default
8043  (2.1.1), 
8044 \family typewriter
8045
8046 \backslash
8047 begin{document}
8048 \family default
8049  (2.2), 
8050 \family typewriter
8051
8052 \backslash
8053 title
8054 \family default
8055  (2.3), 
8056 \family typewriter
8057
8058 \backslash
8059 author
8060 \family default
8061  (2.3), 
8062 \family typewriter
8063
8064 \backslash
8065 affil
8066 \family default
8067  (2.3), 
8068 \family typewriter
8069
8070 \backslash
8071 abstract
8072 \family default
8073  (2.4), 
8074 \family typewriter
8075
8076 \backslash
8077 keywords
8078 \family default
8079  (2.5), 
8080 \family typewriter
8081
8082 \backslash
8083 section
8084 \family default
8085  (2.7), 
8086 \family typewriter
8087
8088 \backslash
8089 subsection
8090 \family default
8091  (2.7), 
8092 \family typewriter
8093
8094 \backslash
8095 subsubsection
8096 \family default
8097  (2.7), 
8098 \family typewriter
8099
8100 \backslash
8101 paragraph
8102 \family default
8103  (2.7), 
8104 \family typewriter
8105
8106 \backslash
8107 facility
8108 \family default
8109  (2.10), 
8110 \family typewriter
8111
8112 \backslash
8113 begin{displaymath}
8114 \family default
8115  (2.12), 
8116 \family typewriter
8117
8118 \backslash
8119 begin{equation}
8120 \family default
8121  (2.12), 
8122 \family typewriter
8123
8124 \backslash
8125 begin{eqnarray}
8126 \family default
8127  (2.12), 
8128 \family typewriter
8129
8130 \backslash
8131 begin{mathletters}
8132 \family default
8133  (2.12), 
8134 \family typewriter
8135
8136 \backslash
8137 begin{thebibliography}
8138 \family default
8139  (2.13.1), 
8140 \family typewriter
8141
8142 \backslash
8143 bibitem
8144 \family default
8145  (2.13.2), all the cite commands and their variations (2.13.2), the generic
8146  graphicx figure commands (2.14.1), 
8147 \family typewriter
8148
8149 \backslash
8150 begin{table}
8151 \family default
8152  (2.15.4), 
8153 \family typewriter
8154
8155 \backslash
8156 begin{tabular}
8157 \family default
8158  (2.15.4), 
8159 \family typewriter
8160
8161 \backslash
8162 caption
8163 \family default
8164  (2.15.4), 
8165 \family typewriter
8166
8167 \backslash
8168 label
8169 \family default
8170  (2.15.4, amongst other places), 
8171 \family typewriter
8172
8173 \backslash
8174 tablerefs
8175 \family default
8176  (2.15.5), 
8177 \family typewriter
8178
8179 \backslash
8180 tablecomments
8181 \family default
8182  (2.15.5), 
8183 \family typewriter
8184
8185 \backslash
8186 url
8187 \family default
8188  (2.17.4), 
8189 \family typewriter
8190
8191 \backslash
8192 end{document}
8193 \family default
8194  (2.18).
8195 \end_layout
8196
8197 \begin_layout Standard
8198 The following style options also work correctly: 
8199 \family typewriter
8200 longabstract
8201 \family default
8202  (2.4), 
8203 \family typewriter
8204 preprint
8205 \family default
8206  (3.2.1), 
8207 \family typewriter
8208 preprint2
8209 \family default
8210  (3.2.2), 
8211 \family typewriter
8212 eqsecnum
8213 \family default
8214  (3.3), 
8215 \family typewriter
8216 flushrt
8217 \family default
8218  (3.4).
8219  Simply put them in the 
8220 \family sans
8221 Options
8222 \family default
8223  box in 
8224 \family sans
8225 Layout\SpecialChar \menuseparator
8226 Document
8227 \family default
8228 .
8229 \end_layout
8230
8231 \begin_layout Subsubsection
8232 Things that work, but require more comment
8233 \end_layout
8234
8235 \begin_layout Standard
8236 The following items work, but require a little more discussion:
8237 \end_layout
8238
8239 \begin_layout Itemize
8240 These items are reserved for use by the journal editors, but you can put
8241  them into the LaTeX preamble if you feel compelled to do so: 
8242 \family typewriter
8243
8244 \backslash
8245 received
8246 \family default
8247
8248 \family typewriter
8249
8250 \backslash
8251 revised
8252 \family default
8253
8254 \family typewriter
8255
8256 \backslash
8257 accepted
8258 \family default
8259
8260 \family typewriter
8261
8262 \backslash
8263 ccc
8264 \family default
8265
8266 \family typewriter
8267
8268 \backslash
8269 cpright
8270 \family default
8271  (all from 2.1.3)
8272 \end_layout
8273
8274 \begin_layout Itemize
8275 These items may be placed in the LaTeX preamble, and are included as blanks
8276  in the template file: 
8277 \family typewriter
8278
8279 \backslash
8280 slugcomment
8281 \family default
8282  (2.1.4), 
8283 \family typewriter
8284
8285 \backslash
8286 shorttitle
8287 \family default
8288  (2.1.5), 
8289 \family typewriter
8290
8291 \backslash
8292 shortauthors
8293 \family default
8294  (2.1.5)
8295 \end_layout
8296
8297 \begin_layout Itemize
8298
8299 \family typewriter
8300
8301 \backslash
8302 email
8303 \family default
8304  (2.3) – can only be used 
8305 \begin_inset Quotes eld
8306 \end_inset
8307
8308 standalone
8309 \begin_inset Quotes erd
8310 \end_inset
8311
8312 , not in the middle of a paragraph.
8313  Use TeX code if you need to embed it.
8314 \end_layout
8315
8316 \begin_layout Itemize
8317
8318 \family typewriter
8319
8320 \backslash
8321 and
8322 \family default
8323  (2.3) – will have extra {} after it.
8324  This should not cause an error.
8325 \end_layout
8326
8327 \begin_layout Itemize
8328
8329 \family typewriter
8330
8331 \backslash
8332 notetoeditor
8333 \family default
8334  (2.6) – can only be used 
8335 \begin_inset Quotes eld
8336 \end_inset
8337
8338 standalone
8339 \begin_inset Quotes erd
8340 \end_inset
8341
8342 , not in the middle of a paragraph.
8343  Use TeX code if you need to embed it.
8344 \end_layout
8345
8346 \begin_layout Itemize
8347
8348 \family typewriter
8349
8350 \backslash
8351 placetable
8352 \family default
8353  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8354  hand
8355 \end_layout
8356
8357 \begin_layout Itemize
8358
8359 \family typewriter
8360
8361 \backslash
8362 placefigure
8363 \family default
8364  (2.8) – same as for 
8365 \family typewriter
8366
8367 \backslash
8368 placetable
8369 \end_layout
8370
8371 \begin_layout Itemize
8372
8373 \family typewriter
8374
8375 \backslash
8376 acknowledgements
8377 \family default
8378  (2.9) – will have extra {} after it.
8379  This should not cause an error.
8380 \end_layout
8381
8382 \begin_layout Itemize
8383
8384 \family typewriter
8385
8386 \backslash
8387 appendix
8388 \family default
8389  (2.11) – will have extra {} after it.
8390  This should not cause an error.
8391 \end_layout
8392
8393 \begin_layout Itemize
8394
8395 \family typewriter
8396
8397 \backslash
8398 figcaption
8399 \family default
8400  (2.14.2) – you can insert an optional filename argument by placing the cursor
8401  at the beginning of the text and selecting 
8402 \family sans
8403 Insert\SpecialChar \menuseparator
8404 Short Title
8405 \family default
8406 .
8407  
8408 \begin_inset Quotes eld
8409 \end_inset
8410
8411 Short Title
8412 \begin_inset Quotes erd
8413 \end_inset
8414
8415  inserts an optional argument of the type needed by 
8416 \family typewriter
8417
8418 \backslash
8419 figcaption
8420 \family default
8421 .
8422  Hopefully it will be renamed someday.
8423 \end_layout
8424
8425 \begin_layout Itemize
8426
8427 \family typewriter
8428
8429 \backslash
8430 objectname
8431 \family default
8432  (2.17.1) – same as 
8433 \family typewriter
8434
8435 \backslash
8436 figcaption
8437 \family default
8438  for the catalog ID optional parameter
8439 \end_layout
8440
8441 \begin_layout Itemize
8442
8443 \family typewriter
8444
8445 \backslash
8446 dataset
8447 \family default
8448  (2.17.1) – same as 
8449 \family typewriter
8450
8451 \backslash
8452 figcaption
8453 \family default
8454  for the catalog ID optional parameter
8455 \end_layout
8456
8457 \begin_layout Subsubsection
8458 Things not implemented, use TeX code
8459 \end_layout
8460
8461 \begin_layout Standard
8462
8463 \family typewriter
8464
8465 \backslash
8466 altaffilmark
8467 \family default
8468  (2.3), 
8469 \family typewriter
8470
8471 \backslash
8472 altaffiltext
8473 \family default
8474  (2.3), 
8475 \family typewriter
8476
8477 \backslash
8478 eqnum
8479 \family default
8480  (2.12), 
8481 \family typewriter
8482
8483 \backslash
8484 setcounter{equation}
8485 \family default
8486  (2.12), Journal name abbreviations (2.13.4), 
8487 \family typewriter
8488
8489 \backslash
8490 figurenum
8491 \family default
8492  (2.14.1), 
8493 \family typewriter
8494
8495 \backslash
8496 epsscale
8497 \family default
8498  (2.14.1), 
8499 \family typewriter
8500
8501 \backslash
8502 plotone
8503 \family default
8504  (2.14.1), 
8505 \family typewriter
8506
8507 \backslash
8508 plottwo
8509 \family default
8510  (2.14.1), 
8511 \family typewriter
8512
8513 \backslash
8514 tablenum
8515 \family default
8516  (2.15.4), 
8517 \family typewriter
8518
8519 \backslash
8520 tableline
8521 \family default
8522  (2.15.4, insert it as the first element in the lefthand cell after where
8523  you want it.
8524  Don't use any of LyX's rules in the table), 
8525 \family typewriter
8526
8527 \backslash
8528 tablenotemark
8529 \family default
8530  (2.15.5), 
8531 \family typewriter
8532
8533 \backslash
8534 tablenotetext
8535 \family default
8536  (2.15.5), much of Misc (2.17, except 
8537 \family typewriter
8538
8539 \backslash
8540 objectname
8541 \family default
8542
8543 \family typewriter
8544
8545 \backslash
8546 dataset
8547 \family default
8548
8549 \family typewriter
8550
8551 \backslash
8552 url
8553 \family default
8554 , and 
8555 \family typewriter
8556
8557 \backslash
8558 email
8559 \family default
8560 ; see above), 
8561 \family typewriter
8562
8563 \backslash
8564 singlespace
8565 \family default
8566  (3.1), 
8567 \family typewriter
8568
8569 \backslash
8570 doublespace
8571 \family default
8572  (3.1), 
8573 \family typewriter
8574
8575 \backslash
8576 onecolumn
8577 \family default
8578  (3.2), 
8579 \family typewriter
8580
8581 \backslash
8582 twocolumn
8583 \family default
8584  (3.2)
8585 \end_layout
8586
8587 \begin_layout Subsubsection
8588 Things that cannot be implemented
8589 \end_layout
8590
8591 \begin_layout Standard
8592 \SpecialChar \ldots{}
8593  at least in any meaningful sort of way, so I suggest ignoring them.
8594  They are the references environment (2.13.3), and the deluxetable environment
8595  (2.15).
8596  If you really, really need to use deluxetable, I suggest editing it in
8597  a separate file with a text editor, then using 
8598 \family sans
8599 Insert\SpecialChar \menuseparator
8600 Child
8601 \begin_inset space ~
8602 \end_inset
8603
8604 Document
8605 \family default
8606  to include it in your LyX document.
8607  See the 
8608 \family typewriter
8609 aas_sample.lyx
8610 \family default
8611  file to see an example of this.
8612 \end_layout
8613
8614 \begin_layout Subsection
8615 FAQs, Tips, Tricks, and Other Ruminations
8616 \end_layout
8617
8618 \begin_layout Subsubsection
8619 Getting LyX and AASTeX to cooperate
8620 \end_layout
8621
8622 \begin_layout Standard
8623 It can be a bit tricky to get LyX to recognize a new layout and document
8624  class.
8625  When all else fails, do this:
8626 \end_layout
8627
8628 \begin_layout Enumerate
8629 Make certain that LaTeX can find AASTeX.
8630  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8631  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8632 \family typewriter
8633 sample.tex
8634 \family default
8635 .
8636 \end_layout
8637
8638 \begin_layout Enumerate
8639 Make certain that 
8640 \family typewriter
8641 aastex.layout
8642 \family default
8643  appears in LyX's 
8644 \family typewriter
8645 layouts
8646 \family default
8647  folder
8648 \end_layout
8649
8650 \begin_layout Enumerate
8651 Rerun 
8652 \family sans
8653 Tools\SpecialChar \menuseparator
8654 Reconfigure
8655 \family default
8656  in LyX, then restart LyX.
8657 \end_layout
8658
8659 \begin_layout Enumerate
8660 Open a regular new file, not from a template.
8661  Does AASTeX appear in the class list in 
8662 \family sans
8663 Document\SpecialChar \menuseparator
8664 Settings
8665 \family default
8666 ?
8667 \end_layout
8668
8669 \begin_layout Standard
8670 If you get a warning from an existing AASTeX document about not being able
8671  to find the AASTeX layout or a message about 
8672 \begin_inset Quotes eld
8673 \end_inset
8674
8675 You should not mix title layouts with normal ones
8676 \begin_inset Quotes erd
8677 \end_inset
8678
8679 , things haven't been installed correctly.
8680 \end_layout
8681
8682 \begin_layout Subsubsection
8683 LaTeX error processing a table 
8684 \end_layout
8685
8686 \begin_layout Standard
8687 LyX, by default, attempts to center the table caption/title.
8688  This seems to produce a bad interaction in AASTeX so you should click somewhere
8689  in the caption/title, then select 
8690 \family sans
8691 Edit\SpecialChar \menuseparator
8692 Paragraph
8693 \begin_inset space ~
8694 \end_inset
8695
8696 Settings
8697 \family default
8698 , then set the 
8699 \family sans
8700 Alignment
8701 \family default
8702  to 
8703 \family sans
8704 Block
8705 \family default
8706 .
8707  This took care of it for me.
8708 \end_layout
8709
8710 \begin_layout Subsubsection
8711 References
8712 \end_layout
8713
8714 \begin_layout Standard
8715 A couple of things: 1) I have noticed some funny spacing in the reference
8716  entries in the text.
8717  When you enter the bibliography item data, make sure their is 
8718 \emph on
8719 no
8720 \emph default
8721  space between the last author and the parenthesis setting off the year;
8722  
8723 \emph on
8724 e.
8725 \begin_inset space \thinspace{}
8726 \end_inset
8727
8728 g.
8729 \begin_inset space \space{}
8730 \end_inset
8731
8732
8733 \emph default
8734 type 
8735 \family typewriter
8736 Ressler(1992)
8737 \family default
8738 , not 
8739 \family typewriter
8740 Ressler (1992)
8741 \family default
8742 .
8743  2) Entering the references at all is not obvious.
8744  The easiest thing is to start typing your first reference at the end of
8745  the document, then mark it as type 
8746 \family sans
8747 References
8748 \family default
8749 .
8750  That will put a small gray box in front of what you just typed.
8751  Click on the box to fill in the rest of the information.
8752  For new references, go to the end of an existing reference and press return.
8753  That will create a new line with its own box, etc.
8754 \end_layout
8755
8756 \begin_layout Subsubsection
8757 Including EPS files
8758 \end_layout
8759
8760 \begin_layout Standard
8761 Even though AASTeX provides its own figure commands (
8762 \family typewriter
8763
8764 \backslash
8765 plotone
8766 \family default
8767 , for example), I much prefer LaTeX's standard figure commands (with the
8768  default graphicx).
8769  You can insert the 
8770 \family typewriter
8771
8772 \backslash
8773 plotone
8774 \family default
8775 , etc.
8776 \begin_inset space ~
8777 \end_inset
8778
8779 commands as TeX code into a Figure Float box if you desire, but I never
8780  have much luck getting the layout right.
8781  With the standard graphics, LyX will insert a 
8782 \family typewriter
8783
8784 \backslash
8785 usepackage{graphicx}
8786 \family default
8787  command into the LaTeX preamble and handle the figures in the standard
8788  LaTeX2e way, interspersing the figures in the text.
8789  I believe ApJ accepts figures exactly this way now; AJ might still use
8790  the 
8791 \begin_inset Quotes eld
8792 \end_inset
8793
8794 stack everything at the end
8795 \begin_inset Quotes erd
8796 \end_inset
8797
8798  technique.
8799 \end_layout
8800
8801 \begin_layout Subsubsection
8802 Things I could have done, but didn't
8803 \end_layout
8804
8805 \begin_layout Standard
8806 There are a few 
8807 \begin_inset Quotes eld
8808 \end_inset
8809
8810 pretty
8811 \begin_inset Quotes erd
8812 \end_inset
8813
8814  things I could have implemented, but chose not to.
8815  For instance, I saw no point in double-spacing the text in the LyX window,
8816  even though it is double-spaced in the paper manuscript.
8817  Also, I chose not to make separate layouts for the preprint and preprint2
8818  styles.
8819  Since I assume you will spend most of your time in the plain manuscript
8820  mode anyway, I decided not to chew up more disk space with this.
8821  
8822 \end_layout
8823
8824 \begin_layout Subsection
8825 Final Caveat
8826 \end_layout
8827
8828 \begin_layout Standard
8829 Your mileage may vary.
8830  I've now had papers published by both ApJ and AJ that have had 98% of the
8831  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8832  cleanups.
8833  I have had no trouble with the submission process, and I'm sure the journals
8834  were never aware that there might be a difference.
8835  So, go forth and publish!
8836 \end_layout
8837
8838 \begin_layout Section
8839 AMS LaTeX
8840 \end_layout
8841
8842 \begin_layout Standard
8843 by 
8844 \noun on
8845 David Johnson
8846 \noun default
8847 ; updated by 
8848 \noun on
8849 Richard Heck
8850 \end_layout
8851
8852 \begin_layout Standard
8853 \begin_inset VSpace bigskip
8854 \end_inset
8855
8856
8857 \end_layout
8858
8859 \begin_layout Standard
8860 \noindent
8861 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8862  papers to be submitted to American Mathematical Society publications.
8863  The layouts are not tailored to a specific journal, but easily can be.
8864  You should refer to the AMS documentation for specific instructions for
8865  each journal (usually it will entail only changing a single line in the
8866  TeX output).
8867  That documentation is available on the Web at 
8868 \begin_inset Flex URL
8869 status open
8870
8871 \begin_layout Plain Layout
8872
8873 http://www.ams.org
8874 \end_layout
8875
8876 \end_inset
8877
8878  or by ftp at 
8879 \begin_inset Flex URL
8880 status open
8881
8882 \begin_layout Plain Layout
8883
8884 ftp://ftp.ams.org/pub/tex/amslatex/
8885 \end_layout
8886
8887 \end_inset
8888
8889 .
8890  These layouts are appropriate, and useful, for any mathematical writing.
8891  
8892 \end_layout
8893
8894 \begin_layout Standard
8895 There are two basic AMS LaTeX layouts: 
8896 \end_layout
8897
8898 \begin_layout Itemize
8899 amsart: The standard AMS article format.
8900 \end_layout
8901
8902 \begin_layout Itemize
8903 amsbook: the standard AMS book (really, monograph) format.
8904  
8905 \end_layout
8906
8907 \begin_layout Standard
8908 The layouts themselves contain only the minimum necessary to use the AMS
8909  classes.
8910  They do not, in particular, contain any of the `theorem' environments used
8911  for setting theorems, lemmas, and the like.
8912  These are contained, instead, in the 
8913 \begin_inset Flex Code
8914 status collapsed
8915
8916 \begin_layout Plain Layout
8917 Theorems (AMS)
8918 \end_layout
8919
8920 \end_inset
8921
8922  module, which is loaded by default when when you select one of the AMS
8923  classes.
8924  (It can also be used with other classes and can be removed, if you would
8925  rather use something else.) Less commonly used environments are in the 
8926 \begin_inset Flex Code
8927 status collapsed
8928
8929 \begin_layout Plain Layout
8930 Theorems (AMS-Extended)
8931 \end_layout
8932
8933 \end_inset
8934
8935  module, which must be loaded manually.
8936 \end_layout
8937
8938 \begin_layout Standard
8939 By default, theorems and the like are numbered consecutively throughout
8940  the document, but this may be modified by loading the module 
8941 \begin_inset Flex Code
8942 status collapsed
8943
8944 \begin_layout Plain Layout
8945 Theorems (Order by Section)
8946 \end_layout
8947
8948 \end_inset
8949
8950  or, if you are using 
8951 \begin_inset Flex Code
8952 status collapsed
8953
8954 \begin_layout Plain Layout
8955 book (AMS)
8956 \end_layout
8957
8958 \end_inset
8959
8960 , the module 
8961 \begin_inset Flex Code
8962 status collapsed
8963
8964 \begin_layout Plain Layout
8965 Theorems (Order by Chapter)
8966 \end_layout
8967
8968 \end_inset
8969
8970 .
8971  These will number the results as 
8972 \begin_inset Formula $n.m$
8973 \end_inset
8974
8975 , where the first number refers to the section (or chapter) and the second
8976  refers to the total number of results so far in that section (or chapter).
8977  Many environments are also available unnumbered.
8978  These are indicated by an asterisk at the end.
8979  If you happen to want 
8980 \emph on
8981 only
8982 \emph default
8983  unnumbered results, the module 
8984 \begin_inset Flex Code
8985 status collapsed
8986
8987 \begin_layout Plain Layout
8988 Theorems (Starred)
8989 \end_layout
8990
8991 \end_inset
8992
8993  provides that option.
8994 \end_layout
8995
8996 \begin_layout Standard
8997 Note that these modules do not 
8998 \emph on
8999 have
9000 \emph default
9001  to be used with the AMS classes.
9002  It is perfectly possible to use the 
9003 \begin_inset Flex Code
9004 status collapsed
9005
9006 \begin_layout Plain Layout
9007 Theorems (AMS)
9008 \end_layout
9009
9010 \end_inset
9011
9012  module, and the others mentioned, with other classes, such as 
9013 \begin_inset Flex Code
9014 status collapsed
9015
9016 \begin_layout Plain Layout
9017 article
9018 \end_layout
9019
9020 \end_inset
9021
9022
9023 \begin_inset Flex Code
9024 status collapsed
9025
9026 \begin_layout Plain Layout
9027 report
9028 \end_layout
9029
9030 \end_inset
9031
9032
9033 \begin_inset Flex Code
9034 status collapsed
9035
9036 \begin_layout Plain Layout
9037 book (KOMA-script)
9038 \end_layout
9039
9040 \end_inset
9041
9042 , and so forth.
9043 \end_layout
9044
9045 \begin_layout Subsection
9046 What these layouts provide
9047 \end_layout
9048
9049 \begin_layout Standard
9050 There is a long list of included environments provided by these layouts.
9051  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9052  variety of `theorem' environments.
9053  However, the AMS recommends the environments that are available in LyX.
9054  
9055 \end_layout
9056
9057 \begin_layout Standard
9058 The following environments—as well as the standard environments, such as
9059  
9060 \begin_inset Flex Noun
9061 status collapsed
9062
9063 \begin_layout Plain Layout
9064 section
9065 \end_layout
9066
9067 \end_inset
9068
9069
9070 \begin_inset Flex Noun
9071 status collapsed
9072
9073 \begin_layout Plain Layout
9074 bibliography
9075 \end_layout
9076
9077 \end_inset
9078
9079
9080 \begin_inset Flex Noun
9081 status collapsed
9082
9083 \begin_layout Plain Layout
9084 title
9085 \end_layout
9086
9087 \end_inset
9088
9089
9090 \begin_inset Flex Noun
9091 status collapsed
9092
9093 \begin_layout Plain Layout
9094 author
9095 \end_layout
9096
9097 \end_inset
9098
9099 , and 
9100 \begin_inset Flex Noun
9101 status collapsed
9102
9103 \begin_layout Plain Layout
9104 date
9105 \end_layout
9106
9107 \end_inset
9108
9109 —are provided by 
9110 \begin_inset Flex Code
9111 status collapsed
9112
9113 \begin_layout Plain Layout
9114 article (AMS)
9115 \end_layout
9116
9117 \end_inset
9118
9119  and 
9120 \begin_inset Flex Code
9121 status collapsed
9122
9123 \begin_layout Plain Layout
9124 book (AMS)
9125 \end_layout
9126
9127 \end_inset
9128
9129 :
9130 \end_layout
9131
9132 \begin_layout Description
9133 Address This should be the author's permanent address.
9134 \end_layout
9135
9136 \begin_layout Description
9137 Current
9138 \begin_inset space ~
9139 \end_inset
9140
9141 Address This should be the author's temporary address at the time of submission,
9142  if different from the Address.
9143 \end_layout
9144
9145 \begin_layout Description
9146 Email Author's e-mail address
9147 \end_layout
9148
9149 \begin_layout Description
9150 URL Author's Web address, if desired.
9151 \end_layout
9152
9153 \begin_layout Description
9154 Keywords Key words or phrases used to identify specific topics discussed
9155  in the paper.
9156 \end_layout
9157
9158 \begin_layout Description
9159 Subjectclass These refer to the AMS Subject Classifications, published and
9160  described in 
9161 \emph on
9162 Mathematical Reviews
9163 \emph default
9164 .
9165  These are also available online at the AMS cites listed above.
9166 \end_layout
9167
9168 \begin_layout Description
9169 Thanks
9170 \end_layout
9171
9172 \begin_layout Description
9173 Dedicatory
9174 \end_layout
9175
9176 \begin_layout Description
9177 Translator
9178 \end_layout
9179
9180 \begin_layout Standard
9181 The following environments are provided by both the 
9182 \begin_inset Flex Code
9183 status collapsed
9184
9185 \begin_layout Plain Layout
9186 Theorems
9187 \end_layout
9188
9189 \end_inset
9190
9191  and 
9192 \begin_inset Flex Code
9193 status collapsed
9194
9195 \begin_layout Plain Layout
9196 Theorems (AMS)
9197 \end_layout
9198
9199 \end_inset
9200
9201  modules, in the latter case in both starred (unnumbered) and unstarred
9202  (numbered) versions.
9203  These same environments are provided only in the starred versions by the
9204  
9205 \begin_inset Flex Code
9206 status collapsed
9207
9208 \begin_layout Plain Layout
9209 Theorems (Starred)
9210 \end_layout
9211
9212 \end_inset
9213
9214  module:
9215 \end_layout
9216
9217 \begin_layout Theorem
9218 This is typically used for the statements of major results.
9219  
9220 \end_layout
9221
9222 \begin_layout Corollary*
9223 This is used for statements which follow fairly directly from previous statement
9224 s.
9225  Again, these can be major results.
9226  
9227 \end_layout
9228
9229 \begin_layout Lemma
9230 These are smaller results needed to prove other statements.
9231 \end_layout
9232
9233 \begin_layout Proposition
9234 These are less major results which (hopefully) add to the general theory
9235  being discussed.
9236 \end_layout
9237
9238 \begin_layout Conjecture
9239 These are statements provided without justification, which the author does
9240  not know how to prove, but which seem to be true (to the author, at least).
9241 \end_layout
9242
9243 \begin_layout Definition*
9244 Guess what this is for.
9245  The font is different for this environment than for the previous ones.
9246  
9247 \end_layout
9248
9249 \begin_layout Example*
9250 Used for examples illustrating proven results.
9251 \end_layout
9252
9253 \begin_layout Problem
9254 It's not really known what this is for.
9255  You should figure it out.
9256 \end_layout
9257
9258 \begin_layout Exercise*
9259 Write a description for this one.
9260 \end_layout
9261
9262 \begin_layout Remark
9263 This environment is also a type of theorem, usually a lesser sort of observation.
9264 \end_layout
9265
9266 \begin_layout Claim*
9267 Often used in the course of giving a proof of a larger result.
9268 \end_layout
9269
9270 \begin_layout Case
9271 Generally, these are used to break up long arguments, using specific instances
9272  of some condition.
9273  
9274 \end_layout
9275
9276 \begin_layout Case
9277 The numbering scheme for cases is on its own, not together with other numbered
9278  statements.
9279  
9280 \end_layout
9281
9282 \begin_layout Proof
9283 At the end of this environment, a QED symbol (usually a square, but it can
9284  vary with different styles) is placed.
9285  If you want to have other environments within this one—for example, Case
9286  environments—and have the QED symbol appear only after them, then the other
9287  environments need to be nested within the proof environment.
9288  See the section 
9289 \emph on
9290 Nesting Environments
9291 \emph default
9292  of the 
9293 \emph on
9294 User's Guide
9295 \emph default
9296  for information on nesting.
9297 \end_layout
9298
9299 \begin_layout Standard
9300 And these environments are provided by 
9301 \begin_inset Flex Code
9302 status collapsed
9303
9304 \begin_layout Plain Layout
9305 Theorems (AMS-Extended)
9306 \end_layout
9307
9308 \end_inset
9309
9310 :
9311 \end_layout
9312
9313 \begin_layout Criterion*
9314 A required condition.
9315 \end_layout
9316
9317 \begin_layout Algorithm*
9318 A general procedure to be used.
9319 \end_layout
9320
9321 \begin_layout Axiom*
9322 This is a property or statement taken as true within the system being discussed.
9323 \end_layout
9324
9325 \begin_layout Condition*
9326 Sometimes used to state a condition assumed within the present context of
9327  discussion.
9328 \end_layout
9329
9330 \begin_layout Note*
9331 Similar to a Remark.
9332 \end_layout
9333
9334 \begin_layout Notation*
9335 Used for the explanation of, yes, notation.
9336 \end_layout
9337
9338 \begin_layout Summary
9339 Do we really need to tell you? 
9340 \end_layout
9341
9342 \begin_layout Acknowledgement*
9343 Acknowledgement.
9344 \end_layout
9345
9346 \begin_layout Conclusion*
9347 Sometimes used at the end of a long train of argument.
9348 \end_layout
9349
9350 \begin_layout Fact
9351 Used in a way similar to Proposition, though perhaps lower on the scale.
9352 \end_layout
9353
9354 \begin_layout Standard
9355 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9356  fonts packages.
9357  They need to be available on your system in order to use these environments.
9358 \end_layout
9359
9360 \begin_layout Section
9361 AGU journals (
9362 \family sans
9363 aguplus
9364 \family default
9365 )
9366 \end_layout
9367
9368 \begin_layout Standard
9369 by 
9370 \shape smallcaps
9371 Martin Vermeer
9372 \end_layout
9373
9374 \begin_layout Subsection
9375 Description
9376 \end_layout
9377
9378 \begin_layout Standard
9379 These are the layout files for some of the journals of the American Geophysical
9380  Society.
9381  It is assumed that you have both the AGU's own class files and AGUplus
9382  installed (everything to be found at
9383 \begin_inset Flex URL
9384 status collapsed
9385
9386 \begin_layout Plain Layout
9387
9388 ftp://ftp.agu.org/journals/latex/journals
9389 \end_layout
9390
9391 \end_inset
9392
9393 ).
9394 \end_layout
9395
9396 \begin_layout Subsection
9397 New styles
9398 \end_layout
9399
9400 \begin_layout Standard
9401 Redefined are 
9402 \family sans
9403 Paragraph
9404 \family default
9405
9406 \family sans
9407 Paragraph*
9408 \family default
9409 .
9410  They are still called this in the LyX GUI, though their LaTeX equivalents
9411  in the AGU classes are 
9412 \family sans
9413 Subsubsubsection
9414 \family default
9415  and 
9416 \family sans
9417 Subsubsubsection*
9418 \family default
9419 .
9420 \end_layout
9421
9422 \begin_layout Standard
9423 Newly defined styles are 
9424 \family sans
9425 Left_Header
9426 \family default
9427
9428 \family sans
9429 Right_Header
9430 \family default
9431
9432 \family sans
9433 Received
9434 \family default
9435
9436 \family sans
9437 Revised
9438 \family default
9439
9440 \family sans
9441 Accepted
9442 \family default
9443
9444 \family sans
9445 CCC
9446 \family default
9447
9448 \family sans
9449 PaperId
9450 \family default
9451
9452 \family sans
9453 AuthorAddr
9454 \family default
9455
9456 \family sans
9457 SlugComment
9458 \family default
9459 .
9460  These are mostly manuscript attributes and defined in the AGU class documentati
9461 on.
9462 \end_layout
9463
9464 \begin_layout Standard
9465 I suspect this is still badly incomplete.
9466 \end_layout
9467
9468 \begin_layout Subsection
9469 New floats
9470 \end_layout
9471
9472 \begin_layout Standard
9473
9474 \family sans
9475 Planotable
9476 \family default
9477  and 
9478 \family sans
9479 Plate
9480 \family default
9481 .
9482  We also have a new 
9483 \family sans
9484 Table_Caption
9485 \family default
9486 .
9487 \end_layout
9488
9489 \begin_layout Subsection
9490 Supported journals
9491 \end_layout
9492
9493 \begin_layout Itemize
9494
9495 \emph on
9496 Journal of Geophysical Research
9497 \emph default
9498
9499 \family typewriter
9500 jgrga.layout
9501 \family default
9502  — Martin Vermeer
9503 \end_layout
9504
9505 \begin_layout Standard
9506 Add your own, it isn't so hard! Look at the 
9507 \family typewriter
9508 jgrga.layout
9509 \family default
9510  example and 
9511 \family typewriter
9512 aguplus.inc
9513 \family default
9514 .
9515 \end_layout
9516
9517 \begin_layout Subsection
9518 Bugs and things to remember
9519 \end_layout
9520
9521 \begin_layout Standard
9522 In order to use the new layouts, you must remember to do the following for
9523  a new document:
9524 \end_layout
9525
9526 \begin_layout Enumerate
9527
9528 \emph on
9529 Turn off babel
9530 \emph default
9531 .
9532  This can be done in the 
9533 \family sans
9534 Layout\SpecialChar \menuseparator
9535 Document
9536 \family default
9537  or 
9538 \family sans
9539 Document\SpecialChar \menuseparator
9540 Settings
9541 \family default
9542  menu item.
9543  (AGU articles are always in English, right? So 
9544 \emph on
9545 don't
9546 \emph default
9547  choose a language.)
9548 \end_layout
9549
9550 \begin_layout Enumerate
9551 Enter 
9552 \family typewriter
9553 jgrga
9554 \family default
9555  into the document's 
9556 \family sans
9557 Extra Options
9558 \family default
9559  field.
9560  (Yes, this is a bug.)
9561 \end_layout
9562
9563 \begin_layout Enumerate
9564 Make sure you use the 
9565 \family typewriter
9566 agu.bst
9567 \family default
9568  bibliography style, by entering 
9569 \family sans
9570 agu
9571 \family default
9572  into the second field of the BibTeX inset.
9573  None of the standard styles will do.
9574 \end_layout
9575
9576 \begin_layout Section
9577 Broadway
9578 \end_layout
9579
9580 \begin_layout Standard
9581 by 
9582 \shape smallcaps
9583 Garst Reese
9584 \end_layout
9585
9586 \begin_layout Subsection
9587 Introduction
9588 \end_layout
9589
9590 \begin_layout Standard
9591 Broadway is for writing plays.
9592  The format is more decorative than Hollywood, and much less standardized.
9593  This format should be suitable for workshops.
9594 \end_layout
9595
9596 \begin_layout Subsection
9597 Special problems
9598 \end_layout
9599
9600 \begin_layout Standard
9601 The same as in Hollywood.
9602 \end_layout
9603
9604 \begin_layout Subsection
9605 Special features
9606 \end_layout
9607
9608 \begin_layout Standard
9609 Insert the 
9610 \family sans
9611 Speaker
9612 \family default
9613  names as labels then cross-reference the label to insert the name.
9614  The cross-reference dialog will show the current cast of characters.
9615 \end_layout
9616
9617 \begin_layout Subsection
9618 Paper size and Margins
9619 \end_layout
9620
9621 \begin_layout Standard
9622 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9623 \end_layout
9624
9625 \begin_layout Subsection
9626 Environments
9627 \end_layout
9628
9629 \begin_layout Standard
9630 The following environments are available.
9631  You can use broadway.bind to get the bind keys shown at the right.
9632 \end_layout
9633
9634 \begin_layout Itemize
9635
9636 \family sans
9637 Standard
9638 \begin_inset Newline newline
9639 \end_inset
9640
9641
9642 \family default
9643 You should not have to use this, but it is here for anything that does not
9644  fit otherwise.
9645 \end_layout
9646
9647 \begin_layout Itemize
9648
9649 \family sans
9650 Narrative
9651 \begin_inset space \hfill{}
9652 \end_inset
9653
9654 M-z n
9655 \begin_inset Newline newline
9656 \end_inset
9657
9658
9659 \family default
9660 Used to describe stage setting and the action.
9661  First use of speaker names in all CAPs.
9662 \end_layout
9663
9664 \begin_layout Itemize
9665
9666 \family sans
9667 ACT
9668 \begin_inset space \hfill{}
9669 \end_inset
9670
9671 M-z a
9672 \begin_inset Newline newline
9673 \end_inset
9674
9675
9676 \family default
9677 Automatically numbered.
9678  On screen it will be arabic, but will print as Roman.
9679 \end_layout
9680
9681 \begin_layout Itemize
9682
9683 \family sans
9684 ACT*
9685 \begin_inset space \hfill{}
9686 \end_inset
9687
9688 M-z S at
9689 \begin_inset Newline newline
9690 \end_inset
9691
9692
9693 \family default
9694 Subtitle for 
9695 \family sans
9696 ACT.
9697
9698 \family default
9699  It is just centered text.
9700 \end_layout
9701
9702 \begin_layout Itemize
9703
9704 \family sans
9705 SCENE
9706 \begin_inset space \hfill{}
9707 \end_inset
9708
9709 M-z S-S
9710 \begin_inset Newline newline
9711 \end_inset
9712
9713
9714 \family default
9715 Not automatically numbered.
9716  You supply the number.
9717  This is because I couldn't figure out how.
9718 \end_layout
9719
9720 \begin_layout Itemize
9721
9722 \family sans
9723 AT_RISE:
9724 \begin_inset space \hfill{}
9725 \end_inset
9726
9727 M-z S-R
9728 \begin_inset Newline newline
9729 \end_inset
9730
9731
9732 \family default
9733 A special case of Narrative to describe the setting and action as the curtain
9734  rises.
9735 \end_layout
9736
9737 \begin_layout Itemize
9738
9739 \family sans
9740 Speaker
9741 \begin_inset space \hfill{}
9742 \end_inset
9743
9744 M-z s
9745 \begin_inset Newline newline
9746 \end_inset
9747
9748
9749 \family default
9750 The speaker's (actor's) title, centered in all CAPS.
9751 \end_layout
9752
9753 \begin_layout Itemize
9754
9755 \family sans
9756 Parenthetical
9757 \begin_inset space \hfill{}
9758 \end_inset
9759
9760 M-z p
9761 \begin_inset Newline newline
9762 \end_inset
9763
9764
9765 \family default
9766 Instructions to the speaker.
9767  The parentheses are automatically inserted.
9768  The ( will appear on screen, but both will be in the printed play.
9769  This environment is only used within 
9770 \family sans
9771 Dialogue
9772 \family default
9773 .
9774 \end_layout
9775
9776 \begin_layout Itemize
9777
9778 \family sans
9779 Dialogue
9780 \begin_inset space \hfill{}
9781 \end_inset
9782
9783 M-z d
9784 \begin_inset Newline newline
9785 \end_inset
9786
9787
9788 \family default
9789 What the Speaker says.
9790 \end_layout
9791
9792 \begin_layout Itemize
9793
9794 \family sans
9795 CURTAIN
9796 \begin_inset space \hfill{}
9797 \end_inset
9798
9799 M-z S-C
9800 \begin_inset Newline newline
9801 \end_inset
9802
9803
9804 \family default
9805 The curtain comes down.
9806 \end_layout
9807
9808 \begin_layout Itemize
9809
9810 \family sans
9811 Title
9812 \begin_inset space \hfill{}
9813 \end_inset
9814
9815 M-z S-T
9816 \end_layout
9817
9818 \begin_layout Itemize
9819
9820 \family sans
9821 Author
9822 \begin_inset space \hfill{}
9823 \end_inset
9824
9825 M-z S-A
9826 \end_layout
9827
9828 \begin_layout Itemize
9829
9830 \family sans
9831 Right_Address
9832 \begin_inset space \hfill{}
9833 \end_inset
9834
9835 M-z r
9836 \end_layout
9837
9838 \begin_layout Standard
9839 Hello there.
9840 \end_layout
9841
9842 \begin_layout Section
9843 Dinbrief
9844 \end_layout
9845
9846 \begin_layout Standard
9847 The document class 
9848 \family sans
9849 dinbrief
9850 \family default
9851  can be used to type letters according to German conventions.
9852  A template file is included in 
9853 \family typewriter
9854 .../lyx/share/templates
9855 \family default
9856  for you to use as a starting point.
9857 \end_layout
9858
9859 \begin_layout Section
9860 EGS journals (
9861 \family sans
9862 egs
9863 \family default
9864 )
9865 \end_layout
9866
9867 \begin_layout Standard
9868 by 
9869 \shape smallcaps
9870 Martin Vermeer
9871 \end_layout
9872
9873 \begin_layout Subsection
9874 Description
9875 \end_layout
9876
9877 \begin_layout Standard
9878 This is the layout file for the European Geophysical Society journals.
9879  The needed 
9880 \family typewriter
9881 egs.cls
9882 \family default
9883  can be downloaded from the web site of the EGS under 
9884 \begin_inset Flex URL
9885 status collapsed
9886
9887 \begin_layout Plain Layout
9888
9889 www.copernicus.org
9890 \end_layout
9891
9892 \end_inset
9893
9894 .
9895 \end_layout
9896
9897 \begin_layout Subsection
9898 New styles
9899 \end_layout
9900
9901 \begin_layout Standard
9902
9903 \family sans
9904 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9905  Accepted
9906 \family default
9907
9908 \family sans
9909 Offsets
9910 \family default
9911 .
9912  The current layout file is unfortunately very unmodular and would benefit
9913  from using the various 
9914 \family typewriter
9915 std*.inc
9916 \family default
9917  file inclusions.
9918 \end_layout
9919
9920 \begin_layout Section
9921 Elsevier Journals
9922 \end_layout
9923
9924 \begin_layout Standard
9925 See the LyX template file 
9926 \family typewriter
9927 elsarticle.lyx
9928 \family default
9929 .
9930  It contains all infos you need.
9931 \end_layout
9932
9933 \begin_layout Section
9934 Foils [aka 
9935 \family sans
9936 FoilTeX
9937 \family default
9938 ]
9939 \begin_inset CommandInset label
9940 LatexCommand label
9941 name "sec:foiltex"
9942
9943 \end_inset
9944
9945
9946 \end_layout
9947
9948 \begin_layout Standard
9949 by 
9950 \noun on
9951 Allan Rae
9952 \end_layout
9953
9954 \begin_layout Subsection
9955 Introduction
9956 \end_layout
9957
9958 \begin_layout Standard
9959 This section describes how to use LyX to make slides for overhead projectors.
9960  There are two document classes that can do this: the default slides class
9961  and the 
9962 \family sans
9963 FoilTeX
9964 \family default
9965  slides class.
9966  This section documents the latter.
9967 \end_layout
9968
9969 \begin_layout Standard
9970 I'm going to say this again, nice and clear, so that there's no misunderstanding
9971 :
9972 \end_layout
9973
9974 \begin_layout Standard
9975 \begin_inset VSpace bigskip
9976 \end_inset
9977
9978
9979 \end_layout
9980
9981 \begin_layout Standard
9982 \align center
9983
9984 \size large
9985 This section documents the class 
9986 \begin_inset Quotes eld
9987 \end_inset
9988
9989
9990 \family sans
9991 slides (FoilTeX)
9992 \family default
9993
9994 \begin_inset Quotes erd
9995 \end_inset
9996
9997  
9998 \emph on
9999 only.
10000 \end_layout
10001
10002 \begin_layout Standard
10003 \begin_inset VSpace bigskip
10004 \end_inset
10005
10006
10007 \end_layout
10008
10009 \begin_layout Standard
10010 If you're looking for the documentation for 
10011 \begin_inset Quotes eld
10012 \end_inset
10013
10014
10015 \family sans
10016 slides (default)
10017 \family default
10018
10019 \begin_inset Quotes erd
10020 \end_inset
10021
10022 , check out section
10023 \begin_inset space ~
10024 \end_inset
10025
10026
10027 \begin_inset CommandInset ref
10028 LatexCommand ref
10029 reference "sec:slitex"
10030
10031 \end_inset
10032
10033 .
10034  If your machine doesn't have the 
10035 \family sans
10036 foils
10037 \family default
10038  class [
10039 \begin_inset Quotes eld
10040 \end_inset
10041
10042
10043 \family sans
10044 slides (FoilTeX)
10045 \family default
10046
10047 \begin_inset Quotes erd
10048 \end_inset
10049
10050 ] installed, you'll probably have to use the default 
10051 \family sans
10052 slides
10053 \family default
10054  class, which isn't quite as good as 
10055 \family sans
10056 foils.
10057 \end_layout
10058
10059 \begin_layout Standard
10060 The 
10061 \family sans
10062 foils
10063 \family default
10064  class is designed for use with version 2.1 of the 
10065 \family sans
10066 foils.cls
10067 \family default
10068  LaTeX class file which is now an integral part of LaTeX2e.
10069 \end_layout
10070
10071 \begin_layout Subsection
10072 Getting Started
10073 \end_layout
10074
10075 \begin_layout Standard
10076 Obviously, to use this document class, you need to select 
10077 \begin_inset Quotes eld
10078 \end_inset
10079
10080
10081 \family sans
10082 slides (FoilTeX)
10083 \family default
10084
10085 \begin_inset Quotes erd
10086 \end_inset
10087
10088  from the 
10089 \family sans
10090 Class
10091 \family default
10092  entry in the 
10093 \family sans
10094 Document
10095 \begin_inset space ~
10096 \end_inset
10097
10098 Layout
10099 \family default
10100  dialog.
10101  There are some settings in the 
10102 \family sans
10103 Document
10104 \begin_inset space ~
10105 \end_inset
10106
10107 Layout
10108 \family default
10109  dialog that you should know about that are specific to this class:
10110 \end_layout
10111
10112 \begin_layout Itemize
10113 Don't change the options 
10114 \family sans
10115 Sides
10116 \family default
10117  and 
10118 \family sans
10119 Columns
10120 \family default
10121  on the 
10122 \family sans
10123 Document
10124 \begin_inset space ~
10125 \end_inset
10126
10127 Layout
10128 \family default
10129  dialog.
10130  They're ignored by the 
10131 \family sans
10132 foils
10133 \family default
10134  class.
10135 \end_layout
10136
10137 \begin_layout Itemize
10138 The default font size is 20
10139 \begin_inset space \thinspace{}
10140 \end_inset
10141
10142 pt with the other options being 17
10143 \begin_inset space \thinspace{}
10144 \end_inset
10145
10146 pt, 25
10147 \begin_inset space \thinspace{}
10148 \end_inset
10149
10150 pt and 30
10151 \begin_inset space \thinspace{}
10152 \end_inset
10153
10154 pt.
10155 \end_layout
10156
10157 \begin_layout Itemize
10158 The default font is 
10159 \family sans
10160 sans
10161 \family default
10162  
10163 \family sans
10164 serif
10165 \family default
10166  but all math equations are still typeset in the usual roman font.
10167 \end_layout
10168
10169 \begin_layout Itemize
10170
10171 \family sans
10172 FoilTeX
10173 \family default
10174  supports A4 and Letter paper sizes as well as a special size for working
10175  with 35
10176 \begin_inset space \thinspace{}
10177 \end_inset
10178
10179 mm slides.
10180  It doesn't support A5, B5, legal or executive paper sizes.
10181 \end_layout
10182
10183 \begin_layout Itemize
10184 Don't bother changing the 
10185 \family sans
10186 Float Placement
10187 \family default
10188  settings because they are ignored anyway.
10189  All floats appear where they are defined in the text.
10190 \end_layout
10191
10192 \begin_layout Itemize
10193 The 
10194 \family sans
10195 Pagestyle
10196 \family default
10197  setting behaves a bit differently for this class.
10198  
10199 \family sans
10200 FoilTeX
10201 \family default
10202  provides extensive footer and header capabilities including a user-defined
10203  logo.
10204  See section
10205 \begin_inset space ~
10206 \end_inset
10207
10208
10209 \begin_inset CommandInset ref
10210 LatexCommand ref
10211 reference "sec:foilfoot"
10212
10213 \end_inset
10214
10215  for more details.
10216  The title page is treated differently to all other pages in the document
10217  and is 
10218 \emph on
10219 always
10220 \emph default
10221  unnumbered and 
10222 \emph on
10223 always
10224 \emph default
10225  has the logo centered at the bottom of the page (if one is defined).
10226  The possible page style choices and what they do are as follows:
10227 \end_layout
10228
10229 \begin_deeper
10230 \begin_layout Labeling
10231 \labelwidthstring MMMMMMM
10232
10233 \family sans
10234 \series bold
10235 empty
10236 \family default
10237 \series default
10238  The final output contains no page numbers, or other headers or footers
10239  (except footnotes of course).
10240  
10241 \end_layout
10242
10243 \begin_layout Labeling
10244 \labelwidthstring MMMMMMM
10245
10246 \family sans
10247 \series bold
10248 plain
10249 \family default
10250 \series default
10251  The final output contains page numbers centered at the bottom of the page.
10252  No other headings or footers (other than footnotes).
10253 \end_layout
10254
10255 \begin_layout Labeling
10256 \labelwidthstring MMMMMMM
10257
10258 \series bold
10259 foilheadings
10260 \series default
10261  Page numbers in lower right corner.
10262  Additional headers and footers are also shown.
10263  This is also the default.
10264 \end_layout
10265
10266 \begin_layout Labeling
10267 \labelwidthstring MMMMMMM
10268
10269 \series bold
10270 fancy
10271 \series default
10272  Gives you access to the 
10273 \family sans
10274 fancyheadings
10275 \family default
10276  package although its use with 
10277 \family sans
10278 FoilTeX
10279 \family default
10280  is discouraged by the writer of the 
10281 \family sans
10282 FoilTeX
10283 \family default
10284  package because of some potential page layout clashes.
10285 \end_layout
10286
10287 \end_deeper
10288 \begin_layout Subsubsection
10289 Extra Options
10290 \end_layout
10291
10292 \begin_layout Standard
10293 The following options may be used in the extra class options in the 
10294 \family sans
10295 Document\SpecialChar \menuseparator
10296 Settings
10297 \family default
10298  dialog.
10299 \end_layout
10300
10301 \begin_layout Labeling
10302 \labelwidthstring MMMMMMx
10303
10304 \series bold
10305 35mmSlide
10306 \series default
10307  This sets up the page layout for 7.33
10308 \begin_inset space \thinspace{}
10309 \end_inset
10310
10311 in by 11
10312 \begin_inset space \thinspace{}
10313 \end_inset
10314
10315 in paper, which is about the same aspect ratio as a 35
10316 \begin_inset space \thinspace{}
10317 \end_inset
10318
10319 mm slide, making it a bit easier to work with this medium.
10320 \end_layout
10321
10322 \begin_layout Labeling
10323 \labelwidthstring MMMMMMx
10324
10325 \series bold
10326 headrule
10327 \series default
10328  Places a rule across the page below the header on every page except the
10329  title page.
10330 \end_layout
10331
10332 \begin_layout Labeling
10333 \labelwidthstring MMMMMMx
10334
10335 \series bold
10336 footrule
10337 \series default
10338  Places a rule across the page above the footer on every page except the
10339  title page.
10340 \end_layout
10341
10342 \begin_layout Labeling
10343 \labelwidthstring MMMMMMx
10344
10345 \series bold
10346 dvips
10347 \series default
10348  This is automatically set each time you create a new 
10349 \family sans
10350 foils
10351 \family default
10352  document.
10353  This option tells 
10354 \family sans
10355 FoilTeX
10356 \family default
10357  to use the dvips driver to rotate those pages that are set as landscape
10358  foils.
10359 \end_layout
10360
10361 \begin_layout Labeling
10362 \labelwidthstring MMMMMMx
10363
10364 \series bold
10365 landscape
10366 \series default
10367  Simply changes the page dimensions to those of a landscape page but doesn't
10368  do any rotation.
10369  Thus if you use this option you need to use an external program to rotate
10370  each page or feed your paper through your printer as landscape.
10371  Note that this option effectively reverses the roles of the 
10372 \family sans
10373 Foilhead
10374 \family default
10375  and 
10376 \family sans
10377 Rotatefoilhead
10378 \family default
10379  environments (don't worry these are described in the next section).
10380 \end_layout
10381
10382 \begin_layout Labeling
10383 \labelwidthstring MMMMMMx
10384
10385 \series bold
10386 leqno
10387 \series default
10388  Equation numbers on the left.
10389 \end_layout
10390
10391 \begin_layout Labeling
10392 \labelwidthstring MMMMMMx
10393
10394 \series bold
10395 fleqn
10396 \series default
10397  Flush-left equations.
10398 \end_layout
10399
10400 \begin_layout Subsection
10401 Supported Environments
10402 \end_layout
10403
10404 \begin_layout Standard
10405 Most of the environments commonly supported in other classes are also supported
10406  by the 
10407 \family sans
10408 foils
10409 \family default
10410  class.
10411  There are several additional environments provided by 
10412 \family sans
10413 FoilTeX
10414 \family default
10415  as well as a couple added by LyX.
10416  The following environments are shared with other classes:
10417 \end_layout
10418
10419 \begin_layout Standard
10420 \begin_inset ERT
10421 status open
10422
10423 \begin_layout Plain Layout
10424
10425
10426 \backslash
10427 begin{multicols}{2}
10428 \end_layout
10429
10430 \end_inset
10431
10432
10433 \end_layout
10434
10435 \begin_layout Itemize
10436
10437 \family sans
10438 Standard
10439 \end_layout
10440
10441 \begin_layout Itemize
10442
10443 \family sans
10444 Itemize
10445 \end_layout
10446
10447 \begin_layout Itemize
10448
10449 \family sans
10450 Enumerate
10451 \end_layout
10452
10453 \begin_layout Itemize
10454
10455 \family sans
10456 Description
10457 \end_layout
10458
10459 \begin_layout Itemize
10460
10461 \family sans
10462 List
10463 \end_layout
10464
10465 \begin_layout Itemize
10466
10467 \family sans
10468 LyX-Code
10469 \end_layout
10470
10471 \begin_layout Itemize
10472
10473 \family sans
10474 Verse
10475 \end_layout
10476
10477 \begin_layout Itemize
10478
10479 \family sans
10480 Quote
10481 \end_layout
10482
10483 \begin_layout Itemize
10484
10485 \family sans
10486 Quotation
10487 \end_layout
10488
10489 \begin_layout Itemize
10490
10491 \family sans
10492 Title
10493 \end_layout
10494
10495 \begin_layout Itemize
10496
10497 \family sans
10498 Author
10499 \end_layout
10500
10501 \begin_layout Itemize
10502
10503 \family sans
10504 Date
10505 \end_layout
10506
10507 \begin_layout Itemize
10508
10509 \family sans
10510 Abstract
10511 \end_layout
10512
10513 \begin_layout Itemize
10514
10515 \family sans
10516 Bibliography
10517 \end_layout
10518
10519 \begin_layout Itemize
10520
10521 \family sans
10522 Address
10523 \end_layout
10524
10525 \begin_layout Itemize
10526
10527 \family sans
10528 RightAddress
10529 \end_layout
10530
10531 \begin_layout Itemize
10532
10533 \family sans
10534 Caption
10535 \end_layout
10536
10537 \begin_layout Itemize
10538
10539 \family sans
10540 Comment
10541 \end_layout
10542
10543 \begin_layout Standard
10544 \begin_inset ERT
10545 status open
10546
10547 \begin_layout Plain Layout
10548
10549
10550 \backslash
10551 end{multicols}
10552 \end_layout
10553
10554 \end_inset
10555
10556
10557 \end_layout
10558
10559 \begin_layout Standard
10560 That is, all the major environments apart from the sectioning environments.
10561  Since foils are essentially self-contained sections, with a title and body,
10562  
10563 \family sans
10564 FoilTeX
10565 \family default
10566  provides specific commands for starting new foils and these are:
10567 \end_layout
10568
10569 \begin_layout Itemize
10570
10571 \family sans
10572 Foilhead
10573 \end_layout
10574
10575 \begin_layout Itemize
10576
10577 \family sans
10578 Rotatefoilhead
10579 \end_layout
10580
10581 \begin_layout Standard
10582 LyX also provides slightly modified versions of these two environments called:
10583 \end_layout
10584
10585 \begin_layout Itemize
10586
10587 \family sans
10588 ShortFoilhead
10589 \end_layout
10590
10591 \begin_layout Itemize
10592
10593 \family sans
10594 ShortRotatefoilhead
10595 \end_layout
10596
10597 \begin_layout Standard
10598 and the differences will be explained in the next section.
10599 \end_layout
10600
10601 \begin_layout Standard
10602 Since foils are often used in presenting ideas or new theorems and such
10603  
10604 \family sans
10605 FoilTeX
10606 \family default
10607  also provides a comprehensive box of goodies for presenting them:
10608 \end_layout
10609
10610 \begin_layout Standard
10611 \begin_inset ERT
10612 status open
10613
10614 \begin_layout Plain Layout
10615
10616
10617 \backslash
10618 begin{multicols}{2}
10619 \end_layout
10620
10621 \end_inset
10622
10623
10624 \end_layout
10625
10626 \begin_layout Itemize
10627
10628 \family sans
10629 Theorem
10630 \end_layout
10631
10632 \begin_layout Itemize
10633
10634 \family sans
10635 Lemma
10636 \end_layout
10637
10638 \begin_layout Itemize
10639
10640 \family sans
10641 Corollary
10642 \end_layout
10643
10644 \begin_layout Itemize
10645
10646 \family sans
10647 Proposition
10648 \end_layout
10649
10650 \begin_layout Itemize
10651
10652 \family sans
10653 Definition
10654 \end_layout
10655
10656 \begin_layout Itemize
10657
10658 \family sans
10659 Proof
10660 \end_layout
10661
10662 \begin_layout Itemize
10663
10664 \family sans
10665 Theorem*
10666 \end_layout
10667
10668 \begin_layout Itemize
10669
10670 \family sans
10671 Lemma*
10672 \end_layout
10673
10674 \begin_layout Itemize
10675
10676 \family sans
10677 Corollary*
10678 \end_layout
10679
10680 \begin_layout Itemize
10681
10682 \family sans
10683 Proposition*
10684 \end_layout
10685
10686 \begin_layout Itemize
10687
10688 \family sans
10689 Definition*
10690 \end_layout
10691
10692 \begin_layout Standard
10693 \begin_inset ERT
10694 status open
10695
10696 \begin_layout Plain Layout
10697
10698
10699 \backslash
10700 end{multicols}
10701 \end_layout
10702
10703 \end_inset
10704
10705
10706 \end_layout
10707
10708 \begin_layout Standard
10709 The starred versions are unnumbered while the unstarred versions are numbered.
10710  There are also two list environments added by LyX and these are:
10711 \end_layout
10712
10713 \begin_layout Itemize
10714
10715 \family sans
10716 TickList
10717 \end_layout
10718
10719 \begin_layout Itemize
10720
10721 \family sans
10722 CrossList
10723 \end_layout
10724
10725 \begin_layout Standard
10726
10727 \family sans
10728 FoilTeX
10729 \family default
10730  provides some powerful header and footer capabilities that are best set
10731  in the preamble although they may be set at any point in a document.
10732  If you want to change these settings in your document the best place to
10733  do so is at the very top of a foil, i.
10734 \begin_inset space \thinspace{}
10735 \end_inset
10736
10737 e.
10738 \emph on
10739
10740 \begin_inset space \space{}
10741 \end_inset
10742
10743
10744 \emph default
10745 straight after the foilhead.
10746 \end_layout
10747
10748 \begin_layout Standard
10749 For this purpose, the following command styles are provided [
10750 \shape smallcaps
10751 Martin Vermeer
10752 \shape default
10753 ]:
10754 \end_layout
10755
10756 \begin_layout Standard
10757 \begin_inset ERT
10758 status open
10759
10760 \begin_layout Plain Layout
10761
10762
10763 \backslash
10764 begin{multicols}{2}
10765 \end_layout
10766
10767 \end_inset
10768
10769
10770 \end_layout
10771
10772 \begin_layout Itemize
10773
10774 \family sans
10775 My
10776 \begin_inset space ~
10777 \end_inset
10778
10779 Logo
10780 \end_layout
10781
10782 \begin_layout Itemize
10783
10784 \family sans
10785 Restriction
10786 \end_layout
10787
10788 \begin_layout Itemize
10789
10790 \family sans
10791 Right
10792 \begin_inset space ~
10793 \end_inset
10794
10795 Footer
10796 \end_layout
10797
10798 \begin_layout Itemize
10799
10800 \family sans
10801 Right
10802 \begin_inset space ~
10803 \end_inset
10804
10805 Header
10806 \end_layout
10807
10808 \begin_layout Itemize
10809
10810 \family sans
10811 Left
10812 \begin_inset space ~
10813 \end_inset
10814
10815 Header
10816 \end_layout
10817
10818 \begin_deeper
10819 \begin_layout Standard
10820 \begin_inset space ~
10821 \end_inset
10822
10823
10824 \end_layout
10825
10826 \end_deeper
10827 \begin_layout Standard
10828 \begin_inset ERT
10829 status open
10830
10831 \begin_layout Plain Layout
10832
10833
10834 \backslash
10835 end{multicols}
10836 \end_layout
10837
10838 \end_inset
10839
10840
10841 \end_layout
10842
10843 \begin_layout Standard
10844 There are also a few commands provided by 
10845 \family sans
10846 FoilTeX
10847 \family default
10848  that aren't directly supported by LyX but I'll tell you what they do and
10849  how to use them in section
10850 \begin_inset space ~
10851 \end_inset
10852
10853
10854 \begin_inset CommandInset ref
10855 LatexCommand ref
10856 reference "sec:unsuppfoils"
10857
10858 \end_inset
10859
10860 .
10861 \end_layout
10862
10863 \begin_layout Subsection
10864 Building a Set of Foils
10865 \end_layout
10866
10867 \begin_layout Standard
10868 This section will give a simple introduction to using the different environments
10869  to build a set of foils.
10870  If you want to see an example set of foils, take a look at the 
10871 \family typewriter
10872 Foils.lyx
10873 \family default
10874  file you find in LyX's 
10875 \family typewriter
10876 examples
10877 \family default
10878  folder.
10879 \end_layout
10880
10881 \begin_layout Subsubsection
10882 Give It a Title Page
10883 \end_layout
10884
10885 \begin_layout Standard
10886 Unlike other classes that provide 
10887 \family sans
10888 Title
10889 \family default
10890
10891 \family sans
10892 Author
10893 \family default
10894
10895 \family sans
10896 Date
10897 \family default
10898  and 
10899 \family sans
10900 Abstract
10901 \family default
10902  environments, 
10903 \family sans
10904 foils
10905 \family default
10906  creates the title on a page of its own.
10907  If you leave out the 
10908 \family sans
10909 Date
10910 \family default
10911  environment LaTeX will substitute the current date (every time you regenerate
10912  the output).
10913 \end_layout
10914
10915 \begin_layout Subsubsection
10916 Start a New Foil
10917 \end_layout
10918
10919 \begin_layout Standard
10920 As I mentioned earlier, there are four ways of starting a new foil.
10921  For portrait foils you should use 
10922 \family sans
10923 Foilhead
10924 \family default
10925  or 
10926 \family sans
10927 ShortFoilhead.
10928
10929 \family default
10930  The difference between these two environments is the amount of space between
10931  the title of the foil (the foilhead) and the body of the foil.
10932 \end_layout
10933
10934 \begin_layout Standard
10935 Landscape foils are generated using the 
10936 \family sans
10937 Rotatefoilhead
10938 \family default
10939  and 
10940 \family sans
10941 ShortRotatefoilhead
10942 \family default
10943  environments.
10944  Again the only difference is the spacing between foilhead and body.
10945  Both of the short versions have 0.5 inches less separation between the foilhead
10946  and the body.
10947  
10948 \end_layout
10949
10950 \begin_layout Standard
10951 One problem with the support for landscape foils is the requirement that
10952  you have to use the 
10953 \family typewriter
10954 dvips
10955 \family default
10956  driver to generate the PostScript output otherwise the foils won't be rotated.
10957  It is possible to get landscape foils even if you haven't got the 
10958 \family typewriter
10959 dvips
10960 \family default
10961  driver provided you can feed your foils sideways through your printer ;-)
10962 \end_layout
10963
10964 \begin_layout Subsubsection
10965 Theorems, Lemmas, Proofs and more
10966 \end_layout
10967
10968 \begin_layout Standard
10969 Due to a small bug in LyX you can't have two of the same type of these environme
10970 nts directly following each other.
10971  They must be separated by something.
10972  If you try, you will just be extending the previous environment as if you
10973  had merged the two environments together.
10974  So, how do you get around this problem? The simplest option is to insert
10975  some text between the two environments or add a 
10976 \family sans
10977 LaTeX
10978 \family default
10979  environment between the two with just a 
10980 \begin_inset Quotes eld
10981 \end_inset
10982
10983
10984 \family typewriter
10985 %
10986 \family default
10987
10988 \begin_inset Quotes erd
10989 \end_inset
10990
10991  in it.
10992  This will force LyX to produce two separate environments and hence the
10993  correct LaTeX output.
10994  An example is provided in the example file included with the LyX distribution.
10995  Remember, this problem only occurs if you are trying to place two of the
10996  same type of theorem-like environments one directly after the other.
10997 \end_layout
10998
10999 \begin_layout Subsubsection
11000 Lists
11001 \end_layout
11002
11003 \begin_layout Standard
11004 You get all the commonly supported list styles found in other classes as
11005  well as two new ones.
11006  I'll only describe the new ones here.
11007  If you want to find out more about the other list environments check out
11008  the 
11009 \emph on
11010 User's Guide.
11011
11012 \emph default
11013  If you intend to use itemized lists you might also want to read about the
11014  
11015 \family sans
11016 Itemize
11017 \begin_inset space ~
11018 \end_inset
11019
11020 Bullet
11021 \begin_inset space ~
11022 \end_inset
11023
11024 Selection
11025 \family default
11026  dialog described above in section
11027 \begin_inset space ~
11028 \end_inset
11029
11030
11031 \begin_inset CommandInset ref
11032 LatexCommand ref
11033 reference "sec:bullet"
11034
11035 \end_inset
11036
11037 .
11038 \end_layout
11039
11040 \begin_layout Standard
11041 The two new list styles, 
11042 \family sans
11043 TickList
11044 \family default
11045  and 
11046 \family sans
11047 CrossList
11048 \family default
11049 , are designed to make it easier for you to create lists of do's and don'ts
11050  or right and wrong by providing dedicated environments that use a tick
11051  or a cross as the label of the list.
11052  These lists are in fact dedicated variants of the 
11053 \family sans
11054 Itemize
11055 \family default
11056  environment.
11057  They do however require that you have the 
11058 \family typewriter
11059 psnfss
11060 \family default
11061  packages installed.
11062 \end_layout
11063
11064 \begin_layout Subsubsection
11065 Figures and Tables
11066 \end_layout
11067
11068 \begin_layout Standard
11069
11070 \family sans
11071 FoilTeX
11072 \family default
11073  redefines the floating tables and figures so that they appear exactly where
11074  they are in the text rather than pushing them to the top of the page or
11075  to some user specified location.
11076  In fact if you change the float placement settings they are simply ignored.
11077 \end_layout
11078
11079 \begin_layout Subsubsection
11080 Page Headers and Footers
11081 \begin_inset CommandInset label
11082 LatexCommand label
11083 name "sec:foilfoot"
11084
11085 \end_inset
11086
11087
11088 \end_layout
11089
11090 \begin_layout Standard
11091
11092 \family sans
11093 My
11094 \begin_inset space ~
11095 \end_inset
11096
11097 Logo
11098 \family default
11099  and 
11100 \family sans
11101 Restriction
11102 \family default
11103  are two commands used to control the left-footer text string.
11104  The first is meant to allow you to include a graphic logo on your foils
11105  and defaults to 
11106 \begin_inset Quotes eld
11107 \end_inset
11108
11109 -Typeset by 
11110 \family sans
11111 FoilTeX
11112 \family default
11113 -
11114 \begin_inset Quotes erd
11115 \end_inset
11116
11117 .
11118  While the second is meant to provide a classification for the audience,
11119  
11120 \emph on
11121 e.
11122 \begin_inset space \thinspace{}
11123 \end_inset
11124
11125 g.
11126 \emph default
11127
11128 \begin_inset space \space{}
11129 \end_inset
11130
11131 Confidential.
11132  It is empty by default.
11133 \end_layout
11134
11135 \begin_layout Standard
11136 The remaining page corners can be filled by 
11137 \family sans
11138 Right
11139 \begin_inset space ~
11140 \end_inset
11141
11142 Footer
11143 \family default
11144  (which defaults to page numbers), 
11145 \family sans
11146 Right
11147 \begin_inset space ~
11148 \end_inset
11149
11150 Header
11151 \family default
11152  (top right) and 
11153 \family sans
11154 Left
11155 \begin_inset space ~
11156 \end_inset
11157
11158 Header
11159 \family default
11160  (top left).
11161 \end_layout
11162
11163 \begin_layout Subsection
11164 Unsupported 
11165 \family sans
11166 FoilTeX
11167 \family default
11168  Goodies
11169 \begin_inset CommandInset label
11170 LatexCommand label
11171 name "sec:unsuppfoils"
11172
11173 \end_inset
11174
11175
11176 \end_layout
11177
11178 \begin_layout Standard
11179 All the commands mentioned below need to be set in a 
11180 \family sans
11181 LaTeX
11182 \family default
11183  environment or as 
11184 \family sans
11185 TeX
11186 \family default
11187  within another environment.
11188 \end_layout
11189
11190 \begin_layout Subsubsection
11191 Lengths
11192 \end_layout
11193
11194 \begin_layout Standard
11195 All lengths are adjusted using the 
11196 \family typewriter
11197
11198 \backslash
11199 setlength{
11200 \family default
11201 \emph on
11202 lengthname
11203 \family typewriter
11204 \emph default
11205 }{
11206 \family default
11207 \emph on
11208 newlength
11209 \family typewriter
11210 \emph default
11211 }
11212 \family default
11213  command.
11214  Where 
11215 \emph on
11216 lengthname
11217 \emph default
11218  should be replaced by the name given to the length you want to change and
11219  
11220 \emph on
11221 newlength
11222 \emph default
11223  is the length value.
11224  All lengths should be specified in units of length such as inches (
11225 \family typewriter
11226 in
11227 \family default
11228 ), millimeters (
11229 \family typewriter
11230 mm
11231 \family default
11232 ) or points (
11233 \family typewriter
11234 pt
11235 \family default
11236 ) or relative to some document or font-based length such as 
11237 \family typewriter
11238
11239 \backslash
11240 textwidth
11241 \family default
11242 .
11243  
11244 \end_layout
11245
11246 \begin_layout Standard
11247 It's possible to change the spacing between a foilhead and the body of the
11248  foil by adjusting the length specified by 
11249 \family typewriter
11250
11251 \backslash
11252 foilheadskip
11253 \family default
11254 .
11255  For example, to make 
11256 \emph on
11257 all
11258 \emph default
11259  foilheads 0.5
11260 \begin_inset space \space{}
11261 \end_inset
11262
11263 in closer to their bodies put the following in the preamble: 
11264 \family typewriter
11265
11266 \backslash
11267 setlength{
11268 \backslash
11269 foilheadskip}{-0.5in}
11270 \end_layout
11271
11272 \begin_layout Standard
11273 The spacings around floats can be adjusted by setting these lengths:
11274 \end_layout
11275
11276 \begin_layout Labeling
11277 \labelwidthstring MMMMMMMMMMM
11278
11279 \family typewriter
11280
11281 \backslash
11282 abovefloatskip
11283 \family default
11284  Separation between the text and the top of the float
11285 \end_layout
11286
11287 \begin_layout Labeling
11288 \labelwidthstring MMMMMMMMMMM
11289
11290 \family typewriter
11291
11292 \backslash
11293 abovecaptionskip
11294 \family default
11295  Separation between the float and the caption
11296 \end_layout
11297
11298 \begin_layout Labeling
11299 \labelwidthstring MMMMMMMMMMM
11300
11301 \family typewriter
11302
11303 \backslash
11304 belowcaptionskip
11305 \family default
11306  Separation between the caption and the following text
11307 \end_layout
11308
11309 \begin_layout Labeling
11310 \labelwidthstring MMMMMMMMMMM
11311
11312 \family typewriter
11313
11314 \backslash
11315 captionwidth
11316 \family default
11317  You can make the captions narrower than the surrounding text by adjusting
11318  this length.
11319  Best done relative to 
11320 \family typewriter
11321
11322 \backslash
11323 textwidth
11324 \family default
11325 .
11326 \end_layout
11327
11328 \begin_layout Standard
11329 There are also several title page related lengths that you may find useful
11330  if you have a long title or several authors:
11331 \end_layout
11332
11333 \begin_layout Labeling
11334 \labelwidthstring MMMMMMMMMMM
11335
11336 \family typewriter
11337
11338 \backslash
11339 abovetitleskip
11340 \family default
11341  Separation from headers to 
11342 \family sans
11343 Title
11344 \end_layout
11345
11346 \begin_layout Labeling
11347 \labelwidthstring MMMMMMMMMMM
11348
11349 \family typewriter
11350
11351 \backslash
11352 titleauthorskip
11353 \family default
11354  between 
11355 \family sans
11356 Title
11357 \family default
11358  and 
11359 \family sans
11360 Author
11361 \family default
11362  environments
11363 \end_layout
11364
11365 \begin_layout Labeling
11366 \labelwidthstring MMMMMMMMMMM
11367
11368 \family typewriter
11369
11370 \backslash
11371 authorauthorskip
11372 \family default
11373  between multiple 
11374 \family sans
11375 Author
11376 \family default
11377  lines
11378 \end_layout
11379
11380 \begin_layout Labeling
11381 \labelwidthstring MMMMMMMMMMM
11382
11383 \family typewriter
11384
11385 \backslash
11386 authordateskip
11387 \family default
11388  between the 
11389 \family sans
11390 Author
11391 \family default
11392  and the 
11393 \family sans
11394 Date
11395 \end_layout
11396
11397 \begin_layout Labeling
11398 \labelwidthstring MMMMMMMMMMM
11399
11400 \family typewriter
11401
11402 \backslash
11403 dateabstractskip
11404 \family default
11405  between the 
11406 \family sans
11407 Date
11408 \family default
11409  and the 
11410 \family sans
11411 Abstract
11412 \end_layout
11413
11414 \begin_layout Standard
11415 The last length related command affects all the list environments.
11416  If you place 
11417 \family typewriter
11418
11419 \backslash
11420 zerolistvertdimens
11421 \family default
11422  
11423 \emph on
11424 inside
11425 \emph default
11426  a list environment then all the vertical spacing between the list items
11427  is removed.
11428  Note that this is a command not a length so it doesn't require 
11429 \family typewriter
11430
11431 \backslash
11432 setlength
11433 \family default
11434  like the stuff mentioned above.
11435 \end_layout
11436
11437 \begin_layout Subsubsection
11438 Headers and Footers
11439 \end_layout
11440
11441 \begin_layout Standard
11442 The 
11443 \family typewriter
11444
11445 \backslash
11446 LogoOn
11447 \family default
11448  and 
11449 \family typewriter
11450
11451 \backslash
11452 LogoOff
11453 \family default
11454  commands control whether the logo in the 
11455 \family sans
11456 MyLogo
11457 \family default
11458  definition appear on a given page.
11459  If you put 
11460 \family typewriter
11461
11462 \backslash
11463 LogoOff
11464 \family default
11465  in the preamble then none of the foils will have the logo on them.
11466  If you don't want the logo on a particular page place the 
11467 \family typewriter
11468
11469 \backslash
11470 LogoOff
11471 \family default
11472  directly after the foilhead of that page and the 
11473 \family typewriter
11474
11475 \backslash
11476 LogoOn
11477 \family default
11478  directly after the next foilhead.
11479 \end_layout
11480
11481 \begin_layout Standard
11482 If you decide to use the 
11483 \family sans
11484 fancy
11485 \family default
11486  page style setting in the 
11487 \family sans
11488 Document
11489 \begin_inset space ~
11490 \end_inset
11491
11492 Layout
11493 \family default
11494  dialog you should probably add 
11495 \family typewriter
11496
11497 \backslash
11498 let
11499 \backslash
11500 headwidth
11501 \backslash
11502 textwidth
11503 \family default
11504  to your preamble so headers and footers on landscape pages are correctly
11505  placed when rotated.
11506  This is due to some clashes between the page layouts provided by the 
11507 \family sans
11508 fancyheadings
11509 \family default
11510  package and the 
11511 \family sans
11512 foils
11513 \family default
11514  class.
11515 \end_layout
11516
11517 \begin_layout Section
11518 Hollywood (Hollywood spec scripts)
11519 \end_layout
11520
11521 \begin_layout Standard
11522 by 
11523 \shape smallcaps
11524 Garst Reese
11525 \end_layout
11526
11527 \begin_layout Subsection
11528 Introduction
11529 \end_layout
11530
11531 \begin_layout Standard
11532 Getting the format of a Hollywood script right is a 
11533 \begin_inset Quotes eld
11534 \end_inset
11535
11536 rite of passage.
11537 \begin_inset Quotes erd
11538 \end_inset
11539
11540  It is designed to make the readers focus on content and to be easy and
11541  familiar for the actors to read.
11542  Each page of a script should be one minute of film.
11543  Nothing goes in a script that you cannot see or hear on screen.
11544  The courier 12 pt font should be used throughout.
11545  No italics.
11546 \end_layout
11547
11548 \begin_layout Subsection
11549 Special problems
11550 \end_layout
11551
11552 \begin_layout Standard
11553 Speakers' lines should NEVER break in mid-sentence.
11554  If a speaker's lines continue over a page break, repeat the 
11555 \family sans
11556 Speaker
11557 \family default
11558  title followed by (Cont'd).
11559 \end_layout
11560
11561 \begin_layout Subsection
11562 Special features
11563 \end_layout
11564
11565 \begin_layout Standard
11566 Insert the 
11567 \family sans
11568 Speaker
11569 \family default
11570  names as labels then cross-reference the label to insert the name.
11571  The cross-reference dialog will show the current cast of characters.
11572  You can use this to insert the speaker name in narratives also.
11573 \end_layout
11574
11575 \begin_layout Subsection
11576 Paper size and Margins
11577 \end_layout
11578
11579 \begin_layout Standard
11580 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11581 \end_layout
11582
11583 \begin_layout Subsection
11584 Environments
11585 \end_layout
11586
11587 \begin_layout Standard
11588 The following environments are available.
11589  You can use hollywood.bind to get the bind keys shown at the right.
11590 \end_layout
11591
11592 \begin_layout Itemize
11593
11594 \family sans
11595 Standard
11596 \begin_inset Newline newline
11597 \end_inset
11598
11599
11600 \family default
11601 Used where nothing else works.
11602  Try to avoid it.
11603 \end_layout
11604
11605 \begin_layout Itemize
11606
11607 \family sans
11608 FADE_IN
11609 \family default
11610 :
11611 \begin_inset space \hfill{}
11612 \end_inset
11613
11614
11615 \family sans
11616 M-z S-I
11617 \family default
11618
11619 \begin_inset Newline newline
11620 \end_inset
11621
11622 Usually followed by something like 
11623 \begin_inset Quotes eld
11624 \end_inset
11625
11626 on Sally waking up.
11627 \begin_inset Quotes erd
11628 \end_inset
11629
11630
11631 \end_layout
11632
11633 \begin_layout Itemize
11634
11635 \family sans
11636 INT:
11637 \begin_inset space \hfill{}
11638 \end_inset
11639
11640 M-z i
11641 \begin_inset Newline newline
11642 \end_inset
11643
11644
11645 \family default
11646 Introduces a new INTERIOR camera set-up.
11647  Always followed by DAY or NIGHT, or something similar to define the lighting
11648  required.
11649  Everthing on this line in CAPS.
11650 \end_layout
11651
11652 \begin_layout Itemize
11653
11654 \family sans
11655 EXT:
11656 \begin_inset space \hfill{}
11657 \end_inset
11658
11659 M-z e
11660 \begin_inset Newline newline
11661 \end_inset
11662
11663
11664 \family default
11665 Introduces a new EXTERIOR camera set-up.
11666  Everthing on this line in CAPS.
11667 \end_layout
11668
11669 \begin_layout Itemize
11670
11671 \family sans
11672 Speaker
11673 \begin_inset space \hfill{}
11674 \end_inset
11675
11676 M-z s
11677 \begin_inset Newline newline
11678 \end_inset
11679
11680
11681 \family default
11682 The character speaking.
11683 \end_layout
11684
11685 \begin_layout Itemize
11686
11687 \family sans
11688 Parenthetical
11689 \begin_inset space \hfill{}
11690 \end_inset
11691
11692 M-z p
11693 \begin_inset Newline newline
11694 \end_inset
11695
11696
11697 \family default
11698 Instructions to the speaker.
11699  The () are automatically inserted, but only the ( will show in LyX.
11700  Both will be printed.
11701 \end_layout
11702
11703 \begin_layout Itemize
11704
11705 \family sans
11706 Dialogue
11707 \begin_inset space \hfill{}
11708 \end_inset
11709
11710 M-z d
11711 \begin_inset Newline newline
11712 \end_inset
11713
11714
11715 \family default
11716 What the 
11717 \family sans
11718 Speaker
11719 \family default
11720  says.
11721 \end_layout
11722
11723 \begin_layout Itemize
11724
11725 \family sans
11726 Transition
11727 \begin_inset space \hfill{}
11728 \end_inset
11729
11730 M-z t
11731 \begin_inset Newline newline
11732 \end_inset
11733
11734
11735 \family default
11736 Camera movement instruction.
11737  e.
11738 \begin_inset space \thinspace{}
11739 \end_inset
11740
11741 g.
11742 \begin_inset space \space{}
11743 \end_inset
11744
11745 CUT TO:
11746 \end_layout
11747
11748 \begin_layout Itemize
11749
11750 \family sans
11751 FADE OUT:
11752 \begin_inset space \hfill{}
11753 \end_inset
11754
11755 M-z S-I
11756 \end_layout
11757
11758 \begin_layout Itemize
11759
11760 \family sans
11761 Author
11762 \begin_inset space \hfill{}
11763 \end_inset
11764
11765 M-z S-A
11766 \end_layout
11767
11768 \begin_layout Itemize
11769
11770 \family sans
11771 Title
11772 \begin_inset space \hfill{}
11773 \end_inset
11774
11775 M-z S-T
11776 \end_layout
11777
11778 \begin_layout Itemize
11779
11780 \family sans
11781 Right_Address
11782 \begin_inset space \hfill{}
11783 \end_inset
11784
11785 M-z r
11786 \end_layout
11787
11788 \begin_layout Subsection
11789 Script jargon
11790 \end_layout
11791
11792 \begin_layout Itemize
11793 (O.S) — off screen
11794 \end_layout
11795
11796 \begin_layout Itemize
11797 (V.0) — voice over
11798 \end_layout
11799
11800 \begin_layout Itemize
11801 b.
11802 \begin_inset space \thinspace{}
11803 \end_inset
11804
11805 g.
11806  — background
11807 \end_layout
11808
11809 \begin_layout Itemize
11810 C.U.
11811  — close-up
11812 \end_layout
11813
11814 \begin_layout Itemize
11815 PAN — camera movement
11816 \end_layout
11817
11818 \begin_layout Itemize
11819 INSERT — cut to close-up of
11820 \end_layout
11821
11822 \begin_layout Section
11823 ijmpc and ijmpd
11824 \end_layout
11825
11826 \begin_layout Standard
11827 by 
11828 \noun on
11829 Panayotis Papasotiriou
11830 \end_layout
11831
11832 \begin_layout Subsection
11833 Overview
11834 \end_layout
11835
11836 \begin_layout Standard
11837 The ijmpc package is a set of macros that facilitates electronic manuscript
11838  submission to the 
11839 \emph on
11840 International Journal of Modern Physics C
11841 \emph default
11842 .
11843  Similarly, the ijmpd package is for creating manuscripts to be submitted
11844  to the 
11845 \emph on
11846 International Journal of Modern Physics D
11847 \emph default
11848 .
11849  Both journals are published by World Scientific.
11850  The corresponding document classes are named 
11851 \family typewriter
11852 ws-ijmpc.cls
11853 \family default
11854  and 
11855 \family typewriter
11856 ws-ijmpd.cls
11857 \family default
11858 , respectively.
11859  These files, together with instructions for the authors, can be downloaded
11860  from the sites 
11861 \begin_inset Flex URL
11862 status collapsed
11863
11864 \begin_layout Plain Layout
11865
11866 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11867 \end_layout
11868
11869 \end_inset
11870
11871  and 
11872 \begin_inset Flex URL
11873 status collapsed
11874
11875 \begin_layout Plain Layout
11876
11877 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11878 \end_layout
11879
11880 \end_inset
11881
11882 .
11883  Both packages are modified versions of the standard 
11884 \begin_inset Quotes eld
11885 \end_inset
11886
11887 article
11888 \begin_inset Quotes erd
11889 \end_inset
11890
11891  package, and they are almost (but not exactly) identical.
11892  Most of their features are supported by LyX.
11893  I have used LyX successfully to write articles submitted to both journals
11894  without any problem.
11895 \end_layout
11896
11897 \begin_layout Subsection
11898 Writing a paper
11899 \end_layout
11900
11901 \begin_layout Standard
11902 As usual, the easiest way to write a paper is to start with a template.
11903  Click on 
11904 \family sans
11905 File\SpecialChar \menuseparator
11906 New from
11907 \family default
11908  
11909 \family sans
11910 \bar under
11911 T
11912 \bar default
11913 emplate
11914 \family default
11915 , then choose the 
11916 \family typewriter
11917 ijmpc.lyx
11918 \family default
11919  or 
11920 \family typewriter
11921 ijmpd.lyx
11922 \family default
11923  template.
11924  This will give an (almost) empty document that includes the most common
11925  fields found in a manuscript.
11926  Simply overwrite the existing text (including the brackets, 
11927 \family typewriter
11928 <>
11929 \family default
11930 ) with your text.
11931  You should keep in mind the following remarks.
11932 \end_layout
11933
11934 \begin_layout Enumerate
11935 LyX won't let you change the font size and the page style of the document,
11936  because such modifications are not allowed by both packages.
11937 \end_layout
11938
11939 \begin_layout Enumerate
11940 The language of the document should not be changed.
11941  Before previewing your paper, be sure that the babel package is not used.
11942  To do this, click on 
11943 \family sans
11944 Tools\SpecialChar \menuseparator
11945 Preferences
11946 \family default
11947 , select the 
11948 \family sans
11949 Lang Opts
11950 \family default
11951  tab, deselect the 
11952 \family sans
11953 Use babel
11954 \family default
11955  checkbox in the language settings, and click on 
11956 \family sans
11957 Apply
11958 \family default
11959  (or 
11960 \family sans
11961 Save
11962 \family default
11963 , if you wish to make this change permanent).
11964 \end_layout
11965
11966 \begin_layout Enumerate
11967 The 
11968 \begin_inset Quotes eld
11969 \end_inset
11970
11971 Keywords
11972 \begin_inset Quotes erd
11973 \end_inset
11974
11975  style must be used to define keywords.
11976 \end_layout
11977
11978 \begin_layout Enumerate
11979 The ijmpc package provides a style named 
11980 \begin_inset Quotes eld
11981 \end_inset
11982
11983 Classification Codes
11984 \begin_inset Quotes erd
11985 \end_inset
11986
11987 , which can be used to define classification codes, such as PACS numbers.
11988  Note that this facility is not supported by the ijmpd package.
11989 \end_layout
11990
11991 \begin_layout Enumerate
11992 Several new environments are available: 
11993 \begin_inset Quotes eld
11994 \end_inset
11995
11996 Definition
11997 \begin_inset Quotes erd
11998 \end_inset
11999
12000
12001 \begin_inset Quotes eld
12002 \end_inset
12003
12004 Step
12005 \begin_inset Quotes erd
12006 \end_inset
12007
12008
12009 \begin_inset Quotes eld
12010 \end_inset
12011
12012 Example
12013 \begin_inset Quotes erd
12014 \end_inset
12015
12016
12017 \begin_inset Quotes eld
12018 \end_inset
12019
12020 Remark
12021 \begin_inset Quotes erd
12022 \end_inset
12023
12024
12025 \begin_inset Quotes eld
12026 \end_inset
12027
12028 Notation
12029 \begin_inset Quotes erd
12030 \end_inset
12031
12032
12033 \begin_inset Quotes eld
12034 \end_inset
12035
12036 Theorem
12037 \begin_inset Quotes erd
12038 \end_inset
12039
12040
12041 \begin_inset Quotes eld
12042 \end_inset
12043
12044 Proof
12045 \begin_inset Quotes erd
12046 \end_inset
12047
12048
12049 \begin_inset Quotes eld
12050 \end_inset
12051
12052 Corollary
12053 \begin_inset Quotes erd
12054 \end_inset
12055
12056
12057 \begin_inset Quotes eld
12058 \end_inset
12059
12060 Lemma
12061 \begin_inset Quotes erd
12062 \end_inset
12063
12064
12065 \begin_inset Quotes eld
12066 \end_inset
12067
12068 Proposition
12069 \begin_inset Quotes erd
12070 \end_inset
12071
12072
12073 \begin_inset Quotes eld
12074 \end_inset
12075
12076 Prop
12077 \begin_inset Quotes erd
12078 \end_inset
12079
12080
12081 \begin_inset Quotes eld
12082 \end_inset
12083
12084 Question
12085 \begin_inset Quotes erd
12086 \end_inset
12087
12088
12089 \begin_inset Quotes eld
12090 \end_inset
12091
12092 Claim
12093 \begin_inset Quotes erd
12094 \end_inset
12095
12096 , and 
12097 \begin_inset Quotes eld
12098 \end_inset
12099
12100 Conjecture
12101 \begin_inset Quotes erd
12102 \end_inset
12103
12104 .
12105  Their use is more or less obvious.
12106  LyX supports all these environments; it will use the proper label, text
12107  style, and numbering scheme for each of them.
12108 \end_layout
12109
12110 \begin_layout Enumerate
12111 Both packages use basic citations; the natbib package should not be used.
12112  In LyX, citation references are shown as usual; in the output, citations
12113  are shown as superscripts.
12114  If you want to use a citation as normal text, you should use the 
12115 \family typewriter
12116 refcite
12117 \family default
12118  command, e.
12119 \begin_inset space \thinspace{}
12120 \end_inset
12121
12122 g.
12123 \begin_inset space \space{}
12124 \end_inset
12125
12126
12127 \begin_inset Quotes eld
12128 \end_inset
12129
12130 See Ref.
12131 \begin_inset space \space{}
12132 \end_inset
12133
12134
12135 \family typewriter
12136
12137 \backslash
12138 refcite{key}
12139 \family default
12140
12141 \begin_inset Quotes erd
12142 \end_inset
12143
12144 .
12145 \end_layout
12146
12147 \begin_layout Enumerate
12148 There is no 
12149 \begin_inset Quotes eld
12150 \end_inset
12151
12152 Acknowledgments
12153 \begin_inset Quotes erd
12154 \end_inset
12155
12156  section in both packages.
12157  To put acknowledgments, just use the 
12158 \begin_inset Quotes eld
12159 \end_inset
12160
12161 Section*
12162 \begin_inset Quotes erd
12163 \end_inset
12164
12165  environment.
12166 \end_layout
12167
12168 \begin_layout Enumerate
12169 Appendices may be added to the paper, 
12170 \emph on
12171 after
12172 \emph default
12173  the Acknowledgments and 
12174 \shape italic
12175 before
12176 \shape default
12177  the References.
12178  LyX provides a special environment, called 
12179 \begin_inset Quotes eld
12180 \end_inset
12181
12182 Appendices Section
12183 \begin_inset Quotes erd
12184 \end_inset
12185
12186  which marks the beginning of the appendices.
12187  This environment should be left blank; it just sends a LaTeX command, but
12188  nothing is really printed.
12189  In LyX, the word 
12190 \begin_inset Quotes eld
12191 \end_inset
12192
12193 Appendix
12194 \begin_inset Quotes erd
12195 \end_inset
12196
12197  is printed with blue letters, as a signal that all sections after that
12198  point are appendices.
12199  To write an appendix, use the 
12200 \begin_inset Quotes eld
12201 \end_inset
12202
12203 Appendix
12204 \begin_inset Quotes erd
12205 \end_inset
12206
12207  environment.
12208  LyX will number each appendix with capital letters, as required by both
12209  journals.
12210  Note that 
12211 \begin_inset Quotes eld
12212 \end_inset
12213
12214 Appendices Section
12215 \begin_inset Quotes erd
12216 \end_inset
12217
12218  
12219 \emph on
12220 must
12221 \emph default
12222  be present before the first appendix; if not, all appendices will be numbered
12223  as normal sections in the output.
12224 \end_layout
12225
12226 \begin_layout Enumerate
12227 The ijmpc and the ijmpd packages use the 
12228 \family typewriter
12229 tbl
12230 \family default
12231  command to implement table captions.
12232  As a result, a table created by LyX is printed correctly, but its caption
12233  is ignored.
12234  However, you can use some TeX code to overcome this problem, so that captions
12235  are printed as expected.
12236  To do so, create a float table as usual, remove the caption, and replace
12237  it with the TeX code 
12238 \family typewriter
12239
12240 \backslash
12241 tbl{
12242 \emph on
12243 your table caption
12244 \emph default
12245 }{
12246 \family default
12247  (sic); you must also the TeX code 
12248 \family typewriter
12249 }
12250 \family default
12251  immediately after the tabular material.
12252  Study the example table included in the template files to see how this
12253  trick is implemented.
12254  Alternatively, If you need table captions, you should implement the whole
12255  table float in a 
12256 \family typewriter
12257 .tex
12258 \family default
12259  file, then include this file to the LyX document (
12260 \family sans
12261 Insert\SpecialChar \menuseparator
12262 File\SpecialChar \menuseparator
12263 Child
12264 \begin_inset space ~
12265 \end_inset
12266
12267 Document
12268 \family default
12269 ).
12270  Details on how to create a table float can be found in the files 
12271 \family typewriter
12272 ws-ijmpc.tex
12273 \family default
12274  and 
12275 \family typewriter
12276 ws-ijmpd.tex
12277 \family default
12278 , included in the corresponding packages.
12279 \end_layout
12280
12281 \begin_layout Subsection
12282 Preparing a paper for submission
12283 \end_layout
12284
12285 \begin_layout Standard
12286 Before you submit your paper you must export the LyX document as a LaTeX
12287  file (
12288 \family sans
12289 File\SpecialChar \menuseparator
12290 Export\SpecialChar \menuseparator
12291 LaTeX
12292 \family default
12293 )
12294 \begin_inset Foot
12295 status open
12296
12297 \begin_layout Plain Layout
12298 Actually you have the choice between LaTeX (plain) and pdflatex.
12299  If you intend to use pdflatex to prepare the paper, you should use the
12300  pdflatex option so that included graphics are converted to PDF format,
12301  ready for use by pdflatex.
12302 \end_layout
12303
12304 \end_inset
12305
12306 , then make the following changes to the resulting 
12307 \family typewriter
12308 .tex
12309 \family default
12310  file.
12311 \end_layout
12312
12313 \begin_layout Enumerate
12314 Remove the comment lines before the 
12315 \family typewriter
12316
12317 \backslash
12318 documentclass
12319 \family default
12320  command.
12321 \end_layout
12322
12323 \begin_layout Enumerate
12324 Remove everything between (and including) the 
12325 \family typewriter
12326
12327 \backslash
12328 makeatletter
12329 \family default
12330  and 
12331 \family typewriter
12332
12333 \backslash
12334 makeatother
12335 \family default
12336  commands, except for any commands you specifically put into the LaTeX preamble.
12337 \end_layout
12338
12339 \begin_layout Standard
12340 The modified 
12341 \family typewriter
12342 .tex
12343 \family default
12344  file should be saved and processed through LaTeX as many times as necessary.
12345  You may also want to check the resulting 
12346 \family typewriter
12347 .dvi
12348 \family default
12349  document.
12350 \end_layout
12351
12352 \begin_layout Subsection
12353 Use of TeX code
12354 \end_layout
12355
12356 \begin_layout Standard
12357 The use of TeX code is reduced to two commands, which must be placed at
12358  the top of the document.
12359  If you started writing your paper by using the 
12360 \family typewriter
12361 ijmpc.lyx
12362 \family default
12363  or the 
12364 \family typewriter
12365 ijmpd.lyx
12366 \family default
12367  template, the TeX code needed is already in its place; you usually don't
12368  need to delete it.
12369  You may only modify the first TeX code to specify the information printed
12370  to the top of odd and even pages (authors' names and short paper's title,
12371  respectively).
12372  This TeX code must have the form 
12373 \family typewriter
12374
12375 \backslash
12376 markboth{Authors' Names}{Short Paper's Title}
12377 \family default
12378 .
12379 \end_layout
12380
12381 \begin_layout Section
12382 iopart
12383 \end_layout
12384
12385 \begin_layout Standard
12386 by 
12387 \noun on
12388 Uwe Stöhr
12389 \end_layout
12390
12391 \begin_layout Subsection
12392 Overview
12393 \end_layout
12394
12395 \begin_layout Standard
12396 The iopart package provides a document class to create electronic manuscript
12397  submission to the journals published by the Institute of Physics.
12398  Instructions for the authors how to create a paper using the iopart class
12399  can be downloaded together with the iopart package from the site 
12400 \begin_inset Flex URL
12401 status collapsed
12402
12403 \begin_layout Plain Layout
12404
12405 ftp://ftp.iop.org/pub/journals/latex2e
12406 \end_layout
12407
12408 \end_inset
12409
12410 .
12411 \end_layout
12412
12413 \begin_layout Subsection
12414 Writing a paper
12415 \end_layout
12416
12417 \begin_layout Standard
12418 The easiest way to write a paper is to start with the file 
12419 \emph on
12420 IOP-article.lyx
12421 \emph default
12422  that is available in LyX's examples files folder.
12423  Open this file, save it under a new name, and start writing.
12424  The example file explains how to use the special text environments.
12425  Here are the most important advices:
12426 \end_layout
12427
12428 \begin_layout Itemize
12429 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12430  two options 
12431 \family sans
12432 Use AMS math package
12433 \family default
12434  in the document settings under 
12435 \family sans
12436 Math Options
12437 \family default
12438  are not used!
12439 \end_layout
12440
12441 \begin_layout Itemize
12442
12443 \size normal
12444 The title environment defines the kind of your paper.
12445  So use one of the following environments for the title:
12446 \end_layout
12447
12448 \begin_deeper
12449 \begin_layout Itemize
12450
12451 \family sans
12452 \size normal
12453 Title
12454 \family default
12455  for a Paper
12456 \end_layout
12457
12458 \begin_layout Itemize
12459
12460 \family sans
12461 \size normal
12462 Review
12463 \family default
12464  for a Review
12465 \end_layout
12466
12467 \begin_layout Itemize
12468
12469 \family sans
12470 \size normal
12471 Topical
12472 \family default
12473  for a Topical review
12474 \end_layout
12475
12476 \begin_layout Itemize
12477
12478 \family sans
12479 \size normal
12480 Comment
12481 \family default
12482  for a Comment
12483 \end_layout
12484
12485 \begin_layout Itemize
12486
12487 \family sans
12488 \size normal
12489 Note
12490 \family default
12491  for a Note
12492 \end_layout
12493
12494 \begin_layout Itemize
12495
12496 \family sans
12497 \size normal
12498 Paper
12499 \family default
12500  for a Paper (same as Title)
12501 \end_layout
12502
12503 \begin_layout Itemize
12504
12505 \family sans
12506 \size normal
12507 Prelim
12508 \family default
12509  for a Preliminary communication
12510 \end_layout
12511
12512 \begin_layout Itemize
12513
12514 \family sans
12515 \size normal
12516 Rapid
12517 \family default
12518  for a Rapid communication
12519 \end_layout
12520
12521 \begin_layout Itemize
12522
12523 \family sans
12524 \size normal
12525 Letter
12526 \family default
12527  for a Letter to the editor
12528 \end_layout
12529
12530 \end_deeper
12531 \begin_layout Itemize
12532
12533 \size normal
12534 All title environments except of 
12535 \family sans
12536 Letter
12537 \family default
12538  can have an optional short title.
12539 \end_layout
12540
12541 \begin_layout Itemize
12542 There is a general title environment 
12543 \family sans
12544 Article
12545 \family default
12546  which is not directly supported by the LyX.
12547  This can be used as TeX code when your document doesn't fit into one of
12548  the other title types.
12549 \end_layout
12550
12551 \begin_layout Standard
12552 For more informations like hints for special table and formula formatting,
12553  look at the IOP author guidelines.
12554 \end_layout
12555
12556 \begin_layout Section
12557 Kluwer
12558 \end_layout
12559
12560 \begin_layout Standard
12561 by 
12562 \noun on
12563 Panayotis Papasotiriou
12564 \end_layout
12565
12566 \begin_layout Subsection
12567 Overview
12568 \end_layout
12569
12570 \begin_layout Standard
12571 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12572  that facilitates electronic manuscript submission to the journals they
12573  publish.
12574  Most known of them (at least in my domain of interest) are 
12575 \emph on
12576 Astrophysics and Space Science
12577 \emph default
12578  and 
12579 \emph on
12580 Solar Physics
12581 \emph default
12582 , but there are many others (see a complete list at 
12583 \begin_inset Flex URL
12584 status open
12585
12586 \begin_layout Plain Layout
12587
12588 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12589 \end_layout
12590
12591 \end_inset
12592
12593 ).
12594  The Kluwer package may be downloaded from the site 
12595 \begin_inset Flex URL
12596 status collapsed
12597
12598 \begin_layout Plain Layout
12599
12600 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12601 \end_layout
12602
12603 \end_inset
12604
12605 .
12606  A complete user guide is contained in that package (but it can also be
12607  downloaded separately).
12608 \end_layout
12609
12610 \begin_layout Standard
12611 LyX supports many features of the package but not everything.
12612  However, the TeX code needed is reduced to some 
12613 \begin_inset Quotes eld
12614 \end_inset
12615
12616 peculiar
12617 \begin_inset Quotes erd
12618 \end_inset
12619
12620  commands of the package (see
12621 \begin_inset space ~
12622 \end_inset
12623
12624
12625 \begin_inset CommandInset ref
12626 LatexCommand ref
12627 reference "subsec:kluwer_peculiarities"
12628
12629 \end_inset
12630
12631 ).
12632  I have recently used LyX to write an article submitted to the 
12633 \emph on
12634 Astrophysics and Space Science
12635 \emph default
12636  without any problem.
12637 \end_layout
12638
12639 \begin_layout Subsection
12640 Writing a paper
12641 \end_layout
12642
12643 \begin_layout Standard
12644 The easiest way to write a paper is to start with the Kluwer template file.
12645  Click on 
12646 \family sans
12647 File\SpecialChar \menuseparator
12648 New from
12649 \family default
12650  
12651 \family sans
12652 Template
12653 \family default
12654 , then choose the 
12655 \family typewriter
12656 kluwer.lyx
12657 \family default
12658  template.
12659  This will give an (almost) empty document that includes the most common
12660  fields found in a manuscript and a short description of their use.
12661  As in most templates, simply overwrite the existing text (including the
12662  brackets, 
12663 \family typewriter
12664 <>
12665 \family default
12666 ) with the correct information.
12667 \end_layout
12668
12669 \begin_layout Subsection
12670 Preparing a paper for submission
12671 \end_layout
12672
12673 \begin_layout Standard
12674 As in the AASTeX package, before you submit your paper to a journal you
12675  must 
12676 \begin_inset Quotes eld
12677 \end_inset
12678
12679 postprocess
12680 \begin_inset Quotes erd
12681 \end_inset
12682
12683  it as follows.
12684 \end_layout
12685
12686 \begin_layout Enumerate
12687 Export your paper as a LaTeX file.
12688  To do this, click on 
12689 \family sans
12690 File\SpecialChar \menuseparator
12691 Export\SpecialChar \menuseparator
12692 LaTeX
12693 \family default
12694 .
12695  
12696 \end_layout
12697
12698 \begin_layout Enumerate
12699 Edit the resulting 
12700 \family typewriter
12701 .tex
12702 \family default
12703  file with a text editor and make the following changes
12704 \end_layout
12705
12706 \begin_deeper
12707 \begin_layout Enumerate
12708 remove the comment lines before the 
12709 \family typewriter
12710
12711 \backslash
12712 documentclass
12713 \family default
12714  command,
12715 \end_layout
12716
12717 \begin_layout Enumerate
12718 remove everything between (and including) the 
12719 \family typewriter
12720
12721 \backslash
12722 makeatletter
12723 \family default
12724  and 
12725 \family typewriter
12726
12727 \backslash
12728 makeatother
12729 \family default
12730  commands, except for any commands you specifically put into the LaTeX preamble.
12731 \end_layout
12732
12733 \begin_layout Standard
12734 Save the resulting 
12735 \family typewriter
12736 .tex
12737 \family default
12738  file.
12739 \end_layout
12740
12741 \end_deeper
12742 \begin_layout Enumerate
12743 Run the 
12744 \family typewriter
12745 .tex
12746 \family default
12747  file through LaTeX as many times as necessary (usually up to three).
12748 \end_layout
12749
12750 \begin_layout Enumerate
12751 View the resulting 
12752 \family typewriter
12753 .dvi
12754 \family default
12755  document using, e.
12756 \begin_inset space \thinspace{}
12757 \end_inset
12758
12759 g.
12760 \begin_inset space \space{}
12761 \end_inset
12762
12763
12764 \family sans
12765 xdvi
12766 \family default
12767 , and check if everything is OK (it should, if you didn't make any mistake).
12768 \end_layout
12769
12770 \begin_layout Subsection
12771 \begin_inset Quotes eld
12772 \end_inset
12773
12774 Peculiarities
12775 \begin_inset Quotes erd
12776 \end_inset
12777
12778  of the Kluwer package
12779 \begin_inset CommandInset label
12780 LatexCommand label
12781 name "subsec:kluwer_peculiarities"
12782
12783 \end_inset
12784
12785
12786 \end_layout
12787
12788 \begin_layout Standard
12789 The Kluwer package has the following 
12790 \begin_inset Quotes eld
12791 \end_inset
12792
12793 peculiarities
12794 \begin_inset Quotes erd
12795 \end_inset
12796
12797 .
12798 \end_layout
12799
12800 \begin_layout Enumerate
12801 It is possible to write multiple articles in the same LaTeX file
12802 \begin_inset Foot
12803 status collapsed
12804
12805 \begin_layout Plain Layout
12806 I can't imagine any good reason to do this.
12807 \end_layout
12808
12809 \end_inset
12810
12811 .
12812  Each article must be included in the environment 
12813 \begin_inset Quotes eld
12814 \end_inset
12815
12816 article
12817 \begin_inset Quotes erd
12818 \end_inset
12819
12820 .
12821  Unfortunately, this environment cannot be omitted, even if you write just
12822  one article.
12823  Therefore, each article starts with the command 
12824 \family typewriter
12825
12826 \backslash
12827 begin{article}
12828 \family default
12829  and, obviously, ends with the command 
12830 \family typewriter
12831
12832 \backslash
12833 end{article}
12834 \family default
12835 .
12836  Although this can be implemented in LyX, I didn't included it, since it
12837  looks ugly and can confuse the novice user.
12838  Therefore, you need to enter them directly and mark them as LaTeX code
12839  (the well-known 
12840 \begin_inset Quotes eld
12841 \end_inset
12842
12843 TeX code
12844 \begin_inset Quotes erd
12845 \end_inset
12846
12847 ).
12848 \end_layout
12849
12850 \begin_layout Enumerate
12851 Information given at the beginning of the article (i.
12852 \begin_inset space \thinspace{}
12853 \end_inset
12854
12855 e.
12856 \begin_inset space \space{}
12857 \end_inset
12858
12859 title, subtitle, author, institution, running title, running author, abstract
12860  and keywords) must be included in an environment called 
12861 \begin_inset Quotes eld
12862 \end_inset
12863
12864 opening
12865 \begin_inset Quotes erd
12866 \end_inset
12867
12868 .
12869  This is not implemented in LyX, so you must enter title, subtitle etc.
12870 \begin_inset space ~
12871 \end_inset
12872
12873 between two TeX code lines (
12874 \family typewriter
12875
12876 \backslash
12877 begin{opening}
12878 \family default
12879  and 
12880 \family typewriter
12881
12882 \backslash
12883 end{opening}
12884 \family default
12885 ).
12886 \end_layout
12887
12888 \begin_layout Enumerate
12889 According to the user manual, the label of each bibliography item must be
12890  written as 
12891 \family typewriter
12892
12893 \backslash
12894 protect
12895 \backslash
12896 citeauthoryear{
12897 \family default
12898 \emph on
12899 author(s)
12900 \family typewriter
12901 \emph default
12902 }{
12903 \family default
12904 \emph on
12905 year
12906 \family typewriter
12907 \emph default
12908 }
12909 \family default
12910 .
12911 \end_layout
12912
12913 \begin_layout Standard
12914 The 
12915 \family typewriter
12916 kluwer.lyx
12917 \family default
12918  template takes care of all these 
12919 \begin_inset Quotes eld
12920 \end_inset
12921
12922 peculiarities
12923 \begin_inset Quotes erd
12924 \end_inset
12925
12926 .
12927  If you start a new paper using this template you don't need to do anything
12928  special.
12929  Just 
12930 \end_layout
12931
12932 \begin_layout Enumerate
12933 don't delete the TeX code included in the template, and
12934 \end_layout
12935
12936 \begin_layout Enumerate
12937 copy the example bibliography item included in the template and modify it
12938  as necessary to enter new bibliography items.
12939 \end_layout
12940
12941 \begin_layout Section
12942 Koma-Script
12943 \end_layout
12944
12945 \begin_layout Standard
12946 by 
12947 \noun on
12948 Bernd Rellermeyer
12949 \end_layout
12950
12951 \begin_layout Subsection
12952 Overview
12953 \end_layout
12954
12955 \begin_layout Standard
12956 The LyX document classes 
12957 \emph on
12958 article (koma-script)
12959 \emph default
12960
12961 \emph on
12962 report (koma-script)
12963 \emph default
12964
12965 \emph on
12966 book
12967 \emph default
12968  
12969 \emph on
12970 (koma-script)
12971 \emph default
12972 , and 
12973 \emph on
12974 letter
12975 \emph default
12976  
12977 \emph on
12978 (koma-script)
12979 \emph default
12980  correspond to the LaTeX document classes 
12981 \family typewriter
12982 scrartcl.cls
12983 \family default
12984
12985 \family typewriter
12986 scrreprt.cls
12987 \family default
12988
12989 \family typewriter
12990 scrbook.cls
12991 \family default
12992 , and 
12993 \family typewriter
12994 scrlettr.cls
12995 \family default
12996 , resp.
12997 \begin_inset space ~
12998 \end_inset
12999
13000 of the Koma-Script family.
13001  They are replacements for the standard document classes 
13002 \family typewriter
13003 article.cls
13004 \family default
13005
13006 \family typewriter
13007 report.cls
13008 \family default
13009
13010 \family typewriter
13011 book.cls
13012 \family default
13013  and 
13014 \family typewriter
13015 letter.cls
13016 \family default
13017 , resp., and fit better to European typography conventions in a number of
13018  points.
13019 \end_layout
13020
13021 \begin_layout Itemize
13022 Standard character size is 11pt in 
13023 \emph on
13024 article (koma-script)
13025 \emph default
13026
13027 \emph on
13028 report (koma-script)
13029 \emph default
13030 , and 
13031 \emph on
13032 book (koma-script)
13033 \emph default
13034 , and 12pt in 
13035 \emph on
13036 letter (koma-script)
13037 \emph default
13038 .
13039 \end_layout
13040
13041 \begin_layout Itemize
13042 Headings, labels of the description environment, and a number of elements
13043  of the 
13044 \emph on
13045 letter (koma-script)
13046 \emph default
13047  document class are set in a bold sans serif font.
13048 \begin_inset Foot
13049 status collapsed
13050
13051 \begin_layout Plain Layout
13052 There is a big difference between the bold sans serif old cm fonts and new
13053  ec fonts, especially in the appearance of headings.
13054  In comparison, the ec bold sans serif fonts look a bit thin.
13055  Here the LaTeX package 
13056 \family typewriter
13057 cmsd.sty by
13058 \family default
13059  
13060 \shape smallcaps
13061 Walter Schmidt
13062 \shape default
13063  helps to produce the 
13064 \begin_inset Quotes eld
13065 \end_inset
13066
13067 usual
13068 \begin_inset Quotes erd
13069 \end_inset
13070
13071  appearance when using the ec fonts.
13072 \end_layout
13073
13074 \end_inset
13075
13076  The numbering of chapter headings is made in the same way as the numbering
13077  of section headings, that is without the extra line 
13078 \begin_inset Quotes eld
13079 \end_inset
13080
13081 Chapter\SpecialChar \ldots{}
13082
13083 \begin_inset Quotes erd
13084 \end_inset
13085
13086 .
13087  In addition, the appearance of the headings can be modified by using a
13088  number of options (in LyX to be entered in the field 
13089 \family sans
13090 Extra
13091 \begin_inset space ~
13092 \end_inset
13093
13094 Options
13095 \family default
13096  of the dialog 
13097 \family sans
13098 Layout\SpecialChar \menuseparator
13099 Document
13100 \family default
13101 ).
13102  
13103 \end_layout
13104
13105 \begin_layout Itemize
13106 The main means in the Koma-Script document classes to design the type area
13107  are the options 
13108 \family sans
13109 BCOR
13110 \family default
13111  and 
13112 \family sans
13113 DIV
13114 \family default
13115  (in LyX to be entered in the extra class options field in the dialog 
13116 \family sans
13117 Document\SpecialChar \menuseparator
13118 Settings
13119 \family default
13120 ).
13121  They make a clearer modification of page margins possible as do the options
13122  of the dialog 
13123 \family sans
13124 Document\SpecialChar \menuseparator
13125 Settings
13126 \family default
13127 .
13128  
13129 \end_layout
13130
13131 \begin_layout Itemize
13132 The LaTeX document classes of the Koma-Script family define a number of
13133  additional commands.
13134  Those part of it which makes sense in LyX is implemented in corresponding
13135  paragraph types.
13136 \end_layout
13137
13138 \begin_layout Standard
13139 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13140  can be found in the Koma-Script documentation 
13141 \emph on
13142 scrguide
13143 \emph default
13144  (German) and 
13145 \emph on
13146 scrguien
13147 \emph default
13148  (English).
13149 \end_layout
13150
13151 \begin_layout Subsection
13152 article (koma-script), report (koma-script), and book (koma-script)
13153 \end_layout
13154
13155 \begin_layout Standard
13156 The document classes 
13157 \emph on
13158 article (koma-script)
13159 \emph default
13160
13161 \emph on
13162 report (koma-script)
13163 \emph default
13164 , and 
13165 \emph on
13166 book
13167 \emph default
13168  
13169 \emph on
13170 (koma-script)
13171 \emph default
13172  are implemented in the layout files 
13173 \family typewriter
13174 scrartcl.layout
13175 \family default
13176
13177 \family typewriter
13178 scrreprt.layout
13179 \family default
13180 , and 
13181 \family typewriter
13182 scrbook.layout
13183 \family default
13184 , resp.
13185  They contain all the paragraph types of the corresponding standard document
13186  classes 
13187 \emph on
13188 article
13189 \emph default
13190
13191 \emph on
13192 report
13193 \emph default
13194 , and 
13195 \emph on
13196 book
13197 \emph default
13198 , resp., partly modified, with the exception of the LyX specific 
13199 \family sans
13200 List
13201 \family default
13202 -type, which is replaced by the new 
13203 \family sans
13204 Labeling
13205 \family default
13206 -type having the same functionality.
13207  Beside the 
13208 \family sans
13209 Labeling
13210 \family default
13211 -Type there is a number of new paragraph types added.
13212  They are 
13213 \emph on
13214 not
13215 \emph default
13216  part of 
13217 \emph on
13218 letter (koma-script)
13219 \emph default
13220 .
13221 \end_layout
13222
13223 \begin_layout Itemize
13224
13225 \family sans
13226 Addpart, Addchap
13227 \family default
13228
13229 \family sans
13230 Addsec
13231 \family default
13232 : are equivalents to 
13233 \family sans
13234 Part*, Chapter*
13235 \family default
13236  and 
13237 \family sans
13238 Section*
13239 \family default
13240 , resp., additionally inserting an entry in the table of contents.
13241  
13242 \family sans
13243 Addpart
13244 \family default
13245  and 
13246 \family sans
13247 Addchap
13248 \family default
13249  are not contained in 
13250 \emph on
13251 article (koma-script)
13252 \emph default
13253 .
13254 \end_layout
13255
13256 \begin_layout Itemize
13257
13258 \family sans
13259 Addchap*
13260 \family default
13261
13262 \family sans
13263 Addsec*
13264 \family default
13265 : behave exactly as 
13266 \family sans
13267 Addchap
13268 \family default
13269  and 
13270 \family sans
13271 Addsec
13272 \family default
13273 , resp., additionally clearing running heads.
13274  
13275 \family sans
13276 Addchap*
13277 \family default
13278  is not contained in 
13279 \emph on
13280 article (koma-script)
13281 \emph default
13282 .
13283 \begin_inset Foot
13284 status collapsed
13285
13286 \begin_layout Plain Layout
13287 There is also an 
13288 \family typewriter
13289
13290 \backslash
13291 addpart*
13292 \family default
13293  command in 
13294 \emph on
13295 book (koma-script)
13296 \emph default
13297  and in 
13298 \emph on
13299 report (koma-script)
13300 \emph default
13301 , but since this is identical to 
13302 \family sans
13303 Part*
13304 \family default
13305 , is has not been implemented in LyX.
13306 \end_layout
13307
13308 \end_inset
13309
13310
13311 \end_layout
13312
13313 \begin_layout Itemize
13314
13315 \family sans
13316 Minisec
13317 \family default
13318 : generates a heading directly above the following paragraph in the standard
13319  character size without affecting the structure of the document.
13320 \end_layout
13321
13322 \begin_layout Itemize
13323
13324 \family sans
13325 Captionabove
13326 \family default
13327  and 
13328 \family sans
13329 Captionbelow
13330 \family default
13331  are special captions which respect the different space settings needed
13332  for captions placed above or below an element (if you follow strict typographic
13333  rules, you might want to place table captions always above the table).
13334  You can also use the class option 
13335 \family typewriter
13336 tablecaptionsabove
13337 \family default
13338 , which will switch 
13339 \family sans
13340 caption
13341 \family default
13342  to 
13343 \family sans
13344 captionabove
13345 \family default
13346  for tables and 
13347 \family sans
13348 captionbelow
13349 \family default
13350  for figures.
13351  You need at least Koma-Script version 2.8q to use this.
13352 \end_layout
13353
13354 \begin_layout Itemize
13355
13356 \family sans
13357 Dictum
13358 \family default
13359 : can be used to set a bonmot, e.
13360 \begin_inset space \thinspace{}
13361 \end_inset
13362
13363 g.
13364 \begin_inset space \space{}
13365 \end_inset
13366
13367 at the beginning of a chapter.
13368  If you use the optional argument (
13369 \family sans
13370 Insert\SpecialChar \menuseparator
13371 Short
13372 \begin_inset space ~
13373 \end_inset
13374
13375 Title
13376 \family default
13377 ), you can insert the dictum's author there.
13378  Dictum and author are separated by a line.
13379  You need at least Koma-Script version 2.8q to use this.
13380  
13381 \family sans
13382 Dictum
13383 \family default
13384  is not contained in 
13385 \emph on
13386 article (koma-script)
13387 \emph default
13388 .
13389 \end_layout
13390
13391 \begin_layout Standard
13392 The following types, together with the standard types 
13393 \family sans
13394 Title
13395 \family default
13396
13397 \family sans
13398 Author
13399 \family default
13400 , and 
13401 \family sans
13402 Date
13403 \family default
13404 , form the title area of the document.
13405  They must be entered ahead of the first 
13406 \begin_inset Quotes eld
13407 \end_inset
13408
13409 ordinary
13410 \begin_inset Quotes erd
13411 \end_inset
13412
13413  paragraph.
13414 \begin_inset Foot
13415 status collapsed
13416
13417 \begin_layout Plain Layout
13418 The corresponding LaTeX commands must appear before the 
13419 \family typewriter
13420
13421 \backslash
13422 maketitle
13423 \family default
13424  command.
13425 \end_layout
13426
13427 \end_inset
13428
13429  When such a type is used more than once, the latter usage overwrites the
13430  former one, that means, for every type only the latest usage is valid.
13431  The order of the different types however has, like 
13432 \family sans
13433 Title
13434 \family default
13435
13436 \family sans
13437 Author
13438 \family default
13439 , and 
13440 \family sans
13441 Date
13442 \family default
13443 , no effect on the appearance of the produced document.
13444 \end_layout
13445
13446 \begin_layout Itemize
13447
13448 \family sans
13449 Subject
13450 \family default
13451 : produces a centered paragraph above 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 subject of the document.
13464 \end_layout
13465
13466 \begin_layout Itemize
13467
13468 \family sans
13469 Publishers
13470 \family default
13471 : produces a centered paragraph below the ordinary title (
13472 \family sans
13473 Title
13474 \family default
13475
13476 \family sans
13477 Author
13478 \family default
13479
13480 \family sans
13481 Date
13482 \family default
13483 ) for the publishers' name.
13484 \end_layout
13485
13486 \begin_layout Itemize
13487
13488 \family sans
13489 Dedication
13490 \family default
13491 : in 
13492 \emph on
13493 report (koma-script)
13494 \emph default
13495  and 
13496 \emph on
13497 book (koma-script)
13498 \emph default
13499  produces a centered paragraph on its own page behind the title page, or
13500  in 
13501 \emph on
13502 article (koma-script)
13503 \emph default
13504  produces a centered paragraph below the ordinary title (
13505 \family sans
13506 Title
13507 \family default
13508
13509 \family sans
13510 Author
13511 \family default
13512
13513 \family sans
13514 Date
13515 \family default
13516
13517 \family sans
13518 Publishers
13519 \family default
13520 ) for a dedication.
13521 \end_layout
13522
13523 \begin_layout Itemize
13524
13525 \family sans
13526 Titlehead
13527 \family default
13528 : produces a left aligned paragraph above the ordinary title (
13529 \family sans
13530 Title
13531 \family default
13532
13533 \family sans
13534 Author
13535 \family default
13536
13537 \family sans
13538 Date
13539 \family default
13540
13541 \family sans
13542 Subject
13543 \family default
13544 ) for a document`s head.
13545 \end_layout
13546
13547 \begin_layout Itemize
13548
13549 \family sans
13550 Uppertitleback
13551 \family default
13552 : produces in a double-sided print in 
13553 \emph on
13554 report (koma-script)
13555 \emph default
13556  and 
13557 \emph on
13558 book (koma-script)
13559 \emph default
13560  a left-aligned paragraph at the top of the title page`s back or has no
13561  effect in a single-sided print or in 
13562 \emph on
13563 article (koma-script)
13564 \emph default
13565 .
13566 \end_layout
13567
13568 \begin_layout Itemize
13569
13570 \family sans
13571 Lowertitleback
13572 \family default
13573 : produces in a double-sided print in 
13574 \emph on
13575 report (koma-script)
13576 \emph default
13577  and 
13578 \emph on
13579 book (koma-script)
13580 \emph default
13581  a left-aligned paragraph at the bottom of the title page`s back or has
13582  no effect in a single-sided print or in 
13583 \emph on
13584 article (koma-script)
13585 \emph default
13586 .
13587 \end_layout
13588
13589 \begin_layout Itemize
13590
13591 \family sans
13592 Extratitle
13593 \family default
13594 : produces a special 
13595 \begin_inset Quotes eld
13596 \end_inset
13597
13598 dirty
13599 \begin_inset Quotes erd
13600 \end_inset
13601
13602  page ahead of the actual document containing a paragraph without special
13603  formatting.
13604 \end_layout
13605
13606 \begin_layout Standard
13607 The layout files for the document classes 
13608 \emph on
13609 article (koma-script)
13610 \emph default
13611
13612 \emph on
13613 report (koma-script)
13614 \emph default
13615 , and 
13616 \emph on
13617 book (koma-script)
13618 \emph default
13619  do include the file 
13620 \family typewriter
13621 scrmacros.inc
13622 \family default
13623 .
13624  This is thought of as a place to define your own types.
13625  Copy scrmacros
13626 \family typewriter
13627 .inc
13628 \family default
13629  in your personal layout directory and edit the file!
13630 \end_layout
13631
13632 \begin_layout Subsection
13633 letter (koma-script)
13634 \end_layout
13635
13636 \begin_layout Standard
13637 \noindent
13638 The document class 
13639 \emph on
13640 letter (koma-script)
13641 \emph default
13642  is implemented in the layout file 
13643 \family typewriter
13644 scrlettr.layout
13645 \family default
13646 .
13647  It contains all the paragraph types of the corresponding standard document
13648  class 
13649 \emph on
13650 letter
13651 \emph default
13652 , partly modified, with the exception of the LyX specific types 
13653 \family sans
13654 LyX-Code
13655 \family default
13656  and 
13657 \family sans
13658 Comment
13659 \family default
13660  and the 
13661 \family sans
13662 List
13663 \family default
13664  type, which is replaced by the new 
13665 \family sans
13666 Labeling
13667 \family default
13668  type.
13669  In addition, it contains, in contrast to the standard document class, the
13670  standard types 
13671 \family sans
13672 LaTeX
13673 \family default
13674
13675 \family sans
13676 Quotation
13677 \family default
13678
13679 \family sans
13680 Quote
13681 \family default
13682 , and 
13683 \family sans
13684 Verse
13685 \family default
13686 .
13687  Furthermore, there are a number of new letter specific types.
13688 \end_layout
13689
13690 \begin_layout Standard
13691 The appearance of the letter produced by this document class can be controlled
13692  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13693 \begin_inset Foot
13694 status collapsed
13695
13696 \begin_layout Plain Layout
13697 For example, the standard appearance of the letter`s heading, consisting
13698  of name and address, is quite self-willed.
13699  An 
13700 \begin_inset Quotes eld
13701 \end_inset
13702
13703 ordinary
13704 \begin_inset Quotes erd
13705 \end_inset
13706
13707  heading is produced by the following LaTeX commands in the preamble:
13708 \end_layout
13709
13710 \begin_layout LyX-Code
13711
13712 \backslash
13713 firsthead{
13714 \backslash
13715 parbox[b]{
13716 \backslash
13717 textwidth}
13718 \end_layout
13719
13720 \begin_layout LyX-Code
13721   {
13722 \backslash
13723 ignorespaces 
13724 \backslash
13725 fromname
13726 \backslash
13727
13728 \backslash
13729  
13730 \backslash
13731 ignorespaces 
13732 \backslash
13733 fromaddress}} 
13734 \end_layout
13735
13736 \begin_layout LyX-Code
13737
13738 \backslash
13739 nexthead{
13740 \backslash
13741 parbox[b]{
13742 \backslash
13743 textwidth}
13744 \end_layout
13745
13746 \begin_layout LyX-Code
13747   {
13748 \backslash
13749 ignorespaces 
13750 \backslash
13751 fromname 
13752 \backslash
13753 hfill 
13754 \backslash
13755 ignorespaces 
13756 \backslash
13757 pagename
13758 \backslash
13759  
13760 \backslash
13761 thepage}}
13762 \end_layout
13763
13764 \end_inset
13765
13766  A detailed German description of such LaTeX commands can be found in the
13767  Koma-Script documentation 
13768 \emph on
13769 scrguide
13770 \emph default
13771 .
13772  With it, the letter's author can produce his personal letter layout.
13773 \end_layout
13774
13775 \begin_layout Standard
13776 The types 
13777 \family sans
13778 Letter
13779 \family default
13780  and 
13781 \family sans
13782 Opening
13783 \family default
13784  define the beginning of the letter and must be used in every letter.
13785  To emphasize them in the LyX document class, they are marked with the letter
13786  
13787 \shape italic
13788 L
13789 \shape default
13790  or 
13791 \shape italic
13792 O
13793 \shape default
13794 , resp.
13795 \begin_inset space ~
13796 \end_inset
13797
13798 in the left margin.
13799  It is possible to write any number of letters in one file.
13800  An 
13801 \family sans
13802 Opening
13803 \family default
13804  type produces a new letter using the same addressee and a 
13805 \family sans
13806 Letter
13807 \family default
13808  type produces a new addressee.
13809  The types 
13810 \family sans
13811 Closing
13812 \family default
13813
13814 \family sans
13815 PS
13816 \family default
13817
13818 \family sans
13819 CC
13820 \family default
13821 , and 
13822 \family sans
13823 Encl
13824 \family default
13825  are ordinary paragraph types and can also be used several times in one
13826  and the same letter.
13827 \end_layout
13828
13829 \begin_layout Itemize
13830
13831 \family sans
13832 Letter
13833 \family default
13834 : produces a paragraph for the addressee and implicitly defines the beginning
13835  of the letter.
13836 \end_layout
13837
13838 \begin_layout Itemize
13839
13840 \family sans
13841 Opening
13842 \family default
13843 : produces a paragraph for the form of address and implicitly produces a
13844  new letter.
13845 \end_layout
13846
13847 \begin_layout Itemize
13848
13849 \family sans
13850 Closing
13851 \family default
13852 : produces a paragraph for a close.
13853 \end_layout
13854
13855 \begin_layout Itemize
13856
13857 \family sans
13858 PS
13859 \family default
13860 : produces a paragraph for a postscript.
13861 \end_layout
13862
13863 \begin_layout Itemize
13864
13865 \family sans
13866 CC
13867 \family default
13868 : produces a paragraph for a distribution list.
13869 \end_layout
13870
13871 \begin_layout Itemize
13872
13873 \family sans
13874 Encl
13875 \family default
13876 : produces a paragraph for enclosures.
13877 \end_layout
13878
13879 \begin_layout Standard
13880 The types 
13881 \family sans
13882 Name
13883 \family default
13884
13885 \family sans
13886 Signature
13887 \family default
13888
13889 \family sans
13890 Address
13891 \family default
13892
13893 \family sans
13894 Telephone
13895 \family default
13896
13897 \family sans
13898 Place
13899 \family default
13900
13901 \family sans
13902 Backaddress
13903 \family default
13904
13905 \family sans
13906 Specialmail
13907 \family default
13908
13909 \family sans
13910 Location
13911 \family default
13912
13913 \family sans
13914 Title
13915 \family default
13916 , and 
13917 \family sans
13918 Subject
13919 \family default
13920  are input types provided with a label to enter information, which will
13921  be processed by the document class.
13922 \begin_inset Foot
13923 status open
13924
13925 \begin_layout Plain Layout
13926 It could be seen as a matter of inconsequence, that the types 
13927 \family sans
13928 Letter
13929 \family default
13930  and 
13931 \family sans
13932 Opening
13933 \family default
13934  described above are not such input types as well.
13935  Because of the special meaning of those types, however, I have implemented
13936  them as ordinary paragraph types with a one letter mark in the left margin.
13937  Moreover, it would affect my feeling of symmetry, if the 
13938 \family sans
13939 Opening
13940 \family default
13941  type and the 
13942 \family sans
13943 Closing
13944 \family default
13945  type had such a serious different appearance.
13946 \end_layout
13947
13948 \end_inset
13949
13950  The types must be used ahead of the corresponding 
13951 \family sans
13952 Opening
13953 \family default
13954  type.
13955 \end_layout
13956
13957 \begin_layout Standard
13958 An implementation of these types in a WYSIWYG fashion does not seem to make
13959  sense, because the real appearance of the produced letter does not only
13960  depend on the usage of the particular type, but also on other factors.
13961  For example, a signature entered in the 
13962 \family sans
13963 Signature
13964 \family default
13965  type will in the standard behavior appear in the produced letter only,
13966  when in the same letter also a 
13967 \family sans
13968 Closing
13969 \family default
13970  type is used.
13971  The entered value of the 
13972 \family sans
13973 Telephone
13974 \family default
13975  type will in the standard behavior not appear in the produced letter at
13976  all.
13977  The possibility to design the letter`s heading freely is already indicated
13978  in a footnote above.
13979 \end_layout
13980
13981 \begin_layout Standard
13982 The input types can also be used as empty paragraphs.
13983  This makes sense e.
13984 \begin_inset space \thinspace{}
13985 \end_inset
13986
13987 g.
13988 \begin_inset space \space{}
13989 \end_inset
13990
13991 for the 
13992 \family sans
13993 Signature
13994 \family default
13995  type.
13996  If the 
13997 \family sans
13998 Signature
13999 \family default
14000  type is not used at all, in the standard behavior the value of the 
14001 \family sans
14002 Name
14003 \family default
14004  type is used as signature, whereas if an empty 
14005 \family sans
14006 Signature
14007 \family default
14008  type is used, no signature value is defined.
14009 \end_layout
14010
14011 \begin_layout Standard
14012 By using the input types it is possible to write a letter template, containing
14013  filled input types with your personal dates (name, address, etc.) and empty
14014  input types for other dates you want to enter.
14015 \end_layout
14016
14017 \begin_layout Itemize
14018
14019 \family sans
14020 Name
14021 \family default
14022 : sender's name, in the standard behavior appears as a centered paragraph
14023  in small caps in the letter`s heading.
14024 \end_layout
14025
14026 \begin_layout Itemize
14027
14028 \family sans
14029 Signature
14030 \family default
14031 : sender's signature, in the standard behavior appears below the 
14032 \family sans
14033 Closing
14034 \family default
14035  type.
14036  If no 
14037 \family sans
14038 Signature
14039 \family default
14040  type is used, the value of the 
14041 \family sans
14042 Name
14043 \family default
14044  type appears instead.
14045 \end_layout
14046
14047 \begin_layout Itemize
14048
14049 \family sans
14050 Address
14051 \family default
14052 : sender's address, in the standard behavior appears in a centered paragraph
14053  in the letter`s heading below the sender's name.
14054 \end_layout
14055
14056 \begin_layout Itemize
14057
14058 \family sans
14059 Telephone
14060 \family default
14061 : sender's telephone number, in the standard behavior only sets the LaTeX
14062  variable 
14063 \family typewriter
14064
14065 \backslash
14066 telephonenum
14067 \family default
14068 .
14069 \end_layout
14070
14071 \begin_layout Itemize
14072
14073 \family sans
14074 Place
14075 \family default
14076 : place of the letter`s making.
14077 \end_layout
14078
14079 \begin_layout Itemize
14080
14081 \family sans
14082 Date
14083 \family default
14084 : date of the letter`s making.
14085  
14086 \family sans
14087 Place
14088 \family default
14089  and 
14090 \family sans
14091 Date
14092 \family default
14093 , in the standard behavior, produce the place and the date in a right-aligned
14094  line below the addressee's field.
14095  If an empty 
14096 \family sans
14097 Date
14098 \family default
14099  type is used, neither place nor date appear, independent of the value of
14100  the 
14101 \family sans
14102 Place
14103 \family default
14104  type.
14105  If no 
14106 \family sans
14107 Date
14108 \family default
14109  type is used, the date of the letter `s production is used.
14110 \end_layout
14111
14112 \begin_layout Itemize
14113
14114 \family sans
14115 Backaddress
14116 \family default
14117 : sender`s back address, in the standard behavior appears above the addressee's
14118  field in a small sans serif font.
14119 \end_layout
14120
14121 \begin_layout Itemize
14122
14123 \family sans
14124 Specialmail
14125 \family default
14126 : special mail information, in the standard behavior appears underlined
14127  above the addressee's field below the back address.
14128 \end_layout
14129
14130 \begin_layout Itemize
14131
14132 \family sans
14133 Location
14134 \family default
14135 : additional information, in the standard behavior appears on right side
14136  below the addressee`s field.
14137 \end_layout
14138
14139 \begin_layout Itemize
14140
14141 \family sans
14142 Title
14143 \family default
14144 : the letter's title, in the standard behavior appears in a big, bold, sans
14145  serif font above the subject.
14146 \end_layout
14147
14148 \begin_layout Itemize
14149
14150 \family sans
14151 Subject
14152 \family default
14153 : the letter's subject, in the standard behavior appears in a bold font
14154  above the 
14155 \family sans
14156 Opening
14157 \family default
14158  paragraph.
14159 \end_layout
14160
14161 \begin_layout Standard
14162 The types 
14163 \family sans
14164 Yourref
14165 \family default
14166
14167 \family sans
14168 Yourmail
14169 \family default
14170
14171 \family sans
14172 Myref
14173 \family default
14174
14175 \family sans
14176 Customer
14177 \family default
14178 , and 
14179 \family sans
14180 Invoice
14181 \family default
14182  produce a business letter like line above the 
14183 \family sans
14184 Title
14185 \family default
14186  line containing the fields 
14187 \begin_inset Quotes eld
14188 \end_inset
14189
14190 Your ref.
14191 \begin_inset Quotes erd
14192 \end_inset
14193
14194
14195 \begin_inset Quotes eld
14196 \end_inset
14197
14198 Your letter of
14199 \begin_inset Quotes erd
14200 \end_inset
14201
14202
14203 \begin_inset Quotes eld
14204 \end_inset
14205
14206 Our ref.
14207 \begin_inset Quotes erd
14208 \end_inset
14209
14210
14211 \begin_inset Quotes eld
14212 \end_inset
14213
14214 Customer no.
14215 \begin_inset Quotes erd
14216 \end_inset
14217
14218
14219 \begin_inset Quotes eld
14220 \end_inset
14221
14222 Invoice no.
14223 \begin_inset Quotes erd
14224 \end_inset
14225
14226 , and 
14227 \begin_inset Quotes eld
14228 \end_inset
14229
14230 Date
14231 \begin_inset Quotes erd
14232 \end_inset
14233
14234 .
14235  For the date field, the value of the 
14236 \family sans
14237 Date
14238 \family default
14239  type is used.
14240  If one of these 
14241 \begin_inset Quotes eld
14242 \end_inset
14243
14244 business letter types
14245 \begin_inset Quotes erd
14246 \end_inset
14247
14248  is used, the value of the 
14249 \family sans
14250 Place
14251 \family default
14252  type however does not appear, but only the LaTeX variable 
14253 \family typewriter
14254
14255 \backslash
14256 fromplace
14257 \family default
14258  is set.
14259  The ordinary output of place and date in a right-aligned line below the
14260  addressee`s field is suppressed.
14261  The types are implemented as input types provided with a label and must
14262  be used ahead of the corresponding 
14263 \family sans
14264 Opening
14265 \family default
14266  type.
14267 \end_layout
14268
14269 \begin_layout Itemize
14270
14271 \family sans
14272 Yourref
14273 \family default
14274 : Your ref.
14275 \end_layout
14276
14277 \begin_layout Itemize
14278
14279 \family sans
14280 Yourmail
14281 \family default
14282 : Your letter of.
14283 \end_layout
14284
14285 \begin_layout Itemize
14286
14287 \family sans
14288 Myref
14289 \family default
14290 : Our ref.
14291 \end_layout
14292
14293 \begin_layout Itemize
14294
14295 \family sans
14296 Customer
14297 \family default
14298 : Customer no.
14299 \end_layout
14300
14301 \begin_layout Itemize
14302
14303 \family sans
14304 Invoice
14305 \family default
14306 : Invoice no.
14307 \end_layout
14308
14309 \begin_layout Subsection
14310 The new letter class: letter (koma-script v.2)
14311 \end_layout
14312
14313 \begin_layout Standard
14314 by 
14315 \noun on
14316 Jürgen Spitzmüller
14317 \end_layout
14318
14319 \begin_layout Standard
14320 \begin_inset VSpace medskip
14321 \end_inset
14322
14323
14324 \end_layout
14325
14326 \begin_layout Standard
14327 \noindent
14328 Koma-Script version 2.8 has introduced a new letter class 
14329 \family typewriter
14330 scrlttr2
14331 \family default
14332  which supersedes the now unsupported 
14333 \family typewriter
14334 scrlettr
14335 \family default
14336 .
14337  It has — on the LaTeX side — a completely new interface and is not compatible
14338  with the old class.
14339  Therefore, LyX supports both, though it is recommended you use the new
14340  class.
14341 \end_layout
14342
14343 \begin_layout Standard
14344 This class covers the same functionality as 
14345 \emph on
14346 letter (koma-script),
14347 \emph default
14348  and a few more.
14349  The basic items are 
14350 \family sans
14351 Address
14352 \family default
14353  (receiver's address, same as 
14354 \family sans
14355 Letter
14356 \family default
14357  in the old layout), 
14358 \family sans
14359 Opening
14360 \family default
14361 , and 
14362 \family sans
14363 Closing
14364 \family default
14365 .
14366  
14367 \family sans
14368 NextAddress
14369 \family default
14370  will start a new letter (i.
14371 \begin_inset space \thinspace{}
14372 \end_inset
14373
14374 e.
14375 \begin_inset space \space{}
14376 \end_inset
14377
14378 you can write several letters per document).
14379  New elements are sender's 
14380 \family sans
14381 E-Mail
14382 \family default
14383
14384 \family sans
14385 URL
14386 \family default
14387
14388 \family sans
14389 Fax
14390 \family default
14391
14392 \family sans
14393 Bank
14394 \family default
14395  and the possibility to use a 
14396 \family sans
14397 Logo
14398 \family default
14399  (via 
14400 \family sans
14401 Insert\SpecialChar \menuseparator
14402 Graphics
14403 \family default
14404 ) in the header.
14405 \end_layout
14406
14407 \begin_layout Standard
14408 The biggest improvement is, though, that the letter's layout is configurable
14409  to meet almost any needs.
14410  This can be done via the preamble or with a special style file (Letter
14411  Class Option, extension 
14412 \family typewriter
14413 *.lco
14414 \family default
14415 ), that will be read in as a class option.
14416 \begin_inset Foot
14417 status collapsed
14418
14419 \begin_layout Plain Layout
14420 The KOMA package comes with some default 
14421 \family typewriter
14422 *.lco
14423 \family default
14424  files.
14425  There is, for instance, a 
14426 \family typewriter
14427 DIN.lco
14428 \family default
14429  file that follows german typesetting rules, or a 
14430 \family typewriter
14431 KOMAold.lco
14432 \family default
14433  that provides the default layout of the old 
14434 \family typewriter
14435 scrlettr
14436 \family default
14437  class.
14438  The latter can be loaded with the class option 
14439 \family typewriter
14440 KOMAold
14441 \family default
14442 , inserted via the 
14443 \family sans
14444 \bar under
14445 L
14446 \bar default
14447 ayout\SpecialChar \menuseparator
14448
14449 \bar under
14450 D
14451 \bar default
14452 ocument\SpecialChar \menuseparator
14453 Extra Options
14454 \family default
14455  field.
14456 \end_layout
14457
14458 \end_inset
14459
14460  Have a look at the 
14461 \emph on
14462 koma-letter2
14463 \emph default
14464  template that is included in LyX for examples.
14465  A detailed description is to be found in the Koma-Script documentation
14466  (
14467 \emph on
14468 scrguide
14469 \emph default
14470 ).
14471 \end_layout
14472
14473 \begin_layout Subsection
14474 Problems
14475 \end_layout
14476
14477 \begin_layout Standard
14478 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14479  some problems.
14480 \end_layout
14481
14482 \begin_layout Itemize
14483 The chapter number of a 
14484 \family sans
14485 Chapter
14486 \family default
14487  type appears on a line of its own above the chapter heading instead of
14488  appearing in the same line ahead of it.
14489  The cause for that is the LyX internal behavior for the labeltype 
14490 \family sans
14491 Counter_Chapter
14492 \family default
14493  in the layout file.
14494 \end_layout
14495
14496 \begin_layout Itemize
14497 The headings of the types 
14498 \family sans
14499 Addchap
14500 \family default
14501  and 
14502 \family sans
14503 Addsec
14504 \family default
14505  are only put in the 
14506 \begin_inset Quotes eld
14507 \end_inset
14508
14509 true
14510 \begin_inset Quotes erd
14511 \end_inset
14512
14513  LaTeX table of contents, but not in the LyX table of contents (
14514 \family sans
14515 Document\SpecialChar \menuseparator
14516 Table
14517 \begin_inset space ~
14518 \end_inset
14519
14520 of
14521 \begin_inset space ~
14522 \end_inset
14523
14524 Contents
14525 \family default
14526 ).
14527 \end_layout
14528
14529 \begin_layout Itemize
14530 The paragraphs in a 
14531 \emph on
14532 letter
14533 \emph default
14534  document class appear in a skip separation mode, not indented.
14535  This is the standard behavior, no special LaTeX commands are needed for
14536  that.
14537  But in the 
14538 \family sans
14539 Document\SpecialChar \menuseparator
14540 Settings
14541 \family default
14542  dialog the corresponding radio button indicates 
14543 \family sans
14544 Indent
14545 \family default
14546 .
14547  A 
14548 \family sans
14549 Skip
14550 \family default
14551  value always has the effect that extra LaTeX commands are inserted in the
14552  document to produce the gap, which is not what is wanted in this case.
14553 \end_layout
14554
14555 \begin_layout Section
14556 Memoir
14557 \end_layout
14558
14559 \begin_layout Standard
14560 By 
14561 \noun on
14562 Jürgen Spitzmüller
14563 \end_layout
14564
14565 \begin_layout Subsection
14566 Overview
14567 \end_layout
14568
14569 \begin_layout Standard
14570 Memoir is a very powerful and constantly evolving class.
14571  It has been designed with regard to fictional and non-fictional literature.
14572  Its aim is to let the user have maximum control over the typesetting of
14573  his document.
14574  Memoir is based on the standard book class, but it can also emulate the
14575  article class (see below).
14576 \end_layout
14577
14578 \begin_layout Standard
14579 Peter Wilson, the developer of Memoir, is known as the author of lots of
14580  useful packages in the LaTeX world.
14581  Most of them have been merged with Memoir.
14582  Therefore, it is much easier to layout the table of contents, appendices,
14583  chapter designs and such.
14584  LyX, though, does not support all of these goodies natively.
14585  Some of them might be added to forthcoming releases
14586 \begin_inset Foot
14587 status collapsed
14588
14589 \begin_layout Plain Layout
14590 You are invited to send suggestions to 
14591 \begin_inset Flex URL
14592 status collapsed
14593
14594 \begin_layout Plain Layout
14595
14596 lyx-devel@lists.lyx.org
14597 \end_layout
14598
14599 \end_inset
14600
14601 .
14602 \end_layout
14603
14604 \end_inset
14605
14606 , lots will probably never be supported, due to the limitations of LyX's
14607  framework.
14608  Of course you can still use all features with the help of some native LaTeX
14609  commands (TeX code
14610 \begin_inset Foot
14611 status collapsed
14612
14613 \begin_layout Plain Layout
14614 Cf.
14615 \begin_inset ERT
14616 status collapsed
14617
14618 \begin_layout Plain Layout
14619
14620
14621 \backslash
14622  
14623 \end_layout
14624
14625 \end_inset
14626
14627 section
14628 \begin_inset space ~
14629 \end_inset
14630
14631
14632 \begin_inset CommandInset ref
14633 LatexCommand ref
14634 reference "sec:Inserting-TeX-Code"
14635
14636 \end_inset
14637
14638  for details.
14639 \end_layout
14640
14641 \end_inset
14642
14643 ).
14644  In this section, we can only list those features that are natively supported
14645  by LyX.
14646  For detailed descriptions (and for the rest of features) we recommend you
14647  have a look at the detailed manual of the Memoir class
14648 \begin_inset Foot
14649 status collapsed
14650
14651 \begin_layout Plain Layout
14652 Cf.
14653 \begin_inset ERT
14654 status collapsed
14655
14656 \begin_layout Plain Layout
14657
14658
14659 \backslash
14660  
14661 \end_layout
14662
14663 \end_inset
14664
14665
14666 \begin_inset Flex URL
14667 status collapsed
14668
14669 \begin_layout Plain Layout
14670
14671 CTAN:/macros/latex/memoir/memman.pdf
14672 \end_layout
14673
14674 \end_inset
14675
14676 .
14677 \end_layout
14678
14679 \end_inset
14680
14681 , which is not only a user guide for the class, but also both a comprehensive
14682  description on good typesetting and a superb example for good typesetting
14683  itself.
14684 \end_layout
14685
14686 \begin_layout Subsection
14687 Basic features and restrictions
14688 \end_layout
14689
14690 \begin_layout Standard
14691 Memoir supports basically all features of the standard book classes.
14692  There are, however, some differences, as follows:
14693 \end_layout
14694
14695 \begin_layout Description
14696 Font
14697 \begin_inset space ~
14698 \end_inset
14699
14700 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14701 \end_layout
14702
14703 \begin_layout Description
14704 Page
14705 \begin_inset space ~
14706 \end_inset
14707
14708 style: The fancy page style is not supported, due to a command clash between
14709  Memoir and the fancyhdr package (they both define a command with the same
14710  name, which confuses LaTeX).
14711  Instead, Memoir comes with a number of its own page styles (see 
14712 \family sans
14713 Layout\SpecialChar \menuseparator
14714 Document\SpecialChar \menuseparator
14715 Page
14716 \begin_inset space ~
14717 \end_inset
14718
14719 Style
14720 \family default
14721 ).
14722  If you want to use these for the chapter pages, you have to use the command
14723  
14724 \family typewriter
14725
14726 \backslash
14727 chapterstyle
14728 \family default
14729  in the main text or in preamble (e.
14730 \begin_inset space \thinspace{}
14731 \end_inset
14732
14733 g.
14734 \begin_inset space \space{}
14735 \end_inset
14736
14737
14738 \family typewriter
14739
14740 \backslash
14741 chapterstyle{companion}
14742 \family default
14743 ).
14744 \end_layout
14745
14746 \begin_layout Description
14747 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14748  optional argument in the standard classes.
14749  With this, you can specify an alternative version of the title for the
14750  table of contents and the headers (for instance, if the title is too long).
14751  In LyX, you can do this via 
14752 \family sans
14753 Insert\SpecialChar \menuseparator
14754 Short
14755 \begin_inset space ~
14756 \end_inset
14757
14758 Title
14759 \family default
14760  at the beginning of a chapter/section.
14761  Memoir features a second optional argument and thus separates the table
14762  of contents from the header.
14763  You can define three variants of a title with this: one for the main text,
14764  one for the table of contents, and one for the headers.
14765  Simply insert two optional arguments if you need this feature, the first
14766  one containing the short title for the Table of Contents, the second one
14767  containing an alternative short title for the headers.
14768 \end_layout
14769
14770 \begin_layout Description
14771 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14772  of contents, the list of figures and the list of table start a new page
14773  automatically.
14774  Memoir does not follow this route.
14775  You have to insert a page break yourself, if you want to have one.
14776 \end_layout
14777
14778 \begin_layout Description
14779 Titlepage: For some unknown reason, Memoir uses pagination on the title
14780  page (in the standard classes, title pages are 
14781 \begin_inset Quotes eld
14782 \end_inset
14783
14784 empty
14785 \begin_inset Quotes erd
14786 \end_inset
14787
14788 ).
14789  If you want an empty title page, type 
14790 \family typewriter
14791
14792 \backslash
14793 aliaspagestyle{title}{empty}
14794 \family default
14795  in the preamble.
14796 \end_layout
14797
14798 \begin_layout Description
14799 Article: With the class option 
14800 \emph on
14801 article
14802 \emph default
14803  (to be inserted in 
14804 \family sans
14805 Layout\SpecialChar \menuseparator
14806 Document\SpecialChar \menuseparator
14807 Extra
14808 \begin_inset space ~
14809 \end_inset
14810
14811 Options
14812 \family default
14813 ), you can emulate article style.
14814  That is, counters (footnotes, figures, tables etc.) will not be reset on
14815  new chapters, chapters don't start a new page (but are—in contrary to 
14816 \begin_inset Quotes eld
14817 \end_inset
14818
14819 real
14820 \begin_inset Quotes erd
14821 \end_inset
14822
14823  article classes—still allowed), parts, though, use their own page, as in
14824  book.
14825 \end_layout
14826
14827 \begin_layout Description
14828 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14829  font commands, which have been used in the old LaTeX version 2.09 (e.
14830 \begin_inset space \thinspace{}
14831 \end_inset
14832
14833 g.
14834 \begin_inset space \space{}
14835 \end_inset
14836
14837
14838 \family typewriter
14839
14840 \backslash
14841 rm
14842 \family default
14843
14844 \family typewriter
14845
14846 \backslash
14847 it
14848 \family default
14849 ).
14850  It produces an error and stops LaTeX whenever such a command appears.
14851  The class option 
14852 \emph on
14853 oldfontcommands
14854 \emph default
14855  reallows the commands and spits out warnings instead (which does at least
14856  not stop LaTeX).
14857  Since a lot of packages and particularly BibTeX style files are still using
14858  those commands, we have decided to use this option by default.
14859 \end_layout
14860
14861 \begin_layout Subsection
14862 Extra features
14863 \end_layout
14864
14865 \begin_layout Standard
14866 We will only describe the features supported by LyX (which is not much currently
14867 ).
14868  Please consult the Memoir manual
14869 \begin_inset Foot
14870 status collapsed
14871
14872 \begin_layout Plain Layout
14873 Cf.
14874 \begin_inset ERT
14875 status collapsed
14876
14877 \begin_layout Plain Layout
14878
14879
14880 \backslash
14881  
14882 \end_layout
14883
14884 \end_inset
14885
14886
14887 \begin_inset Flex URL
14888 status collapsed
14889
14890 \begin_layout Plain Layout
14891
14892 CTAN:/macros/latex/memoir/memman.pdf
14893 \end_layout
14894
14895 \end_inset
14896
14897 .
14898 \end_layout
14899
14900 \end_inset
14901
14902  for details.
14903 \end_layout
14904
14905 \begin_layout Description
14906 Abstract: You may wonder why an abstract is an extra feature.
14907  Well, it is in book class.
14908  Usually books don't have abstracts.
14909  Memoir, however, has.
14910  You can use it wherever and how often you like.
14911 \end_layout
14912
14913 \begin_layout Description
14914 Chapterprecis: You may know this older typesetting style: The contents of
14915  a chapter are summarized below the title and also in the table of contents
14916  (e.
14917 \begin_inset space \thinspace{}
14918 \end_inset
14919
14920 g.
14921 \begin_inset space \space{}
14922 \end_inset
14923
14924
14925 \emph on
14926 Our hero arrives in Troia; he loses some friends; he finds others
14927 \emph default
14928 ).
14929  Chapterprecis does exactly this.
14930  It is therefore only sensible below a chapter.
14931 \end_layout
14932
14933 \begin_layout Description
14934 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14935  The epigraph environment provides an elegant way of typesetting such a
14936  motto.
14937  The motto itself (text) and its author (source) are divided by a short
14938  line.
14939  Unfortunately, we have to fool LyX a bit here again, since the environment
14940  needs two arguments (text and source).
14941  In this case, we have to use curly brackets (in TeX mode) between the two
14942  arguments: 
14943 \emph on
14944 <smart slogan>
14945 \emph default
14946  
14947 \family typewriter
14948 }{
14949 \family default
14950  
14951 \emph on
14952 <author of the slogan>.
14953 \end_layout
14954
14955 \begin_layout Description
14956 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14957  complex figurative poems).
14958  LyX can only support a few of them.
14959  One is poemtitle, which is a centered title for poems, which will also
14960  be added to the table of contents (verse is the standard environment for
14961  poems.
14962  Memoir has some enhanced versions of verse, but you need to use TeX code,
14963  because they have to be nested inside regular verse environments, which
14964  is not possible with LyX).
14965 \end_layout
14966
14967 \begin_layout Description
14968 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14969 \end_layout
14970
14971 \begin_layout Section
14972 Article (mwart), book (mwbk) and report (mwrep)
14973 \begin_inset Argument
14974 status collapsed
14975
14976 \begin_layout Plain Layout
14977 The 
14978 \family typewriter
14979 mw
14980 \family default
14981  Classes
14982 \end_layout
14983
14984 \end_inset
14985
14986
14987 \end_layout
14988
14989 \begin_layout Standard
14990 by 
14991 \noun on
14992 Tomasz Luczak
14993 \end_layout
14994
14995 \begin_layout Standard
14996 The LyX document classes 
14997 \emph on
14998 article (mwart)
14999 \emph default
15000
15001 \emph on
15002 report (mwrep)
15003 \emph default
15004  and 
15005 \emph on
15006 book
15007 \emph default
15008  
15009 \emph on
15010 (mwbk)
15011 \emph default
15012  correspond to the LaTeX document classes 
15013 \family typewriter
15014 mwart.cls
15015 \family default
15016
15017 \family typewriter
15018 mwrep.cls
15019 \family default
15020  and 
15021 \family typewriter
15022 mwbk.cls
15023 \family default
15024 , resp.
15025  They are replacements for the standard document classes 
15026 \family typewriter
15027 article.cls
15028 \family default
15029
15030 \family typewriter
15031 report.cls
15032 \family default
15033  and 
15034 \family typewriter
15035 book.cls
15036 \family default
15037 , resp., and fit better to Polish typography conventions in a number of points.
15038  
15039 \end_layout
15040
15041 \begin_layout Standard
15042 Basic differences:
15043 \end_layout
15044
15045 \begin_layout Itemize
15046 Unnumbered titles (with star, e.
15047 \begin_inset space \thinspace{}
15048 \end_inset
15049
15050 g.
15051 \begin_inset space \space{}
15052 \end_inset
15053
15054
15055 \family sans
15056 Section*
15057 \family default
15058 ) are added into table of contents,
15059 \end_layout
15060
15061 \begin_layout Itemize
15062 Additional page styles:
15063 \end_layout
15064
15065 \begin_deeper
15066 \begin_layout Description
15067 uheadings header with separated lines,
15068 \end_layout
15069
15070 \begin_layout Description
15071 myheadings custom header, contents headers via commands: 
15072 \family typewriter
15073
15074 \backslash
15075 markright
15076 \family default
15077  and 
15078 \family typewriter
15079
15080 \backslash
15081 markboth
15082 \family default
15083 ,
15084 \end_layout
15085
15086 \begin_layout Description
15087 myuheadings custom header with separated lines,
15088 \end_layout
15089
15090 \begin_layout Description
15091 outer page number is placed on outer side of page
15092 \end_layout
15093
15094 \end_deeper
15095 \begin_layout Itemize
15096 Options 
15097 \end_layout
15098
15099 \begin_deeper
15100 \begin_layout Description
15101 rmheadings serif titles — default,
15102 \end_layout
15103
15104 \begin_layout Description
15105 sfheadings sansserif titles,
15106 \end_layout
15107
15108 \begin_layout Description
15109 authortitle on title page first placed is author next title — default,
15110 \end_layout
15111
15112 \begin_layout Description
15113 titleauthor on title page first placed is title next author,
15114 \end_layout
15115
15116 \begin_layout Description
15117 withmarginpar reserve place on page for margins.
15118 \end_layout
15119
15120 \end_deeper
15121 \begin_layout Section
15122 Paper
15123 \end_layout
15124
15125 \begin_layout Standard
15126 The document class 
15127 \family sans
15128 paper
15129 \family default
15130  provides an alternative to the standard 
15131 \family sans
15132 article
15133 \family default
15134  class.
15135  It provides similar functionality, but you might prefer this layout with
15136  sans serif sections, headings, and more.
15137 \end_layout
15138
15139 \begin_layout Section
15140 RevTeX4
15141 \end_layout
15142
15143 \begin_layout Standard
15144 by 
15145 \noun on
15146 Amir Karger
15147 \end_layout
15148
15149 \begin_layout Standard
15150 \begin_inset VSpace bigskip
15151 \end_inset
15152
15153
15154 \end_layout
15155
15156 \begin_layout Standard
15157 \noindent
15158 The 
15159 \family sans
15160 Revtex
15161 \begin_inset space ~
15162 \end_inset
15163
15164 4
15165 \family default
15166  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15167 \begin_inset Formula $\beta$
15168 \end_inset
15169
15170  release of May, 1999) class.
15171 \end_layout
15172
15173 \begin_layout Standard
15174 LyX has a 
15175 \family sans
15176 Revtex
15177 \family default
15178  textclass, which works with RevTeX 3.1.
15179  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15180  That means that it doesn't interact very well with LyX, which requires
15181  LaTeX2e, although it has been kludged to work.
15182  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15183  LyX with the 
15184 \family sans
15185 RevTeX
15186 \begin_inset space ~
15187 \end_inset
15188
15189 4
15190 \family default
15191  textclass should also be pretty easy to use.
15192 \end_layout
15193
15194 \begin_layout Standard
15195 These documents are supposed to be used in 
15196 \emph on
15197 addition
15198 \emph default
15199  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15200  macros, and assume you'll know what to put in the preamble if necessary.
15201 \end_layout
15202
15203 \begin_layout Subsection
15204 Installation
15205 \end_layout
15206
15207 \begin_layout Standard
15208 All you need to do is install RevTeX 4, as described in the package's README
15209  file.
15210  The package can be found at The RevTeX 4 Web Site 
15211 \begin_inset Flex URL
15212 status collapsed
15213
15214 \begin_layout Plain Layout
15215
15216 http://publish.aps.org/revtex4/
15217 \end_layout
15218
15219 \end_inset
15220
15221 .
15222  Install it somewhere that LaTeX can see it.
15223  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15224  (i.
15225 \begin_inset space \thinspace{}
15226 \end_inset
15227
15228 e.
15229 \begin_inset space \space{}
15230 \end_inset
15231
15232 not the directory where you installed the class file.) Then, if you reconfigure
15233  LyX, it will find the class file and let you use the RevTeX4 textclass.
15234 \end_layout
15235
15236 \begin_layout Standard
15237 Probably the easiest way to get started is either to import a RevTeX 4 document
15238  using 
15239 \family typewriter
15240 tex2lyx
15241 \family default
15242 , or to use the 
15243 \family sans
15244 Revtex
15245 \begin_inset space ~
15246 \end_inset
15247
15248 4
15249 \family default
15250  template, found in the templates directory.
15251 \end_layout
15252
15253 \begin_layout Subsection
15254 Preamble Matter
15255 \end_layout
15256
15257 \begin_layout Standard
15258 Optional arguments to 
15259 \family typewriter
15260
15261 \backslash
15262 documentclass
15263 \family default
15264 , like 
15265 \begin_inset Quotes eld
15266 \end_inset
15267
15268 preprint
15269 \begin_inset Quotes erd
15270 \end_inset
15271
15272  and 
15273 \begin_inset Quotes eld
15274 \end_inset
15275
15276 aps
15277 \begin_inset Quotes erd
15278 \end_inset
15279
15280 , go in the 
15281 \family sans
15282 E
15283 \bar under
15284 x
15285 \bar default
15286 tra
15287 \begin_inset space ~
15288 \end_inset
15289
15290 Options
15291 \family default
15292  field in the 
15293 \family sans
15294 Document
15295 \begin_inset space ~
15296 \end_inset
15297
15298 Layout
15299 \family default
15300  dialog, as usual.
15301  Remember that in RevTeX, at least one optional argument is required! 
15302 \end_layout
15303
15304 \begin_layout Standard
15305 Other preamble matter, like 
15306 \family typewriter
15307
15308 \backslash
15309 draft
15310 \family default
15311  etc.
15312 \begin_inset space ~
15313 \end_inset
15314
15315 goes in the 
15316 \family sans
15317 LaTeX
15318 \begin_inset space ~
15319 \end_inset
15320
15321 Preamble
15322 \family default
15323  dialog, also as usual.
15324 \end_layout
15325
15326 \begin_layout Subsection
15327 Layouts
15328 \end_layout
15329
15330 \begin_layout Standard
15331 The layouts basically correspond to the commands in RevTeX4.0.
15332  For example, the Email layout corresponds to 
15333 \family typewriter
15334
15335 \backslash
15336 email{}
15337 \family default
15338 .
15339  Note that (at least as of RevTeX 4.0 Beta), the 
15340 \family sans
15341 Address
15342 \family default
15343  and 
15344 \family sans
15345 Affiliation
15346 \family default
15347  layouts are exactly equivalent, so you shouldn't need to use both.
15348 \begin_inset Foot
15349 status collapsed
15350
15351 \begin_layout Plain Layout
15352 In case you're curious, both were included so that 
15353 \family typewriter
15354 tex2lyx
15355 \family default
15356  would be able to translate both 
15357 \family typewriter
15358
15359 \backslash
15360 address
15361 \family default
15362  and 
15363 \family typewriter
15364
15365 \backslash
15366 affiliation
15367 \family default
15368 .
15369 \end_layout
15370
15371 \end_inset
15372
15373
15374 \end_layout
15375
15376 \begin_layout Subsection
15377 Important Notes
15378 \end_layout
15379
15380 \begin_layout Standard
15381 There are a couple of important unique aspects of RevTeX 4 which might cause
15382  bugs that will be even more confusing in LyX.
15383 \end_layout
15384
15385 \begin_layout Standard
15386 In RevTeX, the 
15387 \family typewriter
15388
15389 \backslash
15390 thanks
15391 \family default
15392  command goes 
15393 \emph on
15394 outside
15395 \emph default
15396  the 
15397 \family typewriter
15398
15399 \backslash
15400 author
15401 \family default
15402  command.
15403  The LyX equivalent is that there is a separate Thanks layout.
15404  Do 
15405 \emph on
15406 not
15407 \emph default
15408  write footnotes in the 
15409 \family sans
15410 Author
15411 \family default
15412  layout, or weird things may happen.
15413  See the RevTeX 4 documentation for more details.
15414 \end_layout
15415
15416 \begin_layout Standard
15417 Also, the 
15418 \family sans
15419 Author
15420 \begin_inset space ~
15421 \end_inset
15422
15423 Email
15424 \family default
15425
15426 \family sans
15427 Author
15428 \begin_inset space ~
15429 \end_inset
15430
15431 URL
15432 \family default
15433 , and 
15434 \family sans
15435 Thanks
15436 \family default
15437  layouts must be placed 
15438 \emph on
15439 in between
15440 \emph default
15441  the 
15442 \family sans
15443 Author
15444 \family default
15445  layout and the corresponding 
15446 \family sans
15447 Address
15448 \family default
15449  (or equivalent 
15450 \family sans
15451 Affiliation
15452 \family default
15453 ) layout.
15454  If you put the 
15455 \family sans
15456 Thanks
15457 \family default
15458  after the 
15459 \family sans
15460 Address
15461 \family default
15462 , the LaTeX won't compile.
15463 \end_layout
15464
15465 \begin_layout Subsection
15466 Drawbacks
15467 \end_layout
15468
15469 \begin_layout Standard
15470 The main problem with this layout is that you can't use the optional arguments
15471  to layouts like Email and Title.
15472  (The problem is not unique to this layout; you can't use optional arguments
15473  to the Section layouts either.) This means that after you export that file
15474  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15475  need to edit the LaTeX file with a text editor to add the optional arguments
15476  to set, e.
15477 \begin_inset space \thinspace{}
15478 \end_inset
15479
15480 g.
15481 \begin_inset space \space{}
15482 \end_inset
15483
15484 the running title for the page headers.
15485  Lacking these layouts makes the 
15486 \family typewriter
15487
15488 \backslash
15489 altaffiliation
15490 \family default
15491  (and the equivalent 
15492 \family typewriter
15493
15494 \backslash
15495 altaddress
15496 \family default
15497 ) useless, so the corresponding layouts don't exist, and will have to be
15498  added by hand.
15499 \begin_inset Foot
15500 status collapsed
15501
15502 \begin_layout Plain Layout
15503
15504 \emph on
15505 Note from JMarc:
15506 \emph default
15507  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15508  has not been updated yet to take advantage of it.
15509 \end_layout
15510
15511 \end_inset
15512
15513  
15514 \end_layout
15515
15516 \begin_layout Section
15517 Springer Journals (
15518 \family sans
15519 svjour
15520 \family default
15521 )
15522 \end_layout
15523
15524 \begin_layout Standard
15525 by 
15526 \noun on
15527 Martin Vermeer
15528 \end_layout
15529
15530 \begin_layout Subsection
15531 Description
15532 \end_layout
15533
15534 \begin_layout Standard
15535 These are the layout files for some of the journal formats used by Springer
15536  Verlag and listed on 
15537 \begin_inset Flex URL
15538 status collapsed
15539
15540 \begin_layout Plain Layout
15541
15542 http://www.springer.de/author/tex/help-journals.html
15543 \end_layout
15544
15545 \end_inset
15546
15547 , where you should also go to fetch the class files (yes, these are LaTeX2e
15548  now!).
15549  It is a modular system: the things common to all journals are implemented
15550  in 
15551 \family typewriter
15552 svjour.inc
15553 \family default
15554 , which journal-specific layout files (such as, e.
15555 \begin_inset space \thinspace{}
15556 \end_inset
15557
15558 g.
15559 \begin_inset space \space{}
15560 \end_inset
15561
15562
15563 \family typewriter
15564 svjog.layout
15565 \family default
15566  for Journal of Geodesy) can include.
15567 \end_layout
15568
15569 \begin_layout Standard
15570 This means that implementing support for any other Springer journal on this
15571  list is as simple as writing your own 
15572 \family typewriter
15573 sv
15574 \family default
15575 <myjournal>
15576 \family typewriter
15577 .layout
15578 \family default
15579  file following the outline given in 
15580 \family typewriter
15581 svjog.layout
15582 \family default
15583 .
15584  
15585 \end_layout
15586
15587 \begin_layout Standard
15588 It is reasonably well tested only for the Journal of Geodesy.
15589  
15590 \family typewriter
15591 svjour
15592 \family default
15593  and 
15594 \family typewriter
15595 svjog
15596 \family default
15597  come with the standard LyX distribution.
15598  Install the relevant class file (downloaded from Springer) in a proper
15599  directory, reconfigure LaTeX (in the teTeX case by running 
15600 \family typewriter
15601 texhash
15602 \family default
15603 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15604  and it should work.
15605 \end_layout
15606
15607 \begin_layout Subsection
15608 New styles
15609 \end_layout
15610
15611 \begin_layout Standard
15612 A large number of theorem-like styles — 
15613 \family sans
15614 Claim, Conjecture,
15615 \family default
15616  
15617 \family sans
15618 \SpecialChar \ldots{}
15619 Theorem
15620 \family default
15621 .
15622 \end_layout
15623
15624 \begin_layout Standard
15625
15626 \family sans
15627 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15628  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15629 \family default
15630 .
15631  See the Springer class file documentation for details.
15632 \end_layout
15633
15634 \begin_layout Subsection
15635 Supported journals
15636 \end_layout
15637
15638 \begin_layout Itemize
15639
15640 \emph on
15641 Journal of Geodesy
15642 \emph default
15643
15644 \family typewriter
15645 svjog.layout
15646 \family default
15647  — Martin Vermeer
15648 \end_layout
15649
15650 \begin_layout Itemize
15651
15652 \emph on
15653 Probability Theory and Related Fields
15654 \emph default
15655
15656 \family typewriter
15657 svprobth.layout
15658 \family default
15659  — Jean-Marc Lasgouttes
15660 \end_layout
15661
15662 \begin_layout Standard
15663 Add your own, it isn't so hard!
15664 \end_layout
15665
15666 \begin_layout Subsection
15667 Credits
15668 \end_layout
15669
15670 \begin_layout Standard
15671 These files are partly based on the older 
15672 \family typewriter
15673 ejour2.layout
15674 \family default
15675 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15676  file from Springer.
15677  All this, and the 
15678 \family typewriter
15679 ejour2
15680 \family default
15681  layout, are now defunct.
15682  Jean-Marc Lasgouttes helped out big in making me find my way around the
15683  LyX layout file mechanism.
15684 \end_layout
15685
15686 \begin_layout Subsection
15687 Bugs
15688 \end_layout
15689
15690 \begin_layout Standard
15691 Probably.
15692  But probably less than in the old hacked-LaTeX 
15693 \family typewriter
15694 ejour2
15695 \family default
15696 .
15697 \end_layout
15698
15699 \begin_layout Standard
15700 Limitations e.
15701 \begin_inset space \thinspace{}
15702 \end_inset
15703
15704 g.: does not display the number for theorem-like layouts, just #.
15705 \end_layout
15706
15707 \begin_layout Section
15708 Slides [aka 
15709 \noun on
15710 SliTeX
15711 \noun default
15712 ]
15713 \begin_inset CommandInset label
15714 LatexCommand label
15715 name "sec:slitex"
15716
15717 \end_inset
15718
15719
15720 \end_layout
15721
15722 \begin_layout Standard
15723 by 
15724 \noun on
15725 John Weiss
15726 \noun default
15727  
15728 \end_layout
15729
15730 \begin_layout Subsection
15731 Introduction
15732 \end_layout
15733
15734 \begin_layout Standard
15735 This section describes how to use LyX to make slides for overhead projectors.
15736  There are two document classes that can do this: the default slides class
15737  and the 
15738 \family sans
15739 FoilTeX
15740 \family default
15741  slides class.
15742  This section documents the former.
15743 \end_layout
15744
15745 \begin_layout Standard
15746 I'm going to say this again, nice and clear, so that there's no misunderstanding
15747 :
15748 \end_layout
15749
15750 \begin_layout Standard
15751 \begin_inset VSpace bigskip
15752 \end_inset
15753
15754
15755 \end_layout
15756
15757 \begin_layout Standard
15758 \align center
15759
15760 \size large
15761 This section documents the class 
15762 \begin_inset Quotes eld
15763 \end_inset
15764
15765
15766 \family sans
15767 slides (default)
15768 \family default
15769
15770 \begin_inset Quotes erd
15771 \end_inset
15772
15773  
15774 \emph on
15775 only.
15776 \end_layout
15777
15778 \begin_layout Standard
15779 \begin_inset VSpace bigskip
15780 \end_inset
15781
15782
15783 \end_layout
15784
15785 \begin_layout Standard
15786 If you're looking for the documentation for 
15787 \begin_inset Quotes eld
15788 \end_inset
15789
15790
15791 \family sans
15792 slides (FoilTeX)
15793 \family default
15794
15795 \begin_inset Quotes erd
15796 \end_inset
15797
15798 , check out section
15799 \begin_inset space ~
15800 \end_inset
15801
15802
15803 \begin_inset CommandInset ref
15804 LatexCommand ref
15805 reference "sec:foiltex"
15806
15807 \end_inset
15808
15809 .
15810  The 
15811 \family sans
15812 foils
15813 \family default
15814  class [
15815 \begin_inset Quotes eld
15816 \end_inset
15817
15818
15819 \family sans
15820 slides (FoilTeX)
15821 \family default
15822
15823 \begin_inset Quotes erd
15824 \end_inset
15825
15826 ] is actually somewhat better than the default 
15827 \family sans
15828 slides
15829 \family default
15830  class,
15831 \begin_inset Foot
15832 status collapsed
15833
15834 \begin_layout Plain Layout
15835 \SpecialChar \ldots{}
15836 or so I've been told repeatedly by its advocates.
15837  Having never used it, I have no idea if this claim is true or not.
15838 \end_layout
15839
15840 \end_inset
15841
15842  which this section documents.
15843 \end_layout
15844
15845 \begin_layout Standard
15846 This class is the LaTeX2e improvement of the old 
15847 \noun on
15848 SliTeX
15849 \noun default
15850  package.
15851  Every LaTeX2e distribution includes this class [which I'll just refer to
15852  as 
15853 \begin_inset Quotes eld
15854 \end_inset
15855
15856
15857 \family sans
15858 slides
15859 \family default
15860
15861 \begin_inset Quotes erd
15862 \end_inset
15863
15864  from now on], so you're bound to have it.
15865  As I noted earlier, there are other classes, such as 
15866 \family sans
15867 foils
15868 \family default
15869 , which also produce slides for overhead projectors and do a better job
15870  at it.
15871  However, there are some things which 
15872 \family sans
15873 slides
15874 \family default
15875  can do which the others can't, such as generate overlays.
15876  Read on to learn more!
15877 \end_layout
15878
15879 \begin_layout Subsection
15880 Getting Started
15881 \begin_inset CommandInset label
15882 LatexCommand label
15883 name "sec:slidesetup"
15884
15885 \end_inset
15886
15887
15888 \end_layout
15889
15890 \begin_layout Standard
15891 Obviously, to use this document class, you need to select 
15892 \begin_inset Quotes eld
15893 \end_inset
15894
15895
15896 \family sans
15897 slides (default)
15898 \family default
15899
15900 \begin_inset Quotes erd
15901 \end_inset
15902
15903  from the class list in the 
15904 \family sans
15905 Document\SpecialChar \menuseparator
15906 Settings
15907 \family default
15908  dialog.
15909  There are some other special things you should know about this class:
15910 \end_layout
15911
15912 \begin_layout Itemize
15913 Don't bother changing the options 
15914 \family sans
15915 Sides and Columns
15916 \family default
15917 .
15918  They're not supported by the 
15919 \family sans
15920 slides
15921 \family default
15922  class, anyways.
15923 \end_layout
15924
15925 \begin_layout Itemize
15926 The option 
15927 \family sans
15928 Page
15929 \begin_inset space ~
15930 \end_inset
15931
15932 style
15933 \family default
15934  behaves a bit differently for this class.
15935  The possible choices and what they do are as follows:
15936 \end_layout
15937
15938 \begin_deeper
15939 \begin_layout Description
15940
15941 \family sans
15942 plain
15943 \family default
15944  The final output contains page numbers in the lower right corner.
15945 \end_layout
15946
15947 \begin_layout Description
15948
15949 \family sans
15950 headings
15951 \family default
15952  Like 
15953 \family sans
15954 plain
15955 \family default
15956 , but also prints out any time markers you've put in.
15957  This is the default.
15958 \end_layout
15959
15960 \begin_layout Description
15961
15962 \family sans
15963 empty
15964 \family default
15965  The final output contains no page numbers, time markers, or alignment markers.
15966 \end_layout
15967
15968 \end_deeper
15969 \begin_layout Itemize
15970 The 
15971 \family sans
15972 slides
15973 \family default
15974  class has an extra option: 
15975 \family typewriter
15976 clock
15977 \family default
15978 .
15979  To use it, put 
15980 \begin_inset Quotes eld
15981 \end_inset
15982
15983
15984 \family typewriter
15985 clock
15986 \family default
15987
15988 \begin_inset Quotes erd
15989 \end_inset
15990
15991  in the extra class options.
15992 \end_layout
15993
15994 \begin_deeper
15995 \begin_layout Standard
15996 Using this options allows you to add time markers to 
15997 \family sans
15998 Note
15999 \family default
16000 s.
16001  See section
16002 \begin_inset space ~
16003 \end_inset
16004
16005
16006 \begin_inset CommandInset ref
16007 LatexCommand ref
16008 reference "sec:slideNote"
16009
16010 \end_inset
16011
16012  for more details.
16013 \end_layout
16014
16015 \end_deeper
16016 \begin_layout Standard
16017 You can also use the template file 
16018 \begin_inset Quotes eld
16019 \end_inset
16020
16021
16022 \family typewriter
16023 slides.lyx
16024 \family default
16025
16026 \begin_inset Quotes erd
16027 \end_inset
16028
16029  to automatically set up a document to use the 
16030 \family sans
16031 slides
16032 \family default
16033  class [using 
16034 \family sans
16035 File\SpecialChar \menuseparator
16036 New
16037 \begin_inset space ~
16038 \end_inset
16039
16040 from
16041 \begin_inset space ~
16042 \end_inset
16043
16044 Template
16045 \family default
16046  to open your new document].
16047  The template file also contains some examples of the special paragraph
16048  environments used by this class.
16049  I'll describe those next.
16050 \end_layout
16051
16052 \begin_layout Subsection
16053 Paragraph Environments
16054 \end_layout
16055
16056 \begin_layout Subsubsection
16057 Supported Environments
16058 \end_layout
16059
16060 \begin_layout Standard
16061 The first thing you'll notice when you start up a new 
16062 \family sans
16063 slides
16064 \family default
16065  document is the font size and type: it's the equivalent of the size 
16066 \begin_inset Quotes eld
16067 \end_inset
16068
16069
16070 \family sans
16071 Largest
16072 \family default
16073
16074 \begin_inset Quotes erd
16075 \end_inset
16076
16077  in the 
16078 \family sans
16079 Sans
16080 \begin_inset space ~
16081 \end_inset
16082
16083 Serif
16084 \family default
16085  font.
16086  This is also what's used in the output.
16087  Think of this as a 
16088 \begin_inset Quotes eld
16089 \end_inset
16090
16091 visual cue
16092 \begin_inset Quotes erd
16093 \end_inset
16094
16095  to remind you that this is a slide.
16096  Your final slides will use a larger font; ergo, you'll have less space.
16097  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16098 \end_layout
16099
16100 \begin_layout Standard
16101 The next thing that becomes obvious is the changes to the paragraph environment
16102  pull-down box [at the far-left end of the toolbar].
16103  Most of the paragraph environments you're used to seeing are missing.
16104  There are also five new ones.
16105  That's because the 
16106 \family sans
16107 slides
16108 \family default
16109  class itself only supports certain paragraph environments:
16110 \end_layout
16111
16112 \begin_layout Itemize
16113
16114 \family sans
16115 Standard
16116 \end_layout
16117
16118 \begin_layout Itemize
16119
16120 \family sans
16121 Itemize
16122 \end_layout
16123
16124 \begin_layout Itemize
16125
16126 \family sans
16127 Enumerate
16128 \end_layout
16129
16130 \begin_layout Itemize
16131
16132 \family sans
16133 Description
16134 \end_layout
16135
16136 \begin_layout Itemize
16137
16138 \family sans
16139 List
16140 \end_layout
16141
16142 \begin_layout Itemize
16143
16144 \family sans
16145 Quotation
16146 \end_layout
16147
16148 \begin_layout Itemize
16149
16150 \family sans
16151 Quote
16152 \end_layout
16153
16154 \begin_layout Itemize
16155
16156 \family sans
16157 Verse
16158 \end_layout
16159
16160 \begin_layout Itemize
16161
16162 \family sans
16163 Caption
16164 \end_layout
16165
16166 \begin_layout Itemize
16167
16168 \family sans
16169 LyX-Code
16170 \end_layout
16171
16172 \begin_layout Itemize
16173
16174 \family sans
16175 Comment
16176 \end_layout
16177
16178 \begin_layout Standard
16179 All of the other standard environments, including the section-heading environmen
16180 ts, aren't used in the 
16181 \family sans
16182 slides
16183 \family default
16184  class.
16185 \end_layout
16186
16187 \begin_layout Standard
16188 On the other hand, you'll notice the following new environments:
16189 \end_layout
16190
16191 \begin_layout Itemize
16192
16193 \family sans
16194 Slide
16195 \end_layout
16196
16197 \begin_layout Itemize
16198
16199 \family sans
16200 Overlay
16201 \end_layout
16202
16203 \begin_layout Itemize
16204
16205 \family sans
16206 Note
16207 \end_layout
16208
16209 \begin_layout Itemize
16210
16211 \family sans
16212 InvisibleText
16213 \end_layout
16214
16215 \begin_layout Itemize
16216
16217 \family sans
16218 VisibleText
16219 \end_layout
16220
16221 \begin_layout Standard
16222 These five are kind of quirky, due to a 
16223 \begin_inset Quotes eld
16224 \end_inset
16225
16226 feature
16227 \begin_inset Quotes erd
16228 \end_inset
16229
16230  in LyX.
16231  You see, LyX doesn't permit you to nest any other paragraph environment
16232  into an empty environment.
16233  Now, that's fine and dandy, but it means that you wouldn't be able to start
16234  a slide with anything except plain text.
16235  To deal with this, I've performed a little 
16236 \begin_inset Quotes eld
16237 \end_inset
16238
16239 LaTeX magic.
16240 \begin_inset Quotes erd
16241 \end_inset
16242
16243  
16244 \end_layout
16245
16246 \begin_layout Subsubsection
16247 Quirks of the New Environments
16248 \begin_inset CommandInset label
16249 LatexCommand label
16250 name "sec:slideQuirk"
16251
16252 \end_inset
16253
16254
16255 \end_layout
16256
16257 \begin_layout Standard
16258 All five of the new paragraph environments are somewhat quirky due to inherent
16259  limitiations in the current version of LyX.
16260  As I just mentioned, LyX forbids environments that begin with another environme
16261 nt.
16262  To get around this, the 
16263 \family sans
16264 Slide
16265 \family default
16266  environment isn't a paragraph environment as described in the 
16267 \emph on
16268 User's Guide
16269 \emph default
16270 .
16271  
16272 \end_layout
16273
16274 \begin_layout Standard
16275 You should consider 
16276 \family sans
16277 Slide
16278 \family default
16279
16280 \family sans
16281 Overlay
16282 \family default
16283 , and 
16284 \family sans
16285 Note
16286 \family default
16287  to be 
16288 \begin_inset Quotes eld
16289 \end_inset
16290
16291 pseudo-environments.
16292 \begin_inset Quotes erd
16293 \end_inset
16294
16295  They look like a section heading or a 
16296 \begin_inset Quotes eld
16297 \end_inset
16298
16299
16300 \family sans
16301 Caption
16302 \family default
16303 ,
16304 \begin_inset Quotes erd
16305 \end_inset
16306
16307  but really begin a [and, if necessary, end the previous] paragraph environment.
16308  Likewise, treat 
16309 \family sans
16310 InvisibleText
16311 \family default
16312  and 
16313 \family sans
16314 VisibleText
16315 \family default
16316  as 
16317 \begin_inset Quotes eld
16318 \end_inset
16319
16320 pseudo-commands.
16321 \begin_inset Quotes erd
16322 \end_inset
16323
16324  These two perform some action.
16325 \end_layout
16326
16327 \begin_layout Standard
16328 A common feature of all five environments, 
16329 \family sans
16330 Slide
16331 \family default
16332
16333 \family sans
16334 Overlay
16335 \family default
16336
16337 \family sans
16338 Note
16339 \family default
16340
16341 \family sans
16342 InvisibleText
16343 \family default
16344  and 
16345 \family sans
16346 VisibleText
16347 \family default
16348 , is a rather long-ish label.
16349  The text following this label — ordinarily the contents of the paragraph
16350  environment — is utterly irrelevant for 
16351 \family sans
16352 Slide
16353 \family default
16354
16355 \family sans
16356 Overlay
16357 \family default
16358
16359 \family sans
16360 Note
16361 \family default
16362
16363 \family sans
16364 InvisibleText
16365 \family default
16366  and 
16367 \family sans
16368 VisibleText
16369 \family default
16370 .
16371  LyX completely ignores it.
16372  In fact, you can leave these five environments completely empty.
16373  
16374 \end_layout
16375
16376 \begin_layout Standard
16377 While you don't 
16378 \emph on
16379 have
16380 \emph default
16381  to put any text after the rather long-ish label, you might want to.
16382  This could be a short description of the contents of the 
16383 \family sans
16384 Slide
16385 \family default
16386 , for example.
16387  In that case, enter your descriptive comment and hit 
16388 \family sans
16389 Return
16390 \family default
16391  as you normally would.
16392 \end_layout
16393
16394 \begin_layout Standard
16395 If, on the other hand, you don't want to enter any descriptive text, you'll
16396  hit another LyX quirk.
16397  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16398  environment until you put something in the old one.
16399  So, do this:
16400 \end_layout
16401
16402 \begin_layout Itemize
16403 Start entering the text that will 
16404 \emph on
16405 follow
16406 \emph default
16407  the new 
16408 \family sans
16409 Slide
16410 \family default
16411
16412 \family sans
16413 Overlay
16414 \family default
16415
16416 \family sans
16417 Note
16418 \family default
16419
16420 \family sans
16421 InvisibleText
16422 \family default
16423  or 
16424 \family sans
16425 VisibleText
16426 \family default
16427 .
16428  
16429 \end_layout
16430
16431 \begin_layout Itemize
16432 Now move to the beginning of that paragraph.
16433  
16434 \end_layout
16435
16436 \begin_layout Itemize
16437 Next, hit 
16438 \family sans
16439 Return
16440 \family default
16441 .
16442  
16443 \end_layout
16444
16445 \begin_layout Itemize
16446 Finally, change this new, empty paragraph to a 
16447 \family sans
16448 Slide
16449 \family default
16450
16451 \family sans
16452 Overlay
16453 \family default
16454
16455 \family sans
16456 Note
16457 \family default
16458
16459 \family sans
16460 InvisibleText
16461 \family default
16462  or 
16463 \family sans
16464 VisibleText
16465 \family default
16466 .
16467  
16468 \end_layout
16469
16470 \begin_layout Standard
16471 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16472
16473 \end_layout
16474
16475 \begin_layout Subsection
16476 Making a Presentation with 
16477 \family sans
16478 Slide
16479 \family default
16480
16481 \family sans
16482 Overlay
16483 \family default
16484  and 
16485 \family sans
16486 Note
16487 \end_layout
16488
16489 \begin_layout Subsubsection
16490 Using the 
16491 \family sans
16492 Slide
16493 \family default
16494  Environment
16495 \end_layout
16496
16497 \begin_layout Standard
16498 If you're expecting this section to teach you how to actually make a presentatio
16499 n, you'll be sorely disappointed.
16500  Naturally, I'll describe all of the ways the 
16501 \family sans
16502 slides
16503 \family default
16504  class can assist you in preparing the materials for a presentation.
16505  Filling in the contents, however, is up to you.
16506  [Then again, that 
16507 \emph on
16508 is
16509 \emph default
16510  the LyX philosophy.]
16511 \end_layout
16512
16513 \begin_layout Standard
16514 Choosing the 
16515 \family sans
16516 Slide
16517 \family default
16518  environment [in the manner described in section
16519 \begin_inset space ~
16520 \end_inset
16521
16522
16523 \begin_inset CommandInset ref
16524 LatexCommand ref
16525 reference "sec:slideQuirk"
16526
16527 \end_inset
16528
16529 ] tells LyX to begin a new slide [duh].
16530  The label for this environment/
16531 \begin_inset Quotes erd
16532 \end_inset
16533
16534 pseudo-command
16535 \begin_inset Quotes erd
16536 \end_inset
16537
16538  is an 
16539 \begin_inset Quotes eld
16540 \end_inset
16541
16542 ASCII line,
16543 \begin_inset Quotes erd
16544 \end_inset
16545
16546  in cool blue, followed by the label, 
16547 \begin_inset Quotes eld
16548 \end_inset
16549
16550 NewSlide:
16551 \begin_inset Quotes erd
16552 \end_inset
16553
16554 .
16555  Any text or paragraph environments that follow this one go on the new slide.
16556  It's that simple.
16557 \end_layout
16558
16559 \begin_layout Standard
16560 Slides are probably the only time you'll need to forcibly end pages in LyX
16561  (this can be specified in the 
16562 \family sans
16563 Paragraph Layout
16564 \family default
16565  dialog).
16566  In fact, you'll want to, once you finish entering the contents of one slide.
16567  If you've entered more text than can physically fit on a slide, the extra
16568  overflows onto a new slide.
16569  I don't recommend doing this, however, since the overflow slide won't have
16570  any page number on it.
16571  Furthermore, it may interfere with any 
16572 \family sans
16573 Overlay
16574 \family default
16575  you've made to accompany the oversized 
16576 \family sans
16577 Slide
16578 \family default
16579 .
16580 \end_layout
16581
16582 \begin_layout Standard
16583 The 
16584 \family sans
16585 Overlay
16586 \family default
16587  and 
16588 \family sans
16589 Note
16590 \family default
16591  environments work the same way as the 
16592 \family sans
16593 Slide
16594 \family default
16595  environment.
16596  They both create an 
16597 \begin_inset Quotes eld
16598 \end_inset
16599
16600 ASCII line
16601 \begin_inset Quotes erd
16602 \end_inset
16603
16604  followed by a label [
16605 \begin_inset Quotes eld
16606 \end_inset
16607
16608 NewOverlay:
16609 \begin_inset Quotes erd
16610 \end_inset
16611
16612  and 
16613 \begin_inset Quotes eld
16614 \end_inset
16615
16616 NewNote:
16617 \begin_inset Quotes erd
16618 \end_inset
16619
16620 , respectively].
16621  The color is a stunning magenta instead of blue, and the 
16622 \begin_inset Quotes eld
16623 \end_inset
16624
16625 ASCII line
16626 \begin_inset Quotes erd
16627 \end_inset
16628
16629  will look different, in style and in length.
16630  The label fonts of all three also differ from one another.
16631 \end_layout
16632
16633 \begin_layout Standard
16634 As with a 
16635 \family sans
16636 Slide
16637 \family default
16638 , if the contents of a 
16639 \family sans
16640 Note
16641 \family default
16642  or 
16643 \family sans
16644 Overlay
16645 \family default
16646  exceed the physical size of a slide or sheet of paper, the extra will overflow
16647  onto a new sheet.
16648  Again, you should avoid this.
16649  It defeats the whole purpose of 
16650 \family sans
16651 Note
16652 \family default
16653 s and 
16654 \family sans
16655 Overlay
16656 \family default
16657 s.
16658 \end_layout
16659
16660 \begin_layout Subsubsection
16661 Using 
16662 \family sans
16663 Overlay
16664 \family default
16665  with 
16666 \family sans
16667 Slide
16668 \end_layout
16669
16670 \begin_layout Standard
16671 The idea behind an 
16672 \family sans
16673 Overlay
16674 \family default
16675  is a slide that sits atop another slide.
16676  Perhaps you wish to discuss a figure on the main 
16677 \family sans
16678 Slide
16679 \family default
16680  before displaying the text associated with it.
16681  One way to accomplish this is tape a flap of dark paper over the part of
16682  the 
16683 \family sans
16684 Slide
16685 \family default
16686  you want to display later.
16687  This method fails, however, if you wish to overlap one graph with another,
16688  for example.
16689  You would then have to fumble while speaking to align the two separate,
16690  overlapping 
16691 \family sans
16692 Slide
16693 \family default
16694 s to align the two graphs.
16695  The use of an 
16696 \family sans
16697 Overlay
16698 \family default
16699  environment in both cases makes life much easier.
16700 \end_layout
16701
16702 \begin_layout Standard
16703 Each 
16704 \family sans
16705 Overlay
16706 \family default
16707  receives the page number of its 
16708 \begin_inset Quotes eld
16709 \end_inset
16710
16711 parent
16712 \begin_inset Quotes erd
16713 \end_inset
16714
16715  
16716 \family sans
16717 Slide
16718 \family default
16719 , appended by 
16720 \begin_inset Quotes eld
16721 \end_inset
16722
16723
16724 \family typewriter
16725 -a
16726 \family default
16727
16728 \begin_inset Quotes erd
16729 \end_inset
16730
16731 .
16732 \begin_inset Foot
16733 status collapsed
16734
16735 \begin_layout Plain Layout
16736 Presumably, mutliple 
16737 \family sans
16738 Overlay
16739 \family default
16740 s would have 
16741 \begin_inset Quotes eld
16742 \end_inset
16743
16744
16745 \family typewriter
16746 -a
16747 \family default
16748
16749 \begin_inset Quotes erd
16750 \end_inset
16751
16752
16753 \begin_inset Quotes eld
16754 \end_inset
16755
16756
16757 \family typewriter
16758 -b
16759 \family default
16760
16761 \begin_inset Quotes erd
16762 \end_inset
16763
16764
16765 \begin_inset Quotes eld
16766 \end_inset
16767
16768
16769 \family typewriter
16770 -c
16771 \family default
16772
16773 \begin_inset Quotes erd
16774 \end_inset
16775
16776 , etc.
16777 \begin_inset space ~
16778 \end_inset
16779
16780 appended to the page number of the parent 
16781 \family sans
16782 Slide
16783 \family default
16784 .
16785  
16786 \end_layout
16787
16788 \end_inset
16789
16790  Clearly, you want the contents of both the 
16791 \family sans
16792 Slide
16793 \family default
16794  and the 
16795 \family sans
16796 Overlay
16797 \family default
16798  to each fit on a single physical slide! You should probably consider an
16799  
16800 \family sans
16801 Overlay
16802 \family default
16803  as 
16804 \begin_inset Quotes eld
16805 \end_inset
16806
16807 part of
16808 \begin_inset Quotes erd
16809 \end_inset
16810
16811  a 
16812 \family sans
16813 Slide
16814 \family default
16815 .
16816  Indeed, the LyX 
16817 \family sans
16818 slides
16819 \family default
16820  class provides a visual cue for this: the label at the start of an 
16821 \family sans
16822 Overlay
16823 \family default
16824  is shorter than that at the start of a 
16825 \family sans
16826 Slide
16827 \family default
16828 .
16829  Lastly, when you generate printable output, you'll find alignment markers
16830  in all four corners of both the 
16831 \family sans
16832 Overlay
16833 \family default
16834  page and its parent 
16835 \family sans
16836 Slide
16837 \family default
16838 .
16839  These will assist you in lining up the two physical slides.
16840 \end_layout
16841
16842 \begin_layout Standard
16843 The major problem in overlaying two slides is aligning the contents of the
16844  two transparencies.
16845  How much space should you leave for that graph on the second slide? Worse
16846  still, what if you want a graph and a sentence on second slide, but there
16847  is text on the main transparency that goes in between them? You could try
16848  and insert vertical space of the right size.
16849  The better way is to use 
16850 \family sans
16851 InvisibleText
16852 \family default
16853  and 
16854 \family sans
16855 VisibleText
16856 \family default
16857 .
16858 \end_layout
16859
16860 \begin_layout Standard
16861 As their names imply, 
16862 \family sans
16863 InvisibleText
16864 \family default
16865  and 
16866 \family sans
16867 VisibleText
16868 \family default
16869  are two command-like paragraph environments that make all subsequent text
16870  invisible and visible, respectively.
16871  Note from section
16872 \begin_inset space ~
16873 \end_inset
16874
16875
16876 \begin_inset CommandInset ref
16877 LatexCommand ref
16878 reference "sec:slideQuirk"
16879
16880 \end_inset
16881
16882  that you don't place anything 
16883 \emph on
16884 into
16885 \emph default
16886  these two environments, however.
16887  When you create an 
16888 \family sans
16889 InvisibleText
16890 \family default
16891 , it inserts a centered, sky-blue label into the page reading 
16892 \begin_inset Quotes eld
16893 \end_inset
16894
16895 <Invisible Text Follows>
16896 \begin_inset Quotes erd
16897 \end_inset
16898
16899 .
16900  For paragraphs following this label, the parts of the 
16901 \family sans
16902 Slide
16903 \family default
16904  [or 
16905 \family sans
16906 Overlay
16907 \family default
16908 ; it doesn't matter which] where they would be contain instead blank space.
16909  
16910 \end_layout
16911
16912 \begin_layout Standard
16913 For 
16914 \family sans
16915 VisibleText
16916 \family default
16917 , the corresponding centered label is 
16918 \begin_inset Quotes eld
16919 \end_inset
16920
16921 <Visible Text Follows>
16922 \begin_inset Quotes erd
16923 \end_inset
16924
16925  in blazing green.
16926  Paragraphs following this label behave normally.
16927  Note that the beginning of a new 
16928 \family sans
16929 Slide
16930 \family default
16931
16932 \family sans
16933 Overlay
16934 \family default
16935 , or 
16936 \family sans
16937 Note
16938 \family default
16939  automatically shuts off an 
16940 \family sans
16941 InvisibleText
16942 \family default
16943 .
16944  It's therefore not necessary to use 
16945 \family sans
16946 VisibleText
16947 \family default
16948  at the end of a 
16949 \family sans
16950 Slide
16951 \family default
16952 .
16953 \end_layout
16954
16955 \begin_layout Standard
16956 By now, it should be obvious how to create overlay transparencies using
16957  the proper combination of 
16958 \family sans
16959 InvisibleText
16960 \family default
16961  and 
16962 \family sans
16963 VisibleText
16964 \family default
16965  on a 
16966 \family sans
16967 Slide
16968 \family default
16969  and 
16970 \family sans
16971 Overlay
16972 \family default
16973 :
16974 \end_layout
16975
16976 \begin_layout Enumerate
16977 Create a 
16978 \family sans
16979 Slide
16980 \family default
16981 , including everything that will appear on it, whether on the main slide
16982  or on the 
16983 \family sans
16984 Overlay
16985 \family default
16986 .
16987 \end_layout
16988
16989 \begin_layout Enumerate
16990 Before each figure or paragraph that will appear only on the 
16991 \family sans
16992 Overlay
16993 \family default
16994 , insert an 
16995 \family sans
16996 InvisibleText
16997 \family default
16998  environment.
16999  If necessary, insert a 
17000 \family sans
17001 VisibleText
17002 \family default
17003  environment after the 
17004 \family sans
17005 Overlay
17006 \family default
17007 -only text.
17008 \end_layout
17009
17010 \begin_layout Enumerate
17011 Start an 
17012 \family sans
17013 Overlay
17014 \family default
17015  immediately following the 
17016 \family sans
17017 Slide
17018 \family default
17019 .
17020 \end_layout
17021
17022 \begin_layout Enumerate
17023 Copy the contents of this 
17024 \family sans
17025 Slide
17026 \family default
17027  into the 
17028 \family sans
17029 Overlay
17030 \family default
17031 .
17032 \end_layout
17033
17034 \begin_layout Enumerate
17035 Within the 
17036 \family sans
17037 Overlay
17038 \family default
17039 , change all of the 
17040 \family sans
17041 InvisibleText
17042 \family default
17043  lines to 
17044 \family sans
17045 VisibleText
17046 \family default
17047  and vice-versa.
17048 \end_layout
17049
17050 \begin_layout Standard
17051 That's it.
17052  You've just made an 
17053 \family sans
17054 Overlay
17055 \family default
17056 .
17057 \end_layout
17058
17059 \begin_layout Standard
17060 There's one problem with the way I've designed the LyX 
17061 \family sans
17062 slides
17063 \family default
17064  class: you can't make text in the middle of a paragraph invisible, nor
17065  make text in the middle of an invisible paragraph visible again.
17066  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17067 \begin_inset Foot
17068 status collapsed
17069
17070 \begin_layout Plain Layout
17071 The commands of interest are: 
17072 \end_layout
17073
17074 \begin_layout Itemize
17075
17076 \family typewriter
17077 {
17078 \backslash
17079 invisible \SpecialChar \ldots{}
17080  }
17081 \end_layout
17082
17083 \begin_layout Itemize
17084
17085 \family typewriter
17086 {
17087 \backslash
17088 visible \SpecialChar \ldots{}
17089  }
17090 \end_layout
17091
17092 \begin_layout Plain Layout
17093 \SpecialChar \ldots{}
17094 and need to be marked as TeX.
17095  The text whose 
17096 \begin_inset Quotes eld
17097 \end_inset
17098
17099 visibility
17100 \begin_inset Quotes erd
17101 \end_inset
17102
17103  you wish to change goes in between the brackets [and after the 
17104 \family typewriter
17105
17106 \backslash
17107 invisible
17108 \family default
17109  or 
17110 \family typewriter
17111
17112 \backslash
17113 visible
17114 \family default
17115  command].
17116  If you don't know how to mark text as TeX, see the appropriate section
17117  of the 
17118 \emph on
17119 User's Guide
17120 \emph default
17121 .
17122 \end_layout
17123
17124 \end_inset
17125
17126
17127 \end_layout
17128
17129 \begin_layout Subsubsection
17130 Using 
17131 \family sans
17132 Note
17133 \family default
17134  with 
17135 \family sans
17136 Slide
17137 \family default
17138
17139 \begin_inset CommandInset label
17140 LatexCommand label
17141 name "sec:slideNote"
17142
17143 \end_inset
17144
17145
17146 \end_layout
17147
17148 \begin_layout Standard
17149 Like an 
17150 \family sans
17151 Overlay
17152 \family default
17153 , a 
17154 \family sans
17155 Note
17156 \family default
17157  is associated with a 
17158 \begin_inset Quotes eld
17159 \end_inset
17160
17161 parent
17162 \begin_inset Quotes erd
17163 \end_inset
17164
17165  
17166 \family sans
17167 Slide
17168 \family default
17169 .
17170  Here, too, the LyX 
17171 \family sans
17172 slides
17173 \family default
17174  class provides visual cues.
17175  The label for a 
17176 \family sans
17177 Note
17178 \family default
17179  is shorter than that of a 
17180 \family sans
17181 Slide
17182 \family default
17183  [yet longer than that of an 
17184 \family sans
17185 Overlay
17186 \family default
17187 ] and, like the label of an 
17188 \family sans
17189 Overlay
17190 \family default
17191  is shockingly magenta.
17192  Additionally, the printed 
17193 \family sans
17194 Note
17195 \family default
17196  has the page number of its 
17197 \begin_inset Quotes eld
17198 \end_inset
17199
17200 parent
17201 \begin_inset Quotes erd
17202 \end_inset
17203
17204  
17205 \family sans
17206 Slide
17207 \family default
17208 , appended by 
17209 \begin_inset Quotes eld
17210 \end_inset
17211
17212
17213 \family typewriter
17214 -
17215 \family default
17216 1
17217 \begin_inset Quotes erd
17218 \end_inset
17219
17220
17221 \begin_inset Quotes eld
17222 \end_inset
17223
17224
17225 \family typewriter
17226 -
17227 \family default
17228 2
17229 \begin_inset Quotes erd
17230 \end_inset
17231
17232
17233 \begin_inset Quotes eld
17234 \end_inset
17235
17236
17237 \family typewriter
17238 -
17239 \family default
17240 3
17241 \begin_inset Quotes erd
17242 \end_inset
17243
17244 , etc.
17245  You can have multiple 
17246 \family sans
17247 Note
17248 \family default
17249 s associated with a single 
17250 \family sans
17251 Slide
17252 \family default
17253 , and, as with 
17254 \family sans
17255 Slide
17256 \family default
17257  and 
17258 \family sans
17259 Overlay
17260 \family default
17261 , you'll probably want to break up long 
17262 \family sans
17263 Note
17264 \family default
17265 s so that they fit on a single sheet of paper.
17266 \end_layout
17267
17268 \begin_layout Standard
17269 The purpose of a 
17270 \family sans
17271 Note
17272 \family default
17273  is obvious: it contains anything additional you might want to say about
17274  a 
17275 \family sans
17276 Slide
17277 \family default
17278 .
17279  It could also be used as a sheet of reminders for a particular 
17280 \family sans
17281 Slide
17282 \family default
17283 .
17284  In the case of the latter, you might want to make use of time markers.
17285  Currently, the LyX 
17286 \family sans
17287 slides
17288 \family default
17289  class has no 
17290 \begin_inset Quotes eld
17291 \end_inset
17292
17293 native
17294 \begin_inset Quotes erd
17295 \end_inset
17296
17297  support for time markers, a 
17298 \noun on
17299 SliTeX
17300 \noun default
17301  feature.
17302  So, you'll have to resort to using the LaTeX codes.
17303 \end_layout
17304
17305 \begin_layout Standard
17306 To use time markers, you'll need to specify the extra class option 
17307 \begin_inset Quotes eld
17308 \end_inset
17309
17310
17311 \family typewriter
17312 clock
17313 \family default
17314
17315 \begin_inset Quotes erd
17316 \end_inset
17317
17318  [see section
17319 \begin_inset space ~
17320 \end_inset
17321
17322
17323 \begin_inset CommandInset ref
17324 LatexCommand ref
17325 reference "sec:slidesetup"
17326
17327 \end_inset
17328
17329 ].
17330  This option turns on timing marks, which will appear in the lower-left-hand
17331  corner of every 
17332 \family sans
17333 Note
17334 \family default
17335  you generate.
17336  To set what appears in the time marker, you use the LaTeX commands 
17337 \begin_inset Quotes eld
17338 \end_inset
17339
17340
17341 \family typewriter
17342
17343 \backslash
17344 settime{}
17345 \family default
17346
17347 \begin_inset Quotes erd
17348 \end_inset
17349
17350  and 
17351 \begin_inset Quotes eld
17352 \end_inset
17353
17354
17355 \family typewriter
17356
17357 \backslash
17358 addtime{}
17359 \family default
17360
17361 \begin_inset Quotes erd
17362 \end_inset
17363
17364 .
17365  The arguments of both commands are time measured in seconds.
17366  
17367 \begin_inset Quotes eld
17368 \end_inset
17369
17370
17371 \family typewriter
17372
17373 \backslash
17374 settime{}
17375 \family default
17376
17377 \begin_inset Quotes erd
17378 \end_inset
17379
17380  sets the time marker to a given time.
17381  
17382 \begin_inset Quotes eld
17383 \end_inset
17384
17385
17386 \family typewriter
17387
17388 \backslash
17389 addtime{}
17390 \family default
17391
17392 \begin_inset Quotes erd
17393 \end_inset
17394
17395  increments the time marker by the specified amount.
17396  Using time markers and 
17397 \family sans
17398 Note
17399 \family default
17400 s in this fashion, you can remind yourself how much time to spend on a particula
17401
17402 \family sans
17403 Slide
17404 \family default
17405 .
17406 \end_layout
17407
17408 \begin_layout Standard
17409 There's one last feature to describe.
17410  Clearly, you'd like to print out all of your 
17411 \family sans
17412 Slide
17413 \family default
17414 s and 
17415 \family sans
17416 Overlay
17417 \family default
17418 s on transparencies while printing all of your 
17419 \family sans
17420 Note
17421 \family default
17422 s on plain paper.
17423  However, a 
17424 \family sans
17425 Note
17426 \family default
17427  
17428 \emph on
17429 must
17430 \emph default
17431  follow the 
17432 \family sans
17433 Slide
17434 \family default
17435  with which it is associated.
17436  What's a person to do?
17437 \end_layout
17438
17439 \begin_layout Standard
17440 Luckily, there are two LaTeX commands that allow you to select what to print
17441  out.
17442  Both must be placed into the preamble of your document.
17443  The command 
17444 \begin_inset Quotes eld
17445 \end_inset
17446
17447
17448 \family typewriter
17449
17450 \backslash
17451 onlyslides{
17452 \backslash
17453 slides}
17454 \family default
17455
17456 \begin_inset Quotes erd
17457 \end_inset
17458
17459  will cause the output to contain only the 
17460 \family sans
17461 Slide
17462 \family default
17463 s and 
17464 \family sans
17465 Overlay
17466 \family default
17467 s.
17468  Correspondingly, the command 
17469 \begin_inset Quotes eld
17470 \end_inset
17471
17472
17473 \family typewriter
17474
17475 \backslash
17476 onlynotes{
17477 \backslash
17478 notes}
17479 \family default
17480
17481 \begin_inset Quotes erd
17482 \end_inset
17483
17484  prevents the output of anything but 
17485 \family sans
17486 Note
17487 \family default
17488 s.
17489  I'd advise placing both commands in the preamble and initially comment
17490  both out.
17491  You can then preview your entire presentation as you write.
17492  When you're done writing, you can then uncomment one of the two to select
17493  what you want to print.
17494  I like to uncomment 
17495 \begin_inset Quotes eld
17496 \end_inset
17497
17498
17499 \family typewriter
17500
17501 \backslash
17502 onlyslides{
17503 \backslash
17504 slides}
17505 \family default
17506
17507 \begin_inset Quotes erd
17508 \end_inset
17509
17510  , print to a file with 
17511 \begin_inset Quotes eld
17512 \end_inset
17513
17514
17515 \family typewriter
17516 -slides
17517 \family default
17518
17519 \begin_inset Quotes erd
17520 \end_inset
17521
17522  in its name, comment it back out, then uncomment 
17523 \begin_inset Quotes eld
17524 \end_inset
17525
17526
17527 \family typewriter
17528
17529 \backslash
17530 onlynotes{
17531 \backslash
17532 notes}
17533 \family default
17534
17535 \begin_inset Quotes erd
17536 \end_inset
17537
17538  and print to a 
17539 \begin_inset Quotes eld
17540 \end_inset
17541
17542
17543 \family typewriter
17544 *-notes.ps
17545 \family default
17546
17547 \begin_inset Quotes erd
17548 \end_inset
17549
17550  file.
17551  I can then send either file to a printer, loading transparencies or plain
17552  paper as appropriate.
17553 \end_layout
17554
17555 \begin_layout Standard
17556 You can also provide other arguments to the 
17557 \begin_inset Quotes eld
17558 \end_inset
17559
17560
17561 \family typewriter
17562
17563 \backslash
17564 onlyslides{}
17565 \family default
17566
17567 \begin_inset Quotes erd
17568 \end_inset
17569
17570  and 
17571 \begin_inset Quotes eld
17572 \end_inset
17573
17574
17575 \family typewriter
17576
17577 \backslash
17578 onlynotes{}
17579 \family default
17580
17581 \begin_inset Quotes erd
17582 \end_inset
17583
17584  commands.
17585  See a good LaTeX book for details.
17586 \end_layout
17587
17588 \begin_layout Subsection
17589 The 
17590 \family sans
17591 slides
17592 \family default
17593  Class Template File
17594 \end_layout
17595
17596 \begin_layout Standard
17597 I have also provided a template file, 
17598 \begin_inset Quotes eld
17599 \end_inset
17600
17601
17602 \family typewriter
17603 slides.lyx
17604 \family default
17605
17606 \begin_inset Quotes erd
17607 \end_inset
17608
17609 , with the 
17610 \family sans
17611 slides
17612 \family default
17613  class.
17614  To use it, begin your new presentation with 
17615 \family sans
17616 \bar under
17617 F
17618 \bar default
17619 ile\SpecialChar \menuseparator
17620 New
17621 \begin_inset space ~
17622 \end_inset
17623
17624 from
17625 \begin_inset space ~
17626 \end_inset
17627
17628
17629 \bar under
17630 T
17631 \bar default
17632 emplate
17633 \family default
17634 .
17635  Your new LyX presentation file will contain an example 
17636 \family sans
17637 Slide
17638 \family default
17639  – 
17640 \family sans
17641 Overlay
17642 \family default
17643  – 
17644 \family sans
17645 Note
17646 \family default
17647  triplet.
17648  The 
17649 \family sans
17650 Slide
17651 \family default
17652  and 
17653 \family sans
17654 Overlay
17655 \family default
17656  additionally contain an example of the use of 
17657 \family sans
17658 InvisibleText
17659 \family default
17660  and 
17661 \family sans
17662 VisibleText
17663 \family default
17664 .
17665  Lastly, the preamble will contain:
17666 \end_layout
17667
17668 \begin_layout LyX-Code
17669 % Uncomment to print out only slides and overlays
17670 \end_layout
17671
17672 \begin_layout LyX-Code
17673 %
17674 \end_layout
17675
17676 \begin_layout LyX-Code
17677 %
17678 \backslash
17679 onlyslides{
17680 \backslash
17681 slides}
17682 \begin_inset Newline newline
17683 \end_inset
17684
17685  
17686 \end_layout
17687
17688 \begin_layout LyX-Code
17689 % Uncomment to print out only notes
17690 \end_layout
17691
17692 \begin_layout LyX-Code
17693 %
17694 \end_layout
17695
17696 \begin_layout LyX-Code
17697 %
17698 \backslash
17699 onlynotes{
17700 \backslash
17701 notes}
17702 \end_layout
17703
17704 \begin_layout Standard
17705 One final thing: I created this class to support the LaTeX2e 
17706 \begin_inset Quotes eld
17707 \end_inset
17708
17709
17710 \noun on
17711 SliTeX
17712 \noun default
17713  emulation
17714 \begin_inset Quotes erd
17715 \end_inset
17716
17717  class, one of the built-in LaTeX2e classes.
17718  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17719  built-in slide class.
17720  It's here if you want it or need it.
17721  There exist other LaTeX2e classes for creating presentations, such as the
17722  
17723 \family sans
17724 Foils
17725 \family default
17726  class [see section
17727 \begin_inset space ~
17728 \end_inset
17729
17730
17731 \begin_inset CommandInset ref
17732 LatexCommand ref
17733 reference "sec:foiltex"
17734
17735 \end_inset
17736
17737 ] or the 
17738 \begin_inset Quotes eld
17739 \end_inset
17740
17741
17742 \family typewriter
17743 seminar
17744 \family default
17745
17746 \begin_inset Quotes erd
17747 \end_inset
17748
17749  package [present on some TeX distributions].
17750  The latter is not yet supported under LyX.
17751 \begin_inset Foot
17752 status collapsed
17753
17754 \begin_layout Plain Layout
17755 Perhaps you can take on the task\SpecialChar \ldots{}
17756
17757 \end_layout
17758
17759 \end_inset
17760
17761  I know nothing about these other classes.
17762  Try them out to see what sort of alternative they provide.
17763 \end_layout
17764
17765 \begin_layout Chapter
17766 LyX Features needing Extra Software
17767 \end_layout
17768
17769 \begin_layout Section
17770 Checking TeX
17771 \end_layout
17772
17773 \begin_layout Standard
17774 by 
17775 \noun on
17776 Asger Alstrup
17777 \end_layout
17778
17779 \begin_layout Subsection
17780 Introduction
17781 \end_layout
17782
17783 \begin_layout Standard
17784 If you have the 
17785 \family typewriter
17786 chktex
17787 \family default
17788  program installed
17789 \begin_inset Foot
17790 status collapsed
17791
17792 \begin_layout Plain Layout
17793
17794 \family typewriter
17795 chktex
17796 \family default
17797  is not yet available when you are using the LaTeX distribution MiKTeX.
17798 \end_layout
17799
17800 \end_inset
17801
17802 , you'll find in the 
17803 \family sans
17804 Tools
17805 \family default
17806  menu the entry: 
17807 \family sans
17808 Check
17809 \begin_inset space ~
17810 \end_inset
17811
17812 TeX
17813 \family default
17814 .
17815  You can get 
17816 \family typewriter
17817 chktex
17818 \family default
17819  from CTAN, 
17820 \begin_inset CommandInset href
17821 LatexCommand href
17822 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17823
17824 \end_inset
17825
17826 .
17827 \end_layout
17828
17829 \begin_layout Standard
17830 The 
17831 \family sans
17832 ChkTeX
17833 \family default
17834  package is a program that was written by 
17835 \begin_inset Flex Noun
17836 status collapsed
17837
17838 \begin_layout Plain Layout
17839 Jens T.
17840 \begin_inset space ~
17841 \end_inset
17842
17843 Berger Thielemann
17844 \end_layout
17845
17846 \end_inset
17847
17848  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17849  and easy to forget.
17850  The program runs over your LaTeX file, checks the integrity of the file,
17851  and flags some common errors.
17852  In other technical words, it is 
17853 \family typewriter
17854 lint
17855 \family default
17856  for LaTeX.
17857 \end_layout
17858
17859 \begin_layout Standard
17860 Well, what is a syntax checker doing in LyX which is supposed to produce
17861  correct LaTeX anyways? The answer is simple: Just as 
17862 \family typewriter
17863 Lint
17864 \family default
17865  not only checks the 
17866 \emph on
17867 syntax
17868 \emph default
17869  of C programs, but also does 
17870 \emph on
17871 semantic
17872 \emph default
17873  checks for type-errors, 
17874 \family sans
17875 ChkTeX
17876 \family default
17877  catches some common 
17878 \emph on
17879 typographic
17880 \emph default
17881  errors, in addition to the syntactical ones.
17882  Specifically, 
17883 \family sans
17884 ChkTeX
17885 \family default
17886  is capable of detecting several common errors, such as
17887 \end_layout
17888
17889 \begin_layout Itemize
17890 Ellipsis detection:
17891 \begin_inset Newline newline
17892 \end_inset
17893
17894 Use \SpecialChar \ldots{}
17895  instead of ...
17896 \end_layout
17897
17898 \begin_layout Itemize
17899 No space in front of/after parenthesis:
17900 \begin_inset Newline newline
17901 \end_inset
17902
17903 ( wrong spacing )
17904 \end_layout
17905
17906 \begin_layout Itemize
17907 Enforcement of normal space after common abbreviations:
17908 \begin_inset Newline newline
17909 \end_inset
17910
17911 e.
17912 \begin_inset space \thinspace{}
17913 \end_inset
17914
17915 g.
17916 \begin_inset space \space{}
17917 \end_inset
17918
17919 is too wide spacing.
17920 \end_layout
17921
17922 \begin_layout Itemize
17923 Enforcement of end-of-sentence space when the last sentence ends with a
17924  capital letter:
17925 \begin_inset Newline newline
17926 \end_inset
17927
17928 This is a TEST.
17929  And this is wrong spacing.
17930 \end_layout
17931
17932 \begin_layout Itemize
17933 Space in front of labels and similar commands:
17934 \begin_inset Newline newline
17935 \end_inset
17936
17937 The label should stick right up to the text to avoid falling to a wrong
17938  page.
17939  
17940 \begin_inset CommandInset label
17941 LatexCommand label
17942 name "sec:chktex"
17943
17944 \end_inset
17945
17946  
17947 \begin_inset Foot
17948 status collapsed
17949
17950 \begin_layout Plain Layout
17951 This footnote is in danger of falling off to a wrong page
17952 \end_layout
17953
17954 \end_inset
17955
17956  The label is separated too much.
17957 \end_layout
17958
17959 \begin_layout Itemize
17960 Space in front of references, instead of hard spaces:
17961 \begin_inset Newline newline
17962 \end_inset
17963
17964 If you have bad luck, the text will break right between the referenced text
17965  and reference number, and that's a pity.
17966  See section 
17967 \begin_inset CommandInset ref
17968 LatexCommand ref
17969 reference "sec:chktex"
17970
17971 \end_inset
17972
17973 .
17974 \end_layout
17975
17976 \begin_layout Itemize
17977 Use of 
17978 \begin_inset Quotes eld
17979 \end_inset
17980
17981 x
17982 \begin_inset Quotes erd
17983 \end_inset
17984
17985  instead of 
17986 \begin_inset Formula $\times$
17987 \end_inset
17988
17989  between numbers:
17990 \begin_inset Newline newline
17991 \end_inset
17992
17993 2x2 looks cheap compared to 
17994 \begin_inset Formula $2\times2$
17995 \end_inset
17996
17997 .
17998 \end_layout
17999
18000 \begin_layout Standard
18001 and more \SpecialChar \ldots{}
18002  It is an invaluable tool when you are 
18003 \begin_inset Quotes eld
18004 \end_inset
18005
18006 finishing up
18007 \begin_inset Quotes erd
18008 \end_inset
18009
18010  your document before printing, and you should run it right after the obligatory
18011  spelling check, and before you go fine tuning the typesetting.
18012 \end_layout
18013
18014 \begin_layout Subsection
18015 How to use it
18016 \end_layout
18017
18018 \begin_layout Standard
18019 If you have the program installed, usage is as simple as choosing 
18020 \family sans
18021 Tools\SpecialChar \menuseparator
18022 Check
18023 \begin_inset space ~
18024 \end_inset
18025
18026 TeX
18027 \family default
18028 .
18029  This will make LyX generate a LaTeX file of your document, start 
18030 \family sans
18031 ChkTeX
18032 \family default
18033  to check it, and then make LyX insert 
18034 \begin_inset Quotes eld
18035 \end_inset
18036
18037 error boxes
18038 \begin_inset Quotes erd
18039 \end_inset
18040
18041  with the warnings from 
18042 \family sans
18043 ChkTeX
18044 \family default
18045 , if there were any.
18046  The warnings will be placed close to the point of the mistake, and you
18047  can quickly find them by using the 
18048 \family sans
18049 Navigate\SpecialChar \menuseparator
18050 Error
18051 \family default
18052  menu item, or the shortcut key 
18053 \family sans
18054 C-g
18055 \family default
18056  from the default 
18057 \family typewriter
18058 cua
18059 \family default
18060  bind file.
18061  Open the error boxes by clicking on them with the mouse, or use the shortcut
18062  key 
18063 \family sans
18064 C-i
18065 \family default
18066  from 
18067 \family typewriter
18068 cua
18069 \family default
18070  bindings, or the corresponding 
18071 \family sans
18072 C-o
18073 \family default
18074  for the alternate 
18075 \family typewriter
18076 emacs
18077 \family default
18078  bind file.
18079  Read the warning and correct the mistake, if it is a mistake.
18080  If you have trouble understanding what the warning is about, you can safely
18081  ignore it.
18082  Remember that there is a hidden layer between the document on screen and
18083  the technical details in invoking 
18084 \family sans
18085 ChkTeX
18086 \family default
18087 , and this gap can make some warnings seem arcane or just plain silly.
18088 \end_layout
18089
18090 \begin_layout Standard
18091 This document is an excellent testing bed for the feature, and it should
18092  provide quite a few warnings for you to fiddle with.
18093  Since computers are only so smart, expect most of the warnings to be false
18094  alarms, though.
18095 \end_layout
18096
18097 \begin_layout Subsection
18098 How to fine tune it
18099 \end_layout
18100
18101 \begin_layout Standard
18102 Sometimes, you'll find that 
18103 \family sans
18104 ChkTeX
18105 \family default
18106  makes more noise than suits your mood.
18107  Then you can choose not to use it, wait until your mood changes, or try
18108  to customize 
18109 \family sans
18110 ChkTeX
18111 \family default
18112  to get better along with you.
18113 \end_layout
18114
18115 \begin_layout Standard
18116 Although 
18117 \family sans
18118 ChkTeX
18119 \family default
18120  
18121 \emph on
18122 is
18123 \emph default
18124  very configurable and extensible, you shouldn't expect to solve all problems
18125  with 
18126 \family sans
18127 ChkTeX
18128 \family default
18129  in LyX this way.
18130  Since LyX has to generate a somewhat special LaTeX file to be able to match
18131  the line numbers from the 
18132 \family sans
18133 ChkTeX
18134 \family default
18135  output
18136 \begin_inset Foot
18137 status collapsed
18138
18139 \begin_layout Plain Layout
18140 You can inspect the specific output from 
18141 \family sans
18142 chktex
18143 \family default
18144  by using 
18145 \family sans
18146 Edit\SpecialChar \menuseparator
18147 View
18148 \begin_inset space ~
18149 \end_inset
18150
18151 LaTeX
18152 \begin_inset space ~
18153 \end_inset
18154
18155 Log
18156 \family default
18157  right after a 
18158 \family sans
18159 chktex
18160 \family default
18161  run.
18162 \end_layout
18163
18164 \end_inset
18165
18166  to the internal document structure, some of the warnings will not appear
18167  correctly.
18168  There are two things you can do about this:
18169 \end_layout
18170
18171 \begin_layout Itemize
18172 Fine tune the 
18173 \family sans
18174 ChkTeX
18175 \family default
18176  invocation command line in 
18177 \begin_inset Flex MenuItem
18178 status collapsed
18179
18180 \begin_layout Plain Layout
18181 Tools\SpecialChar \menuseparator
18182 Preferences\SpecialChar \menuseparator
18183 Output\SpecialChar \menuseparator
18184 LaTeX\SpecialChar \menuseparator
18185 CheckTeX command
18186 \end_layout
18187
18188 \end_inset
18189
18190 , or the global 
18191 \family sans
18192 ChkTeX
18193 \family default
18194  installation configuration file (usually with the file 
18195 \family typewriter
18196 chktexrc
18197 \family default
18198 ).
18199  See below to learn what warnings can be enabled and disabled on the command
18200  line.
18201 \end_layout
18202
18203 \begin_layout Itemize
18204 Export your document as a raw LaTeX file using 
18205 \family sans
18206 File\SpecialChar \menuseparator
18207 Export\SpecialChar \menuseparator
18208 LaTeX
18209 \family default
18210  and run 
18211 \family typewriter
18212 chktex
18213 \family default
18214  manually on that.
18215  Invoked in this way, it can be a hassle to find the corresponding place
18216  in the document inside LyX, but with a little patience, you should be able
18217  to do it.
18218 \end_layout
18219
18220 \begin_layout Standard
18221 Here follows the warning messages that can be enabled and disabled in 
18222 \family sans
18223 Preferences
18224 \family default
18225 .
18226  Use 
18227 \family typewriter
18228 -n#
18229 \family default
18230  to disable a warning, and 
18231 \family typewriter
18232 -w#
18233 \family default
18234  to enable a warning.
18235  The emphasized entries are disabled by default, because the default is
18236  "
18237 \family typewriter
18238 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18239 \family default
18240 ".
18241 \end_layout
18242
18243 \begin_layout Standard
18244 Notice that you should only use the options that enable and disable warnings,
18245  because LyX relies on some of the other command line parameters to be set
18246  in a specific way to have a chance to communicate with 
18247 \family typewriter
18248 chktex
18249 \family default
18250 .
18251 \end_layout
18252
18253 \begin_layout Enumerate
18254
18255 \size small
18256 \emph on
18257 Command terminated with space.
18258 \end_layout
18259
18260 \begin_layout Enumerate
18261
18262 \size small
18263 Non-breaking space (
18264 \begin_inset Quotes eld
18265 \end_inset
18266
18267
18268 \family typewriter
18269 ~
18270 \family default
18271
18272 \begin_inset Quotes erd
18273 \end_inset
18274
18275 ) should have been used.
18276 \end_layout
18277
18278 \begin_layout Enumerate
18279
18280 \size small
18281 \emph on
18282 You should enclose the previous parenthesis with 
18283 \begin_inset Quotes eld
18284 \end_inset
18285
18286
18287 \family typewriter
18288 {}
18289 \family default
18290
18291 \begin_inset Quotes erd
18292 \end_inset
18293
18294 .
18295 \end_layout
18296
18297 \begin_layout Enumerate
18298
18299 \size small
18300 Italic correction (
18301 \begin_inset Quotes eld
18302 \end_inset
18303
18304
18305 \family typewriter
18306
18307 \backslash
18308 /
18309 \family default
18310
18311 \begin_inset Quotes erd
18312 \end_inset
18313
18314 ) found in non-italic buffer.
18315 \end_layout
18316
18317 \begin_layout Enumerate
18318
18319 \size small
18320 Italic correction (
18321 \begin_inset Quotes eld
18322 \end_inset
18323
18324
18325 \family typewriter
18326
18327 \backslash
18328 /
18329 \family default
18330
18331 \begin_inset Quotes erd
18332 \end_inset
18333
18334 ) found more than once.
18335 \end_layout
18336
18337 \begin_layout Enumerate
18338
18339 \size small
18340 \emph on
18341 No italic correction (
18342 \begin_inset Quotes eld
18343 \end_inset
18344
18345
18346 \family typewriter
18347
18348 \backslash
18349 /
18350 \family default
18351
18352 \begin_inset Quotes erd
18353 \end_inset
18354
18355 ) found.
18356 \end_layout
18357
18358 \begin_layout Enumerate
18359
18360 \size small
18361 Accent command 
18362 \begin_inset Quotes eld
18363 \end_inset
18364
18365
18366 \family typewriter
18367 cmd
18368 \family default
18369
18370 \begin_inset Quotes erd
18371 \end_inset
18372
18373  needs use of 
18374 \begin_inset Quotes eld
18375 \end_inset
18376
18377
18378 \family typewriter
18379 cmd
18380 \family default
18381
18382 \begin_inset Quotes erd
18383 \end_inset
18384
18385 .
18386 \end_layout
18387
18388 \begin_layout Enumerate
18389
18390 \size small
18391 Wrong length of dash may have been used.
18392 \end_layout
18393
18394 \begin_layout Enumerate
18395
18396 \size small
18397 \emph on
18398 \begin_inset Quotes eld
18399 \end_inset
18400
18401
18402 \family typewriter
18403 %s
18404 \family default
18405
18406 \begin_inset Quotes erd
18407 \end_inset
18408
18409  expected, found 
18410 \begin_inset Quotes eld
18411 \end_inset
18412
18413
18414 \family typewriter
18415 %s
18416 \family default
18417
18418 \begin_inset Quotes erd
18419 \end_inset
18420
18421 .
18422 \end_layout
18423
18424 \begin_layout Enumerate
18425
18426 \size small
18427 Solo 
18428 \begin_inset Quotes eld
18429 \end_inset
18430
18431
18432 \family typewriter
18433 %s
18434 \family default
18435
18436 \begin_inset Quotes erd
18437 \end_inset
18438
18439  found.
18440 \end_layout
18441
18442 \begin_layout Enumerate
18443
18444 \size small
18445 You should use 
18446 \begin_inset Quotes eld
18447 \end_inset
18448
18449
18450 \family typewriter
18451 %s
18452 \family default
18453
18454 \begin_inset Quotes erd
18455 \end_inset
18456
18457  to achieve an ellipsis.
18458 \end_layout
18459
18460 \begin_layout Enumerate
18461
18462 \size small
18463 Inter-word spacing (
18464 \begin_inset Quotes eld
18465 \end_inset
18466
18467
18468 \family typewriter
18469
18470 \backslash
18471
18472 \family default
18473  
18474 \begin_inset Quotes eld
18475 \end_inset
18476
18477 ) should perhaps be used.
18478 \end_layout
18479
18480 \begin_layout Enumerate
18481
18482 \size small
18483 Inter-sentence spacing (
18484 \begin_inset Quotes eld
18485 \end_inset
18486
18487
18488 \family typewriter
18489
18490 \backslash
18491 @
18492 \family default
18493
18494 \begin_inset Quotes erd
18495 \end_inset
18496
18497 ) should perhaps be used.
18498 \end_layout
18499
18500 \begin_layout Enumerate
18501
18502 \size small
18503 Could not find argument for command.
18504 \end_layout
18505
18506 \begin_layout Enumerate
18507
18508 \size small
18509 No match found for 
18510 \begin_inset Quotes eld
18511 \end_inset
18512
18513
18514 \family typewriter
18515 %s
18516 \family default
18517
18518 \begin_inset Quotes erd
18519 \end_inset
18520
18521 .
18522 \end_layout
18523
18524 \begin_layout Enumerate
18525
18526 \size small
18527 Math mode still on at end of LaTeX file.
18528 \end_layout
18529
18530 \begin_layout Enumerate
18531
18532 \size small
18533 Number of 
18534 \begin_inset Quotes eld
18535 \end_inset
18536
18537
18538 \family typewriter
18539 char
18540 \family default
18541
18542 \begin_inset Quotes erd
18543 \end_inset
18544
18545  doesn't match the number of 
18546 \begin_inset Quotes eld
18547 \end_inset
18548
18549
18550 \family typewriter
18551 char
18552 \family default
18553
18554 \begin_inset Quotes erd
18555 \end_inset
18556
18557 .
18558 \end_layout
18559
18560 \begin_layout Enumerate
18561
18562 \size small
18563 You should use either 
18564 \family typewriter
18565
18566 \begin_inset Quotes eld
18567 \end_inset
18568
18569
18570 \family default
18571  or 
18572 \family typewriter
18573
18574 \begin_inset Quotes erd
18575 \end_inset
18576
18577
18578 \family default
18579  as an alternative to 
18580 \begin_inset Quotes eld
18581 \end_inset
18582
18583
18584 \family typewriter
18585 "
18586 \family default
18587
18588 \begin_inset Quotes erd
18589 \end_inset
18590
18591 .
18592 \end_layout
18593
18594 \begin_layout Enumerate
18595
18596 \size small
18597 You should use "
18598 \family typewriter
18599 '
18600 \family default
18601 " (ASCII 39) instead of "
18602 \family typewriter
18603 ´
18604 \family default
18605 " (ASCII 180).
18606 \end_layout
18607
18608 \begin_layout Enumerate
18609
18610 \size small
18611 User-specified pattern found.
18612 \end_layout
18613
18614 \begin_layout Enumerate
18615
18616 \size small
18617 This command might not be intended.
18618 \end_layout
18619
18620 \begin_layout Enumerate
18621
18622 \size small
18623 \emph on
18624 Comment displayed.
18625 \end_layout
18626
18627 \begin_layout Enumerate
18628
18629 \size small
18630 Either 
18631 \family typewriter
18632 ''
18633 \backslash
18634 ,'
18635 \family default
18636  or 
18637 \family typewriter
18638 '
18639 \backslash
18640 ,''
18641 \family default
18642  will look better.
18643 \end_layout
18644
18645 \begin_layout Enumerate
18646
18647 \size small
18648 Delete this space to maintain correct page references.
18649 \end_layout
18650
18651 \begin_layout Enumerate
18652
18653 \size small
18654 \emph on
18655 You might wish to put this between a pair of 
18656 \begin_inset Quotes eld
18657 \end_inset
18658
18659
18660 \family typewriter
18661 {}
18662 \family default
18663
18664 \begin_inset Quotes erd
18665 \end_inset
18666
18667 .
18668 \end_layout
18669
18670 \begin_layout Enumerate
18671
18672 \size small
18673 You ought to remove spaces in front of punctuation.
18674 \end_layout
18675
18676 \begin_layout Enumerate
18677
18678 \size small
18679 Could not execute LaTeX command.
18680 \end_layout
18681
18682 \begin_layout Enumerate
18683
18684 \size small
18685 Don't use 
18686 \family typewriter
18687
18688 \backslash
18689 /
18690 \family default
18691  in front of small punctuation.
18692 \end_layout
18693
18694 \begin_layout Enumerate
18695
18696 \family typewriter
18697 \size small
18698 $
18699 \backslash
18700 times$
18701 \family default
18702  may look prettier here.
18703 \end_layout
18704
18705 \begin_layout Enumerate
18706
18707 \size small
18708 \emph on
18709 Multiple spaces detected in output.
18710 \end_layout
18711
18712 \begin_layout Enumerate
18713
18714 \size small
18715 This text may be ignored.
18716 \end_layout
18717
18718 \begin_layout Enumerate
18719
18720 \size small
18721 Use 
18722 \family typewriter
18723
18724 \begin_inset Quotes eld
18725 \end_inset
18726
18727
18728 \family default
18729  to begin quotation, not 
18730 \family typewriter
18731 '
18732 \family default
18733 .
18734 \end_layout
18735
18736 \begin_layout Enumerate
18737
18738 \size small
18739 Use 
18740 \family typewriter
18741 '
18742 \family default
18743  to end quotation, not 
18744 \family typewriter
18745
18746 \begin_inset Quotes eld
18747 \end_inset
18748
18749
18750 \family default
18751 .
18752 \end_layout
18753
18754 \begin_layout Enumerate
18755
18756 \size small
18757 Don't mix quotes.
18758 \end_layout
18759
18760 \begin_layout Enumerate
18761
18762 \size small
18763 You should perhaps use 
18764 \begin_inset Quotes eld
18765 \end_inset
18766
18767
18768 \family typewriter
18769 cmd
18770 \family default
18771
18772 \begin_inset Quotes erd
18773 \end_inset
18774
18775  instead.
18776 \end_layout
18777
18778 \begin_layout Enumerate
18779
18780 \size small
18781 You should put a space in front of/after parenthesis.
18782 \end_layout
18783
18784 \begin_layout Enumerate
18785
18786 \size small
18787 You should avoid spaces in front of/after parenthesis.
18788 \end_layout
18789
18790 \begin_layout Enumerate
18791
18792 \size small
18793 \emph on
18794 You should not use punctuation in front of/after quotes.
18795 \end_layout
18796
18797 \begin_layout Enumerate
18798
18799 \size small
18800 Double space found.
18801 \end_layout
18802
18803 \begin_layout Enumerate
18804
18805 \size small
18806 You should put punctuation outside inner/inside display math mode.
18807 \end_layout
18808
18809 \begin_layout Enumerate
18810
18811 \size small
18812 You ought to not use primitive TeX in LaTeX code.
18813 \end_layout
18814
18815 \begin_layout Enumerate
18816
18817 \size small
18818 You should remove spaces in front of 
18819 \begin_inset Quotes eld
18820 \end_inset
18821
18822
18823 \family typewriter
18824 %s
18825 \family default
18826
18827 \begin_inset Quotes erd
18828 \end_inset
18829
18830
18831 \end_layout
18832
18833 \begin_layout Enumerate
18834
18835 \size small
18836 \begin_inset Quotes eld
18837 \end_inset
18838
18839
18840 \family typewriter
18841 %s
18842 \family default
18843
18844 \begin_inset Quotes erd
18845 \end_inset
18846
18847  is normally not followed by 
18848 \begin_inset Quotes eld
18849 \end_inset
18850
18851
18852 \family typewriter
18853 %c
18854 \family default
18855
18856 \begin_inset Quotes erd
18857 \end_inset
18858
18859 .
18860 \end_layout
18861
18862 \begin_layout Standard
18863 In later versions of LyX, we hope to provide a more complete interface to
18864  this tool (and it's smaller cousin 
18865 \family typewriter
18866 lacheck
18867 \family default
18868 ) to exploit the full power of it.
18869  But it's not exactly useless as it is now: go try it on one of your existing
18870  documents of a certain length and be surprised.
18871 \end_layout
18872
18873 \begin_layout Section
18874 Version Control in LyX
18875 \end_layout
18876
18877 \begin_layout Standard
18878 by
18879 \noun on
18880  Lars Gullik Bjønnes 
18881 \noun default
18882 and 
18883 \noun on
18884 Pavel Sanda
18885 \end_layout
18886
18887 \begin_layout Subsection
18888 Introduction
18889 \end_layout
18890
18891 \begin_layout Standard
18892 LyX supports some of the most basic RCS/CVS/SVN commands.
18893  If you need something a bit more sophisticated you will have to do that
18894  manually in a terminal.
18895 \end_layout
18896
18897 \begin_layout Standard
18898 Also note that CVS support is not as good as subversion support so we advise
18899  using SVN instead.
18900  A good place to start learning Subversion is SVN Book
18901 \begin_inset Foot
18902 status open
18903
18904 \begin_layout Plain Layout
18905 \begin_inset CommandInset href
18906 LatexCommand href
18907 target "http://svnbook.red-bean.com/"
18908
18909 \end_inset
18910
18911
18912 \end_layout
18913
18914 \end_inset
18915
18916 .
18917  In the case of RCS you should read 
18918 \begin_inset Quotes eld
18919 \end_inset
18920
18921 rcsintro
18922 \begin_inset Quotes erd
18923 \end_inset
18924
18925  (a man file, read it with 
18926 \family typewriter
18927 man rcsintro
18928 \family default
18929 ).
18930  This file describes all the basic features of RCS.
18931  You should especially notice the comment about a RCS directory, and the
18932  notion of a master RCS file (the file ending in 
18933 \family typewriter
18934 ,v
18935 \family default
18936 ).
18937 \end_layout
18938
18939 \begin_layout Standard
18940 Before you begin to use the version control features in LyX, you should
18941  be familiar with RCS/CVS/SVN usage.
18942  The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18943  package—no guarantees are made for older versions.
18944  Most of the log messages are not currently displayed after operations —
18945  you can check them in the Messages pane if unsure.
18946  Regular users of version control will appreciate VC toolbar, which can
18947  be enabled via 
18948 \family sans
18949 View\SpecialChar \menuseparator
18950 Toolbars\SpecialChar \menuseparator
18951 Version
18952 \begin_inset space ~
18953 \end_inset
18954
18955 Control
18956 \family default
18957 .
18958 \end_layout
18959
18960 \begin_layout Standard
18961 For introducing your own external commands consult vc-command in the manual
18962  of LyX functions.
18963 \end_layout
18964
18965 \begin_layout Subsection
18966 RCS commands in LyX
18967 \end_layout
18968
18969 \begin_layout Standard
18970 The following sections describe the RCS commands supported by LyX.
18971  You can find them in the 
18972 \family sans
18973 File\SpecialChar \menuseparator
18974 Version
18975 \begin_inset space ~
18976 \end_inset
18977
18978 Control
18979 \family default
18980  submenu.
18981  LyX was tested against RCS 5.7/5.8
18982 \begin_inset Foot
18983 status open
18984
18985 \begin_layout Plain Layout
18986 Note that old DOS / MS Windows builds (5.7) need to setup environment variables
18987  in order to work properly with LyX.
18988  In particular time zone (TZ) should be set and more importantly RCSINIT
18989  in order to change default archive location ("SET RCSINIT=-x,v/") --- LyX
18990  expects archive to be found in file.lyx,v within the original document directory.
18991  See also README shipped with Windows RCS binaries.
18992 \end_layout
18993
18994 \end_inset
18995
18996 .
18997 \end_layout
18998
18999 \begin_layout Subsubsection
19000
19001 \family sans
19002 Register
19003 \end_layout
19004
19005 \begin_layout Standard
19006 If your document is not under revision control, this is the only item shown
19007  in the menu.
19008  And if it is under revision control, the 
19009 \family sans
19010 Register
19011 \family default
19012  item is not visible.
19013  
19014 \end_layout
19015
19016 \begin_layout Standard
19017 This command registers your document with RCS (unless you are under the
19018  directory managed by CVS)\SpecialChar \@.
19019  You are asked interactively to supply an initial
19020  description of the document.
19021  The document is now set in Read-Only mode and you have to 
19022 \family sans
19023 Check
19024 \begin_inset space ~
19025 \end_inset
19026
19027 Out
19028 \begin_inset space ~
19029 \end_inset
19030
19031 For
19032 \begin_inset space ~
19033 \end_inset
19034
19035 Edit
19036 \family default
19037 , before making any changes to it.
19038  A document under revision control has a 
19039 \begin_inset Quotes eld
19040 \end_inset
19041
19042 [RCS:<version> <locker>]
19043 \begin_inset Quotes erd
19044 \end_inset
19045
19046  item tagged to the filename in the minibuffer.
19047 \end_layout
19048
19049 \begin_layout Standard
19050 RCS command that is run: 
19051 \family typewriter
19052 ci -q -u -i -t-"<initial description>" <file-name>
19053 \end_layout
19054
19055 \begin_layout Standard
19056 Read 
19057 \family typewriter
19058 man ci
19059 \family default
19060  to understand the switches.
19061  
19062 \end_layout
19063
19064 \begin_layout Subsubsection
19065
19066 \family sans
19067 Check In Changes
19068 \end_layout
19069
19070 \begin_layout Standard
19071 When you are finished editing a file, you check in your changes.
19072  When you do this, you are asked for a description of the changes.
19073  This is stored in the history log.
19074  The version number is bumped, your changes are applied to the master RCS
19075  file, the document is unlocked and set to Read-Only mode.
19076  
19077 \end_layout
19078
19079 \begin_layout Standard
19080 RCS command: 
19081 \family typewriter
19082 ci -q -u -m"<description>" <file-name>
19083 \end_layout
19084
19085 \begin_layout Subsubsection
19086
19087 \family sans
19088 Check Out For Edit
19089 \end_layout
19090
19091 \begin_layout Standard
19092 By doing this you lock the document so that only you can edit it.
19093  This will also make the document Read-Write only for you.
19094  You will usually continue editing for a while and when you are finished
19095  you check in your changes.
19096  The status line is changed to reflect that you have locked the file.
19097  
19098 \end_layout
19099
19100 \begin_layout Standard
19101 RCS command: 
19102 \family typewriter
19103 co -q -l <file-name>
19104 \end_layout
19105
19106 \begin_layout Subsubsection
19107
19108 \family sans
19109 Revert To Repository Version
19110 \end_layout
19111
19112 \begin_layout Standard
19113 This will discard all changes made to the document since the last check
19114  in.
19115  You get a warning before changes are discarded.
19116 \end_layout
19117
19118 \begin_layout Standard
19119 RCS command: 
19120 \family typewriter
19121 co -f -u<version> <file-name>
19122 \end_layout
19123
19124 \begin_layout Subsubsection
19125
19126 \family sans
19127 Undo Last Checkin
19128 \end_layout
19129
19130 \begin_layout Standard
19131 This makes as if the last check in never happened.
19132  No changes are made to the document loaded into LyX, but the last version
19133  is removed from the master RCS file.
19134  
19135 \end_layout
19136
19137 \begin_layout Standard
19138 RCS command: 
19139 \family typewriter
19140 rcs -o<version> <file-name>
19141 \end_layout
19142
19143 \begin_layout Subsubsection
19144
19145 \family sans
19146 Show History
19147 \end_layout
19148
19149 \begin_layout Standard
19150 This shows the complete history of the RCS document.
19151  The output of 
19152 \family typewriter
19153 rlog <file-name>
19154 \family default
19155  is shown in a browser.
19156  See 
19157 \family typewriter
19158 man rlog
19159 \family default
19160  for more info.
19161 \end_layout
19162
19163 \begin_layout Subsubsection
19164 Revision info
19165 \end_layout
19166
19167 \begin_layout Standard
19168 LyX supports RCS version number, author name, date and time of last commit.
19169  All those are extracted from 
19170 \family typewriter
19171 rlog -r <file-name>
19172 \family default
19173 .
19174  For other details see 
19175 \begin_inset CommandInset ref
19176 LatexCommand ref
19177 reference "sub:VCS-Revision-Information"
19178
19179 \end_inset
19180
19181  for details.
19182 \end_layout
19183
19184 \begin_layout Subsection
19185 CVS commands in LyX
19186 \end_layout
19187
19188 \begin_layout Standard
19189 A subset of CVS operations is supported by LyX.
19190  You can find the commands in the 
19191 \family sans
19192 File\SpecialChar \menuseparator
19193 Version
19194 \begin_inset space ~
19195 \end_inset
19196
19197 Control
19198 \family default
19199  submenu.
19200  The version control system SVN is more powerful, so please use it instead
19201  of CVS if possible.
19202 \end_layout
19203
19204 \begin_layout Subsubsection
19205
19206 \family sans
19207 General CVS usage
19208 \end_layout
19209
19210 \begin_layout Standard
19211 If you start from scratch with CVS you have to create your repository and
19212  checkout the working copy with external tools.
19213  If you're using a client-server setup you may need to login before doing
19214  the first repository checkout.
19215 \end_layout
19216
19217 \begin_layout Standard
19218 If your documents are under revision control and others are using the same
19219  repository problems arise when different changes to the same document at
19220  the same location happen.
19221  Standard CVS repositories doesn't operate with a file locking mechanism.
19222  This may be surprising, but conflicts only occur if people disagree on
19223  the proper content of the same part of a document.
19224  So, if co-workers are used to communicate regularly, these conflicts occur
19225  rarely.
19226  If they don't communicate they have a fundamental problem anyway.
19227  Nevertheless some people like to work with so called 
19228 \begin_inset Quotes eld
19229 \end_inset
19230
19231 reserved checkouts
19232 \begin_inset Quotes erd
19233 \end_inset
19234
19235 .
19236  If they do so the working copy of all files is readonly when checked out
19237  first and the user starts editing after using a special command to make
19238  the working copy writable.
19239  When the changes are checked in the working copy returns to readonly state.
19240  With LyX one has to edit the 
19241 \begin_inset Flex Code
19242 status collapsed
19243
19244 \begin_layout Plain Layout
19245 .cvsrc
19246 \end_layout
19247
19248 \end_inset
19249
19250  file and add the line 
19251 \begin_inset Flex Code
19252 status collapsed
19253
19254 \begin_layout Plain Layout
19255 cvs -r
19256 \end_layout
19257
19258 \end_inset
19259
19260  to work with reserved checkouts.
19261  The benefit is the possibility to see who is using a writable copy of some
19262  document.
19263  It's not guaranteed only one user makes a copy writable.
19264 \end_layout
19265
19266 \begin_layout Standard
19267 LyX tries to guess if you're using reserved or non-reserved checkouts.
19268  If your working copy is readonly or it is writable and an additional copy
19269  of your document exists in the CVS/Base sub-directory a reserved otherwise
19270  a non-reserved checkout is assumed.
19271  When a reserved checkout is detected you have to use 
19272 \begin_inset Flex MenuItem
19273 status collapsed
19274
19275 \begin_layout Plain Layout
19276 Check Out
19277 \end_layout
19278
19279 \end_inset
19280
19281  to make your working copy writable if it's readonly.
19282  After doing so the 
19283 \begin_inset Flex MenuItem
19284 status collapsed
19285
19286 \begin_layout Plain Layout
19287 Check In
19288 \end_layout
19289
19290 \end_inset
19291
19292  operation is possible and that makes your working copy readonly again after
19293  transferring your changes to the repository.
19294 \end_layout
19295
19296 \begin_layout Standard
19297 More information about CVS can be found here 
19298 \begin_inset Flex URL
19299 status collapsed
19300
19301 \begin_layout Plain Layout
19302
19303 http://www.nongnu.org/cvs
19304 \end_layout
19305
19306 \end_inset
19307
19308  and here 
19309 \begin_inset Flex URL
19310 status collapsed
19311
19312 \begin_layout Plain Layout
19313
19314 http://ximbiot.com/cvs
19315 \end_layout
19316
19317 \end_inset
19318
19319 .
19320 \end_layout
19321
19322 \begin_layout Standard
19323 Read 
19324 \family typewriter
19325 man cvs
19326 \family default
19327  to understand the sub-commands and the switches mentioned below.
19328 \end_layout
19329
19330 \begin_layout Subsubsection
19331
19332 \family sans
19333 Register
19334 \end_layout
19335
19336 \begin_layout Standard
19337 If your document is not under revision control, this is the only item shown
19338  in the menu.
19339  And if it is under revision control, the 
19340 \family sans
19341 \bar under
19342 R
19343 \bar default
19344 egister
19345 \family default
19346  item is not visible.
19347  
19348 \end_layout
19349
19350 \begin_layout Standard
19351 This command registers in CVS your document 
19352 \begin_inset Flex Strong
19353 status collapsed
19354
19355 \begin_layout Plain Layout
19356
19357 \emph on
19358 only
19359 \end_layout
19360
19361 \end_inset
19362
19363  in the case you have already the documents directory under CVS control
19364  (in particular 
19365 \family typewriter
19366 CVS/Entries
19367 \family default
19368  file exists).
19369  This means you have to create or checkout the archive by yourself using
19370  external tools.
19371  (In case you forget that step LyX registers the document with RCS.)
19372 \end_layout
19373
19374 \begin_layout Standard
19375 Then you are asked interactively to supply an initial description of the
19376  document.
19377  Don't forget that registered file is not yet checked in.
19378 \end_layout
19379
19380 \begin_layout Standard
19381 CVS command that is run: 
19382 \family typewriter
19383 cvs -q add -m"<entered message>" "<file-name>"
19384 \end_layout
19385
19386 \begin_layout Standard
19387 The term 
19388 \family typewriter
19389 "<file-name>"
19390 \family default
19391  above and for all other CVS commands is an abbreviation for 
19392 \begin_inset Quotes eld
19393 \end_inset
19394
19395 change the current working directory to file location and use the file name
19396  without path component as argument
19397 \begin_inset Quotes erd
19398 \end_inset
19399
19400 .
19401 \end_layout
19402
19403 \begin_layout Subsubsection
19404
19405 \family sans
19406 Check In Changes
19407 \end_layout
19408
19409 \begin_layout Standard
19410 When you are finished editing a file, you commit your changes.
19411  When you do this and you had changed the document, you are asked for a
19412  description of the changes.
19413  After that changes are written to the repository.
19414  In case you didn't change the document and a reserved checkout is detected
19415  the reservation made on 
19416 \begin_inset Flex MenuItem
19417 status collapsed
19418
19419 \begin_layout Plain Layout
19420 Check Out
19421 \end_layout
19422
19423 \end_inset
19424
19425  is undone.
19426 \end_layout
19427
19428 \begin_layout Labeling
19429 \labelwidthstring 00.00.0000
19430 CVS
19431 \begin_inset space ~
19432 \end_inset
19433
19434 command: 
19435 \begin_inset space ~
19436 \end_inset
19437
19438
19439 \begin_inset Newline newline
19440 \end_inset
19441
19442
19443 \begin_inset Flex Code
19444 status collapsed
19445
19446 \begin_layout Plain Layout
19447 cvs 
19448 \family typewriter
19449 -q commit -m"<description>" "<file-name>"
19450 \end_layout
19451
19452 \end_inset
19453
19454  or
19455 \begin_inset Newline newline
19456 \end_inset
19457
19458
19459 \begin_inset Flex Code
19460 status collapsed
19461
19462 \begin_layout Plain Layout
19463 cvs -q unedit 
19464 \family typewriter
19465 "<file-name>"
19466 \end_layout
19467
19468 \end_inset
19469
19470
19471 \end_layout
19472
19473 \begin_layout Subsubsection
19474
19475 \family sans
19476 Check Out Changes
19477 \end_layout
19478
19479 \begin_layout Standard
19480 When you are sharing a repository with others, you may have to incorporate
19481  their changes into your working copy.
19482 \end_layout
19483
19484 \begin_layout Standard
19485 CVS command: 
19486 \family typewriter
19487 cvs -q update "<file-name>"
19488 \end_layout
19489
19490 \begin_layout Standard
19491 If a readonly checkout is detected the working copy is made writable and
19492  reserved.
19493 \end_layout
19494
19495 \begin_layout Standard
19496 CVS command: 
19497 \family typewriter
19498 cvs -q edit "<file-name>"
19499 \end_layout
19500
19501 \begin_layout Subsubsection
19502
19503 \family sans
19504 Revert To Repository Version
19505 \end_layout
19506
19507 \begin_layout Standard
19508 This will discard all changes made to the document since the last check
19509  in.
19510  You get a warning before changes are discarded.
19511  Firstly the file is deleted, secondly CVS update command is run.
19512 \end_layout
19513
19514 \begin_layout Standard
19515 CVS command: 
19516 \family typewriter
19517 cvs -q update "<file-name>"
19518 \end_layout
19519
19520 \begin_layout Standard
19521 If a reserved checkout is detected and the working copy has no changes only
19522  the reservation is undone.
19523 \end_layout
19524
19525 \begin_layout Standard
19526 CVS command: 
19527 \family typewriter
19528 cvs -q unedit "<file-name>"
19529 \end_layout
19530
19531 \begin_layout Subsubsection
19532 Update of the local directory checkout from repository
19533 \end_layout
19534
19535 \begin_layout Standard
19536 Once your documents gets more complex, containing sub-documents and pictures,
19537  including external 
19538 \begin_inset Flex Code
19539 status collapsed
19540
19541 \begin_layout Plain Layout
19542 .tex
19543 \end_layout
19544
19545 \end_inset
19546
19547  files and so on using version control becomes more complicated.
19548  LyX supports updating the whole tree in which resides the document.
19549  This become especially useful once you cooperate with people which neither
19550  have detailed knowledge about CVS usage nor they have ambition to commit
19551  additional material to the repository.
19552  You have to organize the files structure so that all external files are
19553  in the same directory or subdirectories of the document.
19554  It's good practice anyway to store multipart documents in an extra directory.
19555 \end_layout
19556
19557 \begin_layout Standard
19558 The 
19559 \begin_inset Flex Code
19560 status collapsed
19561
19562 \begin_layout Plain Layout
19563 Update local directory from repository
19564 \end_layout
19565
19566 \end_inset
19567
19568  command updates the whole directory.
19569  If local changes are detected user is warned before update starts.
19570  In case of merge conflicts both versions of the conflicting document parts
19571  are placed in the final document.
19572  You have to review and correct the result of the merge.
19573  You'll find the conflicts enclosed in pairs 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  and 
19584 \begin_inset Flex Code
19585 status collapsed
19586
19587 \begin_layout Plain Layout
19588 >>>>>>>
19589 \end_layout
19590
19591 \end_inset
19592
19593  separated by 
19594 \begin_inset Flex Code
19595 status collapsed
19596
19597 \begin_layout Plain Layout
19598 =======
19599 \end_layout
19600
19601 \end_inset
19602
19603 .
19604  The first part is your version as before the update operation with the
19605  document name prepended.
19606  The second one is the repository version with the version number after
19607  the sequence of 
19608 \begin_inset Flex Code
19609 status collapsed
19610
19611 \begin_layout Plain Layout
19612 >
19613 \end_layout
19614
19615 \end_inset
19616
19617  signs.
19618 \end_layout
19619
19620 \begin_layout Labeling
19621 \labelwidthstring 00.00.0000
19622 CVS
19623 \begin_inset space ~
19624 \end_inset
19625
19626 commands: 
19627 \begin_inset space ~
19628 \end_inset
19629
19630
19631 \begin_inset Newline newline
19632 \end_inset
19633
19634
19635 \begin_inset Flex Code
19636 status collapsed
19637
19638 \begin_layout Plain Layout
19639 cd $path; cvs diff 
19640 \family typewriter
19641 "."
19642 \end_layout
19643
19644 \end_inset
19645
19646  (Ask if changes are detected.)
19647 \begin_inset Newline newline
19648 \end_inset
19649
19650
19651 \begin_inset Flex Code
19652 status collapsed
19653
19654 \begin_layout Plain Layout
19655 cd $path; cvs -q update 
19656 \family typewriter
19657 "."
19658 \end_layout
19659
19660 \end_inset
19661
19662
19663 \end_layout
19664
19665 \begin_layout Standard
19666 where 
19667 \begin_inset Flex Code
19668 status collapsed
19669
19670 \begin_layout Plain Layout
19671 $path
19672 \end_layout
19673
19674 \end_inset
19675
19676  stands for the path to the document.
19677 \end_layout
19678
19679 \begin_layout Subsubsection
19680
19681 \family sans
19682 Show History
19683 \end_layout
19684
19685 \begin_layout Standard
19686 This shows the complete history of the CVS document.
19687  The output of 
19688 \family typewriter
19689 cvs log "<file-name>"
19690 \family default
19691  is shown in a browser.
19692 \end_layout
19693
19694 \begin_layout Subsection
19695 SVN commands in LyX
19696 \end_layout
19697
19698 \begin_layout Standard
19699 SVN is now partially supported by LyX.
19700  You can find the commands in the 
19701 \family sans
19702 File\SpecialChar \menuseparator
19703 Version
19704 \begin_inset space ~
19705 \end_inset
19706
19707 Control
19708 \family default
19709  submenu.
19710  Please note that if you use password protected access to repository via
19711  ssh, you will be asked in terminal window.
19712  LyX was tested against SVN 1.5 and 1.6
19713 \begin_inset Foot
19714 status open
19715
19716 \begin_layout Plain Layout
19717 Most of the commands will work with 1.4 too, see 
19718 \begin_inset CommandInset ref
19719 LatexCommand ref
19720 reference "sub:SVN-Repo-Update"
19721
19722 \end_inset
19723
19724 .
19725 \end_layout
19726
19727 \end_inset
19728
19729
19730 \end_layout
19731
19732 \begin_layout Subsubsection
19733
19734 \family sans
19735 Register
19736 \end_layout
19737
19738 \begin_layout Standard
19739 If your document is not under revision control, this is the only item shown
19740  in the menu.
19741  And if it is under revision control, the 
19742 \family sans
19743 \bar under
19744 R
19745 \bar default
19746 egister
19747 \family default
19748  item is not visible.
19749  
19750 \end_layout
19751
19752 \begin_layout Standard
19753 This command registers in SVN your document ONLY in case you have already
19754  the documents directory under SVN control (in particular 
19755 \family typewriter
19756 .svn/entries
19757 \family default
19758  file exists).
19759  This means you have to checkout the archive by yourself.
19760  
19761 \end_layout
19762
19763 \begin_layout Standard
19764 Then you are asked interactively to supply an initial description of the
19765  document.
19766  Don't forget that registered file is not yet commited.
19767 \end_layout
19768
19769 \begin_layout Standard
19770 SVN command that is run: 
19771 \family typewriter
19772 svn add -q 
19773 \begin_inset Quotes eld
19774 \end_inset
19775
19776 <file-name>
19777 \begin_inset Quotes erd
19778 \end_inset
19779
19780
19781 \end_layout
19782
19783 \begin_layout Standard
19784 Read 
19785 \family typewriter
19786 man svn
19787 \family default
19788  to understand the switches.
19789  
19790 \end_layout
19791
19792 \begin_layout Subsubsection
19793
19794 \family sans
19795 Check In Changes
19796 \end_layout
19797
19798 \begin_layout Standard
19799 When you are finished editing a file, you commit your changes.
19800  When you do this, you are asked for a description of the changes.
19801  After that changes are commited.
19802 \end_layout
19803
19804 \begin_layout Standard
19805 SVN command:
19806 \begin_inset Foot
19807 status collapsed
19808
19809 \begin_layout Plain Layout
19810 In case locking is not enabled.
19811  See Section 
19812 \begin_inset CommandInset ref
19813 LatexCommand ref
19814 reference "subsec:SVN-File-Locking"
19815
19816 \end_inset
19817
19818 .
19819 \end_layout
19820
19821 \end_inset
19822
19823  
19824 \family typewriter
19825 svn commit -q -m"<description>" <file-name>
19826 \end_layout
19827
19828 \begin_layout Subsubsection
19829
19830 \family sans
19831 Check Out For Edit
19832 \end_layout
19833
19834 \begin_layout Standard
19835 Updates the changes of this file from the repository.
19836  Be sure you understand SVN merging and conflicts resolving before using
19837  this function, because all conflicts has to be resolved manually by you!
19838 \end_layout
19839
19840 \begin_layout Standard
19841 SVN command:
19842 \begin_inset Foot
19843 status collapsed
19844
19845 \begin_layout Plain Layout
19846 Ditto.
19847 \end_layout
19848
19849 \end_inset
19850
19851  
19852 \family typewriter
19853 svn update --non-interactive 
19854 \begin_inset Quotes eld
19855 \end_inset
19856
19857 <file-name>
19858 \begin_inset Quotes erd
19859 \end_inset
19860
19861
19862 \end_layout
19863
19864 \begin_layout Subsubsection
19865
19866 \family sans
19867 Revert To Repository Version
19868 \end_layout
19869
19870 \begin_layout Standard
19871 This will discard all changes made to the document since the last check
19872  in.
19873  You get a warning before changes are discarded.
19874  
19875 \end_layout
19876
19877 \begin_layout Standard
19878 SVN command: 
19879 \family typewriter
19880 svn revert -q 
19881 \begin_inset Quotes eld
19882 \end_inset
19883
19884 <file-name>
19885 \begin_inset Quotes erd
19886 \end_inset
19887
19888
19889 \end_layout
19890
19891 \begin_layout Subsubsection
19892 \begin_inset CommandInset label
19893 LatexCommand label
19894 name "sub:SVN-Repo-Update"
19895
19896 \end_inset
19897
19898 Update of the local directory checkout from repository
19899 \begin_inset Foot
19900 status collapsed
19901
19902 \begin_layout Plain Layout
19903 Note that this command will work only with subversion 
19904 \begin_inset Formula $\geqq1.5$
19905 \end_inset
19906
19907
19908 \end_layout
19909
19910 \end_inset
19911
19912
19913 \end_layout
19914
19915 \begin_layout Standard
19916 All the commands above have one shortcomming - they deal with the current
19917  document only.
19918  Once your document contains pictures, includes external 
19919 \begin_inset Flex Code
19920 status collapsed
19921
19922 \begin_layout Plain Layout
19923 .tex
19924 \end_layout
19925
19926 \end_inset
19927
19928  files and so on administration becomes more complicated.
19929  LyX now supports updating the whole tree in which resides the document
19930 \begin_inset Foot
19931 status collapsed
19932
19933 \begin_layout Plain Layout
19934 One need to organize the files structure so that all external files are
19935  in the same directory or subdirectories of the document.
19936  
19937 \end_layout
19938
19939 \end_inset
19940
19941 .
19942  This become especially useful once you cooperate with people which neither
19943  know about subversion management nor they have ambition to commit additional
19944  material to the repository.
19945  
19946 \end_layout
19947
19948 \begin_layout Standard
19949 \begin_inset Flex Code
19950 status collapsed
19951
19952 \begin_layout Plain Layout
19953 Update local directory from repository
19954 \end_layout
19955
19956 \end_inset
19957
19958  command updates the whole directory and in case of merge conflicts local
19959  version of the files are left, so no unintended data loss occurs.
19960  If local changes are detected user is warned before update starts.
19961 \end_layout
19962
19963 \begin_layout Labeling
19964 \labelwidthstring 00.00.0000
19965 SVN
19966 \begin_inset space ~
19967 \end_inset
19968
19969 commands: 
19970 \begin_inset space ~
19971 \end_inset
19972
19973
19974 \begin_inset Newline newline
19975 \end_inset
19976
19977
19978 \begin_inset Flex Code
19979 status collapsed
19980
19981 \begin_layout Plain Layout
19982 svn diff $path
19983 \end_layout
19984
19985 \end_inset
19986
19987  (Ask if changes are detected.)
19988 \begin_inset Newline newline
19989 \end_inset
19990
19991
19992 \begin_inset Flex Code
19993 status collapsed
19994
19995 \begin_layout Plain Layout
19996 svn update --accept mine-full $path
19997 \end_layout
19998
19999 \end_inset
20000
20001
20002 \end_layout
20003
20004 \begin_layout Standard
20005 where 
20006 \begin_inset Flex Code
20007 status collapsed
20008
20009 \begin_layout Plain Layout
20010 $path
20011 \end_layout
20012
20013 \end_inset
20014
20015  stands for the path to the document.
20016 \end_layout
20017
20018 \begin_layout Subsubsection
20019
20020 \family sans
20021 Show History
20022 \end_layout
20023
20024 \begin_layout Standard
20025 This shows the complete history of the SVN document.
20026  The output of 
20027 \family typewriter
20028 svn log 
20029 \begin_inset Quotes eld
20030 \end_inset
20031
20032 <file-name>
20033 \begin_inset Quotes erd
20034 \end_inset
20035
20036
20037 \family default
20038  is shown in a browser.
20039 \end_layout
20040
20041 \begin_layout Subsubsection
20042 File Locking
20043 \begin_inset CommandInset label
20044 LatexCommand label
20045 name "subsec:SVN-File-Locking"
20046
20047 \end_inset
20048
20049
20050 \end_layout
20051
20052 \begin_layout Standard
20053 The file exchange through various revision control systems brings the problem
20054  of merge conflicts in case two different users try to edit the same (parts
20055  of) document.
20056  When such a conflict happens it needs manual resolving and one reasonable
20057  alternative is to provide some kind of locking mechanism, which guarantees
20058  that only one user is allowed to edit file at the given time.
20059 \end_layout
20060
20061 \begin_layout Standard
20062 SVN has two such mechanisms to provide mutual exclusivity for file access
20063  - locks and automatic setting of write permissions (see sec.
20064  
20065 \begin_inset CommandInset ref
20066 LatexCommand ref
20067 reference "subsec:Automatical-Locking-Property"
20068
20069 \end_inset
20070
20071 ) based on 
20072 \begin_inset Flex Code
20073 status collapsed
20074
20075 \begin_layout Plain Layout
20076 svn:needs-lock
20077 \end_layout
20078
20079 \end_inset
20080
20081  file svn property
20082 \begin_inset Foot
20083 status open
20084
20085 \begin_layout Plain Layout
20086 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20087 \end_layout
20088
20089 \end_inset
20090
20091 .
20092  If this property is detected for a given document LyX starts to use SVN
20093  locks for document editing automatically and the whole check-in/out mechanism
20094  switches to the same regimen as for RCS.
20095  This in particular means there are two different modes of file use in LyX:
20096 \end_layout
20097
20098 \begin_layout Itemize
20099 Unlocked state.
20100  The loaded file is in the read-only mode.
20101  For editing on needs to check-out.
20102  
20103 \emph on
20104 Check-out
20105 \emph default
20106  consists of updating from the repository and gaining write lock.
20107  If the lock is not possible to obtain, we remain in unlocked state.
20108 \end_layout
20109
20110 \begin_layout Itemize
20111 Locked state.
20112  The loaded file is in the 'normal' edit mode.
20113  No other user is allowed to edit the file.
20114  
20115 \emph on
20116 Check-in
20117 \emph default
20118  consists of commiting changes and releasing write-lock.
20119  If no changes have been made to the document, no commit will be produced
20120 \begin_inset Foot
20121 status collapsed
20122
20123 \begin_layout Plain Layout
20124 Don't be puzzled by the fact that you will be asked for commit message anyway.
20125 \end_layout
20126
20127 \end_inset
20128
20129  and only the write-lock will be released.
20130 \end_layout
20131
20132 \begin_layout Standard
20133 SVN commands:
20134 \end_layout
20135
20136 \begin_layout Labeling
20137 \labelwidthstring 00.00.0000
20138 Check-in:
20139 \family typewriter
20140  svn commit -q -m"<description>" "<file-name>"
20141 \begin_inset Newline newline
20142 \end_inset
20143
20144 svn unlock "<file-name>"
20145 \end_layout
20146
20147 \begin_layout Labeling
20148 \labelwidthstring 00.00.0000
20149 Check-out: 
20150 \family typewriter
20151 svn update "<file-name>"
20152 \begin_inset Newline newline
20153 \end_inset
20154
20155 svn lock "<file-name>"
20156 \end_layout
20157
20158 \begin_layout Subsubsection
20159
20160 \family typewriter
20161 \begin_inset CommandInset label
20162 LatexCommand label
20163 name "subsec:Automatical-Locking-Property"
20164
20165 \end_inset
20166
20167
20168 \family default
20169 Automatic Locking Property
20170 \end_layout
20171
20172 \begin_layout Standard
20173 The above mentioned automatic setting of write permissions of the .lyx file
20174  can be set through
20175 \family sans
20176 \bar under
20177  F
20178 \bar default
20179 ile\SpecialChar \menuseparator
20180
20181 \bar under
20182 V
20183 \bar default
20184 ersion
20185 \begin_inset space ~
20186 \end_inset
20187
20188 Control\SpecialChar \menuseparator
20189
20190 \bar under
20191 T
20192 \bar default
20193 oggle locking property
20194 \family default
20195 .
20196  This command is active only when the file is not locked on the svn server
20197  (i.e.
20198  you need to check-out before proceeding).
20199 \end_layout
20200
20201 \begin_layout Labeling
20202 \labelwidthstring 00.00.0000
20203 SVN
20204 \begin_inset space ~
20205 \end_inset
20206
20207 commands:
20208 \end_layout
20209
20210 \begin_layout Labeling
20211 \labelwidthstring 00.00.0000
20212 Set:
20213 \family typewriter
20214  svn propset svn:needs-lock ON "<file-name>"
20215 \end_layout
20216
20217 \begin_layout Labeling
20218 \labelwidthstring 00.00.0000
20219 Unset: 
20220 \family typewriter
20221 svn propdel svn:needs-lock "<file-name>"
20222 \end_layout
20223
20224 \begin_layout Subsubsection
20225 \begin_inset CommandInset label
20226 LatexCommand label
20227 name "sub:VCS-Revision-Information"
20228
20229 \end_inset
20230
20231 Revision Information in Documents
20232 \end_layout
20233
20234 \begin_layout Standard
20235 There are more possibilities how to activate revision information in our
20236  document.
20237 \end_layout
20238
20239 \begin_layout Itemize
20240 LyX supports directly:
20241 \end_layout
20242
20243 \begin_deeper
20244 \begin_layout Itemize
20245 tree revision information (
20246 \begin_inset Flex Code
20247 status collapsed
20248
20249 \begin_layout Plain Layout
20250 vcs-tree-revision
20251 \end_layout
20252
20253 \end_inset
20254
20255 ).
20256  The result is the output of the 
20257 \begin_inset Flex Code
20258 status collapsed
20259
20260 \begin_layout Plain Layout
20261 svnversion
20262 \end_layout
20263
20264 \end_inset
20265
20266  command, the following table gives you an idea, how to read the results.
20267 \end_layout
20268
20269 \begin_layout Standard
20270 \align center
20271 \begin_inset Tabular
20272 <lyxtabular version="3" rows="6" columns="2">
20273 <features rotate="0" tabularvalignment="middle">
20274 <column alignment="center" valignment="top" width="0">
20275 <column alignment="center" valignment="top" width="0">
20276 <row>
20277 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20278 \begin_inset Text
20279
20280 \begin_layout Plain Layout
20281 Output
20282 \end_layout
20283
20284 \end_inset
20285 </cell>
20286 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20287 \begin_inset Text
20288
20289 \begin_layout Plain Layout
20290 Meaning
20291 \end_layout
20292
20293 \end_inset
20294 </cell>
20295 </row>
20296 <row>
20297 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20298 \begin_inset Text
20299
20300 \begin_layout Plain Layout
20301 4123:4168
20302 \end_layout
20303
20304 \end_inset
20305 </cell>
20306 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20307 \begin_inset Text
20308
20309 \begin_layout Plain Layout
20310 mixed revision working copy
20311 \end_layout
20312
20313 \end_inset
20314 </cell>
20315 </row>
20316 <row>
20317 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20318 \begin_inset Text
20319
20320 \begin_layout Plain Layout
20321 4168M
20322 \end_layout
20323
20324 \end_inset
20325 </cell>
20326 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20327 \begin_inset Text
20328
20329 \begin_layout Plain Layout
20330 modified working copy
20331 \end_layout
20332
20333 \end_inset
20334 </cell>
20335 </row>
20336 <row>
20337 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20338 \begin_inset Text
20339
20340 \begin_layout Plain Layout
20341 4123S
20342 \end_layout
20343
20344 \end_inset
20345 </cell>
20346 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20347 \begin_inset Text
20348
20349 \begin_layout Plain Layout
20350 switched working copy
20351 \end_layout
20352
20353 \end_inset
20354 </cell>
20355 </row>
20356 <row>
20357 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20358 \begin_inset Text
20359
20360 \begin_layout Plain Layout
20361 4123P
20362 \end_layout
20363
20364 \end_inset
20365 </cell>
20366 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20367 \begin_inset Text
20368
20369 \begin_layout Plain Layout
20370 partial working copy, from a sparse checkout
20371 \end_layout
20372
20373 \end_inset
20374 </cell>
20375 </row>
20376 <row>
20377 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20378 \begin_inset Text
20379
20380 \begin_layout Plain Layout
20381 4123:4168MS
20382 \end_layout
20383
20384 \end_inset
20385 </cell>
20386 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20387 \begin_inset Text
20388
20389 \begin_layout Plain Layout
20390 mixed revision, modified, switched working copy
20391 \end_layout
20392
20393 \end_inset
20394 </cell>
20395 </row>
20396 </lyxtabular>
20397
20398 \end_inset
20399
20400
20401 \end_layout
20402
20403 \begin_layout Itemize
20404 file revision information.
20405  The result comes from parsing the output of 
20406 \begin_inset Flex Code
20407 status collapsed
20408
20409 \begin_layout Plain Layout
20410 svn
20411 \begin_inset space ~
20412 \end_inset
20413
20414 info
20415 \begin_inset space ~
20416 \end_inset
20417
20418 --xml
20419 \begin_inset space ~
20420 \end_inset
20421
20422 file.lyx
20423 \end_layout
20424
20425 \end_inset
20426
20427 .
20428  Supported flags are:
20429 \end_layout
20430
20431 \begin_deeper
20432 \begin_layout Itemize
20433 version number of the last commit (
20434 \begin_inset Flex Code
20435 status collapsed
20436
20437 \begin_layout Plain Layout
20438 vcs-revision
20439 \end_layout
20440
20441 \end_inset
20442
20443 )
20444 \end_layout
20445
20446 \begin_layout Itemize
20447 author of the last commit (
20448 \begin_inset Flex Code
20449 status collapsed
20450
20451 \begin_layout Plain Layout
20452 vcs-author
20453 \end_layout
20454
20455 \end_inset
20456
20457 )
20458 \end_layout
20459
20460 \begin_layout Itemize
20461 date of the last commit (
20462 \begin_inset Flex Code
20463 status collapsed
20464
20465 \begin_layout Plain Layout
20466 vcs-date
20467 \end_layout
20468
20469 \end_inset
20470
20471 )
20472 \end_layout
20473
20474 \begin_layout Itemize
20475 time of the last commit (
20476 \begin_inset Flex Code
20477 status collapsed
20478
20479 \begin_layout Plain Layout
20480 vcs-time
20481 \end_layout
20482
20483 \end_inset
20484
20485 )
20486 \end_layout
20487
20488 \end_deeper
20489 \begin_layout Standard
20490 You can obtain this info via InsetInfo (e.g.
20491  
20492 \begin_inset Flex Code
20493 status collapsed
20494
20495 \begin_layout Plain Layout
20496 info-insert buffer vcs-date
20497 \end_layout
20498
20499 \end_inset
20500
20501 ).
20502  The information will be available only when you have the file stored under
20503  svn managment (i.e.
20504  the 
20505 \begin_inset Flex Code
20506 status collapsed
20507
20508 \begin_layout Plain Layout
20509 .svn
20510 \end_layout
20511
20512 \end_inset
20513
20514  directory is available with your document).
20515 \end_layout
20516
20517 \end_deeper
20518 \begin_layout Itemize
20519 Another---a hacking one---possibility is to use svn keywords
20520 \begin_inset Foot
20521 status collapsed
20522
20523 \begin_layout Plain Layout
20524 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20525 \end_layout
20526
20527 \end_inset
20528
20529 .
20530  In short -- you set file keywords property (e.g.
20531  
20532 \family sans
20533 svn propset svn:keywords 'Rev' file.lyx
20534 \family default
20535 ) and then paste keyword TeX code
20536 \begin_inset Foot
20537 status collapsed
20538
20539 \begin_layout Plain Layout
20540 This is an easy way how to ensure that LyX won't break the line in the middle
20541  of keyword tag.
20542 \end_layout
20543
20544 \end_inset
20545
20546  tag in your document (e.g.
20547  
20548 \begin_inset ERT
20549 status open
20550
20551 \begin_layout Plain Layout
20552
20553 $Rev$
20554 \end_layout
20555
20556 \end_inset
20557
20558 ).
20559  This way svn client will automatically substitute revision number (e.g.
20560  
20561 \begin_inset ERT
20562 status open
20563
20564 \begin_layout Plain Layout
20565
20566 $Rev: 59 $
20567 \end_layout
20568
20569 \end_inset
20570
20571 ) after each update and commit.
20572  There are more problems with this approach.
20573  Firstly, the '$' character is used in TeX world for math equations, so
20574  any occurence of math formula 
20575 \begin_inset Formula $Rev$
20576 \end_inset
20577
20578  become 
20579 \begin_inset Formula $Rev:59$
20580 \end_inset
20581
20582  in your LyX document.
20583  Similarly for other keywords like Id, Date, Author, etc.
20584  Secondly svn output is dependent on your locales, so its very easy that
20585  svn would produce some problematic strings once Date is used.
20586  Thirdly you get the whole 'Rev: 59' string in your document instead of
20587  the plain number.
20588  Until subversion implements user's custom keywords it will be hard to use
20589  this approach reliably or let LyX to support it directly.
20590 \end_layout
20591
20592 \begin_layout Subsection
20593 SVN and Windows Environment
20594 \end_layout
20595
20596 \begin_layout Quote
20597 My inclination is to say that if the user cannot figure out the command
20598  line operations on their own fairly quickly, they would be well advised
20599  to use TortoiseSVN.
20600  ---P.
20601  A.
20602  Rubin
20603 \end_layout
20604
20605 \begin_layout Subsubsection
20606 Preparation
20607 \end_layout
20608
20609 \begin_layout Standard
20610 In addition to installing LyX, and having access to a Subversion repository,
20611  the user will need to install the Subversion client program.
20612  A Windows installer for the client program is available from 
20613 \begin_inset CommandInset href
20614 LatexCommand href
20615 name "CollabNet"
20616 target "http://www.collab.net/nonav/downloads/subversion/"
20617
20618 \end_inset
20619
20620 .
20621  The user may also want to install 
20622 \begin_inset CommandInset href
20623 LatexCommand href
20624 name "TortoiseSVN"
20625 target "http://tortoisesvn.tigris.org/"
20626
20627 \end_inset
20628
20629 , which integrates Subversion operations into the context (rightclick) menu
20630  of Windows Explorer.
20631  Operations done outside LyX will typically be more convenient using the
20632  Explorer context menu.
20633  Note that TortoiseSVN is not a replacement for the client program, which
20634  is what LyX itself will use.
20635 \end_layout
20636
20637 \begin_layout Subsubsection
20638 Bringing a document under Subversion control
20639 \end_layout
20640
20641 \begin_layout Standard
20642 Before a LyX document can be brought under version control in Subversion,
20643  its parent directory needs to be under version control.
20644  If the document is being added to a project already in the repository,
20645  this is accomplished by checking the project out to the directory where
20646  the new document will be placed.
20647  If the project itself is not yet under version control (for instance, if
20648  this document starts a new project), the directory must be imported into
20649  the repository.
20650  This is done outside LyX.
20651  Both import and checkout are easily accomplished from the Explorer context
20652  menu using TortoiseSVN, or alternatively can be done using the command
20653  line client at a DOS prompt.
20654  The procedure for importing the project using TortoiseSVN is described
20655  below, assuming an existing repository and a new project being started
20656  in 
20657 \family typewriter
20658 C:
20659 \backslash
20660 new project
20661 \family default
20662 .
20663  For information on using the Subversion client program, run 
20664 \family typewriter
20665 svn --help 
20666 \family default
20667 in a DOS shell.
20668 \end_layout
20669
20670 \begin_layout Enumerate
20671 Locate 
20672 \family typewriter
20673 C:
20674 \backslash
20675 new project 
20676 \family default
20677 in Windows Explorer, right click it, and select 
20678 \family typewriter
20679 TortoiseSVN > Repo-browser
20680 \family default
20681 .
20682  If necessary, adjust the URL for the repository, then click OK.
20683 \end_layout
20684
20685 \begin_layout Enumerate
20686 Right click the level of the repository under which you want to place the
20687  new project folder (typically the top level) and click 
20688 \family typewriter
20689 Create folder\SpecialChar \ldots{}
20690
20691 \family default
20692  Supply a name for the project folder and click OK.
20693  Add a message for the log file if desired, then click OK again.
20694  The new project folder should appear in the repository.
20695  Finally, click OK again to exit the repository browser.
20696 \end_layout
20697
20698 \begin_layout Enumerate
20699 Once again right click 
20700 \family typewriter
20701 C:
20702 \backslash
20703 new project
20704 \family default
20705 , this time selecting SVN Checkout\SpecialChar \ldots{}
20706  Select the URL of the project folder
20707  you just created in the repository, and set the checkout directory to 
20708 \family typewriter
20709 C:
20710 \backslash
20711 new project.
20712
20713 \family default
20714  Click OK.
20715  You will be warned about a non-empty folder; click OK to proceed.
20716  You should now have a 
20717 \family typewriter
20718 .svn
20719 \family default
20720  directory under 
20721 \family typewriter
20722 C:
20723 \backslash
20724 new project.
20725 \end_layout
20726
20727 \begin_layout Enumerate
20728 Create or open your document in LyX and click 
20729 \family sans
20730 \bar under
20731 F
20732 \bar default
20733 ile\SpecialChar \menuseparator
20734
20735 \bar under
20736 V
20737 \bar default
20738 ersion
20739 \begin_inset space ~
20740 \end_inset
20741
20742 Control\SpecialChar \menuseparator
20743
20744 \bar under
20745 R
20746 \bar default
20747 egister.
20748  
20749 \family default
20750 Add a log message and click OK to commit the document to version control.
20751 \end_layout
20752
20753 \begin_layout Standard
20754 From this point onward, you should have full functionality in the 
20755 \family sans
20756 \bar under
20757 F
20758 \bar default
20759 ile\SpecialChar \menuseparator
20760
20761 \bar under
20762 V
20763 \bar default
20764 ersion
20765 \begin_inset space ~
20766 \end_inset
20767
20768 Control
20769 \family default
20770  menu.
20771  You also have the option of checking the document in and out, viewing its
20772  history, etc.
20773  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20774  client program from a command prompt.
20775 \end_layout
20776
20777 \begin_layout Subsubsection
20778 SSH tunnel used with SVN under Windows
20779 \end_layout
20780
20781 \begin_layout Standard
20782 Compared with Linux setting up an svn client to communicate over ssh under
20783  Windows is a rather troublesome task.
20784  We will at least offer some hints how to setup the client side but prior
20785  knowledge about ssh and the Windows command line is needed, also be prepared
20786  for a great deal of frustration\SpecialChar \ldots{}
20787
20788 \end_layout
20789
20790 \begin_layout Enumerate
20791 Get an svn client for windows, as described in the previous sections.
20792  When it is a fresh install run some svn command (e.g.
20793  
20794 \begin_inset Flex Code
20795 status collapsed
20796
20797 \begin_layout Plain Layout
20798 svn --version
20799 \end_layout
20800
20801 \end_inset
20802
20803 ) to create config files, which you will need to change later on.
20804 \end_layout
20805
20806 \begin_layout Enumerate
20807 Choose an ssh client for Windows.
20808  There are several possibilities, we will use the one from Putty tools
20809 \begin_inset Foot
20810 status open
20811
20812 \begin_layout Plain Layout
20813 \begin_inset Flex URL
20814 status collapsed
20815
20816 \begin_layout Plain Layout
20817
20818 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20819 \end_layout
20820
20821 \end_inset
20822
20823
20824 \end_layout
20825
20826 \end_inset
20827
20828 .
20829  You will need to set the connection up so that the client doesn't ask for
20830  any password from you.
20831  To keep things easy we will use only keys without any additional password
20832  protection etc.
20833 \end_layout
20834
20835 \begin_deeper
20836 \begin_layout Enumerate
20837 Generate keys by 
20838 \begin_inset Flex Code
20839 status collapsed
20840
20841 \begin_layout Plain Layout
20842 puttygen
20843 \end_layout
20844
20845 \end_inset
20846
20847 .
20848  Save your private .ppk key file and put the public one on the server side.
20849  If the SVN server runs on Linux, note that the format of the public key
20850  is not compatible with Linux openssh and you will need to direcly copy-paste
20851  the key from the “
20852 \emph on
20853 Public key for pasting into OpenSSH authorized_keys file
20854 \emph default
20855 :” edit field into the server's 
20856 \begin_inset Flex Code
20857 status collapsed
20858
20859 \begin_layout Plain Layout
20860 ~/.ssh/authorized_keys
20861 \end_layout
20862
20863 \end_inset
20864
20865
20866 \begin_inset Flex Code
20867 status collapsed
20868
20869 \begin_layout Plain Layout
20870 authorized_keys2
20871 \end_layout
20872
20873 \end_inset
20874
20875  file.
20876 \end_layout
20877
20878 \begin_layout Enumerate
20879 Get the Putty's 
20880 \begin_inset Flex Code
20881 status collapsed
20882
20883 \begin_layout Plain Layout
20884 plink
20885 \end_layout
20886
20887 \end_inset
20888
20889 .
20890  In the SVN config file
20891 \begin_inset Foot
20892 status collapsed
20893
20894 \begin_layout Plain Layout
20895 Exact path depends on Windows version, usually somewhere around 
20896 \begin_inset Flex Code
20897 status collapsed
20898
20899 \begin_layout Plain Layout
20900 c:
20901 \backslash
20902 Documents and Settings
20903 \backslash
20904 user
20905 \backslash
20906 Application Data
20907 \backslash
20908 Subversion
20909 \backslash
20910 config
20911 \end_layout
20912
20913 \end_inset
20914
20915  / 
20916 \begin_inset Flex Code
20917 status collapsed
20918
20919 \begin_layout Plain Layout
20920 AppData
20921 \backslash
20922 Roaming
20923 \backslash
20924 Subversion
20925 \end_layout
20926
20927 \end_inset
20928
20929 .
20930 \end_layout
20931
20932 \end_inset
20933
20934 , section [tunnels], setup ssh command, e.g.
20935  
20936 \begin_inset Flex Code
20937 status collapsed
20938
20939 \begin_layout Plain Layout
20940 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20941 \end_layout
20942
20943 \end_inset
20944
20945 .
20946 \begin_inset Foot
20947 status collapsed
20948
20949 \begin_layout Plain Layout
20950 It will usually take a lot of time to get exact command right and it depends
20951  on many things.
20952  For example do not have some remote server saved as a default session in
20953  Putty etc.
20954  If things fail, try to connect via plink without SVN first.
20955 \end_layout
20956
20957 \end_inset
20958
20959
20960 \end_layout
20961
20962 \end_deeper
20963 \begin_layout Enumerate
20964 Checkout the SVN archive, e.g.
20965  
20966 \begin_inset Flex Code
20967 status collapsed
20968
20969 \begin_layout Plain Layout
20970 svn co svn+ssh://user@server/repository_path
20971 \end_layout
20972
20973 \end_inset
20974
20975 .
20976 \end_layout
20977
20978 \begin_layout Subsubsection
20979 End-of-Line Conversions
20980 \end_layout
20981
20982 \begin_layout Standard
20983 When the collaborators are mixing Linux and Windows environments, LyX will
20984  use different line endings inside the .lyx files.
20985  This is not a problem as far as LyX functionality is concerned, but the
20986  commit diffs will be huge and merge-conflicts prone.
20987  Fortunately SVN itself knows
20988 \begin_inset Foot
20989 status collapsed
20990
20991 \begin_layout Plain Layout
20992 \begin_inset Flex URL
20993 status collapsed
20994
20995 \begin_layout Plain Layout
20996
20997 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20998 \end_layout
20999
21000 \end_inset
21001
21002
21003 \end_layout
21004
21005 \end_inset
21006
21007  how to deal with CR/LF problems when switching .lyx files to the 
21008 \begin_inset Flex Code
21009 status collapsed
21010
21011 \begin_layout Plain Layout
21012 native
21013 \end_layout
21014
21015 \end_inset
21016
21017  mode.
21018 \begin_inset Foot
21019 status collapsed
21020
21021 \begin_layout Plain Layout
21022 For the lazy guys: 
21023 \begin_inset Flex Code
21024 status collapsed
21025
21026 \begin_layout Plain Layout
21027 svn propset svn:eol-style native FILE_NAME
21028 \end_layout
21029
21030 \end_inset
21031
21032
21033 \end_layout
21034
21035 \end_inset
21036
21037
21038 \end_layout
21039
21040 \begin_layout Subsection
21041 Further tuning
21042 \end_layout
21043
21044 \begin_layout Standard
21045 With the recent addition of the vc-command function LyX power users are
21046  allowed to create their own commands for revision control.
21047 \end_layout
21048
21049 \begin_layout Standard
21050 As an example you can see how two TortoiseSVN commands could be integrated
21051  directly:
21052 \end_layout
21053
21054 \begin_layout Description
21055 Commit: 
21056 \begin_inset Flex Code
21057 status collapsed
21058
21059 \begin_layout Plain Layout
21060 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21061 \end_layout
21062
21063 \end_inset
21064
21065
21066 \end_layout
21067
21068 \begin_layout Description
21069 Revert: 
21070 \begin_inset Flex Code
21071 status collapsed
21072
21073 \begin_layout Plain Layout
21074 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21075 \end_layout
21076
21077 \end_inset
21078
21079
21080 \end_layout
21081
21082 \begin_layout Subsection
21083 Version control and Document comparison
21084 \end_layout
21085
21086 \begin_layout Standard
21087 One of the typical uses of version control is to inspect the changes between
21088  revisions, usually by creating 
21089 \begin_inset Flex Code
21090 status collapsed
21091
21092 \begin_layout Plain Layout
21093 diff
21094 \end_layout
21095
21096 \end_inset
21097
21098  dumps.
21099  While this is useful for plain text files, it is much less useful in the
21100  case of LyX files, which have more a complicated structure.
21101  Hence we provide binding to the Document comparison feature.
21102  There are two ways of calling this feature - either by direct call of 
21103 \begin_inset Flex Code
21104 status collapsed
21105
21106 \begin_layout Plain Layout
21107 VC_COMPARE
21108 \end_layout
21109
21110 \end_inset
21111
21112  LyX function (for details see LyX functions manual) or by icon/menu item
21113  
21114 \begin_inset Flex MenuItem
21115 status collapsed
21116
21117 \begin_layout Plain Layout
21118 Compare with older revision...
21119 \end_layout
21120
21121 \end_inset
21122
21123 .
21124  One can either compare two chosen revisions of the document or he can simply
21125  compare the current version of edited text with older revisions (where
21126  '
21127 \begin_inset Flex MenuItem
21128 status collapsed
21129
21130 \begin_layout Plain Layout
21131 0
21132 \end_layout
21133
21134 \end_inset
21135
21136 ' revisions back means comparison of the edited file with last commited
21137  revision).
21138  
21139 \end_layout
21140
21141 \begin_layout Standard
21142 This feature is supported for SVN and RCS though due to the more complicated
21143  versioning scheme of RCS there is a constraint -- when addressing the revisions
21144  in dialog, numbers always point to the last number in RCS revision number,
21145  i.e.
21146  '35' in '1.2.35'.
21147 \end_layout
21148
21149 \begin_layout Section
21150 Literate Programming
21151 \end_layout
21152
21153 \begin_layout Standard
21154 Updated by 
21155 \noun on
21156 Kayvan Sylvan 
21157 \noun default
21158 (kayvan@sylvan.com)
21159 \noun on
21160
21161 \noun default
21162 original documentation written by 
21163 \noun on
21164 Edmar Wienskoski Jr.
21165
21166 \noun default
21167  (edmar-w-jr@technologist.com)
21168 \end_layout
21169
21170 \begin_layout Subsection
21171 Introduction
21172 \end_layout
21173
21174 \begin_layout Standard
21175 The main purpose of this documentation is to show you how to use LyX for
21176  literate programming, where it is assumed that you are familiar with this
21177  programming technique, and know what 
21178 \begin_inset Quotes eld
21179 \end_inset
21180
21181 tangling
21182 \begin_inset Quotes erd
21183 \end_inset
21184
21185  and 
21186 \begin_inset Quotes eld
21187 \end_inset
21188
21189 weaving
21190 \begin_inset Quotes erd
21191 \end_inset
21192
21193  means.
21194  If that is not the case, please follow the web links provided in the following
21195  sections.
21196  There is a lot of good documentation out there covering old development
21197  history to the latest tools tips.
21198 \end_layout
21199
21200 \begin_layout Standard
21201 It is also assumed that you are familiar with LyX itself to a point that
21202  you are comfortable changing your LyX preferences, and X resources file.
21203  If that is not the case please refer to other LyX documentation to cover
21204  your specific needs.
21205 \end_layout
21206
21207 \begin_layout Subsection
21208 Literate Programming
21209 \end_layout
21210
21211 \begin_layout Standard
21212 From the Literate Programming FAQ: 
21213 \end_layout
21214
21215 \begin_layout Quotation
21216 Literate programming is the combination of documentation and source together
21217  in a fashion suited for reading by human beings.
21218  In fact, literate programs should be enjoyable reading, even inviting!
21219  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21220  and documentation in a single file.
21221  Literate programming tools then parse the file to produce either readable
21222  documentation or compilable source.
21223  The WEB style of literate programming was created by D.
21224 \begin_inset space \thinspace{}
21225 \end_inset
21226
21227 E.
21228  Knuth during the development of his TeX typesetting software.
21229  
21230 \end_layout
21231
21232 \begin_layout Standard
21233 Another excerpt says:
21234 \end_layout
21235
21236 \begin_layout Quotation
21237
21238 \emph on
21239 How is literate programming different from verbose commenting?
21240 \end_layout
21241
21242 \begin_layout Quotation
21243 There are three distinguishing characteristics.
21244  In order of importance, they are: 
21245 \end_layout
21246
21247 \begin_deeper
21248 \begin_layout Itemize
21249 flexible order of elaboration 
21250 \end_layout
21251
21252 \begin_layout Itemize
21253 automatic support for browsing 
21254 \end_layout
21255
21256 \begin_layout Itemize
21257 typeset documentation, especially diagrams and mathematics 
21258 \end_layout
21259
21260 \end_deeper
21261 \begin_layout Standard
21262 Now that I sparked your curiosity, take a look in the references.
21263 \end_layout
21264
21265 \begin_layout Subsubsection
21266 References
21267 \end_layout
21268
21269 \begin_layout Standard
21270 The complete Literate Programming FAQ can be found at:
21271 \end_layout
21272
21273 \begin_layout Quote
21274 Literate Programming FAQ 
21275 \begin_inset Flex URL
21276 status collapsed
21277
21278 \begin_layout Plain Layout
21279
21280 http://www.literateprogramming.com/lpfaq.pdf
21281 \end_layout
21282
21283 \end_inset
21284
21285
21286 \end_layout
21287
21288 \begin_layout Standard
21289 The FAQ lists 23 (twenty three!) different literate programming tools.
21290  Where some are specialized or 
21291 \begin_inset Quotes eld
21292 \end_inset
21293
21294 tailored
21295 \begin_inset Quotes erd
21296 \end_inset
21297
21298  for particular programming languages, while other have general scope.
21299  I selected 
21300 \noun on
21301 Noweb
21302 \noun default
21303  for my own use for several reasons:
21304 \end_layout
21305
21306 \begin_layout Itemize
21307 It can generate the documentation either in LaTeX or HTML.
21308 \end_layout
21309
21310 \begin_layout Itemize
21311 It has a open architecture, i.
21312 \begin_inset space \thinspace{}
21313 \end_inset
21314
21315 e.
21316 \begin_inset space \space{}
21317 \end_inset
21318
21319 it is easy to plug in new filters and to perform special processing that
21320  you may need.
21321  
21322 \end_layout
21323
21324 \begin_layout Itemize
21325 There is a good selection of filters available already (the HTML is one
21326  of them).
21327 \end_layout
21328
21329 \begin_layout Itemize
21330 It is free.
21331 \end_layout
21332
21333 \begin_layout Standard
21334 The Noweb web page can be found at: 
21335 \end_layout
21336
21337 \begin_layout Quote
21338 Noweb home page 
21339 \begin_inset Flex URL
21340 status collapsed
21341
21342 \begin_layout Plain Layout
21343
21344 http://www.cs.virginia.edu/~nr/noweb/
21345 \end_layout
21346
21347 \end_inset
21348
21349
21350 \end_layout
21351
21352 \begin_layout Standard
21353 Starting from there you can reach many other interesting links and even
21354  some literate program examples.
21355 \end_layout
21356
21357 \begin_layout Subsection
21358 LyX and Literate Programming
21359 \end_layout
21360
21361 \begin_layout Standard
21362 The LyX support for Literate Programming is provided by using the generic
21363  LyX converters mechanism.
21364  This support is provided in a 
21365 \begin_inset Quotes eld
21366 \end_inset
21367
21368 Noweb independent
21369 \begin_inset Quotes erd
21370 \end_inset
21371
21372  way, i.
21373 \begin_inset space \thinspace{}
21374 \end_inset
21375
21376 e.
21377 \begin_inset space \space{}
21378 \end_inset
21379
21380 you will be able to use this new LyX feature with some other literate programmin
21381 g tool of your choice by just changing your LyX preferences.
21382 \end_layout
21383
21384 \begin_layout Subsubsection
21385 Generating documents and code (weaving and tangling)
21386 \end_layout
21387
21388 \begin_layout Paragraph
21389 Selecting the document class
21390 \end_layout
21391
21392 \begin_layout Standard
21393 If you have installed Noweb and LyX successfully, whenever you open a new
21394  document or try to change the document class of an existing one, you will
21395  find that there are three new document classes available:
21396 \end_layout
21397
21398 \begin_layout Itemize
21399 Article (Noweb)
21400 \end_layout
21401
21402 \begin_layout Itemize
21403 Book (Noweb)
21404 \end_layout
21405
21406 \begin_layout Itemize
21407 Report (Noweb)
21408 \end_layout
21409
21410 \begin_layout Standard
21411 You must select one of them to create your literate documents from.
21412  
21413 \end_layout
21414
21415 \begin_layout Standard
21416 Note that literate documents are not limited to these three classes.
21417  New classes can be generated from other styles like letter or in combination
21418  with other class variations like Article (AMS).
21419  If you have special needs that cannot be covered by one of the existing
21420  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21421  will arrange to insert a new entry, or teach you how to do it.
21422 \begin_inset Foot
21423 status collapsed
21424
21425 \begin_layout Plain Layout
21426 It is very simple, it involves the creation of a file with four lines, and
21427  re-running of the auto configuration.
21428 \end_layout
21429
21430 \end_inset
21431
21432  Moreover, if you use a literate tool other than Noweb you may need to create
21433  a new set of document classes for it.
21434 \end_layout
21435
21436 \begin_layout Paragraph
21437 Typing code in
21438 \end_layout
21439
21440 \begin_layout Standard
21441 LyX enables you to write code with a layout named 
21442 \noun on
21443 Scrap
21444 \noun default
21445 .
21446 \begin_inset Foot
21447 status collapsed
21448
21449 \begin_layout Plain Layout
21450 The equivalent Noweb term is 
21451 \begin_inset Quotes eld
21452 \end_inset
21453
21454 Chunk
21455 \begin_inset Quotes erd
21456 \end_inset
21457
21458 .
21459  For historical reasons, I got used to the term 
21460 \begin_inset Quotes eld
21461 \end_inset
21462
21463 scrap
21464 \begin_inset Quotes erd
21465 \end_inset
21466
21467  introduced by other literate tool named Nuweb, which I used for many years
21468  before rendering myself to Noweb.
21469 \end_layout
21470
21471 \end_inset
21472
21473  Noweb delimits scraps like this:
21474 \end_layout
21475
21476 \begin_layout LyX-Code
21477 <<My scrap>>=
21478 \end_layout
21479
21480 \begin_layout LyX-Code
21481   code
21482 \end_layout
21483
21484 \begin_layout LyX-Code
21485   more code
21486 \end_layout
21487
21488 \begin_layout LyX-Code
21489   even more code
21490 \end_layout
21491
21492 \begin_layout LyX-Code
21493   @
21494 \end_layout
21495
21496 \begin_layout Standard
21497 The problem is that whatever is written in between the << and the 
21498 \family typewriter
21499 @
21500 \family default
21501  must be taken literally, i.
21502 \begin_inset space \thinspace{}
21503 \end_inset
21504
21505 e.
21506 \begin_inset space \space{}
21507 \end_inset
21508
21509 LyX should be prevented from making any special interpretation of what has
21510  been written.
21511  This is handled by a special layout named Scrap, that works like a normal
21512  paragraph but has a free spacing capability.
21513 \end_layout
21514
21515 \begin_layout Standard
21516 The down side of the Scrap paragraph layout is that consecutive paragraphs
21517  of code will be spaced with one empty line in the source code and also
21518  in the printed documentation.
21519  The work around is to enter each line of code within a single Scrap, with
21520  a newline (ctrl-return).
21521  The example above will look like this:
21522 \begin_inset Foot
21523 status collapsed
21524
21525 \begin_layout Plain Layout
21526 If you have a printed version of this document you will not see any difference
21527  between the previous example and this one.
21528 \end_layout
21529
21530 \end_inset
21531
21532
21533 \end_layout
21534
21535 \begin_layout LyX-Code
21536 <<My scrap>>=
21537 \begin_inset Newline newline
21538 \end_inset
21539
21540   code
21541 \begin_inset Newline newline
21542 \end_inset
21543
21544   more code
21545 \begin_inset Newline newline
21546 \end_inset
21547
21548   even more code
21549 \begin_inset Newline newline
21550 \end_inset
21551
21552   @
21553 \end_layout
21554
21555 \begin_layout Standard
21556 This layout works fine.
21557  The only real inconvenience is that you have to type ctrl-return instead
21558  of a plain return.
21559 \begin_inset Foot
21560 status collapsed
21561
21562 \begin_layout Plain Layout
21563 It is in my list of 
21564 \begin_inset Quotes eld
21565 \end_inset
21566
21567 improvements
21568 \begin_inset Quotes erd
21569 \end_inset
21570
21571  to fix that.
21572 \end_layout
21573
21574 \end_inset
21575
21576
21577 \end_layout
21578
21579 \begin_layout Standard
21580 As a special note, you can also use the 
21581 \begin_inset Quotes eld
21582 \end_inset
21583
21584 %def
21585 \begin_inset Quotes erd
21586 \end_inset
21587
21588  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21589 rence:
21590 \end_layout
21591
21592 \begin_layout LyX-Code
21593 <<My scrap>>=
21594 \begin_inset Newline newline
21595 \end_inset
21596
21597   def some_function(args):
21598 \begin_inset Newline newline
21599 \end_inset
21600
21601     "This is the doc string for this function."
21602 \begin_inset Newline newline
21603 \end_inset
21604
21605     print "My args: ", args
21606 \end_layout
21607
21608 \begin_layout LyX-Code
21609 @ %def some_function
21610 \end_layout
21611
21612 \begin_layout Standard
21613 For an example of this usage and the resulting cross-reference output, look
21614  at the Literate python program in 
21615 \emph on
21616 LIBDIR/examples/listerrors.lyx
21617 \emph default
21618  which should make this all clear.
21619 \end_layout
21620
21621 \begin_layout Paragraph
21622 Generating the documentation
21623 \end_layout
21624
21625 \begin_layout Standard
21626 At this point you already have a new document file with a proper document
21627  class, and with some code and text on it.
21628  How do I print it? The answer is simple, you select 
21629 \family sans
21630 View\SpecialChar \menuseparator
21631 DVI,
21632 \family default
21633  etc.
21634  Just like you would do for a plain document.
21635  No special procedure is required.
21636 \end_layout
21637
21638 \begin_layout Standard
21639 To help orientate you, I will now explain what happens inside LyX:
21640 \end_layout
21641
21642 \begin_layout Enumerate
21643 When the 
21644 \family sans
21645 Update\SpecialChar \menuseparator
21646 DVI
21647 \family default
21648  menu option is chosen, a LaTeX file is generated.
21649  
21650 \end_layout
21651
21652 \begin_deeper
21653 \begin_layout Standard
21654 If the document is of any literate class the generated file will be named
21655  with an extension name defined by the 
21656 \begin_inset Quotes eld
21657 \end_inset
21658
21659 literate
21660 \begin_inset Quotes erd
21661 \end_inset
21662
21663  format (defined in the Preferences panel), otherwise the file will have
21664  the usual 
21665 \family typewriter
21666 .tex
21667 \family default
21668  extension.
21669 \end_layout
21670
21671 \end_deeper
21672 \begin_layout Enumerate
21673 Note that the only difference so far is in the name of the file, no special
21674  processing is required by LyX.
21675  Given that you formatted the code using the Scrap layout that, by itself,
21676  takes care of the business.
21677 \end_layout
21678
21679 \begin_layout Enumerate
21680 If the document is of any literate class LyX will then use the internal
21681  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21682 \begin_inset Foot
21683 status collapsed
21684
21685 \begin_layout Plain Layout
21686 The converters are defined in the 
21687 \family sans
21688 Tools\SpecialChar \menuseparator
21689 Preferences
21690 \family default
21691  panel, under the 
21692 \begin_inset Quotes eld
21693 \end_inset
21694
21695 Conversion
21696 \begin_inset Quotes erd
21697 \end_inset
21698
21699  tab.
21700  See section 
21701 \emph on
21702 Converters
21703 \emph default
21704  of the 
21705 \emph on
21706 Customization
21707 \emph default
21708  manual for general information about converters.
21709 \end_layout
21710
21711 \end_inset
21712
21713  to generate the LaTeX file.
21714 \end_layout
21715
21716 \begin_deeper
21717 \begin_layout Standard
21718 Otherwise it will just skip this step.
21719 \end_layout
21720
21721 \end_deeper
21722 \begin_layout Enumerate
21723 Finally, LaTeX is invoked and the regular post processing continues as in
21724  a plain document.
21725 \end_layout
21726
21727 \begin_layout Standard
21728 Independence from a particular 
21729 \begin_inset Quotes eld
21730 \end_inset
21731
21732 literate tool
21733 \begin_inset Quotes erd
21734 \end_inset
21735
21736  is easily achieved by changing the commands that are run by the various
21737  converters.
21738 \end_layout
21739
21740 \begin_layout Paragraph
21741 Generating the code
21742 \end_layout
21743
21744 \begin_layout Standard
21745 When the build menu option is chosen or the corresponding button in the
21746  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21747  Next, LyX invokes the 
21748 \family typewriter
21749 Noweb->Program
21750 \family default
21751  converter.
21752  This converter needs to be defined by the user and is not installed by
21753  default, though the Program format is.
21754  This converter (like any other converter) will have two parts:
21755 \end_layout
21756
21757 \begin_layout Enumerate
21758 The converter program itself.
21759  This program performs the conversion from the one format to the other (in
21760  this case, from the Noweb format to the Program pseudo-format).
21761 \end_layout
21762
21763 \begin_layout Enumerate
21764 The error log parser.
21765  This is a program whose sole purpose is to rewrite error messages in a
21766  format that LyX understands.
21767  This makes it possible for LyX to place error boxes in the right places
21768  in the file buffer.
21769 \end_layout
21770
21771 \begin_layout Standard
21772 The first part, the 
21773 \begin_inset Quotes eld
21774 \end_inset
21775
21776 Converter
21777 \begin_inset Quotes erd
21778 \end_inset
21779
21780  setting, should be set to 
21781 \begin_inset Quotes eld
21782 \end_inset
21783
21784
21785 \family typewriter
21786 build-script $$i
21787 \family default
21788
21789 \begin_inset Quotes erd
21790 \end_inset
21791
21792 .
21793  This basically means that LyX will call 
21794 \begin_inset Quotes eld
21795 \end_inset
21796
21797 build-script
21798 \begin_inset Quotes erd
21799 \end_inset
21800
21801  (a program or script) with the name of the Noweb file (normally a file
21802  in the LyX temp directory).
21803  
21804 \end_layout
21805
21806 \begin_layout Standard
21807 This is an implementation of 
21808 \begin_inset Quotes eld
21809 \end_inset
21810
21811 build-script
21812 \begin_inset Quotes erd
21813 \end_inset
21814
21815  that you can place in a directory on your path:
21816 \end_layout
21817
21818 \begin_layout LyX-Code
21819 #!/bin/sh
21820 \end_layout
21821
21822 \begin_layout LyX-Code
21823 #
21824 \end_layout
21825
21826 \begin_layout LyX-Code
21827 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21828 \end_layout
21829
21830 \begin_layout Standard
21831 The next part of the converter setting is the 
21832 \begin_inset Quotes eld
21833 \end_inset
21834
21835 Flags
21836 \begin_inset Quotes erd
21837 \end_inset
21838
21839  which is to be set to 
21840 \begin_inset Quotes eld
21841 \end_inset
21842
21843
21844 \family typewriter
21845 parselog=listerrors
21846 \family default
21847
21848 \begin_inset Quotes erd
21849 \end_inset
21850
21851 .
21852  This will run any errors that are generated by the 
21853 \begin_inset Quotes eld
21854 \end_inset
21855
21856 build-script
21857 \begin_inset Quotes erd
21858 \end_inset
21859
21860  process through the 
21861 \begin_inset Quotes eld
21862 \end_inset
21863
21864 listerrors
21865 \begin_inset Quotes erd
21866 \end_inset
21867
21868  program.
21869 \end_layout
21870
21871 \begin_layout Standard
21872 The converter code looks in 
21873 \emph on
21874 MYLYXDIR/scripts
21875 \emph default
21876  first, then in 
21877 \emph on
21878 LIBDIR/scripts
21879 \emph default
21880  then on the path for the 
21881 \begin_inset Quotes eld
21882 \end_inset
21883
21884 listerrors
21885 \begin_inset Quotes erd
21886 \end_inset
21887
21888  program.
21889 \end_layout
21890
21891 \begin_layout Standard
21892 The build will normally take place in LyX's temporary directory, so the
21893  files produced by the conversion will be in that directory.
21894  LyX will copy out what it regards as the `main' file, but the 
21895 \family typewriter
21896 Noweb->Program
21897 \family default
21898  conversion may produce several files, and so most of these would then be
21899  deleted when LyX was closed.
21900  The present solution is to use a `copier',
21901 \begin_inset Foot
21902 status collapsed
21903
21904 \begin_layout Plain Layout
21905 See section 
21906 \emph on
21907 Copiers
21908 \emph default
21909  of the 
21910 \emph on
21911 Customization
21912 \emph default
21913  manual for information on these.
21914 \end_layout
21915
21916 \end_inset
21917
21918  in this case, the 
21919 \family typewriter
21920 ext_copy.py
21921 \family default
21922  script in its default mode, so that the entire contents of the temporary
21923  directory is copied.
21924  More will get copied than is needed, to be sure, but nothing will be lost.
21925  If, however, you know what extensions the generated files will have, this
21926  can be improved by using the 
21927 \family typewriter
21928 -e
21929 \family default
21930  option to 
21931 \family typewriter
21932 ext_copy
21933 \family default
21934 .
21935  This option takes a comma-separated list of extensions to copy.
21936  So, for example, if the conversion will generate only files with the extensions
21937  
21938 \family typewriter
21939 .c
21940 \family default
21941  and 
21942 \family typewriter
21943 .h
21944 \family default
21945 , then the correct definition would be:
21946 \end_layout
21947
21948 \begin_layout LyX-Code
21949 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21950 \end_layout
21951
21952 \begin_layout Standard
21953 The result will be that only files with these two extensions will be copied
21954  out.
21955 \end_layout
21956
21957 \begin_layout Paragraph
21958 Build instructions in the document
21959 \end_layout
21960
21961 \begin_layout Standard
21962 The last piece of the integration between LyX and noweb is the 
21963 \begin_inset Quotes eld
21964 \end_inset
21965
21966 build-script
21967 \begin_inset Quotes erd
21968 \end_inset
21969
21970  scrap.
21971  Generally, the instructions for building your program should be embedded
21972  in a scrap of its own.
21973  The noweb-specific 
21974 \begin_inset Quotes eld
21975 \end_inset
21976
21977 build-script
21978 \begin_inset Quotes erd
21979 \end_inset
21980
21981  above uses the notangle command to look for this scrap (called 
21982 \begin_inset Quotes eld
21983 \end_inset
21984
21985 build-script
21986 \begin_inset Quotes erd
21987 \end_inset
21988
21989 ) and runs its contents through 
21990 \begin_inset Quotes eld
21991 \end_inset
21992
21993 sh
21994 \begin_inset Quotes erd
21995 \end_inset
21996
21997 .
21998 \end_layout
21999
22000 \begin_layout Standard
22001 Typically, such a scrap would look something like this:
22002 \end_layout
22003
22004 \begin_layout LyX-Code
22005 <<build-script>>=
22006 \begin_inset Newline newline
22007 \end_inset
22008
22009 #!/bin/sh
22010 \begin_inset Newline newline
22011 \end_inset
22012
22013
22014 \begin_inset Newline newline
22015 \end_inset
22016
22017 if [ -z "${NOWEB_SOURCE}" ]
22018 \begin_inset Newline newline
22019 \end_inset
22020
22021 then
22022 \begin_inset Newline newline
22023 \end_inset
22024
22025   NOWEB_SOURCE=myfile.nw
22026 \begin_inset Newline newline
22027 \end_inset
22028
22029 fi
22030 \begin_inset Newline newline
22031 \end_inset
22032
22033 [...
22034  code to extract files ...]
22035 \begin_inset Newline newline
22036 \end_inset
22037
22038 [...
22039  code to compile files ...]
22040 \begin_inset Newline newline
22041 \end_inset
22042
22043 @
22044 \end_layout
22045
22046 \begin_layout Standard
22047 Look in 
22048 \emph on
22049 LIBDIR/examples/listerrors.lyx
22050 \emph default
22051  or in 
22052 \emph on
22053 LIBDIR/examples/Literate.lyx
22054 \emph default
22055  which implement two versions of the 
22056 \begin_inset Quotes eld
22057 \end_inset
22058
22059 listerrors
22060 \begin_inset Quotes erd
22061 \end_inset
22062
22063  program for some illustrations of how all of these pieces go together or
22064  in 
22065 \emph on
22066 LIBDIR/examples/noweb2lyx.lyx.
22067
22068 \emph default
22069  Interestingly, these three files show off the language-indepence of the
22070  LyX literate programming support since they are written in Python, C and
22071  Perl respectively.
22072 \end_layout
22073
22074 \begin_layout Subsubsection
22075 Configuring LyX
22076 \end_layout
22077
22078 \begin_layout Standard
22079 All the Literate Programming support is configured by the 
22080 \family sans
22081 Tools\SpecialChar \menuseparator
22082 Preferences
22083 \family default
22084  panel in the 
22085 \begin_inset Quotes eld
22086 \end_inset
22087
22088 Conversion
22089 \begin_inset Quotes erd
22090 \end_inset
22091
22092  tab.
22093  The important parts are:
22094 \end_layout
22095
22096 \begin_layout Description
22097 the
22098 \begin_inset space ~
22099 \end_inset
22100
22101
22102 \begin_inset Quotes eld
22103 \end_inset
22104
22105 literate
22106 \begin_inset Quotes erd
22107 \end_inset
22108
22109
22110 \begin_inset space ~
22111 \end_inset
22112
22113 format Set up via the Formats tab, this is where the Noweb-specific pieces
22114  are set up.
22115  The 
22116 \family sans
22117 GUI Name
22118 \family default
22119  is set to 
22120 \family typewriter
22121 NoWeb
22122 \family default
22123 , the file extension is set to 
22124 \family typewriter
22125 .nw
22126 \family default
22127 .
22128  This tells LyX to create a file with a 
22129 \family typewriter
22130 .nw
22131 \family default
22132  extension in the first step of the conversion process.
22133 \end_layout
22134
22135 \begin_layout Description
22136 the
22137 \begin_inset space ~
22138 \end_inset
22139
22140
22141 \family sans
22142 Program
22143 \family default
22144
22145 \begin_inset space ~
22146 \end_inset
22147
22148 format This is an empty format whose sole purpose is to be the endpoint
22149  of a conversion (which then allows us to set up a converter for it).
22150 \end_layout
22151
22152 \begin_layout Description
22153
22154 \family sans
22155 NoWeb
22156 \family default
22157 ->
22158 \family sans
22159 LaTeX
22160 \family default
22161  This converter performs the 
22162 \begin_inset Quotes eld
22163 \end_inset
22164
22165 weaving
22166 \begin_inset Quotes erd
22167 \end_inset
22168
22169  of the literate document.
22170  For Noweb, it is set to 
22171 \begin_inset Quotes eld
22172 \end_inset
22173
22174
22175 \family typewriter
22176 noweave -delay -index $$i > $$o
22177 \family default
22178
22179 \begin_inset Quotes erd
22180 \end_inset
22181
22182
22183 \end_layout
22184
22185 \begin_layout Description
22186
22187 \family sans
22188 NoWeb
22189 \family default
22190 ->
22191 \family sans
22192 Program
22193 \family default
22194  This performs the 
22195 \begin_inset Quotes eld
22196 \end_inset
22197
22198 tangling step
22199 \begin_inset Quotes erd
22200 \end_inset
22201
22202 .
22203  As stated above, the Converter is set to 
22204 \begin_inset Quotes eld
22205 \end_inset
22206
22207
22208 \family typewriter
22209 build-script $$i
22210 \family default
22211
22212 \begin_inset Quotes erd
22213 \end_inset
22214
22215 , with Flags set to 
22216 \begin_inset Quotes eld
22217 \end_inset
22218
22219
22220 \family typewriter
22221 originaldir,parselog=listerrors
22222 \family default
22223
22224 \begin_inset Quotes erd
22225 \end_inset
22226
22227 .
22228 \end_layout
22229
22230 \begin_layout Subsubsection
22231 Debug extensions
22232 \end_layout
22233
22234 \begin_layout Standard
22235 There is also a new function implemented in the LyX server, the 
22236 \begin_inset Quotes eld
22237 \end_inset
22238
22239 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22240  
22241 \end_layout
22242
22243 \begin_layout Standard
22244 When debugging code with ddd/gdb, it is possible to invoke a text editor
22245  at the current execution position with a single key stroke.
22246  The default ddd configuration for that is shift-ctrl-V.
22247  It happens that you can define the editor command line invocation in ddd
22248  by accessing the 
22249 \family sans
22250 Edit\SpecialChar \menuseparator
22251 Preferences\SpecialChar \menuseparator
22252 Helpers
22253 \family default
22254  dialog and changing the "Edit Sources" entry.
22255 \end_layout
22256
22257 \begin_layout Standard
22258 I take advantage of the new created LyX server function and this ddd feature,
22259  and set 
22260 \begin_inset Quotes eld
22261 \end_inset
22262
22263 Edit Sources
22264 \begin_inset Quotes erd
22265 \end_inset
22266
22267  to:
22268 \end_layout
22269
22270 \begin_layout LyX-Code
22271 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22272 \end_layout
22273
22274 \begin_layout Standard
22275 With this, whenever you are using ddd and find a point in the program that
22276  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22277  ddd you forward this information to LyX through the LyX server and then
22278  the LyX window will show the same file with the cursor at the same position
22279  ddd was pointing to.
22280  No more guessing or long scrolling to locate a point in the program back
22281  from debugging !
22282 \end_layout
22283
22284 \begin_layout Standard
22285 Note however that you must enable the LyX server to get this feature working
22286  (it is disabled by default).
22287  You can enable it in 
22288 \family sans
22289 Preferences
22290 \family default
22291  (tabs 
22292 \family sans
22293 Inputs
22294 \family default
22295
22296 \family sans
22297 Paths
22298 \family default
22299 ) by entering in the 
22300 \family sans
22301 LyXserver pipe
22302 \family default
22303  a path like 
22304 \begin_inset Quotes eld
22305 \end_inset
22306
22307
22308 \family typewriter
22309 /home/<your-home-directory>/.lyx/lyxpipe
22310 \family default
22311
22312 \begin_inset Quotes erd
22313 \end_inset
22314
22315
22316 \end_layout
22317
22318 \begin_layout Standard
22319 Read the LyX server documentation in the 
22320 \emph on
22321 Customization Manual
22322 \emph default
22323  for further information.
22324 \end_layout
22325
22326 \begin_layout Subsubsection
22327 Toolbar extensions
22328 \end_layout
22329
22330 \begin_layout Standard
22331 There are six new buttons that can be added to your LyX toolbar.
22332  Five of these buttons are short cuts to layout styles: 
22333 \family sans
22334 Standard
22335 \family default
22336
22337 \family sans
22338 Section
22339 \family default
22340
22341 \family sans
22342 LaTeX
22343 \family default
22344
22345 \family sans
22346 LyX-Code
22347 \family default
22348 , and 
22349 \family sans
22350 Scrap
22351 \family default
22352 .
22353  The last one is a short cut to the 
22354 \begin_inset Quotes eld
22355 \end_inset
22356
22357 Build Program
22358 \begin_inset Quotes erd
22359 \end_inset
22360
22361  File menu entry.
22362  
22363 \end_layout
22364
22365 \begin_layout Standard
22366 LyX has a range of buttons that are available for tool bar customization.
22367  In my toolbar I like to combine the six short cuts above with two more:
22368  One for 
22369 \family sans
22370 View
22371 \family default
22372 \SpecialChar \menuseparator
22373
22374 \family sans
22375 Update
22376 \family default
22377 \SpecialChar \menuseparator
22378
22379 \family sans
22380 DVI
22381 \family default
22382  and the other for 
22383 \family sans
22384 View\SpecialChar \menuseparator
22385 DVI
22386 \family default
22387  File menu entries.
22388  Here is how it looks like:
22389 \end_layout
22390
22391 \begin_layout LyX-Code
22392 Toolbar
22393 \end_layout
22394
22395 \begin_layout LyX-Code
22396   Layouts
22397 \end_layout
22398
22399 \begin_layout LyX-Code
22400   Icon "layout Standard"
22401 \end_layout
22402
22403 \begin_layout LyX-Code
22404   Icon "layout Section"
22405 \end_layout
22406
22407 \begin_layout LyX-Code
22408   Icon "layout LaTeX"
22409 \end_layout
22410
22411 \begin_layout LyX-Code
22412   Icon "layout LyX-Code"
22413 \end_layout
22414
22415 \begin_layout LyX-Code
22416   Icon "layout Scrap"
22417 \end_layout
22418
22419 \begin_layout LyX-Code
22420   Separator
22421 \end_layout
22422
22423 \begin_layout LyX-Code
22424   Icon "buffer-view"
22425 \end_layout
22426
22427 \begin_layout LyX-Code
22428   Icon "buffer-typeset"
22429 \end_layout
22430
22431 \begin_layout LyX-Code
22432   Icon "build-program"
22433 \end_layout
22434
22435 \begin_layout LyX-Code
22436   Separator
22437 \end_layout
22438
22439 \begin_layout LyX-Code
22440 .
22441 \end_layout
22442
22443 \begin_layout LyX-Code
22444 .
22445 \end_layout
22446
22447 \begin_layout LyX-Code
22448 .
22449 \end_layout
22450
22451 \begin_layout LyX-Code
22452 End
22453 \end_layout
22454
22455 \begin_layout Subsubsection
22456 Colors customization
22457 \end_layout
22458
22459 \begin_layout Standard
22460 There are a number of colors in LyX that can be customized in 
22461 \family sans
22462 Preferences
22463 \family default
22464 .
22465  One of the things that bothers people is the LaTeX font color.
22466  The default color is red, since the scraps uses LaTeX font, and there is
22467  a lot of scraps in literate documents, you may get tired of seeing everything
22468  in red.
22469  You can change it by going to the tabs 
22470 \family sans
22471 Look&Feel
22472 \family default
22473
22474 \family sans
22475 Colors.
22476 \end_layout
22477
22478 \begin_layout Standard
22479 The next thing is the visible presence of the newline character in the screen.
22480  You can choose the color of this particular character and make it blend
22481  in the background.
22482  I recommend you choosing a color that is close to the background but not
22483  equal, that way you still can see it is there, but it is not bothering
22484  you anymore.
22485  
22486 \end_layout
22487
22488 \begin_layout Chapter
22489 Special features
22490 \end_layout
22491
22492 \begin_layout Standard
22493 You can do everything with LyX that you can do with LaTeX.
22494  However, LyX cannot support every LaTeX feature directly.
22495  But you can always use TeX Code.
22496  This chapter shows you some more special things you might want to use.
22497  For other special things you can do with figures, tables, floats, boxes
22498  and notes, have a look at the 
22499 \emph on
22500 Embedded
22501 \begin_inset space ~
22502 \end_inset
22503
22504 Objects
22505 \emph default
22506  manual.
22507 \end_layout
22508
22509 \begin_layout Section
22510 Multiple Text Columns
22511 \end_layout
22512
22513 \begin_layout Standard
22514 This feature is independent of the option 
22515 \family sans
22516 Two-column document
22517 \family default
22518  in the document settings under 
22519 \family sans
22520 Text Layout
22521 \family default
22522 .
22523  If you want to have 2
22524 \begin_inset space ~
22525 \end_inset
22526
22527 columns for the whole document, it is recommended to use the 
22528 \family sans
22529 Two-column document
22530 \family default
22531  option.
22532  For all other cases use this feature.
22533 \end_layout
22534
22535 \begin_layout Standard
22536 To use multiple text columns in your document, you have to load the module
22537  
22538 \family sans
22539 Multiple Columns
22540 \family default
22541  (menu 
22542 \family sans
22543 Document\SpecialChar \menuseparator
22544 Settings\SpecialChar \menuseparator
22545 Modules
22546 \family default
22547 ) and must have the LaTeX-package 
22548 \series bold
22549 multicol
22550 \series default
22551
22552 \begin_inset Index idx
22553 status collapsed
22554
22555 \begin_layout Plain Layout
22556 LaTeX-packages ! multicol
22557 \end_layout
22558
22559 \end_inset
22560
22561  installed.
22562 \end_layout
22563
22564 \begin_layout Standard
22565 Footnotes within multiple columns will be placed at the bottom of the page
22566  and not under each column.
22567  Within the different columns you can use everything, with the limitation
22568  that for floats you need to use the float option 
22569 \family sans
22570 Span columns
22571 \family default
22572 .
22573 \end_layout
22574
22575 \begin_layout Subsection
22576 Basics
22577 \end_layout
22578
22579 \begin_layout Standard
22580 If you want to have 2
22581 \begin_inset space ~
22582 \end_inset
22583
22584 columns in your text, use the style 
22585 \family sans
22586 Begin Multiple Columns
22587 \family default
22588  where the columns should start.
22589  The content of the style is the number of the columns, so in this case
22590  use a 
22591 \begin_inset Quotes eld
22592 \end_inset
22593
22594 2
22595 \begin_inset Quotes erd
22596 \end_inset
22597
22598 .
22599  At the point where the columns should end use the style 
22600 \family sans
22601 End Multiple Columns
22602 \family default
22603  and keep it empty.
22604 \end_layout
22605
22606 \begin_layout Standard
22607 Here is an example:
22608 \end_layout
22609
22610 \begin_layout Begin Multiple Columns
22611 2
22612 \end_layout
22613
22614 \begin_layout Standard
22615 \noindent
22616
22617 \series bold
22618 \size small
22619 The Adventure of the Empty House
22620 \series default
22621
22622 \begin_inset Newline newline
22623 \end_inset
22624
22625 by 
22626 \noun on
22627 Sir Arthur Conan Doyle
22628 \end_layout
22629
22630 \begin_layout Standard
22631
22632 \size small
22633 It was in the spring of the year 1894 that all London was interested, and
22634  the fashionable world dismayed, by the murder of the Honourable Ronald
22635  Adair under most unusual and inexplicable circumstances.
22636  The public has already learned those particulars of the crime which came
22637  out in the police investigation, but a good deal was suppressed upon that
22638  occasion, since the case for the prosecution was so overwhelmingly strong
22639  that it was not necessary to bring forward all the facts.
22640  Only now, at the end of nearly ten years, am I allowed to supply those
22641  missing links which make up the whole of that remarkable chain.
22642  The crime was of interest in itself, but that interest was as nothing to
22643  me compared to the inconceivable sequel, which afforded me the greatest
22644  shock and surprise of any event in my adventurous life.
22645  Even now, after this long interval, I find myself thrilling as I think
22646  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22647 ty which utterly submerged my mind.
22648  Let me say to that public, which has shown some interest in those glimpses
22649  which I have occasionally given them of the thoughts and actions of a very
22650  remarkable man, that they are not to blame me if I have not shared my knowledge
22651  with them, for I should have considered it my first duty to do so, had
22652  I not been barred by a positive prohibition from his own lips, which was
22653  only withdrawn upon the third of last month.
22654 \end_layout
22655
22656 \begin_layout End Multiple Columns
22657
22658 \end_layout
22659
22660 \begin_layout Standard
22661 Here is an example with 3
22662 \begin_inset space ~
22663 \end_inset
22664
22665 columns:
22666 \end_layout
22667
22668 \begin_layout Begin Multiple Columns
22669 3
22670 \end_layout
22671
22672 \begin_layout Standard
22673
22674 \size footnotesize
22675 It can be imagined that my close intimacy with Sherlock Holmes had interested
22676  me deeply in crime, and that after his disappearance I never failed to
22677  read with care the various problems which came before the public.
22678  And I even attempted, more than once, for my own private satisfaction,
22679  to employ his methods in their solution, though with indifferent success.
22680  There was none, however, which appealed to me like this tragedy of Ronald
22681  Adair.
22682  As I read the evidence at the inquest, which led up to a verdict of willful
22683  murder against some person or persons unknown, I realized more clearly
22684  than I had ever done the loss which the community had sustained by the
22685  death of Sherlock Holmes.
22686  There were points about this strange business which would, I was sure,
22687  have specially appealed to him, and the efforts of the police would have
22688  been supplemented, or more probably anticipated, by the trained observation
22689  and the alert mind of the first criminal agent in Europe.
22690  All day, as I drove upon my round, I turned over the case in my mind and
22691  found no explanation which appeared to me to be adequate.
22692  At the risk of telling a twice-told tale, I will recapitulate the facts
22693  as they were known to the public at the conclusion of the inquest.
22694 \end_layout
22695
22696 \begin_layout End Multiple Columns
22697
22698 \end_layout
22699
22700 \begin_layout Standard
22701 You can have up to 10
22702 \begin_inset space ~
22703 \end_inset
22704
22705 columns if you want to, but that might not be very pleasant for the readers
22706  of your document.
22707 \end_layout
22708
22709 \begin_layout Standard
22710 \begin_inset Newpage newpage
22711 \end_inset
22712
22713
22714 \end_layout
22715
22716 \begin_layout Subsection
22717 Columns inside Columns
22718 \end_layout
22719
22720 \begin_layout Standard
22721 You can also have columns inside columns:
22722 \end_layout
22723
22724 \begin_layout Begin Multiple Columns
22725 2
22726 \end_layout
22727
22728 \begin_layout Standard
22729
22730 \size footnotesize
22731 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22732  at that time governor of one of the Australian colonies.
22733  Adair's mother had returned from Australia to undergo the operation for
22734  cataract, and she, her son Ronald, and her daughter Hilda were living together
22735  at 427 Park Lane.
22736 \end_layout
22737
22738 \begin_layout Begin Multiple Columns
22739 2
22740 \end_layout
22741
22742 \begin_layout Standard
22743
22744 \size footnotesize
22745 The youth moved in the best society–had, so far as was known, no enemies
22746  and no particular vices.
22747  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22748  had been broken off by mutual consent some months before, and there was
22749  no sign that it had left any very profound feeling behind it.
22750  For the rest {sic} the man's life moved in a narrow and conventional circle,
22751  for his habits were quiet and his nature unemotional.
22752  Yet it was upon this easy-going young aristocrat that death came, in most
22753  strange and unexpected form, between the hours of ten and eleven-twenty
22754  on the night of March 30, 1894.
22755 \end_layout
22756
22757 \begin_layout End Multiple Columns
22758
22759 \end_layout
22760
22761 \begin_layout Standard
22762
22763 \size footnotesize
22764 Ronald Adair was fond of cards–playing continually, but never for such stakes
22765  as would hurt him.
22766  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22767  It was shown that, after dinner on the day of his death, he had played
22768  a rubber of whist at the latter club.
22769  He had also played there in the afternoon.
22770
22771 \size default
22772  
22773 \size footnotesize
22774 The evidence of those who had played with him– Mr.
22775  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22776  and that there was a fairly equal fall of the cards.
22777  Adair might have lost five pounds, but not more.
22778  His fortune was a considerable one, and such a loss could not in any way
22779  affect him.
22780  He had played nearly every day at one club or other, but he was a cautious
22781  player, and usually rose a winner.
22782  It came out in evidence that, in partnership with Colonel Moran, he had
22783  actually won as much as four hundred and twenty pounds in a sitting, some
22784  weeks before, from Godfrey Milner and Lord Balmoral.
22785  So much for his recent history as it came out at the inquest.
22786 \end_layout
22787
22788 \begin_layout End Multiple Columns
22789
22790 \end_layout
22791
22792 \begin_layout Subsection
22793 Advanced Examples
22794 \end_layout
22795
22796 \begin_layout Standard
22797 The examples in this section show some more special features of multiple
22798  columns.
22799 \end_layout
22800
22801 \begin_layout Standard
22802 For more features of multiple columns, have a look at the documentation
22803  of the LaTeX-package 
22804 \series bold
22805 multicol
22806 \series default
22807
22808 \begin_inset Index idx
22809 status collapsed
22810
22811 \begin_layout Plain Layout
22812 LaTeX-packages ! multicol
22813 \end_layout
22814
22815 \end_inset
22816
22817
22818 \begin_inset CommandInset citation
22819 LatexCommand cite
22820 key "multicol"
22821
22822 \end_inset
22823
22824 .
22825 \end_layout
22826
22827 \begin_layout Subsubsection
22828 Preface
22829 \end_layout
22830
22831 \begin_layout Standard
22832 To add a preface text for multiple columns, add the command
22833 \end_layout
22834
22835 \begin_layout Standard
22836
22837 \series bold
22838 }[
22839 \end_layout
22840
22841 \begin_layout Standard
22842 as TeX Code behind the number of columns in the
22843 \family sans
22844  Begin Multiple Columns
22845 \family default
22846  style.
22847  Behind the command follows the preface text.
22848  At the end of the style use the command
22849 \end_layout
22850
22851 \begin_layout Standard
22852
22853 \series bold
22854 ]{
22855 \end_layout
22856
22857 \begin_layout Standard
22858 as TeX Code.
22859  An example with some preface text:
22860 \end_layout
22861
22862 \begin_layout Standard
22863 \begin_inset VSpace bigskip
22864 \end_inset
22865
22866
22867 \end_layout
22868
22869 \begin_layout Begin Multiple Columns
22870 2
22871 \begin_inset ERT
22872 status collapsed
22873
22874 \begin_layout Plain Layout
22875
22876 }[
22877 \end_layout
22878
22879 \end_inset
22880
22881 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22882
22883 \begin_inset ERT
22884 status collapsed
22885
22886 \begin_layout Plain Layout
22887
22888 ]{
22889 \end_layout
22890
22891 \end_inset
22892
22893
22894 \end_layout
22895
22896 \begin_layout Standard
22897
22898 \size small
22899 On the evening of the crime, he returned from the club exactly at ten.
22900  His mother and sister were out spending the evening with a relation.
22901  The servant deposed that she heard him enter the front room on the second
22902  floor, generally used as his sitting-room.
22903  She had lit a fire there, and as it smoked she had opened the window.
22904  No sound was heard from the room until eleven-twenty, the hour of the return
22905  of Lady Maynooth and her daughter.
22906  Desiring to say good-night, she attempted to enter her son's room.
22907  The door was locked on the inside, and no answer could be got to their
22908  cries and knocking.
22909  Help was obtained, and the door forced.
22910  The unfortunate young man was found lying near the table.
22911  His head had been horribly mutilated by an expanding revolver bullet, but
22912  no weapon of any sort was to be found in the room.
22913 \end_layout
22914
22915 \begin_layout End Multiple Columns
22916
22917 \end_layout
22918
22919 \begin_layout Standard
22920 You can also use a section heading as the preface if you use a section command
22921  as TeX Code behind the first TeX Code.
22922  For example the command
22923 \end_layout
22924
22925 \begin_layout Standard
22926
22927 \series bold
22928
22929 \backslash
22930 subsection{subsection title}
22931 \end_layout
22932
22933 \begin_layout Standard
22934 creates a subsection.
22935  In this example the preface is a subsubsection:
22936 \end_layout
22937
22938 \begin_layout Begin Multiple Columns
22939 2
22940 \begin_inset ERT
22941 status collapsed
22942
22943 \begin_layout Plain Layout
22944
22945 }[
22946 \end_layout
22947
22948 \end_inset
22949
22950
22951 \begin_inset ERT
22952 status collapsed
22953
22954 \begin_layout Plain Layout
22955
22956
22957 \backslash
22958 subsubsection{
22959 \end_layout
22960
22961 \end_inset
22962
22963 This is a subsubsection heading as a preface
22964 \begin_inset ERT
22965 status collapsed
22966
22967 \begin_layout Plain Layout
22968
22969 }
22970 \end_layout
22971
22972 \end_inset
22973
22974
22975 \begin_inset ERT
22976 status collapsed
22977
22978 \begin_layout Plain Layout
22979
22980 ]{
22981 \end_layout
22982
22983 \end_inset
22984
22985
22986 \end_layout
22987
22988 \begin_layout Standard
22989
22990 \size small
22991 A minute examination of the circumstances served only to make the case more
22992  complex.
22993  In the first place, no reason could be given why the young man should have
22994  fastened the door upon the inside.
22995  There was the possibility that the murderer had done this, and had afterwards
22996  escaped by the window.
22997  The drop was at least twenty feet, however, and a bed of crocuses in full
22998  bloom lay beneath.
22999  Neither the flowers nor the earth showed any sign of having been disturbed,
23000  nor were there any marks upon the narrow strip of grass which separated
23001  the house from the road.
23002  Apparently, therefore, it was the young man himself who had fastened the
23003  door.
23004  But how did he come by his death? No one could have climbed up to the window
23005  without leaving traces.
23006  Suppose a man had fired through the window, he would indeed be a remarkable
23007  shot who could with a revolver inflict so deadly a wound.
23008  Again, Park Lane is a frequented thoroughfare; there is a cab stand within
23009  a hundred yards of the house.
23010  No one had heard a shot.
23011 \end_layout
23012
23013 \begin_layout End Multiple Columns
23014
23015 \end_layout
23016
23017 \begin_layout Standard
23018 If there is less vertical space left on the page at the beginning of the
23019  multiple columns than needed for 6
23020 \begin_inset space ~
23021 \end_inset
23022
23023 text lines, a page break will be inserted before the multiple columns.
23024  Depending on the number of lines of the preface text, you might want to
23025  change this value.
23026  It is determined by inserting the command
23027 \end_layout
23028
23029 \begin_layout Standard
23030
23031 \series bold
23032 ][number
23033 \backslash
23034 baselineskip
23035 \end_layout
23036
23037 \begin_layout Standard
23038 as TeX Code behind the preface definition but before the final 
23039 \series bold
23040 ]{
23041 \series default
23042  command.
23043  
23044 \emph on
23045 number
23046 \emph default
23047  is hereby the number of text lines.
23048  In this example the space is set to 7
23049 \begin_inset space ~
23050 \end_inset
23051
23052 text lines:
23053 \end_layout
23054
23055 \begin_layout Begin Multiple Columns
23056 2
23057 \begin_inset ERT
23058 status collapsed
23059
23060 \begin_layout Plain Layout
23061
23062 }[
23063 \end_layout
23064
23065 \end_inset
23066
23067
23068 \begin_inset ERT
23069 status collapsed
23070
23071 \begin_layout Plain Layout
23072
23073
23074 \backslash
23075 subsubsection{
23076 \end_layout
23077
23078 \end_inset
23079
23080 This is the sectioning command
23081 \begin_inset Newline newline
23082 \end_inset
23083
23084 as a preface and
23085 \begin_inset Newline newline
23086 \end_inset
23087
23088 with multiple text lines
23089 \begin_inset ERT
23090 status collapsed
23091
23092 \begin_layout Plain Layout
23093
23094 }
23095 \end_layout
23096
23097 \end_inset
23098
23099
23100 \begin_inset ERT
23101 status collapsed
23102
23103 \begin_layout Plain Layout
23104
23105 ][7
23106 \backslash
23107 baselineskip
23108 \end_layout
23109
23110 \end_inset
23111
23112
23113 \begin_inset ERT
23114 status collapsed
23115
23116 \begin_layout Plain Layout
23117
23118 ]{
23119 \end_layout
23120
23121 \end_inset
23122
23123
23124 \end_layout
23125
23126 \begin_layout Standard
23127
23128 \size small
23129 On the evening of the crime, he returned from the club exactly at ten.
23130  His mother and sister were out spending the evening with a relation.
23131  The servant deposed that she heard him enter the front room on the second
23132  floor, generally used as his sitting-room.
23133  She had lit a fire there, and as it smoked she had opened the window.
23134  No sound was heard from the room until eleven-twenty, the hour of the return
23135  of Lady Maynooth and her daughter.
23136  Desiring to say good-night, she attempted to enter her son's room.
23137  The door was locked on the inside, and no answer could be got to their
23138  cries and knocking.
23139  Help was obtained, and the door forced.
23140  The unfortunate young man was found lying near the table.
23141  His head had been horribly mutilated by an expanding revolver bullet, but
23142  no weapon of any sort was to be found in the room.
23143 \end_layout
23144
23145 \begin_layout End Multiple Columns
23146
23147 \end_layout
23148
23149 \begin_layout Subsubsection
23150 Surrounding Space
23151 \end_layout
23152
23153 \begin_layout Standard
23154 The amount of space before and after multiple columns can be changed by
23155  changing the length 
23156 \series bold
23157
23158 \backslash
23159 multicolsep
23160 \series default
23161 .
23162  For example the command
23163 \end_layout
23164
23165 \begin_layout Standard
23166
23167 \series bold
23168
23169 \backslash
23170 setlength{
23171 \backslash
23172 multicolsep}{3cm}
23173 \end_layout
23174
23175 \begin_layout Standard
23176 in TeX Code changes its value to 3
23177 \begin_inset space \thinspace{}
23178 \end_inset
23179
23180 cm.
23181  The change must be made before the multiple columns' start.
23182  The predefined value is 13
23183 \begin_inset space \thinspace{}
23184 \end_inset
23185
23186 pt.
23187 \end_layout
23188
23189 \begin_layout Standard
23190 For this example 
23191 \series bold
23192
23193 \backslash
23194 multicolsep
23195 \series default
23196  was set to 2.5
23197 \begin_inset space \thinspace{}
23198 \end_inset
23199
23200 cm:
23201 \end_layout
23202
23203 \begin_layout Standard
23204 \begin_inset ERT
23205 status open
23206
23207 \begin_layout Plain Layout
23208
23209
23210 \backslash
23211 setlength{
23212 \backslash
23213 multicolsep}{2.5cm}
23214 \end_layout
23215
23216 \end_inset
23217
23218
23219 \end_layout
23220
23221 \begin_layout Begin Multiple Columns
23222 2
23223 \end_layout
23224
23225 \begin_layout Standard
23226
23227 \size small
23228 All day I turned these facts over in my mind, endeavouring to hit upon some
23229  theory which could reconcile them all, and to find that line of least resistanc
23230 e which my poor friend had declared to be the starting-point of every investigat
23231 ion.
23232  I confess that I made little progress.
23233  In the evening I strolled across the Park, and found myself about six o'clock
23234  at the Oxford Street end of Park Lane.
23235  A group of loafers upon the pavements, all staring up at a particular window,
23236  directed me to the house which I had come to see.
23237  A tall, thin man with coloured glasses, whom I strongly suspected of being
23238  a plain-clothes detective, was pointing out some theory of his own, while
23239  the others crowded round to listen to what he said.
23240  I got as near him as I could, but his observations seemed to me to be absurd,
23241  so I withdrew again in some disgust.
23242  As I did so I struck against an elderly, deformed man, who had been behind
23243  me, and I knocked down several books which he was carrying.
23244 \end_layout
23245
23246 \begin_layout End Multiple Columns
23247
23248 \end_layout
23249
23250 \begin_layout Standard
23251 \begin_inset Note Greyedout
23252 status open
23253
23254 \begin_layout Plain Layout
23255
23256 \series bold
23257 Note:
23258 \series default
23259  The values you set with 
23260 \series bold
23261
23262 \backslash
23263 setlength
23264 \series default
23265  will be used for all following multiple columns until you change them again.
23266 \end_layout
23267
23268 \end_inset
23269
23270
23271 \end_layout
23272
23273 \begin_layout Standard
23274 \begin_inset ERT
23275 status collapsed
23276
23277 \begin_layout Plain Layout
23278
23279
23280 \backslash
23281 setlength{
23282 \backslash
23283 multicolsep}{13pt}
23284 \end_layout
23285
23286 \end_inset
23287
23288
23289 \begin_inset Note Note
23290 status collapsed
23291
23292 \begin_layout Plain Layout
23293 go back to the default
23294 \end_layout
23295
23296 \end_inset
23297
23298
23299 \end_layout
23300
23301 \begin_layout Standard
23302 \begin_inset Newpage newpage
23303 \end_inset
23304
23305
23306 \end_layout
23307
23308 \begin_layout Subsubsection
23309 Column Separation
23310 \end_layout
23311
23312 \begin_layout Standard
23313 The width of the columns is automatically calculated, but you can modify
23314  the space between the columns.
23315  This is done by changing the length 
23316 \series bold
23317
23318 \backslash
23319 columnsep
23320 \series default
23321 .
23322  Its predefined value is 10
23323 \begin_inset space \thinspace{}
23324 \end_inset
23325
23326 pt.
23327  Here is an example where 
23328 \series bold
23329
23330 \backslash
23331 columnsep
23332 \series default
23333  is set to 3
23334 \begin_inset space \thinspace{}
23335 \end_inset
23336
23337 cm:
23338 \end_layout
23339
23340 \begin_layout Standard
23341 \begin_inset ERT
23342 status open
23343
23344 \begin_layout Plain Layout
23345
23346
23347 \backslash
23348 setlength{
23349 \backslash
23350 columnsep}{3cm}
23351 \end_layout
23352
23353 \end_inset
23354
23355
23356 \end_layout
23357
23358 \begin_layout Begin Multiple Columns
23359 2
23360 \end_layout
23361
23362 \begin_layout Standard
23363
23364 \size small
23365 My observations of No.
23366 \begin_inset space \space{}
23367 \end_inset
23368
23369 427 Park Lane did little to clear up the problem in which I was interested.
23370  The house was separated from the street by a low wall and railing, the
23371  whole not more than five feet high.
23372  It was perfectly easy, therefore, for anyone to get into the garden, but
23373  the window was entirely inaccessible, since there was no water pipe or
23374  anything which could help the most active man to climb it.
23375  More puzzled than ever, I retraced my steps to Kensington.
23376  I had not been in my study five minutes when the maid entered to say that
23377  a person desired to see me.
23378  To my astonishment it was none other than my strange old book collector,
23379  his sharp, wizened face peering out from a frame of white hair, and his
23380  precious volumes, a dozen of them at least, wedged under his right arm.
23381 \end_layout
23382
23383 \begin_layout End Multiple Columns
23384
23385 \end_layout
23386
23387 \begin_layout Standard
23388 \begin_inset ERT
23389 status collapsed
23390
23391 \begin_layout Plain Layout
23392
23393
23394 \backslash
23395 setlength{
23396 \backslash
23397 columnsep}{10pt}
23398 \end_layout
23399
23400 \end_inset
23401
23402
23403 \begin_inset Note Note
23404 status collapsed
23405
23406 \begin_layout Plain Layout
23407 go back to the default
23408 \end_layout
23409
23410 \end_inset
23411
23412
23413 \end_layout
23414
23415 \begin_layout Subsubsection
23416 Vertical Lines
23417 \end_layout
23418
23419 \begin_layout Standard
23420 Between the columns a rule with a width of the length 
23421 \series bold
23422
23423 \backslash
23424 columnseprule
23425 \series default
23426  is placed.
23427  If this rule width is set to 0
23428 \begin_inset space \thinspace{}
23429 \end_inset
23430
23431 pt (this is the default), the rule is suppressed.
23432  In the following example the line is 2
23433 \begin_inset space \thinspace{}
23434 \end_inset
23435
23436 pt wide:
23437 \end_layout
23438
23439 \begin_layout Standard
23440 \begin_inset ERT
23441 status open
23442
23443 \begin_layout Plain Layout
23444
23445
23446 \backslash
23447 setlength{
23448 \backslash
23449 columnseprule}{2pt}
23450 \end_layout
23451
23452 \end_inset
23453
23454
23455 \end_layout
23456
23457 \begin_layout Begin Multiple Columns
23458 2
23459 \end_layout
23460
23461 \begin_layout Standard
23462
23463 \size small
23464 \begin_inset Quotes eld
23465 \end_inset
23466
23467 You're surprised to see me, sir,
23468 \begin_inset Quotes erd
23469 \end_inset
23470
23471  said he, in a strange, croaking voice.
23472 \end_layout
23473
23474 \begin_layout Standard
23475
23476 \size small
23477 I acknowledged that I was.
23478 \end_layout
23479
23480 \begin_layout Standard
23481
23482 \size small
23483 \begin_inset Quotes eld
23484 \end_inset
23485
23486 Well, I've a conscience, sir, and when I chanced to see you go into this
23487  house, as I came hobbling after you, I thought to myself, I'll just step
23488  in and see that kind gentleman, and tell him that if I was a bit gruff
23489  in my manner there was not any harm meant, and that I am much obliged to
23490  him for picking up my books.
23491 \begin_inset Quotes erd
23492 \end_inset
23493
23494
23495 \end_layout
23496
23497 \begin_layout Standard
23498
23499 \size small
23500 \begin_inset Quotes eld
23501 \end_inset
23502
23503 You make too much of a trifle,
23504 \begin_inset Quotes erd
23505 \end_inset
23506
23507  said I.
23508  
23509 \begin_inset Quotes eld
23510 \end_inset
23511
23512 May I ask how you knew who I was?
23513 \begin_inset Quotes erd
23514 \end_inset
23515
23516
23517 \end_layout
23518
23519 \begin_layout Standard
23520
23521 \size small
23522 \begin_inset Quotes eld
23523 \end_inset
23524
23525 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23526  you'll find my little bookshop at the corner of Church Street, and very
23527  happy to see you, I am sure.
23528  Maybe you collect yourself, sir.
23529  Here's 
23530 \noun on
23531 British
23532 \begin_inset space ~
23533 \end_inset
23534
23535 Birds
23536 \noun default
23537 , and 
23538 \noun on
23539 Catullus
23540 \noun default
23541 , and 
23542 \noun on
23543 The Holy War
23544 \noun default
23545 --a bargain, every one of them.
23546  With five volumes you could just fill that gap on that second shelf.
23547  It looks untidy, does it not, sir?
23548 \begin_inset Quotes erd
23549 \end_inset
23550
23551
23552 \end_layout
23553
23554 \begin_layout End Multiple Columns
23555
23556 \end_layout
23557
23558 \begin_layout Standard
23559 \begin_inset ERT
23560 status collapsed
23561
23562 \begin_layout Plain Layout
23563
23564
23565 \backslash
23566 setlength{
23567 \backslash
23568 columnseprule}{0pt}
23569 \end_layout
23570
23571 \end_inset
23572
23573
23574 \begin_inset Note Note
23575 status collapsed
23576
23577 \begin_layout Plain Layout
23578 go back to the default
23579 \end_layout
23580
23581 \end_inset
23582
23583
23584 \end_layout
23585
23586 \begin_layout Standard
23587 \begin_inset Newpage newpage
23588 \end_inset
23589
23590
23591 \end_layout
23592
23593 \begin_layout Section
23594 Non-standard Paragraph Shapes
23595 \end_layout
23596
23597 \begin_layout Standard
23598 \begin_inset ERT
23599 status collapsed
23600
23601 \begin_layout Plain Layout
23602
23603
23604 \backslash
23605 begin{sloppypar}
23606 \end_layout
23607
23608 \end_inset
23609
23610
23611 \end_layout
23612
23613 \begin_layout Standard
23614 \begin_inset ERT
23615 status collapsed
23616
23617 \begin_layout Plain Layout
23618
23619
23620 \backslash
23621 newdimen
23622 \backslash
23623 varunit 
23624 \end_layout
23625
23626 \begin_layout Plain Layout
23627
23628
23629 \backslash
23630 setlength{
23631 \backslash
23632 varunit}{4.5in}
23633 \end_layout
23634
23635 \end_inset
23636
23637
23638 \end_layout
23639
23640 \begin_layout Standard
23641 \noindent
23642 \begin_inset ERT
23643 status collapsed
23644
23645 \begin_layout Plain Layout
23646
23647
23648 \backslash
23649 parshape 19 0.45
23650 \backslash
23651 varunit 0.332
23652 \backslash
23653 varunit
23654 \end_layout
23655
23656 \begin_layout Plain Layout
23657
23658 0.40
23659 \backslash
23660 varunit 0.300
23661 \backslash
23662 varunit
23663 \end_layout
23664
23665 \begin_layout Plain Layout
23666
23667 0.35
23668 \backslash
23669 varunit 0.293
23670 \backslash
23671 varunit
23672 \end_layout
23673
23674 \begin_layout Plain Layout
23675
23676 0.30
23677 \backslash
23678 varunit 0.300
23679 \backslash
23680 varunit
23681 \end_layout
23682
23683 \begin_layout Plain Layout
23684
23685 0.25
23686 \backslash
23687 varunit 0.317
23688 \backslash
23689 varunit
23690 \end_layout
23691
23692 \begin_layout Plain Layout
23693
23694 0.20
23695 \backslash
23696 varunit 0.342
23697 \backslash
23698 varunit
23699 \end_layout
23700
23701 \begin_layout Plain Layout
23702
23703 0.15
23704 \backslash
23705 varunit 0.373
23706 \backslash
23707 varunit
23708 \end_layout
23709
23710 \begin_layout Plain Layout
23711
23712 0.10
23713 \backslash
23714 varunit 0.410
23715 \backslash
23716 varunit
23717 \end_layout
23718
23719 \begin_layout Plain Layout
23720
23721 0.05
23722 \backslash
23723 varunit 0.453
23724 \backslash
23725 varunit
23726 \end_layout
23727
23728 \begin_layout Plain Layout
23729
23730 0.00
23731 \backslash
23732 varunit 0.500
23733 \backslash
23734 varunit
23735 \end_layout
23736
23737 \begin_layout Plain Layout
23738
23739 0.05
23740 \backslash
23741 varunit 0.453
23742 \backslash
23743 varunit
23744 \end_layout
23745
23746 \begin_layout Plain Layout
23747
23748 0.10
23749 \backslash
23750 varunit 0.410
23751 \backslash
23752 varunit
23753 \end_layout
23754
23755 \begin_layout Plain Layout
23756
23757 0.15
23758 \backslash
23759 varunit 0.373
23760 \backslash
23761 varunit
23762 \end_layout
23763
23764 \begin_layout Plain Layout
23765
23766 0.20
23767 \backslash
23768 varunit 0.342
23769 \backslash
23770 varunit
23771 \end_layout
23772
23773 \begin_layout Plain Layout
23774
23775 0.25
23776 \backslash
23777 varunit 0.317
23778 \backslash
23779 varunit
23780 \end_layout
23781
23782 \begin_layout Plain Layout
23783
23784 0.30
23785 \backslash
23786 varunit 0.300
23787 \backslash
23788 varunit
23789 \end_layout
23790
23791 \begin_layout Plain Layout
23792
23793 0.35
23794 \backslash
23795 varunit 0.293
23796 \backslash
23797 varunit
23798 \end_layout
23799
23800 \begin_layout Plain Layout
23801
23802 0.40
23803 \backslash
23804 varunit 0.300
23805 \backslash
23806 varunit
23807 \end_layout
23808
23809 \begin_layout Plain Layout
23810
23811 0.45
23812 \backslash
23813 varunit 0.332
23814 \backslash
23815 varunit
23816 \end_layout
23817
23818 \begin_layout Plain Layout
23819
23820 \end_layout
23821
23822 \end_inset
23823
23824 There are times when the tyranny of rectangular paragraphs must be overthrown.
23825  In such situations, a call to the delightful plain TeX command 
23826 \family typewriter
23827
23828 \backslash
23829 parshape
23830 \family default
23831  is called for.
23832  As you can see, completely arbitrary shapes can be laid out with a suitable
23833  set of line length definitions.
23834  While this parshape may look a bit silly and useless, one could conceive
23835  of situations such as finely tuned dropped capitals, word wrapping around
23836  non-rectangular graphics, etc.
23837  which will benefit from such handcrafting.
23838 \end_layout
23839
23840 \begin_layout Standard
23841 \begin_inset VSpace bigskip
23842 \end_inset
23843
23844
23845 \end_layout
23846
23847 \begin_layout Standard
23848 The syntax is 
23849 \family typewriter
23850
23851 \backslash
23852 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23853  #nindent #nlength
23854 \family default
23855 , where 
23856 \family typewriter
23857 numlines
23858 \family default
23859  is the number of lines of text which define the paragraph.
23860  If there turn out to be fewer lines, the shape is truncated; if there are
23861  more, the excess lines have the same dimensions as the last line of the
23862  definition.
23863  The 
23864 \family typewriter
23865 #nindent
23866 \family default
23867  and 
23868 \family typewriter
23869 #nlength
23870 \family default
23871  entries specify the indentation of the line from the left margin, and the
23872  length of the line as measured from that point.
23873  The shape applies only to the current paragraph; everything is reset to
23874  normal for the next paragraph.
23875 \end_layout
23876
23877 \begin_layout Standard
23878 \begin_inset ERT
23879 status collapsed
23880
23881 \begin_layout Plain Layout
23882
23883
23884 \backslash
23885 end{sloppypar}
23886 \end_layout
23887
23888 \end_inset
23889
23890
23891 \end_layout
23892
23893 \begin_layout Bibliography
23894 \begin_inset CommandInset bibitem
23895 LatexCommand bibitem
23896 key "multicol"
23897
23898 \end_inset
23899
23900 Documentation of the LaTeX-package 
23901 \begin_inset CommandInset href
23902 LatexCommand href
23903 name "multicol"
23904 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23905
23906 \end_inset
23907
23908
23909 \begin_inset Index idx
23910 status collapsed
23911
23912 \begin_layout Plain Layout
23913 LaTeX-packages ! multicol
23914 \end_layout
23915
23916 \end_inset
23917
23918
23919 \end_layout
23920
23921 \end_body
23922 \end_document