]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
* de.po: spelling correction
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
2 \lyxformat 413
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 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38   L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
39   {LyX}}
40
41 % used for multi-column text
42 \usepackage{multicol}
43
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
46 \end_preamble
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
49 \begin_modules
50 logicalmkup
51 theorems-ams
52 theorems-ams-extended
53 \end_modules
54 \maintain_unincluded_children false
55 \begin_local_layout
56 Format 7
57 InsetLayout CharStyle:MenuItem
58 LyxType               charstyle
59 LabelString           menu
60 LatexType             command
61 LatexName             menuitem
62 Font
63 Family              Sans
64 EndFont
65 Preamble
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
67 EndPreamble
68 End
69 \end_local_layout
70 \language english
71 \language_package default
72 \inputencoding latin1
73 \fontencoding global
74 \font_roman default
75 \font_sans default
76 \font_typewriter default
77 \font_default_family default
78 \use_non_tex_fonts false
79 \font_sc false
80 \font_osf false
81 \font_sf_scale 100
82 \font_tt_scale 100
83
84 \graphics default
85 \default_output_format default
86 \output_sync 0
87 \bibtex_command default
88 \index_command default
89 \paperfontsize 12
90 \spacing single
91 \use_hyperref true
92 \pdf_title "LyX's Additional Features manual"
93 \pdf_author "LyX Team"
94 \pdf_subject "LyX's additional features documentation"
95 \pdf_keywords "LyX, Documentation, Additional"
96 \pdf_bookmarks true
97 \pdf_bookmarksnumbered true
98 \pdf_bookmarksopen false
99 \pdf_bookmarksopenlevel 1
100 \pdf_breaklinks false
101 \pdf_pdfborder false
102 \pdf_colorlinks true
103 \pdf_backref false
104 \pdf_pdfusetitle false
105 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,  pdfpagelayout=OneColumn, pdfnewwindow=true,  pdfstartview=XYZ, plainpages=false, pdfpagelabels"
106 \papersize default
107 \use_geometry false
108 \use_amsmath 0
109 \use_esint 0
110 \use_mhchem 1
111 \use_mathdots 1
112 \cite_engine basic
113 \use_bibtopic false
114 \use_indices false
115 \paperorientation portrait
116 \suppress_date false
117 \use_refstyle 0
118 \index Index
119 \shortcut idx
120 \color #008000
121 \end_index
122 \secnumdepth 3
123 \tocdepth 3
124 \paragraph_separation indent
125 \paragraph_indentation default
126 \quotes_language english
127 \papercolumns 1
128 \papersides 2
129 \paperpagestyle headings
130 \tracking_changes false
131 \output_changes false
132 \html_math_output 0
133 \html_css_as_file 0
134 \html_be_strict true
135 \end_header
136
137 \begin_body
138
139 \begin_layout Title
140 Additional LyX Features
141 \end_layout
142
143 \begin_layout Author
144 by the LyX Team
145 \begin_inset Foot
146 status collapsed
147
148 \begin_layout Plain Layout
149 \noindent
150 Principal maintainer of this file is
151 \noun on
152  Richard Heck
153 \noun default
154 .
155  If you have comments or error corrections, please send them to the LyX
156  Documentation mailing list, 
157 \begin_inset Flex Code
158 status collapsed
159
160 \begin_layout Plain Layout
161 \noindent
162 <lyx-docs@lists.lyx.org>
163 \end_layout
164
165 \end_inset
166
167 .
168 \end_layout
169
170 \end_inset
171
172  
173 \end_layout
174
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
178
179 \end_inset
180
181
182 \end_layout
183
184 \begin_layout Chapter
185 Introduction
186 \end_layout
187
188 \begin_layout Standard
189 This manual is essentially Part II of the 
190 \emph on
191 User's Guide\SpecialChar \@.
192
193 \emph default
194  The reason for separating this document out is simple: the 
195 \emph on
196 User's Guide
197 \emph default
198  is already quite lengthy, and it contains information on all of the basic
199  features one needs to know in order to prepare most documents.
200  However, the LyX Team has worked to make LyX extensible through various
201  configuration files and external packages.
202  That means that if you want to support the Fizzwizzle LaTeX package, you
203  can create a layout file (or module) for it without having to alter LyX
204  itself.
205  We've already had contributions of several new features this way, and some
206  of them are documented here.
207  There are also some more `advanced' features, such as how to control the
208  presentation of bibliographies and how to work with multi-part documents,
209  that are not covered in the 
210 \emph on
211 User's Guide
212 \emph default
213  and are discussed here.
214 \end_layout
215
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218  control, and SGML support, which require additional software to work properly.
219  There is also a chapter on LyX's support for HTML.
220  And lastly, there's a chapter of LaTeX tools and tips, things you can use
221  to spruce up your documents by directly using the powerful features of
222  LaTeX.
223  After all, LyX 
224 \emph on
225 is
226 \emph default
227  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
228 \end_layout
229
230 \begin_layout Standard
231 If you haven't read the 
232 \emph on
233 Introduction
234 \emph default
235  yet, you are definitely in the wrong manual.
236  The 
237 \emph on
238 Introduction
239 \emph default
240  is the first place to go, since it describes the notation and format of
241  all of the manuals.
242  You should also be thoroughly familiar with the 
243 \emph on
244 User's Guide
245 \emph default
246  and all of the basic features of LyX before attempting to read this one.
247 \end_layout
248
249 \begin_layout Standard
250 Since many of the topics in this manual depend heavily on LyX's interaction
251  with LaTeX, this first chapter covers the inner workings of LyX and how
252  to direct LyX to generate exactly the LaTeX code you want.
253  It is obviously for more seasoned LyX users.
254 \end_layout
255
256 \begin_layout Chapter
257 LyX and LaTeX
258 \end_layout
259
260 \begin_layout Section
261 How LyX Uses LaTeX
262 \end_layout
263
264 \begin_layout Standard
265 This chapter is for both TeX-nicians and the LaTeX-curious.
266  In it, we'll explain how LyX and LaTeX work together to produce printable
267  output.
268  This is the only place in any of the manuals where we assume you know something
269  about LaTeX.
270 \end_layout
271
272 \begin_layout Standard
273 At one time, LyX was called a 
274 \begin_inset Quotes eld
275 \end_inset
276
277 WYSIWYM frontend to LaTeX,
278 \begin_inset Quotes erd
279 \end_inset
280
281  but that's no longer true.
282  There are frontends to LaTeX out there.
283 \begin_inset Foot
284 status collapsed
285
286 \begin_layout Plain Layout
287 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
288  There are also the LaTeX modes for vi and emacs, of course.
289 \end_layout
290
291 \end_inset
292
293  These are basically text editors with the ability to run LaTeX and mark
294  any errors in the file you're editing.
295  Although LyX 
296 \emph on
297 is
298 \emph default
299  an editor, and it 
300 \emph on
301 does
302 \emph default
303  run LaTeX, and it also indicates errors in the file, it also does much,
304  much more.
305  For one thing, you don't need to know LaTeX to use LyX effectively.
306  And LyX has added its own extensions to LaTeX.
307  Try the following sometime: select 
308 \begin_inset Flex MenuItem
309 status collapsed
310
311 \begin_layout Plain Layout
312 Export\SpecialChar \menuseparator
313 LaTeX
314 \end_layout
315
316 \end_inset
317
318  from the 
319 \begin_inset Flex MenuItem
320 status collapsed
321
322 \begin_layout Plain Layout
323 File
324 \end_layout
325
326 \end_inset
327
328  menu (or 
329 \begin_inset Flex MenuItem
330 status collapsed
331
332 \begin_layout Plain Layout
333 View\SpecialChar \menuseparator
334 Source
335 \end_layout
336
337 \end_inset
338
339 ), then look at the preamble of the resulting 
340 \begin_inset Flex Code
341 status collapsed
342
343 \begin_layout Plain Layout
344 .tex
345 \end_layout
346
347 \end_inset
348
349  file.
350  You'll notice a variety of new macros defined specifically by LyX.
351  These macros are defined automatically, according to the features you use
352  in the document.
353 \end_layout
354
355 \begin_layout Standard
356 There are several commands that automatically invoke LaTeX.
357  They are:
358 \end_layout
359
360 \begin_layout Itemize
361 \begin_inset Flex MenuItem
362 status collapsed
363
364 \begin_layout Plain Layout
365 View\SpecialChar \menuseparator
366 Format
367 \end_layout
368
369 \end_inset
370
371
372 \end_layout
373
374 \begin_layout Itemize
375 \begin_inset Flex MenuItem
376 status collapsed
377
378 \begin_layout Plain Layout
379 View\SpecialChar \menuseparator
380 Update\SpecialChar \menuseparator
381 Format
382 \end_layout
383
384 \end_inset
385
386
387 \end_layout
388
389 \begin_layout Itemize
390 \begin_inset Flex MenuItem
391 status collapsed
392
393 \begin_layout Plain Layout
394 File\SpecialChar \menuseparator
395 Print
396 \end_layout
397
398 \end_inset
399
400
401 \end_layout
402
403 \begin_layout Itemize
404 \begin_inset Flex MenuItem
405 status collapsed
406
407 \begin_layout Plain Layout
408 File\SpecialChar \menuseparator
409 Fax
410 \end_layout
411
412 \end_inset
413
414
415 \end_layout
416
417 \begin_layout Standard
418 They will only invoke LaTeX if the file has changed since the last time
419  LaTeX was run.
420  
421 \end_layout
422
423 \begin_layout Standard
424 When LyX runs LaTeX on the file you're editing, it performs these steps:
425 \end_layout
426
427 \begin_layout Enumerate
428 Convert the document to LaTeX and save to a file with the extension 
429 \begin_inset Flex Code
430 status collapsed
431
432 \begin_layout Plain Layout
433 .tex
434 \end_layout
435
436 \end_inset
437
438  in place of 
439 \begin_inset Flex Code
440 status collapsed
441
442 \begin_layout Plain Layout
443 .lyx
444 \end_layout
445
446 \end_inset
447
448 .
449 \end_layout
450
451 \begin_layout Enumerate
452 Run LaTeX on the 
453 \begin_inset Flex Code
454 status collapsed
455
456 \begin_layout Plain Layout
457 .tex
458 \end_layout
459
460 \end_inset
461
462  file (maybe several times), and run any other commands (such as 
463 \begin_inset Flex Code
464 status collapsed
465
466 \begin_layout Plain Layout
467 bibtex
468 \end_layout
469
470 \end_inset
471
472  or 
473 \begin_inset Flex Code
474 status collapsed
475
476 \begin_layout Plain Layout
477 makeindex
478 \end_layout
479
480 \end_inset
481
482 ) needed to compile the LaTeX file.
483 \end_layout
484
485 \begin_layout Enumerate
486 If there are any errors, show the error log.
487 \end_layout
488
489 \begin_layout Standard
490 If you've run LaTeX using 
491 \begin_inset Flex MenuItem
492 status collapsed
493
494 \begin_layout Plain Layout
495 View
496 \bar under
497 \SpecialChar \menuseparator
498
499 \bar default
500 DVI
501 \end_layout
502
503 \end_inset
504
505 , LyX then runs a DVI viewer to display the DVI-file.
506  If you've used 
507 \begin_inset Flex MenuItem
508 status collapsed
509
510 \begin_layout Plain Layout
511 View
512 \bar under
513 \SpecialChar \menuseparator
514
515 \bar default
516 PostScript
517 \end_layout
518
519 \end_inset
520
521 , LyX performs further steps:
522 \end_layout
523
524 \begin_layout Itemize
525 Run 
526 \begin_inset Flex Code
527 status collapsed
528
529 \begin_layout Plain Layout
530 dvips
531 \end_layout
532
533 \end_inset
534
535  to convert the DVI file to PostScript.
536 \end_layout
537
538 \begin_layout Itemize
539 Run a PostScript viewer, such as 
540 \begin_inset Flex Code
541 status collapsed
542
543 \begin_layout Plain Layout
544 ghostview
545 \end_layout
546
547 \end_inset
548
549 , to display the PostScript file.
550 \end_layout
551
552 \begin_layout Standard
553 LyX does similar things when viewing, or exporting, other formats.
554 \end_layout
555
556 \begin_layout Section
557 Translating LaTeX files into LyX
558 \end_layout
559
560 \begin_layout Standard
561 You can import a LaTeX file into LyX by using the 
562 \begin_inset Flex MenuItem
563 status collapsed
564
565 \begin_layout Plain Layout
566 File\SpecialChar \menuseparator
567 Import\SpecialChar \menuseparator
568 LaTeX
569 \end_layout
570
571 \end_inset
572
573  command in LyX.
574  This will call a program named 
575 \begin_inset Flex Code
576 status collapsed
577
578 \begin_layout Plain Layout
579 tex2lyx
580 \end_layout
581
582 \end_inset
583
584  which will create a file 
585 \begin_inset Flex Code
586 status collapsed
587
588 \begin_layout Plain Layout
589 foo.lyx
590 \end_layout
591
592 \end_inset
593
594  from the file 
595 \begin_inset Flex Code
596 status collapsed
597
598 \begin_layout Plain Layout
599 foo.tex
600 \end_layout
601
602 \end_inset
603
604 .
605  LyX will then open that file.
606 \begin_inset Foot
607 status collapsed
608
609 \begin_layout Plain Layout
610 \begin_inset Flex Code
611 status collapsed
612
613 \begin_layout Plain Layout
614 tex2lyx
615 \end_layout
616
617 \end_inset
618
619  can also be run from the command line, of course.
620 \end_layout
621
622 \end_inset
623
624
625 \end_layout
626
627 \begin_layout Standard
628 \begin_inset Flex Code
629 status collapsed
630
631 \begin_layout Plain Layout
632 tex2lyx
633 \end_layout
634
635 \end_inset
636
637  will translate most legal LaTeX, but not everything.
638  It will put things it doesn't understand into TeX code, so after translating
639  a file with 
640 \begin_inset Flex Code
641 status collapsed
642
643 \begin_layout Plain Layout
644 tex2lyx
645 \end_layout
646
647 \end_inset
648
649 , you can look for TeX code and hand-edit it until it looks right.
650 \end_layout
651
652 \begin_layout Standard
653 If you don't know what TeX code is, read the next section.
654 \end_layout
655
656 \begin_layout Section
657 \begin_inset CommandInset label
658 LatexCommand label
659 name "sec:Inserting-TeX-Code"
660
661 \end_inset
662
663 Inserting TeX Code into LyX Documents 
664 \end_layout
665
666 \begin_layout Standard
667 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
668  You can always insert TeX code into any LyX document.
669  LyX cannot, and will never be able to, display every possible LaTeX construct.
670  If ever you need to insert LaTeX commands into your LyX document, you can
671  use the 
672 \begin_inset Flex Code
673 status collapsed
674
675 \begin_layout Plain Layout
676 TeX Code
677 \end_layout
678
679 \end_inset
680
681  box, which you can insert into your document with 
682 \begin_inset Flex MenuItem
683 status collapsed
684
685 \begin_layout Plain Layout
686 Insert\SpecialChar \menuseparator
687 TeX Code
688 \end_layout
689
690 \end_inset
691
692 .
693 \end_layout
694
695 \begin_layout Standard
696 Here's an example of inserting LaTeX commands in a LyX document.
697  The code looks like this:
698 \end_layout
699
700 \begin_layout LyX-Code
701
702 \backslash
703 begin{tabular}{ll}
704 \begin_inset Newline newline
705 \end_inset
706
707
708 \backslash
709 begin{minipage}{5cm}
710 \begin_inset Newline newline
711 \end_inset
712
713 This is an example for a minipage environment.
714  You 
715 \begin_inset Newline newline
716 \end_inset
717
718 can put nearly everything in it, even (non-floating) 
719 \begin_inset Newline newline
720 \end_inset
721
722 figures and tables.
723  
724 \begin_inset Newline newline
725 \end_inset
726
727
728 \backslash
729 end{minipage}
730 \begin_inset Newline newline
731 \end_inset
732
733 &
734 \begin_inset Newline newline
735 \end_inset
736
737
738 \backslash
739 begin{minipage}{5cm}
740 \begin_inset Newline newline
741 \end_inset
742
743
744 \backslash
745 begin{verbatim}
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 This ...
756  
757 \begin_inset Newline newline
758 \end_inset
759
760
761 \backslash
762 end{minipage}
763 \begin_inset Newline newline
764 \end_inset
765
766
767 \backslash
768 end{verbatim}
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{tabular}
781 \end_layout
782
783 \begin_layout LyX-Code
784
785 \end_layout
786
787 \begin_layout Standard
788 The 
789 \begin_inset Flex Code
790 status collapsed
791
792 \begin_layout Plain Layout
793 TeX Code
794 \end_layout
795
796 \end_inset
797
798  box containing this text is directly after this paragraph.
799  Those of you reading the manual in LyX will only see the TeX code inset.
800  Those reading a printed version of the manuals will see the actual results:
801 \end_layout
802
803 \begin_layout Standard
804 \begin_inset ERT
805 status collapsed
806
807 \begin_layout Plain Layout
808
809
810 \backslash
811 begin{tabular}{ll}
812 \end_layout
813
814 \begin_layout Plain Layout
815
816
817 \backslash
818 begin{minipage}{5cm}
819 \end_layout
820
821 \begin_layout Plain Layout
822
823 This is an example for a minipage environment.
824  You can put nearly everything in it, even (non-floating) figures and tables.
825  
826 \end_layout
827
828 \begin_layout Plain Layout
829
830
831 \backslash
832 end{minipage}
833 \end_layout
834
835 \begin_layout Plain Layout
836
837 &
838 \end_layout
839
840 \begin_layout Plain Layout
841
842
843 \backslash
844 begin{minipage}{5cm}
845 \end_layout
846
847 \begin_layout Plain Layout
848
849
850 \backslash
851 begin{verbatim}
852 \end_layout
853
854 \begin_layout Plain Layout
855
856
857 \backslash
858 begin{minipage}{5cm}
859 \end_layout
860
861 \begin_layout Plain Layout
862
863 This ...
864  
865 \end_layout
866
867 \begin_layout Plain Layout
868
869
870 \backslash
871 end{minipage}
872 \end_layout
873
874 \begin_layout Plain Layout
875
876
877 \backslash
878 end{verbatim}
879 \end_layout
880
881 \begin_layout Plain Layout
882
883
884 \backslash
885 end{minipage}
886 \end_layout
887
888 \begin_layout Plain Layout
889
890
891 \backslash
892 end{tabular}
893 \end_layout
894
895 \end_inset
896
897
898 \end_layout
899
900 \begin_layout Standard
901 In addition to using TeX code, you can also create a separate file containing
902  some complex LaTeX structure and then use 
903 \begin_inset Flex MenuItem
904 status collapsed
905
906 \begin_layout Plain Layout
907 Insert\SpecialChar \menuseparator
908 Child
909 \begin_inset space ~
910 \end_inset
911
912 Document
913 \end_layout
914
915 \end_inset
916
917  to include your file (you should select the type 
918 \begin_inset Flex Code
919 status collapsed
920
921 \begin_layout Plain Layout
922 Input
923 \end_layout
924
925 \end_inset
926
927 ).
928  We recommend that you only do this if you have a 
929 \begin_inset Flex Code
930 status collapsed
931
932 \begin_layout Plain Layout
933 .tex
934 \end_layout
935
936 \end_inset
937
938  file which you 
939 \emph on
940 know
941 \emph default
942  works already.
943  Otherwise, you'll have a big job tracking down LaTeX errors.
944 \end_layout
945
946 \begin_layout Standard
947 There are a few last points to emphasize:
948 \end_layout
949
950 \begin_layout Itemize
951 LyX 
952 \emph on
953 does not
954 \emph default
955  check if your LaTeX code is correct.
956 \end_layout
957
958 \begin_layout Itemize
959 Beware reinventing the wheel.
960 \end_layout
961
962 \begin_layout Standard
963 On that last point, LyX does have quite a few features tucked into it, and
964  more are coming.
965  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
966  feature before you decide you have to do it by hand.
967  Moreover, there are numerous LaTeX packages out there to do all sorts of
968  things, from labels to envelopes to fancy multipage tables.
969  Check out 
970 \begin_inset CommandInset href
971 LatexCommand href
972 name "CTAN"
973 target "http://www.ctan.org/"
974
975 \end_inset
976
977  for details, and see chapter 
978 \begin_inset CommandInset ref
979 LatexCommand ref
980 reference "cha:secrets"
981
982 \end_inset
983
984 .
985 \end_layout
986
987 \begin_layout Standard
988 If you do need to do some wild and fancy things within your document, be
989  sure to check out a good LaTeX book for assistance.
990  There are a number of them listed in the bibliography of the 
991 \emph on
992 User's Guide
993 \emph default
994 .
995 \end_layout
996
997 \begin_layout Section
998 LyX and the LaTeX Preamble
999 \end_layout
1000
1001 \begin_layout Subsection
1002 About the LaTeX Preamble
1003 \end_layout
1004
1005 \begin_layout Standard
1006 If you already know LaTeX, there is no need to explain here what the preamble
1007  is good for.
1008  If you don't, the following will give you some ideas—we recommend again
1009  that you consult a LaTeX book for further information.
1010  In any case, you should read the points below, because they explain what
1011  you can do and what you don't need to do in the LaTeX preamble of a LyX
1012  document.
1013 \end_layout
1014
1015 \begin_layout Standard
1016 The LaTeX preamble comes at the very beginning of a document, 
1017 \emph on
1018 before
1019 \emph default
1020  the text.
1021  It serves to:
1022 \end_layout
1023
1024 \begin_layout Itemize
1025 Declare the document class.
1026  
1027 \begin_inset Newline newline
1028 \end_inset
1029
1030 LyX already does this for you.
1031  If you're a seasoned LaTeX-nician, and you have a custom document class
1032  you want to use, check out the 
1033 \emph on
1034 Customization Manual
1035 \emph default
1036  for information on how to make LyX interface to it.
1037 \end_layout
1038
1039 \begin_layout Itemize
1040 Declare the usage of packages.
1041  
1042 \begin_inset Newline newline
1043 \end_inset
1044
1045 LaTeX packages provide special commands, which are only available within
1046  a document when the package has been declared in the preamble.
1047  For example, the package 
1048 \begin_inset Flex Code
1049 status collapsed
1050
1051 \begin_layout Plain Layout
1052 indentfirst
1053 \end_layout
1054
1055 \end_inset
1056
1057  forces all paragraphs to be indented.
1058  There are other packages for labels, envelopes, margins, etc.
1059  
1060 \end_layout
1061
1062 \begin_layout Itemize
1063 Set counters, variables, lengths and widths.
1064  
1065 \begin_inset Newline newline
1066 \end_inset
1067
1068 There are several LaTeX counters and variables which 
1069 \emph on
1070 must
1071 \emph default
1072  be set globally from within the preamble in order to have the desired effect.
1073  (There are variables which you can set and reset inside the document, too.)
1074  Margins are a good example of something which must be set in the preamble.
1075  Another example is the label format for lists.
1076  You can actually set these just about anywhere, but it's best to do it
1077  just once, inside the preamble.
1078 \end_layout
1079
1080 \begin_layout Itemize
1081 Declare user defined commands (with 
1082 \begin_inset Flex Code
1083 status collapsed
1084
1085 \begin_layout Plain Layout
1086
1087 \backslash
1088 newcommand
1089 \end_layout
1090
1091 \end_inset
1092
1093  or 
1094 \begin_inset Flex Code
1095 status collapsed
1096
1097 \begin_layout Plain Layout
1098
1099 \backslash
1100 renewcommand
1101 \end_layout
1102
1103 \end_inset
1104
1105 ).
1106 \begin_inset Newline newline
1107 \end_inset
1108
1109 These are abbreviations for LaTeX commands which appear very often inside
1110  a document.
1111  Although the preamble is a good place to declare such commands, they 
1112 \emph on
1113 can
1114 \emph default
1115  be declared anywhere (before they are used for the first time, of course).
1116  This can be useful if there is a lot of raw LaTeX code in your document,
1117  which normally should not be the case.
1118 \end_layout
1119
1120 \begin_layout Standard
1121 LyX adds its own set of definitions to the preamble of the 
1122 \begin_inset Flex Code
1123 status collapsed
1124
1125 \begin_layout Plain Layout
1126 .tex
1127 \end_layout
1128
1129 \end_inset
1130
1131  file it produces.
1132  This makes LaTeX files generated by LyX portable.
1133 \end_layout
1134
1135 \begin_layout Subsection
1136 Changing the Preamble
1137 \end_layout
1138
1139 \begin_layout Standard
1140 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1141  can't change them without patching LyX itself.
1142  You can, however, add your own stuff to the preamble by selecting 
1143 \begin_inset Flex MenuItem
1144 status collapsed
1145
1146 \begin_layout Plain Layout
1147 LaTeX
1148 \begin_inset space ~
1149 \end_inset
1150
1151 Preamble
1152 \end_layout
1153
1154 \end_inset
1155
1156  in the 
1157 \begin_inset Flex MenuItem
1158 status collapsed
1159
1160 \begin_layout Plain Layout
1161 Document\SpecialChar \menuseparator
1162 Settings
1163 \end_layout
1164
1165 \end_inset
1166
1167  dialog.
1168  LyX adds anything in the 
1169 \begin_inset Flex MenuItem
1170 status collapsed
1171
1172 \begin_layout Plain Layout
1173 Preamble
1174 \end_layout
1175
1176 \end_inset
1177
1178  dialog to its own built-in preamble.
1179  Before adding your own declarations in the preamble, you should make sure
1180  that LyX doesn't already support what you want to do.
1181  (Remember what we said about reinventing the wheel?) Also, 
1182 \emph on
1183 make sure your preamble code is correct
1184 \emph default
1185 .
1186  LyX doesn't check it for you.
1187  If there is an error, you're likely to get an error like 
1188 \begin_inset Quotes eld
1189 \end_inset
1190
1191
1192 \begin_inset Flex Code
1193 status collapsed
1194
1195 \begin_layout Plain Layout
1196 Missing 
1197 \backslash
1198 begin{document}
1199 \end_layout
1200
1201 \end_inset
1202
1203
1204 \begin_inset Quotes erd
1205 \end_inset
1206
1207 .
1208  If you see this error, check your preamble.
1209 \end_layout
1210
1211 \begin_layout Subsection
1212 Examples
1213 \end_layout
1214
1215 \begin_layout Standard
1216 Here are some examples of what you can add to a preamble, and what they
1217  do.
1218 \end_layout
1219
1220 \begin_layout Subsubsection
1221 Example #1: Offsets
1222 \end_layout
1223
1224 \begin_layout Standard
1225 There are two variables under LaTeX that control page position: 
1226 \begin_inset Flex Code
1227 status collapsed
1228
1229 \begin_layout Plain Layout
1230
1231 \backslash
1232 hoffset
1233 \end_layout
1234
1235 \end_inset
1236
1237  and 
1238 \begin_inset Flex Code
1239 status collapsed
1240
1241 \begin_layout Plain Layout
1242
1243 \backslash
1244 voffset
1245 \end_layout
1246
1247 \end_inset
1248
1249 .
1250  Their names should be self-explanatory.
1251  These variables are useful if you think for a moment about computer labels.
1252  Sometimes, the size of a print medium and the area of the medium that you
1253  can actually print on aren't the same.
1254  This is where 
1255 \begin_inset Flex Code
1256 status collapsed
1257
1258 \begin_layout Plain Layout
1259
1260 \backslash
1261 hoffset
1262 \end_layout
1263
1264 \end_inset
1265
1266  and 
1267 \begin_inset Flex Code
1268 status collapsed
1269
1270 \begin_layout Plain Layout
1271
1272 \backslash
1273 voffset
1274 \end_layout
1275
1276 \end_inset
1277
1278  come in.
1279 \end_layout
1280
1281 \begin_layout Standard
1282 The default values for 
1283 \begin_inset Flex Code
1284 status collapsed
1285
1286 \begin_layout Plain Layout
1287
1288 \backslash
1289 hoffset
1290 \end_layout
1291
1292 \end_inset
1293
1294  and 
1295 \begin_inset Flex Code
1296 status collapsed
1297
1298 \begin_layout Plain Layout
1299
1300 \backslash
1301 voffset
1302 \end_layout
1303
1304 \end_inset
1305
1306  are both 0
1307 \begin_inset space \thinspace{}
1308 \end_inset
1309
1310 points, i.
1311 \begin_inset space \thinspace{}
1312 \end_inset
1313
1314 e.
1315 \begin_inset space \space{}
1316 \end_inset
1317
1318 the page isn't shifted.
1319  Unfortunately, some DVI drivers always seem to shift the page.
1320  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1321  If you're using LyX on a system that you don't personally maintain, and
1322  your sysadmin is a doofus, 
1323 \begin_inset Flex Code
1324 status collapsed
1325
1326 \begin_layout Plain Layout
1327
1328 \backslash
1329 hoffset
1330 \end_layout
1331
1332 \end_inset
1333
1334  and 
1335 \begin_inset Flex Code
1336 status collapsed
1337
1338 \begin_layout Plain Layout
1339
1340 \backslash
1341 voffset
1342 \end_layout
1343
1344 \end_inset
1345
1346  can save the day.
1347  Suppose your left and top margins are always 0.5
1348 \begin_inset space \thinspace{}
1349 \end_inset
1350
1351 inches too big.
1352  You can add this to the preamble:
1353 \end_layout
1354
1355 \begin_layout LyX-Code
1356
1357 \backslash
1358 setlength{
1359 \backslash
1360 hoffset}{-0.5 in}
1361 \end_layout
1362
1363 \begin_layout LyX-Code
1364
1365 \backslash
1366 setlength{
1367 \backslash
1368 voffset}{-0.5 in}
1369 \end_layout
1370
1371 \begin_layout Standard
1372 and your margins should now be correct.
1373 \end_layout
1374
1375 \begin_layout Subsubsection
1376 Example #2: Labels
1377 \end_layout
1378
1379 \begin_layout Standard
1380 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1381  There's a rather nice package, available at your nearest CTAN archive,
1382  for printing sheets of labels: 
1383 \begin_inset Flex Code
1384 status collapsed
1385
1386 \begin_layout Plain Layout
1387 labels.sty
1388 \end_layout
1389
1390 \end_inset
1391
1392 .
1393  Now, your system may not have this package installed by default.
1394  We leave that up to you to check.
1395  You'll also want to read the documentation for it; we're not going to do
1396  that for you.
1397  Since this is an example, however, we'll give you an example of how you
1398  use this package.
1399 \end_layout
1400
1401 \begin_layout Standard
1402 First, make sure you're using the 
1403 \begin_inset Flex Code
1404 status collapsed
1405
1406 \begin_layout Plain Layout
1407 article
1408 \end_layout
1409
1410 \end_inset
1411
1412  document class.
1413  Next, you need to put the following in your preamble:
1414 \end_layout
1415
1416 \begin_layout LyX-Code
1417
1418 \backslash
1419 usepackage{labels}
1420 \end_layout
1421
1422 \begin_layout LyX-Code
1423
1424 \backslash
1425 LabelCols=3
1426 \end_layout
1427
1428 \begin_layout LyX-Code
1429
1430 \backslash
1431 LabelRows=7
1432 \end_layout
1433
1434 \begin_layout LyX-Code
1435
1436 \backslash
1437 LeftBorder=8mm
1438 \end_layout
1439
1440 \begin_layout LyX-Code
1441
1442 \backslash
1443 RightBorder=8mm
1444 \end_layout
1445
1446 \begin_layout LyX-Code
1447
1448 \backslash
1449 TopBorder=9mm
1450 \end_layout
1451
1452 \begin_layout LyX-Code
1453
1454 \backslash
1455 BottomBorder=2mm
1456 \end_layout
1457
1458 \begin_layout Standard
1459 This sets things up for Avery label sheets, stock #5360.
1460  You're now ready to print labels, but you'll need to insert LaTeX code,
1461  placing the commands 
1462 \begin_inset Flex Code
1463 status collapsed
1464
1465 \begin_layout Plain Layout
1466
1467 \backslash
1468 begin{labels}
1469 \end_layout
1470
1471 \end_inset
1472
1473  and 
1474 \begin_inset Flex Code
1475 status collapsed
1476
1477 \begin_layout Plain Layout
1478
1479 \backslash
1480 end{labels}
1481 \end_layout
1482
1483 \end_inset
1484
1485  around each label text.
1486  This and other special features of 
1487 \begin_inset Flex Code
1488 status collapsed
1489
1490 \begin_layout Plain Layout
1491 labels.sty
1492 \end_layout
1493
1494 \end_inset
1495
1496  are explained in its documentation.
1497 \end_layout
1498
1499 \begin_layout Standard
1500 Someday, someone may write a LyX layout file to support this package directly.
1501  Maybe that someone is you.
1502 \end_layout
1503
1504 \begin_layout Subsubsection
1505 Example #3: Paragraph Indentation
1506 \end_layout
1507
1508 \begin_layout Standard
1509 Americans are trained to indent the first line of 
1510 \emph on
1511 every
1512 \emph default
1513  paragraph.
1514  As with all of their other weird quirks, most Americans will whine and
1515  moan until they can have their way and indent the first line of all paragraphs.
1516  (Yes, we're joking.
1517  (We are?) 
1518 \emph on
1519 Yeah
1520 \emph default
1521 , we are.)
1522 \end_layout
1523
1524 \begin_layout Standard
1525 Of course, this behavior isn't standard typography.
1526  In books, you typically only indent the first line of a paragraph 
1527 \emph on
1528 if
1529 \emph default
1530  it follows another one.
1531  The idea behind indenting the first line of a paragraph is to distinguish
1532  neighboring paragraphs from one another.
1533  If there is no previous paragraph—for example, if it follows a figure or
1534  is the first paragraph in a section—then there is no need for indentation.
1535  
1536 \end_layout
1537
1538 \begin_layout Standard
1539 If you're a typical American (we're still joking!), though, you don't care
1540  about such esoteric things; you want your indentation! Add this to the
1541  preamble:
1542 \end_layout
1543
1544 \begin_layout LyX-Code
1545
1546 \backslash
1547 usepackage{indentfirst}
1548 \end_layout
1549
1550 \begin_layout Standard
1551 If your TeX distribution isn't braindead, you'll have this package, and
1552  all of your paragraphs will get the indentation the Founding Fathers intended
1553  they should have.
1554 \end_layout
1555
1556 \begin_layout Subsubsection
1557 Example #4: This Document
1558 \end_layout
1559
1560 \begin_layout Standard
1561 You can also check out the preamble of this document to get an idea of some
1562  of the advanced things you can do.
1563  Also, there are more examples and an assortment of LaTeX 
1564 \begin_inset Quotes eld
1565 \end_inset
1566
1567 dirty tricks
1568 \begin_inset Quotes erd
1569 \end_inset
1570
1571  given in Chapter
1572 \begin_inset space ~
1573 \end_inset
1574
1575
1576 \begin_inset CommandInset ref
1577 LatexCommand ref
1578 reference "cha:secrets"
1579
1580 \end_inset
1581
1582 .
1583  
1584 \end_layout
1585
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1588 \end_layout
1589
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1592  going.
1593  It then uses the logfile from the LaTeX run to do a post-mortem.
1594  After analyzing the logfile,LyX displays a dialog listing the errors.
1595  Clicking on any one of them will take you to the position in your LyX file
1596  where the error occurred.
1597 \begin_inset Foot
1598 status collapsed
1599
1600 \begin_layout Plain Layout
1601 Well, usually.
1602  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1603  right line.
1604  There are also cases where LaTeX reports the error on one line, but the
1605  actual error is earlier.
1606  This is not unlike forgetting a closing brace in a program: You'll get
1607  an error, but only later.
1608 \end_layout
1609
1610 \end_inset
1611
1612
1613 \end_layout
1614
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1617  
1618 \begin_inset Flex MenuItem
1619 status collapsed
1620
1621 \begin_layout Plain Layout
1622 Document
1623 \bar under
1624 \SpecialChar \menuseparator
1625
1626 \bar default
1627 Latex
1628 \begin_inset space ~
1629 \end_inset
1630
1631 Log
1632 \end_layout
1633
1634 \end_inset
1635
1636 .
1637  There are some fairly common error messages and warnings.
1638  We'll cover those here.
1639  You should look at a good LaTeX book for a complete listing.
1640 \end_layout
1641
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1644 status collapsed
1645
1646 \begin_layout Plain Layout
1647 LaTeX Warning
1648 \end_layout
1649
1650 \end_inset
1651
1652
1653 \begin_inset Newline newline
1654 \end_inset
1655
1656 Anything beginning with these words is a warning message for the purpose
1657  of 
1658 \begin_inset Quotes eld
1659 \end_inset
1660
1661 debugging
1662 \begin_inset Quotes erd
1663 \end_inset
1664
1665  the LaTeX code itself.
1666  You'll get messages like this if you added or changed cross-references
1667  or bibliography entries, in which case, LaTeX is trying to tell you that
1668  you need to make another run.
1669  You can by-and-large ignore these.
1670 \end_layout
1671
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1674 status collapsed
1675
1676 \begin_layout Plain Layout
1677 LaTeX Font Warning
1678 \end_layout
1679
1680 \end_inset
1681
1682
1683 \begin_inset Newline newline
1684 \end_inset
1685
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687  The rest of the message will often say something about a replacement font
1688  that LaTeX used.
1689  You can safely ignore these, too.
1690 \end_layout
1691
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1694 status collapsed
1695
1696 \begin_layout Plain Layout
1697 Overfull 
1698 \backslash
1699 hbox
1700 \end_layout
1701
1702 \end_inset
1703
1704
1705 \begin_inset Newline newline
1706 \end_inset
1707
1708 LaTeX absolutely 
1709 \emph on
1710 loves
1711 \emph default
1712  to spew these out.
1713  They are warnings about lines that were too long and run past the right
1714  margin.
1715  Almost always, this is unnoticeable in the final output.
1716  (It can be just a point or two.) Or, only one or two characters extend past
1717  the margin.
1718  LaTeX seems to generate at least one of these messages for just about any
1719  document you write.
1720 \begin_inset Newline newline
1721 \end_inset
1722
1723 You can ignore these messages.
1724  Your eyes will tell you if there's a problem with something that's too
1725  wide; just look at the output.
1726 \begin_inset Foot
1727 status collapsed
1728
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in 
1731 \begin_inset Flex MenuItem
1732 status collapsed
1733
1734 \begin_layout Plain Layout
1735 Document
1736 \bar under
1737 \SpecialChar \menuseparator
1738
1739 \bar default
1740 Settings
1741 \end_layout
1742
1743 \end_inset
1744
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1746 \end_layout
1747
1748 \end_inset
1749
1750
1751 \end_layout
1752
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1755 status collapsed
1756
1757 \begin_layout Plain Layout
1758 Underfull 
1759 \backslash
1760 hbox
1761 \end_layout
1762
1763 \end_inset
1764
1765
1766 \begin_inset Newline newline
1767 \end_inset
1768
1769 Not quite as common as its cousin.
1770  LaTeX seems to like to print lines that are a bit too wide as opposed to
1771  ones that are a bit too narrow.
1772  We have no idea why.
1773 \end_layout
1774
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1777 status collapsed
1778
1779 \begin_layout Plain Layout
1780 Overfull 
1781 \backslash
1782 vbox
1783 \end_layout
1784
1785 \end_inset
1786
1787  and 
1788 \begin_inset Flex Code
1789 status collapsed
1790
1791 \begin_layout Plain Layout
1792 Underfull 
1793 \backslash
1794 vbox
1795 \end_layout
1796
1797 \end_inset
1798
1799
1800 \begin_inset Newline newline
1801 \end_inset
1802
1803 Warnings about troubles breaking the page.
1804  Once again, just look at the output.
1805  Your eyes will tell you where something has gone wrong.
1806 \end_layout
1807
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1810 status collapsed
1811
1812 \begin_layout Plain Layout
1813  LaTeX Error: File 
1814 \begin_inset Quotes els
1815 \end_inset
1816
1817 Xxxx
1818 \begin_inset Quotes ers
1819 \end_inset
1820
1821  not found
1822 \end_layout
1823
1824 \end_inset
1825
1826
1827 \begin_inset Newline newline
1828 \end_inset
1829
1830 The file 
1831 \begin_inset Quotes eld
1832 \end_inset
1833
1834 Xxxx
1835 \begin_inset Quotes erd
1836 \end_inset
1837
1838  isn't installed on this system.
1839  This usually appears because some package your document needs isn't installed.
1840  If you didn't touch the preamble or didn't use the 
1841 \begin_inset Flex Code
1842 status collapsed
1843
1844 \begin_layout Plain Layout
1845
1846 \backslash
1847 usepackage{}
1848 \end_layout
1849
1850 \end_inset
1851
1852  command, then one of the packages LyX tried to load is missing.
1853  Use 
1854 \begin_inset Flex MenuItem
1855 status collapsed
1856
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1859 LaTeX Configuration
1860 \end_layout
1861
1862 \end_inset
1863
1864  to get a list of packages that LyX knows about.
1865  This file is updated whenever you reconfigure LyX (using 
1866 \begin_inset Flex MenuItem
1867 status collapsed
1868
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1871 Reconfigure
1872 \end_layout
1873
1874 \end_inset
1875
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1878 \end_inset
1879
1880 If you did use the 
1881 \begin_inset Flex Code
1882 status collapsed
1883
1884 \begin_layout Plain Layout
1885
1886 \backslash
1887 usepackage{}
1888 \end_layout
1889
1890 \end_inset
1891
1892  command and the package in question isn't installed, then you'll need to
1893  install it yourself.
1894 \end_layout
1895
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1898 status collapsed
1899
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1902 \end_layout
1903
1904 \end_inset
1905
1906
1907 \begin_inset Newline newline
1908 \end_inset
1909
1910 Error messages beginning with this are trying to tell you that you specified
1911  a bad or undefined option to a package.
1912  Check the package's documentation.
1913 \end_layout
1914
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1917 status collapsed
1918
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1921 \end_layout
1922
1923 \end_inset
1924
1925
1926 \begin_inset Newline newline
1927 \end_inset
1928
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1930  get one of these.
1931  You may have forgotten to load a package.
1932  In any case, this error message usually means that you used an undefined
1933  command.
1934  
1935 \end_layout
1936
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939  Some are self-explanatory.
1940  These are usually LaTeX messages.
1941  Others are downright cryptic.
1942  These are usually TeX error messages, and we really have 
1943 \emph on
1944 no clue
1945 \emph default
1946  what they mean or how to decipher them.
1947  No-one does.
1948 \end_layout
1949
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1952 \end_layout
1953
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1956 \end_layout
1957
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1960 \end_layout
1961
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964  especially if you see a 
1965 \begin_inset Quotes eld
1966 \end_inset
1967
1968
1969 \begin_inset Flex Code
1970 status collapsed
1971
1972 \begin_layout Plain Layout
1973 Missing 
1974 \backslash
1975 begin{document}
1976 \end_layout
1977
1978 \end_inset
1979
1980
1981 \begin_inset Quotes erd
1982 \end_inset
1983
1984  error—it means that there are errors in the preamble.
1985  Start debugging your preamble.
1986 \end_layout
1987
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990  to the document, the first suspect is your LaTeX distribution itself.
1991  Check for missing packages and install them.
1992 \end_layout
1993
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996  Did you use any of the fine-tuning options in LyX? Specifically, did you
1997  
1998 \emph on
1999 misuse
2000 \emph default
2001  any of them, like trying to manually insert lots of 
2002 \begin_inset Flex Code
2003 status collapsed
2004
2005 \begin_layout Plain Layout
2006 Protected
2007 \begin_inset space ~
2008 \end_inset
2009
2010 Blanks
2011 \end_layout
2012
2013 \end_inset
2014
2015
2016 \begin_inset Flex Code
2017 status collapsed
2018
2019 \begin_layout Plain Layout
2020 Linebreaks
2021 \end_layout
2022
2023 \end_inset
2024
2025 , or 
2026 \begin_inset Flex Code
2027 status collapsed
2028
2029 \begin_layout Plain Layout
2030 Pagebreaks
2031 \end_layout
2032
2033 \end_inset
2034
2035 ? Did you try to kludge something together with these instead of using the
2036  appropriate paragraph environment?
2037 \end_layout
2038
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2041  the rules.
2042  Did you try to pull a fancy maneuver? Did you do something funky inside
2043  a table or an equation, like inserting a graphic into a table cell?
2044 \end_layout
2045
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048  a line? By default, LaTeX is rather strict about how much extra inter-word
2049  spacing it will add in order to break a line.
2050  Preferably, you should rework the paragraph to avoid the problem.
2051  If this isn't an option, you can wrap your text in 
2052 \begin_inset Flex Code
2053 status collapsed
2054
2055 \begin_layout Plain Layout
2056
2057 \backslash
2058 sloppypar
2059 \end_layout
2060
2061 \end_inset
2062
2063  to make LaTeX's line breaking more, well, sloppy.
2064 \end_layout
2065
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068  make sure you're in the limits for nesting environments.
2069  If you nested a bunch of environments to the 
2070 \begin_inset Formula $17^{\mathrm{th}}$
2071 \end_inset
2072
2073  level, that's the problem.
2074  (The limit in LaTeX is five.)
2075 \end_layout
2076
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079  If you have a table or figure that's too wide or long for the page, you
2080  need to:
2081 \end_layout
2082
2083 \begin_deeper
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2086 \end_layout
2087
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2090 \end_layout
2091
2092 \end_deeper
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2096 \end_layout
2097
2098 \begin_layout Standard
2099 If all this doesn't help—well, then 
2100 \emph on
2101 perhaps
2102 \emph default
2103  you might have found a bug in LyX\SpecialChar \ldots{}
2104 .
2105 \end_layout
2106
2107 \begin_layout Chapter
2108 Supplemental Tools
2109 \end_layout
2110
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2113 \end_layout
2114
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2117  in the section 
2118 \emph on
2119 Bibliography databases (BibTeX)
2120 \emph default
2121  of the 
2122 \emph on
2123 User's Guide
2124 \emph default
2125 .
2126  The following subsections explain special bibliography features supported
2127  by LyX.
2128 \end_layout
2129
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2132 \end_layout
2133
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2137 \end_inset
2138
2139 g.
2140 \begin_inset space \space{}
2141 \end_inset
2142
2143
2144 \begin_inset Quotes eld
2145 \end_inset
2146
2147 [12]
2148 \begin_inset Quotes erd
2149 \end_inset
2150
2151 ) to refer to a cited work.
2152  However, in many scientific disciplines, other citation styles are in use.
2153  The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2155 \end_inset
2156
2157 g.
2158 \begin_inset space \space{}
2159 \end_inset
2160
2161
2162 \begin_inset Quotes eld
2163 \end_inset
2164
2165 Knuth 1984a
2166 \begin_inset Quotes erd
2167 \end_inset
2168
2169 ).
2170  LyX supports two packages that provide this style, 
2171 \begin_inset Flex Code
2172 status collapsed
2173
2174 \begin_layout Plain Layout
2175 natbib
2176 \end_layout
2177
2178 \end_inset
2179
2180  and 
2181 \begin_inset Flex Code
2182 status collapsed
2183
2184 \begin_layout Plain Layout
2185 jurabib
2186 \end_layout
2187
2188 \end_inset
2189
2190 .
2191  Both packages have their pros and cons, which cannot be listed in detail.
2192  If you only want to have simple author-year (or author-numerical) style,
2193  or if you want to use one of the countless style files for 
2194 \begin_inset Flex Code
2195 status collapsed
2196
2197 \begin_layout Plain Layout
2198 natbib
2199 \end_layout
2200
2201 \end_inset
2202
2203 , than the established 
2204 \begin_inset Flex Code
2205 status collapsed
2206
2207 \begin_layout Plain Layout
2208 natbib
2209 \end_layout
2210
2211 \end_inset
2212
2213  package is probably your choice.
2214  If you need special features like short title references, ibidem etc., you
2215  might consider the 
2216 \begin_inset Flex Code
2217 status collapsed
2218
2219 \begin_layout Plain Layout
2220 jurabib
2221 \end_layout
2222
2223 \end_inset
2224
2225  package.
2226 \end_layout
2227
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2230  Go to 
2231 \begin_inset Flex MenuItem
2232 status collapsed
2233
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2236 Settings
2237 \end_layout
2238
2239 \end_inset
2240
2241  and select under 
2242 \begin_inset Flex MenuItem
2243 status collapsed
2244
2245 \begin_layout Plain Layout
2246 Bibliography
2247 \end_layout
2248
2249 \end_inset
2250
2251  the option 
2252 \begin_inset Flex MenuItem
2253 status collapsed
2254
2255 \begin_layout Plain Layout
2256 Natbib
2257 \end_layout
2258
2259 \end_inset
2260
2261  or 
2262 \begin_inset Flex MenuItem
2263 status collapsed
2264
2265 \begin_layout Plain Layout
2266 Jurabib
2267 \end_layout
2268
2269 \end_inset
2270
2271 .
2272  With both packages, you will get some extra features in the citation dialog
2273  and you can select the style of the reference (
2274 \begin_inset Quotes eld
2275 \end_inset
2276
2277 Knuth 1984
2278 \begin_inset Quotes erd
2279 \end_inset
2280
2281
2282 \begin_inset Quotes eld
2283 \end_inset
2284
2285 Knuth (1984)
2286 \begin_inset Quotes erd
2287 \end_inset
2288
2289
2290 \begin_inset Quotes eld
2291 \end_inset
2292
2293 Knuth, 1984
2294 \begin_inset Quotes erd
2295 \end_inset
2296
2297
2298 \begin_inset Quotes eld
2299 \end_inset
2300
2301 1984
2302 \begin_inset Quotes erd
2303 \end_inset
2304
2305  etc.).
2306  Note that both packages need specifically designed style files.
2307  They both ship their own, but there are lots of additional style files,
2308  and there is even an interactive style file builder
2309 \begin_inset Foot
2310 status collapsed
2311
2312 \begin_layout Plain Layout
2313 See 
2314 \begin_inset Flex URL
2315 status open
2316
2317 \begin_layout Plain Layout
2318
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2320 \end_layout
2321
2322 \end_inset
2323
2324
2325 \end_layout
2326
2327 \end_inset
2328
2329  for 
2330 \begin_inset Flex Code
2331 status collapsed
2332
2333 \begin_layout Plain Layout
2334 natbib
2335 \end_layout
2336
2337 \end_inset
2338
2339 .
2340 \end_layout
2341
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2344 \end_layout
2345
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348  If you are for instance a historian, the possibility to separate sources
2349  and scientific works is most likely a 
2350 \begin_inset Quotes eld
2351 \end_inset
2352
2353 must have
2354 \begin_inset Quotes erd
2355 \end_inset
2356
2357 .
2358  Unfortunately, BibTeX itself does not allow you to do this.
2359  But with the help of some LaTeX packages, BibTeX can be extended to fit
2360  your needs.
2361 \end_layout
2362
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages, 
2365 \family typewriter
2366 bibtopic
2367 \family default
2368 .
2369 \begin_inset Foot
2370 status collapsed
2371
2372 \begin_layout Plain Layout
2373 Available from 
2374 \begin_inset Flex URL
2375 status open
2376
2377 \begin_layout Plain Layout
2378
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2380 \end_layout
2381
2382 \end_inset
2383
2384
2385 \end_layout
2386
2387 \end_inset
2388
2389  The advantage of this package (compared to other packages like 
2390 \family typewriter
2391 multibib
2392 \family default
2393 ) is that you don't need to define new citation commands.
2394  Instead, you need to prepare different bibliographic databases which include
2395  the entries for the different sections of the bibliography.
2396  For example: If you want to divide your bibliography into the sections
2397  
2398 \begin_inset Quotes eld
2399 \end_inset
2400
2401 Sources
2402 \begin_inset Quotes erd
2403 \end_inset
2404
2405  and 
2406 \begin_inset Quotes eld
2407 \end_inset
2408
2409 Scientific works
2410 \begin_inset Quotes erd
2411 \end_inset
2412
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2415 \end_inset
2416
2417 g.
2418 \begin_inset space \space{}
2419 \end_inset
2420
2421
2422 \begin_inset Flex Code
2423 status collapsed
2424
2425 \begin_layout Plain Layout
2426 sources.bib
2427 \end_layout
2428
2429 \end_inset
2430
2431  and 
2432 \begin_inset Flex Code
2433 status collapsed
2434
2435 \begin_layout Plain Layout
2436 scientific.bib
2437 \end_layout
2438
2439 \end_inset
2440
2441 .
2442  
2443 \end_layout
2444
2445 \begin_layout Standard
2446 Go to 
2447 \begin_inset Flex MenuItem
2448 status collapsed
2449
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2452 Settings
2453 \end_layout
2454
2455 \end_inset
2456
2457  and check under 
2458 \begin_inset Flex MenuItem
2459 status collapsed
2460
2461 \begin_layout Plain Layout
2462 Bibliography
2463 \end_layout
2464
2465 \end_inset
2466
2467  the option 
2468 \begin_inset Flex MenuItem
2469 status collapsed
2470
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2473 \end_layout
2474
2475 \end_inset
2476
2477 .
2478  Now you can insert multiple BibTeX bibliographies, one for each section
2479  of your bibliography.
2480  Returning to our example: Insert the BibTeX bibliography 
2481 \begin_inset Flex Code
2482 status collapsed
2483
2484 \begin_layout Plain Layout
2485 sources.bib
2486 \end_layout
2487
2488 \end_inset
2489
2490  and a second one for the database 
2491 \begin_inset Flex Code
2492 status collapsed
2493
2494 \begin_layout Plain Layout
2495 scientific.bib
2496 \end_layout
2497
2498 \end_inset
2499
2500 .
2501  You are free to use the same or different styles for each section.
2502  Additionally, you can chose if the bibliography section should contain
2503  
2504 \begin_inset Quotes eld
2505 \end_inset
2506
2507 all cited references
2508 \begin_inset Quotes erd
2509 \end_inset
2510
2511  of the specified database(s) (which is the default), 
2512 \begin_inset Quotes eld
2513 \end_inset
2514
2515 all uncited references
2516 \begin_inset Quotes erd
2517 \end_inset
2518
2519  or even 
2520 \begin_inset Quotes eld
2521 \end_inset
2522
2523 all references
2524 \begin_inset Quotes erd
2525 \end_inset
2526
2527 .
2528  This might be useful if you would like to separate your bibliography into
2529  three sections: 
2530 \begin_inset Quotes eld
2531 \end_inset
2532
2533 Cited sources
2534 \begin_inset Quotes erd
2535 \end_inset
2536
2537
2538 \begin_inset Quotes eld
2539 \end_inset
2540
2541 Uncited sources
2542 \begin_inset Quotes erd
2543 \end_inset
2544
2545 , and 
2546 \begin_inset Quotes eld
2547 \end_inset
2548
2549 Scientific works
2550 \begin_inset Quotes erd
2551 \end_inset
2552
2553 .
2554  The titles for the sections can be added as ordinary sections or subsections.
2555  Since 
2556 \begin_inset Flex Code
2557 status collapsed
2558
2559 \begin_layout Plain Layout
2560 bibtopic
2561 \end_layout
2562
2563 \end_inset
2564
2565  removes the bibliography title, you have manually re-add that, too (as
2566  a chapter* or section*, for instance).
2567 \end_layout
2568
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2571 \end_layout
2572
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2576 \end_inset
2577
2578 g.
2579 \begin_inset space \space{}
2580 \end_inset
2581
2582 a bibliography for each section or chapter of the document, are not supported
2583  by BibTeX itself.
2584  But the 
2585 \begin_inset Flex Code
2586 status collapsed
2587
2588 \begin_layout Plain Layout
2589 bibtopic
2590 \end_layout
2591
2592 \end_inset
2593
2594  package, which is used for the creation of sectioned bibliographies in
2595  LyX (see the previous section), provides an easy way to solve this task,
2596  if you are willing to use some 
2597 \begin_inset Flex MenuItem
2598 status collapsed
2599
2600 \begin_layout Plain Layout
2601 TeX Code
2602 \end_layout
2603
2604 \end_inset
2605
2606  (see section
2607 \begin_inset space ~
2608 \end_inset
2609
2610
2611 \begin_inset CommandInset ref
2612 LatexCommand ref
2613 reference "sec:Inserting-TeX-Code"
2614
2615 \end_inset
2616
2617 ).
2618 \begin_inset Foot
2619 status collapsed
2620
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the 
2623 \begin_inset Flex Code
2624 status collapsed
2625
2626 \begin_layout Plain Layout
2627 chapterbib
2628 \end_layout
2629
2630 \end_inset
2631
2632  or 
2633 \begin_inset Flex Code
2634 status collapsed
2635
2636 \begin_layout Plain Layout
2637 bibunits
2638 \end_layout
2639
2640 \end_inset
2641
2642  package, respectively.
2643 \end_layout
2644
2645 \end_inset
2646
2647
2648 \end_layout
2649
2650 \begin_layout Standard
2651 First go to 
2652 \begin_inset Flex MenuItem
2653 status collapsed
2654
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2657 Settings
2658 \end_layout
2659
2660 \end_inset
2661
2662  and under 
2663 \begin_inset Flex MenuItem
2664 status collapsed
2665
2666 \begin_layout Plain Layout
2667 Bibliography
2668 \end_layout
2669
2670 \end_inset
2671
2672  check 
2673 \begin_inset Flex MenuItem
2674 status collapsed
2675
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2678 \end_layout
2679
2680 \end_inset
2681
2682 .
2683  In the document, you have to enclose the sections, which shall contain
2684  their own bibliography (including the BibTeX bibliography itself), between
2685  
2686 \begin_inset Flex Code
2687 status collapsed
2688
2689 \begin_layout Plain Layout
2690
2691 \backslash
2692 begin{btUnit}
2693 \end_layout
2694
2695 \end_inset
2696
2697  and 
2698 \begin_inset Flex Code
2699 status collapsed
2700
2701 \begin_layout Plain Layout
2702
2703 \backslash
2704 end{btUnit}
2705 \end_layout
2706
2707 \end_inset
2708
2709  (those commands have to be inserted as TeX code).
2710  The bibliography will contain all references which have been cited in the
2711  current 
2712 \begin_inset Flex Code
2713 status collapsed
2714
2715 \begin_layout Plain Layout
2716 btUnit
2717 \end_layout
2718
2719 \end_inset
2720
2721 .
2722  
2723 \series bold
2724 Note:
2725 \series default
2726  If you are using this approach, then every citation reference has to be
2727  inside some 
2728 \begin_inset Flex Code
2729 status collapsed
2730
2731 \begin_layout Plain Layout
2732 btUnit
2733 \end_layout
2734
2735 \end_inset
2736
2737 .
2738  Also, the 
2739 \begin_inset Flex Code
2740 status collapsed
2741
2742 \begin_layout Plain Layout
2743 btUnit
2744 \end_layout
2745
2746 \end_inset
2747
2748 s cannot be nested.
2749 \end_layout
2750
2751 \begin_layout Section
2752 Multipart Documents
2753 \end_layout
2754
2755 \begin_layout Subsection
2756 General Operation
2757 \end_layout
2758
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761  to break up the document into several files, or perhaps you have something
2762  where a table may change from time to time, but the preceding text does
2763  not.
2764  In these cases, you should seriously consider using multipart documents.
2765  For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767  Each of these could be its own separate LyX file, with one 
2768 \begin_inset Quotes eld
2769 \end_inset
2770
2771 master
2772 \begin_inset Quotes erd
2773 \end_inset
2774
2775  file which contains the title, authors, abstract, references, etc., plus
2776  the five included files.
2777  It is important to note that each of these files is a full LyX file which
2778  can be formatted and printed on its own, as well as included in a master
2779  file.
2780  Each of these files must have the same document class, however—don't attempt
2781  to mix book classes with article classes.
2782  You may also include LaTeX files; however, these files must not have their
2783  own preamble (i.
2784 \begin_inset space \thinspace{}
2785 \end_inset
2786
2787 g.
2788 \begin_inset space \space{}
2789 \end_inset
2790
2791 everything up to and including the 
2792 \begin_inset Flex Code
2793 status collapsed
2794
2795 \begin_layout Plain Layout
2796
2797 \backslash
2798 begin{document}
2799 \end_layout
2800
2801 \end_inset
2802
2803  line as well as the 
2804 \begin_inset Flex Code
2805 status collapsed
2806
2807 \begin_layout Plain Layout
2808
2809 \backslash
2810 end{document}
2811 \end_layout
2812
2813 \end_inset
2814
2815  line must be deleted) or else errors will be generated when you try to
2816  make a DVI file.
2817 \end_layout
2818
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with 
2821 \begin_inset Flex MenuItem
2822 status collapsed
2823
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2826 ChiId
2827 \begin_inset space ~
2828 \end_inset
2829
2830 Document
2831 \end_layout
2832
2833 \end_inset
2834
2835 .
2836  When you click on this selection a small box is inserted into the file
2837  at the current cursor location.
2838  Clicking on the box raises a dialog which allows you to select the file
2839  to be included, and the method of its inclusion.
2840  
2841 \end_layout
2842
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845  The three inclusion methods are 
2846 \begin_inset Quotes eld
2847 \end_inset
2848
2849 include
2850 \begin_inset Quotes erd
2851 \end_inset
2852
2853
2854 \begin_inset Quotes eld
2855 \end_inset
2856
2857 input
2858 \begin_inset Quotes erd
2859 \end_inset
2860
2861 , and 
2862 \begin_inset Quotes eld
2863 \end_inset
2864
2865 verbatim
2866 \begin_inset Quotes erd
2867 \end_inset
2868
2869 .
2870  The difference between 
2871 \begin_inset Quotes eld
2872 \end_inset
2873
2874 include
2875 \begin_inset Quotes erd
2876 \end_inset
2877
2878  and 
2879 \begin_inset Quotes eld
2880 \end_inset
2881
2882 input
2883 \begin_inset Quotes erd
2884 \end_inset
2885
2886  is really only meaningful to LaTeXperts, but the practical difference is
2887  that files which are 
2888 \begin_inset Quotes eld
2889 \end_inset
2890
2891 included
2892 \begin_inset Quotes erd
2893 \end_inset
2894
2895  are typeset beginning on a new page, while files which are 
2896 \begin_inset Quotes eld
2897 \end_inset
2898
2899 inputted
2900 \begin_inset Quotes erd
2901 \end_inset
2902
2903  are typeset starting on the current page.
2904 \end_layout
2905
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files which do not have
2909  all the preamble information.
2910 \end_layout
2911
2912 \begin_layout Standard
2913
2914 \begin_inset Quotes eld
2915 \end_inset
2916
2917 verbatim
2918 \begin_inset Quotes erd
2919 \end_inset
2920
2921  included file allows you to include a file typeset exactly as it appears
2922  in the file, i.
2923 \begin_inset space \thinspace{}
2924 \end_inset
2925
2926 g.
2927 \begin_inset space \space{}
2928 \end_inset
2929
2930 in 
2931 \begin_inset Flex Code
2932 status collapsed
2933
2934 \begin_layout Plain Layout
2935 verbatim
2936 \end_layout
2937
2938 \end_inset
2939
2940  mode, with the characters set in a fixed-width typewriter font.
2941  Normally, spaces in this file are invisible, though two consecutive spaces
2942  are conserved, unlike LyX's normal treatment of spaces.
2943  However, setting the 
2944 \begin_inset Flex MenuItem
2945 status collapsed
2946
2947 \begin_layout Plain Layout
2948 Mark
2949 \begin_inset space ~
2950 \end_inset
2951
2952 spaces
2953 \begin_inset space ~
2954 \end_inset
2955
2956 in
2957 \begin_inset space ~
2958 \end_inset
2959
2960 output
2961 \end_layout
2962
2963 \end_inset
2964
2965  checkbox typesets a mark to unambiguously define the presence of a space.
2966  
2967 \end_layout
2968
2969 \begin_layout Subsection
2970 Cross-References Between Files
2971 \end_layout
2972
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2975 position "t"
2976 hor_pos "c"
2977 has_inner_box 1
2978 inner_pos "t"
2979 use_parbox 0
2980 use_makebox 0
2981 width "100col%"
2982 special "none"
2983 height "1in"
2984 height_special "totalheight"
2985 status open
2986
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989  Need to describe default master documents and how children are opened when
2990  the master is.
2991  [[FIXME]]
2992 \end_layout
2993
2994 \end_inset
2995
2996
2997 \end_layout
2998
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001  First, open all the files in question: let's call them A and B in a two
3002  file example, where B is included in A.
3003  Let's say you insert a label in A, then want to reference it in B.
3004  Open the cross-reference dialog in whilst in document B, and you can select
3005  the 
3006 \begin_inset Quotes eld
3007 \end_inset
3008
3009 buffer
3010 \begin_inset Quotes erd
3011 \end_inset
3012
3013  to use.
3014 \end_layout
3015
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3018 \end_layout
3019
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3022 position "t"
3023 hor_pos "c"
3024 has_inner_box 1
3025 inner_pos "t"
3026 use_parbox 0
3027 use_makebox 0
3028 width "100col%"
3029 special "none"
3030 height "1in"
3031 height_special "totalheight"
3032 status open
3033
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036  There is now material about this on the wiki, and it could be copied here.
3037 \end_layout
3038
3039 \end_inset
3040
3041
3042 \end_layout
3043
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3046  them to a comment.
3047  This way LyX will find the 
3048 \begin_inset Flex Code
3049 status collapsed
3050
3051 \begin_layout Plain Layout
3052 .bib
3053 \end_layout
3054
3055 \end_inset
3056
3057 -files and you can easily insert references without making the bibliography
3058  list visible.
3059 \end_layout
3060
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use use it and the
3063  references will look like this: [?], instead of like this: [1].
3064  One solution is to use the LaTeX-package 
3065 \begin_inset Flex Code
3066 status collapsed
3067
3068 \begin_layout Plain Layout
3069 comment
3070 \end_layout
3071
3072 \end_inset
3073
3074  that will only include comments by processing the files separately.
3075  To do this, add in the LaTeX preamble of every subdocument the following:
3076 \end_layout
3077
3078 \begin_layout LyX-Code
3079
3080 \backslash
3081 usepackage{comment}
3082 \end_layout
3083
3084 \begin_layout LyX-Code
3085
3086 \backslash
3087 includecomment{comment}
3088 \end_layout
3089
3090 \begin_layout Standard
3091 See also 
3092 \begin_inset Flex URL
3093 status collapsed
3094
3095 \begin_layout Plain Layout
3096
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3098 \end_layout
3099
3100 \end_inset
3101
3102 .
3103 \end_layout
3104
3105 \begin_layout Section
3106 Fancy Headers and Footers
3107 \end_layout
3108
3109 \begin_layout Standard
3110 The default page layout is rather plain; for an 
3111 \begin_inset Flex Code
3112 status collapsed
3113
3114 \begin_layout Plain Layout
3115 article
3116 \end_layout
3117
3118 \end_inset
3119
3120  document class, all you get is a centered page number at the bottom of
3121  the page.
3122  This document uses KOMA-script's book class, so it appears to be a bit
3123  fancier.
3124  But to really put on a show, you need to set the document page style to
3125  
3126 \begin_inset Quotes eld
3127 \end_inset
3128
3129 fancy
3130 \begin_inset Quotes erd
3131 \end_inset
3132
3133 , as mentioned in the 
3134 \emph on
3135 User Guide
3136 \emph default
3137 .
3138  This section describes the LaTeX code you need to insert in your LaTeX
3139  preamble in order to get the desired effects.
3140 \end_layout
3141
3142 \begin_layout Standard
3143 For more information on fancy headers, see the 
3144 \begin_inset Flex Code
3145 status collapsed
3146
3147 \begin_layout Plain Layout
3148 fancyhdr
3149 \end_layout
3150
3151 \end_inset
3152
3153  package documentation.
3154  (
3155 \begin_inset Flex URL
3156 status collapsed
3157
3158 \begin_layout Plain Layout
3159
3160 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3161 \end_layout
3162
3163 \end_inset
3164
3165 )
3166 \end_layout
3167
3168 \begin_layout Standard
3169 The page header is divided into three fields, not surprisingly labeled 
3170 \begin_inset Quotes eld
3171 \end_inset
3172
3173 left
3174 \begin_inset Quotes erd
3175 \end_inset
3176
3177
3178 \begin_inset Quotes eld
3179 \end_inset
3180
3181 center
3182 \begin_inset Quotes erd
3183 \end_inset
3184
3185 , and 
3186 \begin_inset Quotes eld
3187 \end_inset
3188
3189 right
3190 \begin_inset Quotes erd
3191 \end_inset
3192
3193 .
3194  The footer is also divided into these three fields.
3195  The LaTeX commands to set these fields in the simplest manner are 
3196 \begin_inset Flex Code
3197 status collapsed
3198
3199 \begin_layout Plain Layout
3200
3201 \backslash
3202 lhead
3203 \end_layout
3204
3205 \end_inset
3206
3207
3208 \begin_inset Flex Code
3209 status collapsed
3210
3211 \begin_layout Plain Layout
3212
3213 \backslash
3214 chead
3215 \end_layout
3216
3217 \end_inset
3218
3219
3220 \begin_inset Flex Code
3221 status collapsed
3222
3223 \begin_layout Plain Layout
3224
3225 \backslash
3226 rhead
3227 \end_layout
3228
3229 \end_inset
3230
3231
3232 \begin_inset Flex Code
3233 status collapsed
3234
3235 \begin_layout Plain Layout
3236
3237 \backslash
3238 lfoot
3239 \end_layout
3240
3241 \end_inset
3242
3243 , etc.
3244  Suppose you wish to put your name in the upper left hand corner of each
3245  page.
3246  Simply insert the following command in the preamble: 
3247 \end_layout
3248
3249 \begin_layout Standard
3250
3251 \family typewriter
3252
3253 \backslash
3254 lhead{John Q.
3255  DocWriter}
3256 \end_layout
3257
3258 \begin_layout Standard
3259 You will now see your name in the upper left.
3260  If a field has a default entry that you would like to get rid of (often
3261  the page number appears in the central footer, simply include a command
3262  with a blank argument, e.
3263 \begin_inset space \thinspace{}
3264 \end_inset
3265
3266 g.:
3267 \end_layout
3268
3269 \begin_layout Standard
3270
3271 \family typewriter
3272
3273 \backslash
3274 cfoot{}
3275 \end_layout
3276
3277 \begin_layout Standard
3278 Let's get really fancy: lets put the section number with the word 
3279 \begin_inset Quotes eld
3280 \end_inset
3281
3282 Section
3283 \begin_inset Quotes erd
3284 \end_inset
3285
3286  (e.
3287 \begin_inset space \thinspace{}
3288 \end_inset
3289
3290 g.
3291 \begin_inset space \space{}
3292 \end_inset
3293
3294 Section 3) in the upper left, the page number (e.
3295 \begin_inset space \thinspace{}
3296 \end_inset
3297
3298 g.
3299 \begin_inset space \space{}
3300 \end_inset
3301
3302 Page 4) in the upper right, your name in the lower left, and the date in
3303  the lower right.
3304  The following commands should now appear in the preamble:
3305 \end_layout
3306
3307 \begin_layout Standard
3308
3309 \family typewriter
3310
3311 \backslash
3312 lhead{Section 
3313 \backslash
3314 thesection}
3315 \end_layout
3316
3317 \begin_layout Standard
3318
3319 \family typewriter
3320
3321 \backslash
3322 chead{}
3323 \end_layout
3324
3325 \begin_layout Standard
3326
3327 \family typewriter
3328
3329 \backslash
3330 rhead{Page 
3331 \backslash
3332 thepage}
3333 \end_layout
3334
3335 \begin_layout Standard
3336
3337 \family typewriter
3338
3339 \backslash
3340 lfoot{John Q.
3341  DocWriter}
3342 \end_layout
3343
3344 \begin_layout Standard
3345
3346 \family typewriter
3347
3348 \backslash
3349 cfoot{}
3350 \end_layout
3351
3352 \begin_layout Standard
3353
3354 \family typewriter
3355
3356 \backslash
3357 rfoot{
3358 \backslash
3359 today}
3360 \end_layout
3361
3362 \begin_layout Standard
3363 The commands 
3364 \begin_inset Flex Code
3365 status collapsed
3366
3367 \begin_layout Plain Layout
3368
3369 \backslash
3370 thesection
3371 \end_layout
3372
3373 \end_inset
3374
3375  and 
3376 \begin_inset Flex Code
3377 status collapsed
3378
3379 \begin_layout Plain Layout
3380
3381 \backslash
3382 thepage
3383 \end_layout
3384
3385 \end_inset
3386
3387  access LaTeX's section and page counters, and so print out the current
3388  section and page numbers.
3389  
3390 \begin_inset Flex Code
3391 status collapsed
3392
3393 \begin_layout Plain Layout
3394
3395 \backslash
3396 today
3397 \end_layout
3398
3399 \end_inset
3400
3401  simply prints out today's date.
3402 \end_layout
3403
3404 \begin_layout Standard
3405 The thicknesses of the horizontal rules drawn beneath the header and above
3406  the footer can also be modified.
3407  If you don't want one of the rules, set its thickness to 0.
3408  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3409  Use commands
3410 \family typewriter
3411  
3412 \family default
3413 like 
3414 \begin_inset Flex Code
3415 status collapsed
3416
3417 \begin_layout Plain Layout
3418
3419 \backslash
3420 renewcommand{
3421 \backslash
3422 headrulewidth}{0.4pt}
3423 \end_layout
3424
3425 \end_inset
3426
3427  and 
3428 \begin_inset Flex Code
3429 status collapsed
3430
3431 \begin_layout Plain Layout
3432
3433 \backslash
3434 renewcommand{
3435 \backslash
3436 footrulewidth}{0.4pt}
3437 \end_layout
3438
3439 \end_inset
3440
3441  to set the thicknesses.
3442 \end_layout
3443
3444 \begin_layout Standard
3445 You can switch the header/footer settings on and off for individual pages
3446  using commands like 
3447 \begin_inset Flex Code
3448 status collapsed
3449
3450 \begin_layout Plain Layout
3451
3452 \backslash
3453 thispagestyle{empty}
3454 \end_layout
3455
3456 \end_inset
3457
3458
3459 \begin_inset Flex Code
3460 status collapsed
3461
3462 \begin_layout Plain Layout
3463
3464 \backslash
3465 thispagestyle{plain}
3466 \end_layout
3467
3468 \end_inset
3469
3470 , and 
3471 \begin_inset Flex Code
3472 status collapsed
3473
3474 \begin_layout Plain Layout
3475
3476 \backslash
3477 thispagestyle{fancy}
3478 \end_layout
3479
3480 \end_inset
3481
3482 .
3483  Simply insert them in the text on the page you want changed and mark them
3484  as TeX code.
3485  In fact, title pages are marked as plain by default, while following pages
3486  are marked fancy when using the global fancy setting.
3487 \end_layout
3488
3489 \begin_layout Standard
3490 As a final example, it is possible to include an image in the header or
3491  footer.
3492  Suppose you want to put a company logo in the upper lefthand corner.
3493  You might try something like
3494 \end_layout
3495
3496 \begin_layout Standard
3497
3498 \family typewriter
3499
3500 \backslash
3501 lhead{
3502 \backslash
3503 resizebox{1in}{!}{
3504 \backslash
3505 includegraphics{logo.eps}}}
3506 \end_layout
3507
3508 \begin_layout Standard
3509 \noindent
3510 (you may need to preface this with 
3511 \begin_inset Flex Code
3512 status collapsed
3513
3514 \begin_layout Plain Layout
3515 \noindent
3516
3517 \backslash
3518 usepackage{graphics}
3519 \end_layout
3520
3521 \end_inset
3522
3523  if you don't include graphics elsewhere in your document).
3524 \end_layout
3525
3526 \begin_layout Section
3527 Itemize Bullet Selection
3528 \begin_inset CommandInset label
3529 LatexCommand label
3530 name "sec:bullet"
3531
3532 \end_inset
3533
3534
3535 \end_layout
3536
3537 \begin_layout Standard
3538 by
3539 \noun on
3540  Allan Rae
3541 \end_layout
3542
3543 \begin_layout Subsection
3544 Introduction
3545 \end_layout
3546
3547 \begin_layout Standard
3548 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3549  Using this dialog you can easily specify what bullet shape to use at each
3550  level of an itemized list.
3551  These settings are document-wide so you won't be able to specify different
3552  sets of bullets for different paragraphs.
3553 \begin_inset Foot
3554 status collapsed
3555
3556 \begin_layout Plain Layout
3557 Well, actually you can but you'll have to do it by hand.
3558 \end_layout
3559
3560 \end_inset
3561
3562
3563 \end_layout
3564
3565 \begin_layout Subsection
3566 How it looks
3567 \end_layout
3568
3569 \begin_layout Standard
3570 Open the dialog by selecting the 
3571 \begin_inset Flex MenuItem
3572 status collapsed
3573
3574 \begin_layout Plain Layout
3575 Document\SpecialChar \menuseparator
3576 Settings
3577 \end_layout
3578
3579 \end_inset
3580
3581  menu item and then select the 
3582 \begin_inset Flex MenuItem
3583 status collapsed
3584
3585 \begin_layout Plain Layout
3586 Bullets
3587 \end_layout
3588
3589 \end_inset
3590
3591  tab.
3592 \end_layout
3593
3594 \begin_layout Standard
3595 The dialog provides you with a table of bullet shapes.
3596  A column of buttons on the left of the table provides access to the six
3597  different panels of bullet shapes.
3598  The row of buttons across the top is used to select which bullet depth
3599  you are changing.
3600  A text entry under the table shows the currently selected bullet shape's
3601  LaTeX equivalent and this can be edited if desired.
3602  If you do modify the text you will also need to specify any needed packages
3603  in the LaTeX preamble.
3604 \end_layout
3605
3606 \begin_layout Standard
3607 The six panels are divided up by the packages they require.
3608  The following table shows the mappings from button name to LaTeX packages.
3609 \end_layout
3610
3611 \begin_layout Standard
3612 \align center
3613 \begin_inset Tabular
3614 <lyxtabular version="3" rows="7" columns="2">
3615 <features tabularvalignment="middle">
3616 <column alignment="center" valignment="top" width="0pt">
3617 <column alignment="center" valignment="top" width="0pt">
3618 <row>
3619 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3620 \begin_inset Text
3621
3622 \begin_layout Plain Layout
3623
3624 \family roman
3625 \series medium
3626 \shape up
3627 \size normal
3628 \emph off
3629 \bar no
3630 \noun off
3631 \color none
3632 Button
3633 \end_layout
3634
3635 \end_inset
3636 </cell>
3637 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3638 \begin_inset Text
3639
3640 \begin_layout Plain Layout
3641
3642 \family roman
3643 \series medium
3644 \shape up
3645 \size normal
3646 \emph off
3647 \bar no
3648 \noun off
3649 \color none
3650 Packages Required
3651 \end_layout
3652
3653 \end_inset
3654 </cell>
3655 </row>
3656 <row>
3657 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3658 \begin_inset Text
3659
3660 \begin_layout Plain Layout
3661
3662 \family sans
3663 \series medium
3664 \shape up
3665 \size normal
3666 \emph off
3667 \bar no
3668 \noun off
3669 \color none
3670 Standard
3671 \end_layout
3672
3673 \end_inset
3674 </cell>
3675 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3676 \begin_inset Text
3677
3678 \begin_layout Plain Layout
3679
3680 \series medium
3681 \shape up
3682 \size normal
3683 \emph off
3684 \bar no
3685 \noun off
3686 \color none
3687 base LaTeX
3688 \end_layout
3689
3690 \end_inset
3691 </cell>
3692 </row>
3693 <row>
3694 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3695 \begin_inset Text
3696
3697 \begin_layout Plain Layout
3698
3699 \family sans
3700 \series medium
3701 \shape up
3702 \size normal
3703 \emph off
3704 \bar no
3705 \noun off
3706 \color none
3707 Maths
3708 \end_layout
3709
3710 \end_inset
3711 </cell>
3712 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3713 \begin_inset Text
3714
3715 \begin_layout Plain Layout
3716
3717 \family typewriter
3718 \series medium
3719 \shape up
3720 \size normal
3721 \emph off
3722 \bar no
3723 \noun off
3724 \color none
3725 amssymb.sty
3726 \end_layout
3727
3728 \end_inset
3729 </cell>
3730 </row>
3731 <row>
3732 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3733 \begin_inset Text
3734
3735 \begin_layout Plain Layout
3736
3737 \family sans
3738 \series medium
3739 \shape up
3740 \size normal
3741 \emph off
3742 \bar no
3743 \noun off
3744 \color none
3745 Ding1
3746 \end_layout
3747
3748 \end_inset
3749 </cell>
3750 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3751 \begin_inset Text
3752
3753 \begin_layout Plain Layout
3754
3755 \family typewriter
3756 \series medium
3757 \shape up
3758 \size normal
3759 \emph off
3760 \bar no
3761 \noun off
3762 \color none
3763 pifont.sty
3764 \end_layout
3765
3766 \end_inset
3767 </cell>
3768 </row>
3769 <row>
3770 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3771 \begin_inset Text
3772
3773 \begin_layout Plain Layout
3774
3775 \family sans
3776 \series medium
3777 \shape up
3778 \size normal
3779 \emph off
3780 \bar no
3781 \noun off
3782 \color none
3783 Ding2
3784 \end_layout
3785
3786 \end_inset
3787 </cell>
3788 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3789 \begin_inset Text
3790
3791 \begin_layout Plain Layout
3792
3793 \family typewriter
3794 \series medium
3795 \shape up
3796 \size normal
3797 \emph off
3798 \bar no
3799 \noun off
3800 \color none
3801 pifont.sty
3802 \end_layout
3803
3804 \end_inset
3805 </cell>
3806 </row>
3807 <row>
3808 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3809 \begin_inset Text
3810
3811 \begin_layout Plain Layout
3812
3813 \family sans
3814 \series medium
3815 \shape up
3816 \size normal
3817 \emph off
3818 \bar no
3819 \noun off
3820 \color none
3821 Ding3
3822 \end_layout
3823
3824 \end_inset
3825 </cell>
3826 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3827 \begin_inset Text
3828
3829 \begin_layout Plain Layout
3830
3831 \family typewriter
3832 \series medium
3833 \shape up
3834 \size normal
3835 \emph off
3836 \bar no
3837 \noun off
3838 \color none
3839 pifont.sty
3840 \end_layout
3841
3842 \end_inset
3843 </cell>
3844 </row>
3845 <row>
3846 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3847 \begin_inset Text
3848
3849 \begin_layout Plain Layout
3850
3851 \family sans
3852 \series medium
3853 \shape up
3854 \size normal
3855 \emph off
3856 \bar no
3857 \noun off
3858 \color none
3859 Ding4
3860 \end_layout
3861
3862 \end_inset
3863 </cell>
3864 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3865 \begin_inset Text
3866
3867 \begin_layout Plain Layout
3868
3869 \family typewriter
3870 \series medium
3871 \shape up
3872 \size normal
3873 \emph off
3874 \bar no
3875 \noun off
3876 \color none
3877 pifont.sty
3878 \end_layout
3879
3880 \end_inset
3881 </cell>
3882 </row>
3883 </lyxtabular>
3884
3885 \end_inset
3886
3887
3888 \end_layout
3889
3890 \begin_layout Standard
3891 LyX doesn't stop you using bullets from packages you don't have.
3892  If you get errors from LaTeX when you try to view or print the file, then
3893  it is likely you are missing a package.
3894 \begin_inset Foot
3895 status collapsed
3896
3897 \begin_layout Plain Layout
3898 LyX doesn't restrict your use since you may be editing locally and exporting
3899  elsewhere.
3900 \end_layout
3901
3902 \end_inset
3903
3904
3905 \end_layout
3906
3907 \begin_layout Subsection
3908 How to use it
3909 \end_layout
3910
3911 \begin_layout Standard
3912 Select which bullet depth you want to change then select the bullet shape
3913  and size.
3914  Any changes will not be visible in LyX, but are visible when viewing the
3915  document.
3916 \end_layout
3917
3918 \begin_layout Standard
3919 You can reset a bullet shape to the default simply by clicking your right
3920  mouse button on the appropriate bullet depth button.
3921 \begin_inset Foot
3922 status collapsed
3923
3924 \begin_layout Plain Layout
3925 If you 
3926 \emph on
3927 really
3928 \emph default
3929  want to have multiple sets of paragraphs with different sets of bullets
3930  in each, then you're going to have to get your hands dirty with TeX code.
3931  The bullet selection dialog can help though because it provides you with
3932  the LaTeX code for a wide range of bullet shapes.
3933  To make your own custom paragraphs you have the following options:
3934 \end_layout
3935
3936 \begin_layout Plain Layout
3937 \begin_inset ERT
3938 status open
3939
3940 \begin_layout Plain Layout
3941
3942
3943 \backslash
3944 let
3945 \backslash
3946 savelabelitemi=
3947 \backslash
3948 labelitemi
3949 \end_layout
3950
3951 \end_inset
3952
3953
3954 \end_layout
3955
3956 \begin_layout Plain Layout
3957 \begin_inset ERT
3958 status open
3959
3960 \begin_layout Plain Layout
3961
3962
3963 \backslash
3964 renewcommand
3965 \backslash
3966 labelitemi[0]{
3967 \backslash
3968 small
3969 \backslash
3970 (
3971 \backslash
3972 sharp
3973 \backslash
3974 )}
3975 \end_layout
3976
3977 \end_inset
3978
3979
3980 \end_layout
3981
3982 \begin_layout Itemize
3983 Use the LaTeX command 
3984 \begin_inset Flex Code
3985 status collapsed
3986
3987 \begin_layout Plain Layout
3988
3989 \backslash
3990 renewcommand{}{}
3991 \end_layout
3992
3993 \end_inset
3994
3995  to specify a new bullet shape for a given depth.
3996  You'll also need to save the current bullet shape so you can restore it
3997  again afterwards.
3998  In this itemized list the following LaTeX code was used to change the bullet
3999  used for the first depth.
4000 \end_layout
4001
4002 \begin_deeper
4003 \begin_layout LyX-Code
4004
4005 \backslash
4006 let
4007 \backslash
4008 savelabelitemi=
4009 \backslash
4010 labelitemi 
4011 \end_layout
4012
4013 \begin_layout LyX-Code
4014
4015 \backslash
4016 renewcommand
4017 \backslash
4018 labelitemi[0]{
4019 \backslash
4020 small
4021 \backslash
4022 (
4023 \backslash
4024 sharp
4025 \backslash
4026 )}
4027 \end_layout
4028
4029 \end_deeper
4030 \begin_layout Itemize
4031 Note that the itemize depth is specified in Roman numerals as part of the
4032  
4033 \family typewriter
4034
4035 \backslash
4036 labelitem
4037 \family default
4038  command.
4039 \end_layout
4040
4041 \begin_layout Itemize
4042 \begin_inset ERT
4043 status open
4044
4045 \begin_layout Plain Layout
4046
4047 [
4048 \backslash
4049 (
4050 \backslash
4051 star
4052 \backslash
4053 )]
4054 \end_layout
4055
4056 \end_inset
4057
4058  Specify each individual entry by starting each item with the bullet shape
4059  enclosed in square brackets and set as 
4060 \begin_inset Flex MenuItem
4061 status collapsed
4062
4063 \begin_layout Plain Layout
4064 TeX Code
4065 \end_layout
4066
4067 \end_inset
4068
4069 .
4070  For example, this item was started with 
4071 \begin_inset Flex Code
4072 status collapsed
4073
4074 \begin_layout Plain Layout
4075 [
4076 \backslash
4077 (
4078 \backslash
4079 star
4080 \backslash
4081 )]
4082 \end_layout
4083
4084 \end_inset
4085
4086 .
4087 \end_layout
4088
4089 \begin_layout Plain Layout
4090 \begin_inset ERT
4091 status open
4092
4093 \begin_layout Plain Layout
4094
4095
4096 \backslash
4097 renewcommand
4098 \backslash
4099 labelitemi[0]{
4100 \backslash
4101 savelabelitemi}
4102 \end_layout
4103
4104 \end_inset
4105
4106
4107 \end_layout
4108
4109 \begin_layout Plain Layout
4110 You'll also need to revert the labelitem back to its previous setting for
4111  the global bullet shape settings to remain in effect.
4112  The way used here was:
4113 \end_layout
4114
4115 \begin_layout LyX-Code
4116
4117 \backslash
4118 renewcommand
4119 \backslash
4120 labelitemi[0]{
4121 \backslash
4122 savelabelitemi}
4123 \end_layout
4124
4125 \end_inset
4126
4127
4128 \end_layout
4129
4130 \begin_layout Chapter
4131 LyX and the World Wide Web
4132 \end_layout
4133
4134 \begin_layout Standard
4135 LyX has long supported the export of documents to various web-friendly formats,
4136  such as HTML.
4137  Before verson 2.0, however, HTML export was always accomplished by the use
4138  of external converters.
4139 \begin_inset Foot
4140 status collapsed
4141
4142 \begin_layout Plain Layout
4143 For details on the use of external converters with LyX, see the 
4144 \emph on
4145 Converters
4146 \emph default
4147  section of the Customization manual.
4148 \end_layout
4149
4150 \end_inset
4151
4152  These fall into two large groups: there are converters that use LaTeX as
4153  an intermediate format, such as 
4154 \begin_inset Flex Code
4155 status collapsed
4156
4157 \begin_layout Plain Layout
4158 htlatex
4159 \end_layout
4160
4161 \end_inset
4162
4163
4164 \begin_inset Flex Code
4165 status collapsed
4166
4167 \begin_layout Plain Layout
4168 html2latex
4169 \end_layout
4170
4171 \end_inset
4172
4173 , and 
4174 \begin_inset Flex Code
4175 status collapsed
4176
4177 \begin_layout Plain Layout
4178 plastex
4179 \end_layout
4180
4181 \end_inset
4182
4183 , relying upon LyX to produce the LaTeX; and there is a converter that works
4184  directly on LyX files, 
4185 \begin_inset Flex Code
4186 status collapsed
4187
4188 \begin_layout Plain Layout
4189 eLyXer
4190 \end_layout
4191
4192 \end_inset
4193
4194 .
4195  All of these have different advantages and disadvantages.
4196  
4197 \end_layout
4198
4199 \begin_layout Standard
4200 The LaTeX-based converters have the advantage that, in principle, they know
4201  everything about the exported document that LaTeX does.
4202  Such converters do not care, for example, if a certain block of code was
4203  produced by LyX or was Evil Red Text.
4204  These converters know about 
4205 \begin_inset Flex Code
4206 status collapsed
4207
4208 \begin_layout Plain Layout
4209 aux
4210 \end_layout
4211
4212 \end_inset
4213
4214  files, counters, and references, and can often make use of the 
4215 \begin_inset Flex Code
4216 status collapsed
4217
4218 \begin_layout Plain Layout
4219 bbl
4220 \end_layout
4221
4222 \end_inset
4223
4224  files generated by BibTeX.
4225  On the other hand, LaTeX is a very hard language to parse---it is sometimes
4226  said that only TeX itself understands TeX---and LaTeX-based converters
4227  will often choke on what seem to be quite simple constructs; complex ones
4228  can throw them completely, and as of this writing, for example, the 
4229 \emph on
4230 Embedded Objects
4231 \emph default
4232  manual will not export with 
4233 \begin_inset Flex Code
4234 status collapsed
4235
4236 \begin_layout Plain Layout
4237 htlatex
4238 \end_layout
4239
4240 \end_inset
4241
4242 , though the others will.
4243  The other issue concerns how math is handled.
4244  These converters typically convert the formulae into little pictures that
4245  are then linked from the HTML document.
4246  Since these are actually generated by LaTeX, they are accurate.
4247  But they do not scale well, and just getting them to look as if they are
4248  actually meant to be in your document---so that the font sizes seem to
4249  be roughly the same---can be a challenge.
4250 \end_layout
4251
4252 \begin_layout Standard
4253 Alex Fernandez's 
4254 \begin_inset Flex Code
4255 status collapsed
4256
4257 \begin_layout Plain Layout
4258 eLyXer
4259 \end_layout
4260
4261 \end_inset
4262
4263  (
4264 \begin_inset CommandInset href
4265 LatexCommand href
4266 name "http://elyxer.nongnu.org/"
4267 target "http://elyxer.nongnu.org/"
4268
4269 \end_inset
4270
4271 ) solves some of these problems.
4272  In particular, the formulae it produces scale perfectly, since it renders
4273  math using a combination of HTML and CSS rather than converting the formulae
4274  to images.
4275  But even moderately complex formula are rendered less well than with 
4276 \begin_inset Flex Code
4277 status collapsed
4278
4279 \begin_layout Plain Layout
4280 htlatex
4281 \end_layout
4282
4283 \end_inset
4284
4285 ; this reflects the limitations of HTML.
4286 \begin_inset Foot
4287 status collapsed
4288
4289 \begin_layout Plain Layout
4290 That said, 
4291 \begin_inset Flex Code
4292 status collapsed
4293
4294 \begin_layout Plain Layout
4295 eLyXer
4296 \end_layout
4297
4298 \end_inset
4299
4300  can also use jsMath and MathJax for equations, but this setting is only
4301  available globally and requires one to have access to a server that runs
4302  the backend.
4303 \end_layout
4304
4305 \end_inset
4306
4307  More importantly (as of version 1.1.1, at least), 
4308 \begin_inset Flex Code
4309 status collapsed
4310
4311 \begin_layout Plain Layout
4312 eLyXer
4313 \end_layout
4314
4315 \end_inset
4316
4317  has limited support for math macros and no support for user-defined paragraph
4318  or character styles.
4319  These limitations make 
4320 \begin_inset Flex Code
4321 status collapsed
4322
4323 \begin_layout Plain Layout
4324 eLyXer
4325 \end_layout
4326
4327 \end_inset
4328
4329  unsuitable for many of the documents LyX users produce.
4330  In principle, of course, these problems could be solved, but the LyX developers
4331  have decided to follow a different path and have made LyX itself capable
4332  of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4333  plaintext.
4334 \end_layout
4335
4336 \begin_layout Standard
4337 As of this writing, XHTML output remains under development and should probably
4338  be regarded as 
4339 \begin_inset Quotes eld
4340 \end_inset
4341
4342 experimental
4343 \begin_inset Quotes erd
4344 \end_inset
4345
4346 .
4347 \begin_inset Foot
4348 status collapsed
4349
4350 \begin_layout Plain Layout
4351 The file 
4352 \begin_inset Flex Code
4353 status collapsed
4354
4355 \begin_layout Plain Layout
4356 development/HTML.notes
4357 \end_layout
4358
4359 \end_inset
4360
4361 , which can be found in the LyX source tree or 
4362 \begin_inset CommandInset href
4363 LatexCommand href
4364 name "accessed online"
4365 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4366
4367 \end_inset
4368
4369 , usually contains up-to-date information about the state of XHTML output.
4370  See also the list of XHTML bugs on 
4371 \begin_inset CommandInset href
4372 LatexCommand href
4373 name "the bug tracker"
4374 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"
4375
4376 \end_inset
4377
4378 .
4379 \end_layout
4380
4381 \end_inset
4382
4383  Still, the developers have chosen this approach because it has several
4384  potential advantages over the other two.
4385 \end_layout
4386
4387 \begin_layout Standard
4388 These advantages are primarily due to the fact that the XHTML output routines,
4389  since they are part of LyX, know everything LyX knows about the document
4390  being exported.
4391 \begin_inset Foot
4392 status collapsed
4393
4394 \begin_layout Plain Layout
4395 Another advantage is that, since these routines are internal to LyX, they
4396  are immune to changes in LyX's file format, or to changes in the semantics
4397  of existing insets.
4398 \end_layout
4399
4400 \end_inset
4401
4402  So they know about the table of contents (as displayed in the outline),
4403  about the counters associated with different paragraph styles, and about
4404  user-defined styles.
4405  The XHTML output routines know what LyX knows about internationalization,
4406  too, so they will output 
4407 \begin_inset Quotes eld
4408 \end_inset
4409
4410 Chapter 1
4411 \begin_inset Quotes erd
4412 \end_inset
4413
4414  or 
4415 \begin_inset Quotes eld
4416 \end_inset
4417
4418
4419 \lang ngerman
4420 Kapitel
4421 \lang english
4422  1
4423 \begin_inset Quotes erd
4424 \end_inset
4425
4426 , depending upon the language in effect at the time.
4427  
4428 \end_layout
4429
4430 \begin_layout Standard
4431 Quite generally, the output routines know what LyX knows about document
4432  layout, that is, about how the document is to be rendered on screen.
4433  We use this information when we output the document as XHTML.
4434  In particular, LyX 
4435 \emph on
4436 automatically
4437 \emph default
4438  generates CSS style information corresponding to the layout information
4439  it uses to render the document on screen: if section headings are supposed
4440  to be sans-serif and bold as seen in LyX, then (by default) they will be
4441  sans-serif and bold when viewed in a web browser, too.
4442  And this is true not just for pre-defined styles, like Section, but for
4443  any style, including user-defined styles.
4444  Indeed, the XHTML output routines make no distinction between user-defined
4445  paragraph and character styles and LyX's own pre-defined styles: in each
4446  case, everything LyX knows about the styles is contained in the layout
4447  files.
4448  And much the same is true as regards pre-defined textual insets, such as
4449  footnotes, and various custom insets.
4450  
4451 \end_layout
4452
4453 \begin_layout Standard
4454 The result is that XHTML output can be customized and extended in exactly
4455  the same way LaTeX output can be customized and extended: through layout
4456  files and modules.
4457  See chapter five of the 
4458 \emph on
4459 Customization 
4460 \emph default
4461 manual for the details.
4462 \end_layout
4463
4464 \begin_layout Standard
4465 The remainder of this chapter contains more detailed information on XHTML
4466  output, its limitations, and ways to work around those limitations.
4467 \end_layout
4468
4469 \begin_layout Section
4470 Math Output in XHTML
4471 \end_layout
4472
4473 \begin_layout Standard
4474 LyX offers four choices for how math is rendered.
4475  These have various advantages and disadvantages:
4476 \end_layout
4477
4478 \begin_layout Itemize
4479 MathML
4480 \begin_inset Newline newline
4481 \end_inset
4482
4483 MathML is a dialect of XML designed specifically for mathematics on the
4484  web, and it typically renders very well in browsers that support it.
4485  The disadvantage is that not all browsers support MathML, and support is
4486  not complete even in the Gecko-based browsers, such as Firefox.
4487 \begin_inset Newline newline
4488 \end_inset
4489
4490 If LyX is unable to render a formula as MathML---for example, if the formula
4491  uses the 
4492 \begin_inset Flex Code
4493 status collapsed
4494
4495 \begin_layout Plain Layout
4496 xymatrix
4497 \end_layout
4498
4499 \end_inset
4500
4501  package or ERT---then it will instead output the formula as an image.
4502  
4503 \end_layout
4504
4505 \begin_layout Itemize
4506 HTML
4507 \begin_inset Newline newline
4508 \end_inset
4509
4510 As mentioned above, 
4511 \begin_inset Flex Code
4512 status collapsed
4513
4514 \begin_layout Plain Layout
4515 elyxer
4516 \end_layout
4517
4518 \end_inset
4519
4520  outputs math as HTML, styled by CSS.
4521 \begin_inset Foot
4522 status collapsed
4523
4524 \begin_layout Plain Layout
4525 LyX has borrowed some of the CSS for its HTML output from 
4526 \begin_inset Flex Code
4527 status collapsed
4528
4529 \begin_layout Plain Layout
4530 elyxer
4531 \end_layout
4532
4533 \end_inset
4534
4535 .
4536 \end_layout
4537
4538 \end_inset
4539
4540  For simple formulae, this can work quite well, though with more complicated
4541  formulae it tends to break down.
4542  Still, this method has the advantage that it is very widely supported and
4543  so it may be appropriate for documents that contain only a little, fairly
4544  simple math.
4545 \begin_inset Newline newline
4546 \end_inset
4547
4548 If Lyx is unable to render a formula as HTML---for example, if the formula
4549  uses the 
4550 \begin_inset Flex Code
4551 status collapsed
4552
4553 \begin_layout Plain Layout
4554 xymatrix
4555 \end_layout
4556
4557 \end_inset
4558
4559  package or ERT---then it will instead output the formula as an image.
4560  
4561 \end_layout
4562
4563 \begin_layout Itemize
4564 Images
4565 \begin_inset Newline newline
4566 \end_inset
4567
4568 Like 
4569 \begin_inset Flex Code
4570 status collapsed
4571
4572 \begin_layout Plain Layout
4573 htlatex
4574 \end_layout
4575
4576 \end_inset
4577
4578 , LyX will output formulae as images, the very same images, in fact, that
4579  are used for instant preview.
4580 \begin_inset Foot
4581 status collapsed
4582
4583 \begin_layout Plain Layout
4584 Instant preview does 
4585 \emph on
4586 not 
4587 \emph default
4588 have to be on for images to be output, however.
4589 \end_layout
4590
4591 \end_inset
4592
4593  The advantage to this method is that the images are simply generated by
4594  LaTeX, so they are very accurate.
4595  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4596  so they do not scale terribly well, and one cannot copy them, etc.
4597  (As of this writing, there are also problems about equation numbering.
4598  See 
4599 \begin_inset CommandInset href
4600 LatexCommand href
4601 name "bug 6894"
4602 target "http://www.lyx.org/trac/ticket/6894"
4603
4604 \end_inset
4605
4606 .)
4607 \begin_inset Newline newline
4608 \end_inset
4609
4610 The size of the images can be controlled by setting the 
4611 \begin_inset Quotes eld
4612 \end_inset
4613
4614 Math Images Scaling
4615 \begin_inset Quotes erd
4616 \end_inset
4617
4618  parameter under 
4619 \begin_inset Flex MenuItem
4620 status collapsed
4621
4622 \begin_layout Plain Layout
4623 Document\SpecialChar \menuseparator
4624 Settings\SpecialChar \menuseparator
4625 Output
4626 \end_layout
4627
4628 \end_inset
4629
4630 .
4631 \begin_inset Foot
4632 status collapsed
4633
4634 \begin_layout Plain Layout
4635 For those who want to know, this controls the resolution of the image in
4636  dots per inch and is based upon a default of 75 dpi.
4637 \end_layout
4638
4639 \end_inset
4640
4641
4642 \begin_inset Newline newline
4643 \end_inset
4644
4645 If LyX for some reason fails to create an image for a formula (e.g., if a
4646  required LaTeX package is not installed), then it will fall back to outputing
4647  the raw LaTeX.
4648 \end_layout
4649
4650 \begin_layout Itemize
4651 LaTeX
4652 \begin_inset Newline newline
4653 \end_inset
4654
4655 Finally, LyX will happily output math as LaTeX.
4656  As well as being the output of last resort, this method can be used with
4657  such tools as 
4658 \begin_inset CommandInset href
4659 LatexCommand href
4660 name "jsMath"
4661 target "http://www.math.union.edu/~dpvc/jsMath/"
4662
4663 \end_inset
4664
4665 , which uses JavaScript to render LaTeX embedded in HTML documents.
4666  LyX wraps the LaTeX in either a 
4667 \begin_inset Flex Code
4668 status collapsed
4669
4670 \begin_layout Plain Layout
4671 span
4672 \end_layout
4673
4674 \end_inset
4675
4676  (for inline formulas) or 
4677 \begin_inset Flex Code
4678 status collapsed
4679
4680 \begin_layout Plain Layout
4681 div
4682 \end_layout
4683
4684 \end_inset
4685
4686  (for displayed formulas) with 
4687 \begin_inset Flex Code
4688 status collapsed
4689
4690 \begin_layout Plain Layout
4691 class='math'
4692 \end_layout
4693
4694 \end_inset
4695
4696 , as is required for jsMath.
4697 \end_layout
4698
4699 \begin_layout Standard
4700 One of these output methods must be selected under 
4701 \begin_inset Flex MenuItem
4702 status collapsed
4703
4704 \begin_layout Plain Layout
4705 Document\SpecialChar \menuseparator
4706 Settings\SpecialChar \menuseparator
4707 Output
4708 \end_layout
4709
4710 \end_inset
4711
4712 .
4713  By default, LyX outputs MathML.
4714  This is a document-wide setting, therefore.
4715 \end_layout
4716
4717 \begin_layout Standard
4718 Eventually, LyX will offer the user the option to select an alternate output
4719  method for a particular inset, say, one that isn't being rendered very
4720  well by MathML.
4721 \begin_inset Foot
4722 status collapsed
4723
4724 \begin_layout Plain Layout
4725 That said, since LyX falls back to images if the inset contains ERT, then
4726  one can force output as an image by putting some harmless ERT into the
4727  math, for example: 
4728 \begin_inset Formula $a=b\relax$
4729 \end_inset
4730
4731 .
4732 \end_layout
4733
4734 \end_inset
4735
4736
4737 \end_layout
4738
4739 \begin_layout Section
4740 Bibliography and Citations
4741 \end_layout
4742
4743 \begin_layout Standard
4744 XHTML output fully supports bibliographies and citations.
4745  
4746 \end_layout
4747
4748 \begin_layout Standard
4749 Citation labels are generated by the same machinery that generates LyX's
4750  on-screen labels, so the labels will look in the output much as they do
4751  in LyX, though better.
4752  If you are using numerical citations, then LyX will output numerical labels,
4753  such as [1] or [17], rather than simply showing the citation key in square
4754  brackets, as it does on-screen.
4755  If you are using author-year citations, then LyX will add lowercase letters
4756  to the years, just as BibTeX does, if it finds more than one citation for
4757  a given author-year combination.
4758  The labels will be printed with the bibliography entries.
4759  Note that there is, at present, no way to customize the appearance of the
4760  labels, for example, to choose between square brackets and parentheses.
4761 \end_layout
4762
4763 \begin_layout Standard
4764 Bibliography output is handled by the same machinery that handles the presentati
4765 on of reference information in the citation dialog, so you will see in the
4766  XHTML output pretty much what you would see if you were to look at a given
4767  entry in the citation dialog.
4768  The formatting can be customized in your layout file or, preferably, in
4769  a module.
4770  See the 
4771 \emph on
4772 Customization
4773 \emph default
4774  manual for the details.
4775 \end_layout
4776
4777 \begin_layout Standard
4778 The main defect at present is that cross-referenced information is printed
4779  with every entry with which it is associated.
4780  So you can see things like this:
4781 \end_layout
4782
4783 \begin_layout Quote
4784 Jason Stanley, 
4785 \begin_inset Quotes eld
4786 \end_inset
4787
4788 Context and Logical Form
4789 \begin_inset Quotes erd
4790 \end_inset
4791
4792 , in 
4793 \emph on
4794 Language in Context: Selected Essays
4795 \emph default
4796  (Oxford: Oxford University Press, 2007), pp.
4797  30--68.
4798 \end_layout
4799
4800 \begin_layout Quote
4801 Jason Stanley, 
4802 \begin_inset Quotes eld
4803 \end_inset
4804
4805 Semantics in Context
4806 \begin_inset Quotes erd
4807 \end_inset
4808
4809 , in 
4810 \emph on
4811 Language in Context: Selected Essays
4812 \emph default
4813  (Oxford: Oxford University Press, 2007), pp.
4814  201--30.
4815 \end_layout
4816
4817 \begin_layout Standard
4818 This should be fixed before long.
4819 \end_layout
4820
4821 \begin_layout Standard
4822 There is no support at present for sectioned bibliographies.
4823  If you have multiple bibliographies, then LyX will print the same bibliography
4824  over and over.
4825 \end_layout
4826
4827 \begin_layout Section
4828 Indexes
4829 \end_layout
4830
4831 \begin_layout Standard
4832 LyX will happily export indexes as XHTML, but with certain limitations at
4833  the moment.
4834 \end_layout
4835
4836 \begin_layout Standard
4837 Index export will be most reliable when you do not attempt to use the fancy
4838  constructs that are described in the section on indexes in the 
4839 \emph on
4840 User's Guide
4841 \emph default
4842 .
4843 \begin_inset Foot
4844 status collapsed
4845
4846 \begin_layout Plain Layout
4847 The main issue here is that LyX itself does not really handle these.
4848  It just lets you enter what you would have to enter in raw LaTeX.
4849 \end_layout
4850
4851 \end_inset
4852
4853  We'll describe how they are handled using the subsection headings from
4854  that section.
4855 \end_layout
4856
4857 \begin_layout Itemize
4858 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4859  these, but the entries must be separated by 
4860 \begin_inset Quotes eld
4861 \end_inset
4862
4863  ! 
4864 \begin_inset Quotes erd
4865 \end_inset
4866
4867 , that is, there must be spaces around the exclamation point.
4868  This is because it is otherwise too difficult to check for escaped exclamation
4869  points, ones in math, and so forth.
4870 \end_layout
4871
4872 \begin_layout Itemize
4873 Page Ranges: There is no support at all for page ranges, since these make
4874  no sense with XHMTL.
4875  Instead, you will just get two index entries, one at either end.
4876 \end_layout
4877
4878 \begin_layout Itemize
4879 Cross-referencing: There is no support for cross-referencing.
4880  If LyX finds an entry containing the 
4881 \begin_inset Quotes eld
4882 \end_inset
4883
4884 |see\SpecialChar \ldots{}
4885
4886 \begin_inset Quotes erd
4887 \end_inset
4888
4889  construct, it is just dropped, and the rest is treated as an ordinary index
4890  entry.
4891 \end_layout
4892
4893 \begin_layout Itemize
4894 Index Entry Order: LyX does support attempts to fix the sorting order.
4895  It will take what is before the first `@' it finds and use that for sorting,
4896  taking what follows the first `@' to be the actual entry.
4897  At present, LyX does not check for escaped `@', so do not try to index
4898  email addresses.
4899 \end_layout
4900
4901 \begin_layout Itemize
4902 Index Entry Layout: You can format entries by using the text style dialog,
4903  or by using any other method available within LyX itself.
4904  There is no support for constructs like: 
4905 \begin_inset Quotes eld
4906 \end_inset
4907
4908 entry|textbf
4909 \begin_inset Quotes erd
4910 \end_inset
4911
4912 .
4913  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4914  and everything that follows it.
4915 \end_layout
4916
4917 \begin_layout Itemize
4918 Multiple Indexes: There is no support for multiple indexes.
4919  Rather, all index entries will be printed as one large index.
4920  To avoid our printing several versions of the index, we print only the
4921  main index, so make sure you have one.
4922 \end_layout
4923
4924 \begin_layout Section
4925 Nomenclature and Glossary
4926 \end_layout
4927
4928 \begin_layout Standard
4929 There is at present no support for glossaries.
4930  Adding it would be fairly trivial, and welcome.
4931 \end_layout
4932
4933 \begin_layout Chapter
4934 The LyX Server
4935 \end_layout
4936
4937 \begin_layout Section
4938 Introduction
4939 \end_layout
4940
4941 \begin_layout Standard
4942 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4943  and retrieve information about the LyX internal state.
4944  This is only intended for advanced users, but they should find it useful.
4945  It is by writing to the LyX server, for example, that bibliography managers,
4946  such as JabRef, are able to 
4947 \begin_inset Quotes eld
4948 \end_inset
4949
4950 push
4951 \begin_inset Quotes erd
4952 \end_inset
4953
4954  citations to LyX.
4955 \end_layout
4956
4957 \begin_layout Section
4958 Starting the LyX Server
4959 \end_layout
4960
4961 \begin_layout Standard
4962 The LyX server works through the use of a pair of named pipes.
4963  These are usually located in 
4964 \begin_inset Flex Code
4965 status collapsed
4966
4967 \begin_layout Plain Layout
4968 UserDir
4969 \end_layout
4970
4971 \end_inset
4972
4973 , (except on Windows, where 
4974 \emph on
4975 local
4976 \emph default
4977  named pipes are special objects located in 
4978 \begin_inset Flex Code
4979 status collapsed
4980
4981 \begin_layout Plain Layout
4982
4983 \backslash
4984
4985 \backslash
4986 .
4987 \backslash
4988 pipe
4989 \end_layout
4990
4991 \end_inset
4992
4993 ) and have the names 
4994 \begin_inset Quotes eld
4995 \end_inset
4996
4997
4998 \begin_inset Flex Code
4999 status collapsed
5000
5001 \begin_layout Plain Layout
5002 lyxpipe.in
5003 \end_layout
5004
5005 \end_inset
5006
5007
5008 \begin_inset Quotes erd
5009 \end_inset
5010
5011  and 
5012 \begin_inset Quotes eld
5013 \end_inset
5014
5015
5016 \begin_inset Flex Code
5017 status collapsed
5018
5019 \begin_layout Plain Layout
5020 lyxpipe.out
5021 \end_layout
5022
5023 \end_inset
5024
5025
5026 \begin_inset Quotes erd
5027 \end_inset
5028
5029 .
5030  External programs write into 
5031 \begin_inset Flex Code
5032 status collapsed
5033
5034 \begin_layout Plain Layout
5035 lyxpipe.in
5036 \end_layout
5037
5038 \end_inset
5039
5040  and read back data from 
5041 \begin_inset Flex Code
5042 status collapsed
5043
5044 \begin_layout Plain Layout
5045 lyxpipe.out
5046 \end_layout
5047
5048 \end_inset
5049
5050 .
5051  The stem of the pipe names can be defined in the 
5052 \begin_inset Flex MenuItem
5053 status collapsed
5054
5055 \begin_layout Plain Layout
5056 Tools\SpecialChar \menuseparator
5057 Preferences
5058 \end_layout
5059
5060 \end_inset
5061
5062  dialog, for example 
5063 \begin_inset Flex Code
5064 status collapsed
5065
5066 \begin_layout Plain Layout
5067 "/home/myhome/lyxpipe"
5068 \end_layout
5069
5070 \end_inset
5071
5072 , or 
5073 \begin_inset Flex Code
5074 status collapsed
5075
5076 \begin_layout Plain Layout
5077 "
5078 \backslash
5079
5080 \backslash
5081 .
5082 \backslash
5083 pipe
5084 \backslash
5085 lyxpipe"
5086 \end_layout
5087
5088 \end_inset
5089
5090  on Windows (but any working path can be used).
5091  You 
5092 \emph on
5093 must
5094 \emph default
5095  configure this manually in order for the server to start.
5096 \end_layout
5097
5098 \begin_layout Standard
5099 LyX will add the '
5100 \begin_inset Flex Code
5101 status collapsed
5102
5103 \begin_layout Plain Layout
5104 .in
5105 \end_layout
5106
5107 \end_inset
5108
5109 ' and '
5110 \begin_inset Flex Code
5111 status collapsed
5112
5113 \begin_layout Plain Layout
5114 .out
5115 \end_layout
5116
5117 \end_inset
5118
5119 ' to create the pipes.
5120  If one of the pipes already exists, LyX will assume that another LyX process
5121  is already running and will not start the server.
5122  On POSIX (Unix like) systems, if for some other reason, an unused 
5123 \begin_inset Quotes eld
5124 \end_inset
5125
5126 stale
5127 \begin_inset Quotes erd
5128 \end_inset
5129
5130  pipe is left in existence when LyX closes, then LyX will try to delete
5131  it.
5132  If this fails for some reason, you will need to delete the pipes manually
5133  and then restart LyX.
5134  On Windows, pipes are deleted by the OS on program termination or crash,
5135  so 
5136 \begin_inset Quotes eld
5137 \end_inset
5138
5139 stale
5140 \begin_inset Quotes erd
5141 \end_inset
5142
5143  pipes should not be possible.
5144 \end_layout
5145
5146 \begin_layout Standard
5147 To have several LyX processes with servers at the same time, you have to
5148  use different configurations, perhaps by using separate user directories,
5149  each with its own 
5150 \begin_inset Flex Code
5151 status collapsed
5152
5153 \begin_layout Plain Layout
5154 preferences
5155 \end_layout
5156
5157 \end_inset
5158
5159  file, for each process.
5160 \end_layout
5161
5162 \begin_layout Standard
5163 If you are developing a client program, you might find it useful to enable
5164  debugging information from the LyX server.
5165  Do this by starting LyX as 
5166 \begin_inset Flex Code
5167 status collapsed
5168
5169 \begin_layout Plain Layout
5170 lyx -dbg lyxserver
5171 \end_layout
5172
5173 \end_inset
5174
5175 .
5176 \end_layout
5177
5178 \begin_layout Standard
5179 You can find a complete example client written in C in the source distribution
5180  as 
5181 \begin_inset Flex Code
5182 status collapsed
5183
5184 \begin_layout Plain Layout
5185 development/lyxserver/server_monitor.c
5186 \end_layout
5187
5188 \end_inset
5189
5190 .
5191 \end_layout
5192
5193 \begin_layout Standard
5194 Another useful tool is command-line based client you will find in 
5195 \begin_inset Flex Code
5196 status collapsed
5197
5198 \begin_layout Plain Layout
5199 src/client/lyxclient
5200 \end_layout
5201
5202 \end_inset
5203
5204 .
5205 \end_layout
5206
5207 \begin_layout Section
5208 Normal communication
5209 \end_layout
5210
5211 \begin_layout Standard
5212 To issue a LyX call, the client writes a line of ASCII text into the input
5213  pipe.
5214  This line has the following format:
5215 \end_layout
5216
5217 \begin_layout Quote
5218 LYXCMD:
5219 \emph on
5220 clientname
5221 \emph default
5222 :
5223 \emph on
5224 function
5225 \emph default
5226 :
5227 \emph on
5228 argument
5229 \end_layout
5230
5231 \begin_layout Description
5232 clientname is a name that the client can choose arbitrarily.
5233  Its only use is that LyX will echo it if it sends an answer—so a client
5234  can dispatch results from different requesters.
5235 \end_layout
5236
5237 \begin_layout Description
5238 function is the function you want LyX to perform.
5239  It is the same as the commands you'd use in the minibuffer.
5240 \end_layout
5241
5242 \begin_layout Description
5243 argument is an optional argument which is meaningful only to some functions
5244  (for instance, the 
5245 \begin_inset Quotes eld
5246 \end_inset
5247
5248 self-insert
5249 \begin_inset Quotes erd
5250 \end_inset
5251
5252  LFUN will insert the argument as text at the cursor position).
5253 \end_layout
5254
5255 \begin_layout Standard
5256 The answer from LyX will arrive in the output pipe and be of the form
5257 \end_layout
5258
5259 \begin_layout Quote
5260 INFO:
5261 \emph on
5262 clientname
5263 \emph default
5264 :
5265 \emph on
5266 function
5267 \emph default
5268 :
5269 \emph on
5270 data
5271 \end_layout
5272
5273 \begin_layout Standard
5274 where 
5275 \emph on
5276 clientname
5277 \emph default
5278  and 
5279 \emph on
5280 function
5281 \emph default
5282  are just echoed from the command request, while 
5283 \emph on
5284 data
5285 \emph default
5286  is more or less useful information filled according to how the command
5287  execution worked out.
5288  Some commands, such as 
5289 \begin_inset Quotes eld
5290 \end_inset
5291
5292 font-state
5293 \begin_inset Quotes erd
5294 \end_inset
5295
5296 , will return information about the internal state of LyX, while other will
5297  return an empty data-response.
5298  This means that the command execution went fine.
5299 \end_layout
5300
5301 \begin_layout Standard
5302 In case of errors, the response from LyX will have this form
5303 \end_layout
5304
5305 \begin_layout Quote
5306 ERROR:
5307 \emph on
5308 clientname
5309 \emph default
5310 :
5311 \emph on
5312 function
5313 \emph default
5314 :
5315 \emph on
5316 error message
5317 \end_layout
5318
5319 \begin_layout Standard
5320 where the 
5321 \emph on
5322 error message
5323 \emph default
5324  should contain an explanation of why the command failed.
5325 \end_layout
5326
5327 \begin_layout Standard
5328 Examples:
5329 \end_layout
5330
5331 \begin_layout LyX-Code
5332 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5333 \begin_inset Newline newline
5334 \end_inset
5335
5336 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5337 \begin_inset Newline newline
5338 \end_inset
5339
5340 read a <~/.lyxpipe.out
5341 \begin_inset Newline newline
5342 \end_inset
5343
5344 echo $a
5345 \end_layout
5346
5347 \begin_layout Section
5348 Notification
5349 \end_layout
5350
5351 \begin_layout Standard
5352 LyX can notify clients of events going on asynchronously.
5353  Currently it will only do this if the user binds a key sequence with the
5354  function 
5355 \begin_inset Quotes eld
5356 \end_inset
5357
5358 notify
5359 \begin_inset Quotes erd
5360 \end_inset
5361
5362 .
5363  The format of the string LyX sends is as follows:
5364 \end_layout
5365
5366 \begin_layout Quote
5367 \begin_inset Flex Code
5368 status collapsed
5369
5370 \begin_layout Plain Layout
5371 NOTIFY:
5372 \end_layout
5373
5374 \end_inset
5375
5376
5377 \emph on
5378 key-sequence
5379 \end_layout
5380
5381 \begin_layout Standard
5382 where 
5383 \emph on
5384 key-sequence
5385 \emph default
5386  is the printed representation of the key sequence that was actually typed
5387  by the user.
5388 \end_layout
5389
5390 \begin_layout Standard
5391 This mechanism can be used to extend LyX's command set and implement macros.
5392  Bind some key sequence to 
5393 \begin_inset Quotes eld
5394 \end_inset
5395
5396 notify
5397 \begin_inset Quotes erd
5398 \end_inset
5399
5400 .
5401  Then start a client that listens on the output pipe, dispatches the command
5402  according to the sequence, and starts a function that may use LyX calls
5403  and LyX requests to issue a command or a series of commands to LyX.
5404 \end_layout
5405
5406 \begin_layout Section
5407 The simple LyX Server Protocol
5408 \end_layout
5409
5410 \begin_layout Standard
5411 LyX implements a simple protocol that can be used for session management.
5412  All messages are of the form
5413 \end_layout
5414
5415 \begin_layout Quote
5416 LYXSRV:
5417 \emph on
5418 clientname
5419 \emph default
5420 :
5421 \emph on
5422 protocol message
5423 \end_layout
5424
5425 \begin_layout Standard
5426 where 
5427 \emph on
5428 protocol message
5429 \emph default
5430  can be 
5431 \begin_inset Quotes eld
5432 \end_inset
5433
5434 hello
5435 \begin_inset Quotes erd
5436 \end_inset
5437
5438  or 
5439 \begin_inset Quotes eld
5440 \end_inset
5441
5442 bye
5443 \begin_inset Quotes erd
5444 \end_inset
5445
5446 .
5447  If 
5448 \begin_inset Quotes eld
5449 \end_inset
5450
5451 hello
5452 \begin_inset Quotes erd
5453 \end_inset
5454
5455  is received from a client, LyX will report back to inform the client that
5456  it's listening to it's messages, while 
5457 \begin_inset Quotes eld
5458 \end_inset
5459
5460 bye
5461 \begin_inset Quotes erd
5462 \end_inset
5463
5464  sent from LyX will inform clients that LyX is closing.
5465 \end_layout
5466
5467 \begin_layout Section
5468 Reverse DVI/PDF search
5469 \end_layout
5470
5471 \begin_layout Standard
5472 Some DVI/PDF viewers
5473 \begin_inset Foot
5474 status collapsed
5475
5476 \begin_layout Plain Layout
5477 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5478  Skim on Mac OSX and SumatraPDF on Windows.
5479 \end_layout
5480
5481 \end_inset
5482
5483  provide 
5484 \emph on
5485 reverse search
5486 \emph default
5487  facility (also called 
5488 \emph on
5489 inverse search
5490 \emph default
5491 ).
5492  This means that you can tell LyX to put the cursor to a specific line in
5493  the document by clicking at the respective position in the DVI/PDF output.
5494  To achieve this, the viewer must be able to communicate with LyX.
5495  This is done via the LyX server either by using the named pipe (
5496 \emph on
5497 lyxpipe
5498 \emph default
5499 ), or the UNIX domain socket (
5500 \emph on
5501 lyxsocket
5502 \emph default
5503 ) that LyX creates in its temporary directory (this is the way the 
5504 \begin_inset Flex Code
5505 status collapsed
5506
5507 \begin_layout Plain Layout
5508 lyxclient
5509 \end_layout
5510
5511 \end_inset
5512
5513  program communicates with LyX).
5514  In some cases, you need a helper script that mediates between the viewer
5515  and LyX, in others, the viewer can communicate with LyX directly.
5516  This depends on the selected viewer and on your operating system.
5517  The same applies to the way viewers need to be configured and the way the
5518  reverse search is actually performed.
5519  In what follows, we will thus describe how to setup reverse search for
5520  specific viewers.
5521  Before we turn to this, though, we will explain what needs to be done generally
5522  to enable reverse search in the DVI/PDF output.
5523 \end_layout
5524
5525 \begin_layout Subsection
5526 \begin_inset CommandInset label
5527 LatexCommand label
5528 name "sub:rev-search"
5529
5530 \end_inset
5531
5532 Automatical enabling
5533 \end_layout
5534
5535 \begin_layout Standard
5536 In most cases LyX will do the work for you by enabling 
5537 \begin_inset Flex MenuItem
5538 status collapsed
5539
5540 \begin_layout Plain Layout
5541 Document\SpecialChar \menuseparator
5542 Output\SpecialChar \menuseparator
5543 Output Sync
5544 \end_layout
5545
5546 \end_inset
5547
5548 .
5549  In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5550  srcltx package (for DVI) respectively.
5551  This option can be easily reached also on 
5552 \begin_inset Flex Code
5553 status collapsed
5554
5555 \begin_layout Plain Layout
5556 View/update
5557 \end_layout
5558
5559 \end_inset
5560
5561  Toolbar.
5562 \end_layout
5563
5564 \begin_layout Standard
5565 Plase note that including 
5566 \begin_inset Flex Code
5567 status collapsed
5568
5569 \begin_layout Plain Layout
5570 srcltx
5571 \end_layout
5572
5573 \end_inset
5574
5575  package or 
5576 \begin_inset Flex Code
5577 status collapsed
5578
5579 \begin_layout Plain Layout
5580 src-specials
5581 \end_layout
5582
5583 \end_inset
5584
5585  sometimes have an impact on the typeset and you should switch them off
5586  for the final typesets.
5587 \end_layout
5588
5589 \begin_layout Standard
5590 You can also define custom macro in preferences and in case you need some
5591  special tweaks read the next section about manual enabling.
5592  
5593 \end_layout
5594
5595 \begin_layout Subsection
5596 Manual enabling
5597 \end_layout
5598
5599 \begin_layout Standard
5600 LaTeX provides several different methods for reverse search.
5601  Some are built-in in the 
5602 \begin_inset Flex Code
5603 status collapsed
5604
5605 \begin_layout Plain Layout
5606 latex/pdflatex
5607 \end_layout
5608
5609 \end_inset
5610
5611  program, some are provided by external packages.
5612  Your choice depends on whether your LaTeX distribution already provides
5613  a given method (the built-in methods are rather new) and whether your viewer
5614  can cope with it.
5615  The available methods are described in the following.
5616 \end_layout
5617
5618 \begin_layout Subsubsection*
5619 Built-in DVI-search via src-specials (DVI only) 
5620 \end_layout
5621
5622 \begin_layout Standard
5623 This method provides the DVI file with the necessary information for reverse
5624  search.
5625  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5626  distribution should include it), and it works reliably.
5627  To enable it, change the 
5628 \begin_inset Flex MenuItem
5629 status collapsed
5630
5631 \begin_layout Plain Layout
5632 LaT
5633 \begin_inset ERT
5634 status collapsed
5635
5636 \begin_layout Plain Layout
5637
5638 {}
5639 \end_layout
5640
5641 \end_inset
5642
5643 eX (plain)->DVI
5644 \end_layout
5645
5646 \end_inset
5647
5648  or 
5649 \begin_inset Flex MenuItem
5650 status collapsed
5651
5652 \begin_layout Plain Layout
5653 LaT
5654 \begin_inset ERT
5655 status collapsed
5656
5657 \begin_layout Plain Layout
5658
5659 {}
5660 \end_layout
5661
5662 \end_inset
5663
5664 eX (plain)->DraftDVI
5665 \end_layout
5666
5667 \end_inset
5668
5669  converter in 
5670 \begin_inset Flex MenuItem
5671 status collapsed
5672
5673 \begin_layout Plain Layout
5674 Preferences\SpecialChar \menuseparator
5675 File Handling\SpecialChar \menuseparator
5676 Converters
5677 \end_layout
5678
5679 \end_inset
5680
5681  to 
5682 \begin_inset Flex Code
5683 status collapsed
5684
5685 \begin_layout Plain Layout
5686 latex -src-specials $$i
5687 \end_layout
5688
5689 \end_inset
5690
5691 .
5692  If this doesn't work, check if your TeX engine needs different options
5693  (the syntax might differ in some distributions).
5694 \end_layout
5695
5696 \begin_layout Subsubsection*
5697 External Packages (PDFSync and scrltx) 
5698 \end_layout
5699
5700 \begin_layout Standard
5701 The packages 
5702 \emph on
5703 pdfsync
5704 \emph default
5705  and 
5706 \emph on
5707 scrltx
5708 \emph default
5709  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5710  respectively.
5711  In order to enable it, load the packages in the LyX preamble: 
5712 \end_layout
5713
5714 \begin_layout Itemize
5715 \begin_inset Flex Code
5716 status collapsed
5717
5718 \begin_layout Plain Layout
5719
5720 \backslash
5721 usepackage{pdfsync}
5722 \end_layout
5723
5724 \end_inset
5725
5726  for reverse PDF search,
5727 \end_layout
5728
5729 \begin_layout Itemize
5730  
5731 \begin_inset Flex Code
5732 status collapsed
5733
5734 \begin_layout Plain Layout
5735
5736 \backslash
5737 usepackage[active]{srcltx}
5738 \end_layout
5739
5740 \end_inset
5741
5742  for reverse DVI search.
5743 \end_layout
5744
5745 \begin_layout Standard
5746 If you want to be able to perform both DVI and PDF reverse searches, you
5747  can also insert in the preamble the following lines
5748 \end_layout
5749
5750 \begin_layout LyX-Code
5751
5752 \backslash
5753 usepackage{ifpdf}
5754 \begin_inset Newline newline
5755 \end_inset
5756
5757
5758 \backslash
5759 ifpdf
5760 \begin_inset Newline newline
5761 \end_inset
5762
5763   
5764 \backslash
5765 usepackage{pdfsync}
5766 \begin_inset Newline newline
5767 \end_inset
5768
5769
5770 \backslash
5771 else
5772 \begin_inset Newline newline
5773 \end_inset
5774
5775   
5776 \backslash
5777 usepackage[active]{srcltx}
5778 \begin_inset Newline newline
5779 \end_inset
5780
5781
5782 \backslash
5783 fi
5784 \end_layout
5785
5786 \begin_layout Standard
5787 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5788  right package will be used.
5789 \end_layout
5790
5791 \begin_layout Standard
5792 Note that PDFSync might affect the output layout of your document.
5793  It is therefore advised to disable PDFsync for final documents.
5794 \end_layout
5795
5796 \begin_layout Subsubsection*
5797 Built-in reverse search via SyncTeX (DVI and PDF) 
5798 \end_layout
5799
5800 \begin_layout Standard
5801 Recent versions of 
5802 \begin_inset Flex Code
5803 status collapsed
5804
5805 \begin_layout Plain Layout
5806 (pdf)latex
5807 \end_layout
5808
5809 \end_inset
5810
5811  have built-in support for both PDF and DVI reverse search.
5812  This so-called 
5813 \emph on
5814 SyncTeX
5815 \emph default
5816  facility is basically the result of the integration of the PDFSync package
5817  to the pdftex program and its merge with the 
5818 \emph on
5819 scr-specials
5820 \emph default
5821  approach.
5822  You need at least TeXLive 2008 or a recent MikTeX distribution in order
5823  to use it.
5824  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5825  already provide SyncTeX support.
5826 \end_layout
5827
5828 \begin_layout Standard
5829 To enable SyncTeX for DVI output, change the 
5830 \begin_inset Flex MenuItem
5831 status collapsed
5832
5833 \begin_layout Plain Layout
5834 LaT
5835 \begin_inset ERT
5836 status collapsed
5837
5838 \begin_layout Plain Layout
5839
5840 {}
5841 \end_layout
5842
5843 \end_inset
5844
5845 eX (plain) -> DVI
5846 \end_layout
5847
5848 \end_inset
5849
5850  or 
5851 \begin_inset Flex MenuItem
5852 status collapsed
5853
5854 \begin_layout Plain Layout
5855 LaT
5856 \begin_inset ERT
5857 status collapsed
5858
5859 \begin_layout Plain Layout
5860
5861 {}
5862 \end_layout
5863
5864 \end_inset
5865
5866 eX (plain) -> DraftDVI
5867 \end_layout
5868
5869 \end_inset
5870
5871  converter in 
5872 \begin_inset Flex MenuItem
5873 status collapsed
5874
5875 \begin_layout Plain Layout
5876 Preferences\SpecialChar \menuseparator
5877 File Handling\SpecialChar \menuseparator
5878 Converters
5879 \end_layout
5880
5881 \end_inset
5882
5883  to 
5884 \begin_inset Flex Code
5885 status collapsed
5886
5887 \begin_layout Plain Layout
5888 latex -synctex=1 $$i
5889 \end_layout
5890
5891 \end_inset
5892
5893 , and for PDF output, change the 
5894 \begin_inset Flex MenuItem
5895 status collapsed
5896
5897 \begin_layout Plain Layout
5898 LaT
5899 \begin_inset ERT
5900 status collapsed
5901
5902 \begin_layout Plain Layout
5903
5904 {}
5905 \end_layout
5906
5907 \end_inset
5908
5909 eX (pdflatex) -> PDF (pdflatex)
5910 \end_layout
5911
5912 \end_inset
5913
5914  or converter to 
5915 \begin_inset Flex Code
5916 status collapsed
5917
5918 \begin_layout Plain Layout
5919 pdflatex -synctex=1 $$i
5920 \end_layout
5921
5922 \end_inset
5923
5924 .
5925  Check the documentation of your viewer whether the viewer needs to be configure
5926 d for the use with SyncTeX.
5927 \begin_inset Foot
5928 status collapsed
5929
5930 \begin_layout Plain Layout
5931 The 
5932 \begin_inset Flex Code
5933 status collapsed
5934
5935 \begin_layout Plain Layout
5936 -synctex=1
5937 \end_layout
5938
5939 \end_inset
5940
5941  option enables gzip compression.
5942  If your viewer does not support it, you should instead use 
5943 \begin_inset Flex Code
5944 status collapsed
5945
5946 \begin_layout Plain Layout
5947 -synctex=-1
5948 \end_layout
5949
5950 \end_inset
5951
5952 .
5953 \end_layout
5954
5955 \end_inset
5956
5957
5958 \end_layout
5959
5960 \begin_layout Subsection
5961 Configuring and using specific viewers
5962 \end_layout
5963
5964 \begin_layout Subsubsection*
5965 Xdvi (all platforms)
5966 \end_layout
5967
5968 \begin_layout Standard
5969 If you use 
5970 \begin_inset Flex Code
5971 status collapsed
5972
5973 \begin_layout Plain Layout
5974 xdvi
5975 \end_layout
5976
5977 \end_inset
5978
5979 , you don't need to do anything else for performing a reverse DVI search,
5980  as LyX already provides the necessary hooks for automatically using the
5981  
5982 \begin_inset Flex Code
5983 status collapsed
5984
5985 \begin_layout Plain Layout
5986 lyxclient
5987 \end_layout
5988
5989 \end_inset
5990
5991  program.
5992  Just setup your document as described above (reverse search is triggered
5993  by Ctrl-click or Alt-click on Mac OSX, respectively).
5994 \end_layout
5995
5996 \begin_layout Standard
5997 However, if for whatever reason you want to use the named pipe instead of
5998  the socket for communicating with LyX, simply change the DVI viewer in
5999  
6000 \begin_inset Flex MenuItem
6001 status collapsed
6002
6003 \begin_layout Plain Layout
6004 Preferences\SpecialChar \menuseparator
6005 File Handling\SpecialChar \menuseparator
6006 File formats
6007 \end_layout
6008
6009 \end_inset
6010
6011  to
6012 \begin_inset Foot
6013 status collapsed
6014
6015 \begin_layout Plain Layout
6016 On Mac OSX you have to use 
6017 \begin_inset Flex Code
6018 status collapsed
6019
6020 \begin_layout Plain Layout
6021 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6022 \end_layout
6023
6024 \end_inset
6025
6026
6027 \end_layout
6028
6029 \end_inset
6030
6031  
6032 \begin_inset Flex Code
6033 status collapsed
6034
6035 \begin_layout Plain Layout
6036 xdvi -editor 'lyxeditor.sh %f %l'
6037 \end_layout
6038
6039 \end_inset
6040
6041 , where 
6042 \begin_inset Flex Code
6043 status collapsed
6044
6045 \begin_layout Plain Layout
6046 lyxeditor.sh
6047 \end_layout
6048
6049 \end_inset
6050
6051  is a suitable script.
6052  For example, a minimal shell script is the following one:
6053 \end_layout
6054
6055 \begin_layout LyX-Code
6056 #!/bin/sh
6057 \begin_inset Newline newline
6058 \end_inset
6059
6060 LYXPIPE="/path/to/lyxpipe"
6061 \begin_inset Newline newline
6062 \end_inset
6063
6064 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6065 \begin_inset Newline newline
6066 \end_inset
6067
6068 echo "$COMMAND" > "${LYXPIPE}".in || exit
6069 \begin_inset Newline newline
6070 \end_inset
6071
6072 read < "${LYXPIPE}".out || exit
6073 \end_layout
6074
6075 \begin_layout Standard
6076 where 
6077 \begin_inset Flex Code
6078 status collapsed
6079
6080 \begin_layout Plain Layout
6081 /path/to/lyxpipe
6082 \end_layout
6083
6084 \end_inset
6085
6086  is the Ly
6087 \begin_inset ERT
6088 status collapsed
6089
6090 \begin_layout Plain Layout
6091
6092 {}
6093 \end_layout
6094
6095 \end_inset
6096
6097 XServer pipe path specified in 
6098 \begin_inset Flex MenuItem
6099 status collapsed
6100
6101 \begin_layout Plain Layout
6102 Preferences\SpecialChar \menuseparator
6103 Paths
6104 \end_layout
6105
6106 \end_inset
6107
6108 .
6109 \begin_inset Foot
6110 status collapsed
6111
6112 \begin_layout Plain Layout
6113 In the 
6114 \begin_inset Flex Code
6115 status collapsed
6116
6117 \begin_layout Plain Layout
6118 development/tools
6119 \end_layout
6120
6121 \end_inset
6122
6123  folder of a source distribution you can find a 
6124 \begin_inset Flex Code
6125 status collapsed
6126
6127 \begin_layout Plain Layout
6128 lyxeditor
6129 \end_layout
6130
6131 \end_inset
6132
6133  script which is able to locate the 
6134 \emph on
6135 lyxpipe
6136 \emph default
6137  based on your preferences.
6138 \end_layout
6139
6140 \end_inset
6141
6142
6143 \end_layout
6144
6145 \begin_layout Subsubsection*
6146 MacDviX (Mac OSX)
6147 \end_layout
6148
6149 \begin_layout Standard
6150 At the end of 
6151 \begin_inset Flex Code
6152 status collapsed
6153
6154 \begin_layout Plain Layout
6155 /Applications/MacDviX_Folder/calleditor.script
6156 \end_layout
6157
6158 \end_inset
6159
6160 , add the following lines:
6161 \end_layout
6162
6163 \begin_layout LyX-Code
6164 /Applications/Ly
6165 \begin_inset ERT
6166 status collapsed
6167
6168 \begin_layout Plain Layout
6169
6170 {}
6171 \end_layout
6172
6173 \end_inset
6174
6175 X.app/Contents/MacOS/lyxeditor "$2" $1
6176 \begin_inset Newline newline
6177 \end_inset
6178
6179 exit 1
6180 \end_layout
6181
6182 \begin_layout Standard
6183 Modify the lines accordingly if you install LyX somewhere else than in the
6184  Applications folder.
6185 \end_layout
6186
6187 \begin_layout Standard
6188 Reverse search is triggered by Alt-click (OPTION-click).
6189 \end_layout
6190
6191 \begin_layout Subsubsection*
6192 Skim (Mac OSX)
6193 \end_layout
6194
6195 \begin_layout Standard
6196 Enter 
6197 \begin_inset Flex Code
6198 status collapsed
6199
6200 \begin_layout Plain Layout
6201 open -a Skim.app $$i
6202 \end_layout
6203
6204 \end_inset
6205
6206  to the viewer setting in 
6207 \begin_inset Flex MenuItem
6208 status collapsed
6209
6210 \begin_layout Plain Layout
6211 Preferences\SpecialChar \menuseparator
6212 File Handling\SpecialChar \menuseparator
6213 File formats\SpecialChar \menuseparator
6214 PDF (pdflatex)
6215 \end_layout
6216
6217 \end_inset
6218
6219 , and then in 
6220 \begin_inset Flex MenuItem
6221 status collapsed
6222
6223 \begin_layout Plain Layout
6224 Skim\SpecialChar \menuseparator
6225 Preferences\SpecialChar \menuseparator
6226 Sync
6227 \end_layout
6228
6229 \end_inset
6230
6231  select Ly
6232 \begin_inset ERT
6233 status collapsed
6234
6235 \begin_layout Plain Layout
6236
6237 {}
6238 \end_layout
6239
6240 \end_inset
6241
6242 X.
6243 \end_layout
6244
6245 \begin_layout Standard
6246 Reverse search is triggered by COMMAND-SHIFT-click
6247 \end_layout
6248
6249 \begin_layout Subsubsection*
6250 Okular (KDE)
6251 \end_layout
6252
6253 \begin_layout Standard
6254 Go to 
6255 \begin_inset Flex MenuItem
6256 status collapsed
6257
6258 \begin_layout Plain Layout
6259 Settings\SpecialChar \menuseparator
6260 Configure Okular\SpecialChar \ldots{}
6261 \SpecialChar \menuseparator
6262 Editor
6263 \end_layout
6264
6265 \end_inset
6266
6267 , select 
6268 \begin_inset Quotes eld
6269 \end_inset
6270
6271 Custom Text Editor
6272 \begin_inset Quotes erd
6273 \end_inset
6274
6275  and add the command 
6276 \begin_inset Flex Code
6277 status collapsed
6278
6279 \begin_layout Plain Layout
6280 lyxclient -g %f %l
6281 \end_layout
6282
6283 \end_inset
6284
6285 .
6286 \end_layout
6287
6288 \begin_layout Standard
6289 Reverse search is triggered by SHIFT-click.
6290 \end_layout
6291
6292 \begin_layout Subsubsection*
6293 YAP (Windows)
6294 \end_layout
6295
6296 \begin_layout Standard
6297 Launch yap, choose its 
6298 \begin_inset Flex MenuItem
6299 status collapsed
6300
6301 \begin_layout Plain Layout
6302 View\SpecialChar \menuseparator
6303 Options
6304 \end_layout
6305
6306 \end_inset
6307
6308  menu and select the 
6309 \begin_inset Quotes eld
6310 \end_inset
6311
6312 Inverse DVI Search
6313 \begin_inset Quotes erd
6314 \end_inset
6315
6316  tab.
6317  Click on the 
6318 \begin_inset Quotes eld
6319 \end_inset
6320
6321 New\SpecialChar \ldots{}
6322
6323 \begin_inset Quotes erd
6324 \end_inset
6325
6326  button and, in the window that opens, enter 
6327 \begin_inset Quotes eld
6328 \end_inset
6329
6330 LyX Editor
6331 \begin_inset Quotes erd
6332 \end_inset
6333
6334  (or any other name you like) in the 
6335 \begin_inset Quotes eld
6336 \end_inset
6337
6338 Name:
6339 \begin_inset Quotes erd
6340 \end_inset
6341
6342  field.
6343  Now click on the button labeled 
6344 \begin_inset Quotes eld
6345 \end_inset
6346
6347 \SpecialChar \ldots{}
6348
6349 \begin_inset Quotes erd
6350 \end_inset
6351
6352  to open a file dialog and navigate to the directory containing the batch
6353  file 
6354 \begin_inset Flex Code
6355 status collapsed
6356
6357 \begin_layout Plain Layout
6358 lyxeditor.bat
6359 \end_layout
6360
6361 \end_inset
6362
6363  (see below).
6364  Select 
6365 \begin_inset Flex Code
6366 status collapsed
6367
6368 \begin_layout Plain Layout
6369 lyxeditor.bat
6370 \end_layout
6371
6372 \end_inset
6373
6374  and then specify the program arguments as 
6375 \begin_inset Flex Code
6376 status collapsed
6377
6378 \begin_layout Plain Layout
6379 %f %l
6380 \end_layout
6381
6382 \end_inset
6383
6384 .
6385  The 
6386 \begin_inset Flex Code
6387 status collapsed
6388
6389 \begin_layout Plain Layout
6390 lyxeditor.bat
6391 \end_layout
6392
6393 \end_inset
6394
6395  wrapper is used for communicating with LyX through the 
6396 \emph on
6397 lyxpipe
6398 \emph default
6399  and is as follows:
6400 \end_layout
6401
6402 \begin_layout LyX-Code
6403 @echo off
6404 \begin_inset Newline newline
6405 \end_inset
6406
6407 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6408 \backslash
6409
6410 \backslash
6411 .
6412 \backslash
6413 pipe
6414 \backslash
6415 lyxpipe.in
6416 \begin_inset Newline newline
6417 \end_inset
6418
6419 type 
6420 \backslash
6421
6422 \backslash
6423 .
6424 \backslash
6425 pipe
6426 \backslash
6427 lyxpipe.out
6428 \end_layout
6429
6430 \begin_layout Standard
6431 Make sure that the LyXServer pipe path you specified in LyX is 
6432 \begin_inset Flex Code
6433 status collapsed
6434
6435 \begin_layout Plain Layout
6436
6437 \backslash
6438
6439 \backslash
6440 .
6441 \backslash
6442 pipe
6443 \backslash
6444 lyxpipe
6445 \end_layout
6446
6447 \end_inset
6448
6449 , otherwise change the 
6450 \begin_inset Flex Code
6451 status collapsed
6452
6453 \begin_layout Plain Layout
6454 lyxeditor.bat
6455 \end_layout
6456
6457 \end_inset
6458
6459  wrapper accordingly.
6460 \end_layout
6461
6462 \begin_layout Standard
6463 In yap, reverse search is triggered by double-click.
6464 \end_layout
6465
6466 \begin_layout Subsubsection*
6467 SumatraPDF (Windows)
6468 \end_layout
6469
6470 \begin_layout Standard
6471 In order to use SumatraPDF for inverse search, enter 
6472 \begin_inset Flex Code
6473 status collapsed
6474
6475 \begin_layout Plain Layout
6476 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6477 \end_layout
6478
6479 \end_inset
6480
6481  in the viewer setting in 
6482 \begin_inset Flex MenuItem
6483 status collapsed
6484
6485 \begin_layout Plain Layout
6486 Preferences\SpecialChar \menuseparator
6487 File Handling\SpecialChar \menuseparator
6488 File formats\SpecialChar \menuseparator
6489 PDF (pdflatex)
6490 \end_layout
6491
6492 \end_inset
6493
6494 , where 
6495 \begin_inset Flex Code
6496 status collapsed
6497
6498 \begin_layout Plain Layout
6499 lyxeditor.bat
6500 \end_layout
6501
6502 \end_inset
6503
6504  is the previous wrapper.
6505  If SumatraPDF.exe is not in your command PATH, use its full file name.
6506 \end_layout
6507
6508 \begin_layout Standard
6509 Reverse search is triggered by double-click.
6510 \end_layout
6511
6512 \begin_layout Subsubsection*
6513 YAP (Cygwin)
6514 \end_layout
6515
6516 \begin_layout Standard
6517 First of all, make sure that yap is your default DVI viewer in the Windows
6518  environment, then launch it, choose its 
6519 \begin_inset Flex MenuItem
6520 status collapsed
6521
6522 \begin_layout Plain Layout
6523 View\SpecialChar \menuseparator
6524 Options
6525 \end_layout
6526
6527 \end_inset
6528
6529  menu and select the 
6530 \begin_inset Quotes eld
6531 \end_inset
6532
6533 Inverse DVI Search
6534 \begin_inset Quotes erd
6535 \end_inset
6536
6537  tab.
6538  Click on the 
6539 \begin_inset Quotes eld
6540 \end_inset
6541
6542 New\SpecialChar \ldots{}
6543
6544 \begin_inset Quotes erd
6545 \end_inset
6546
6547  button and, in the window that opens, enter 
6548 \begin_inset Quotes eld
6549 \end_inset
6550
6551 LyX Editor
6552 \begin_inset Quotes erd
6553 \end_inset
6554
6555  (or any other name you like) in the 
6556 \begin_inset Quotes eld
6557 \end_inset
6558
6559 Name:
6560 \begin_inset Quotes erd
6561 \end_inset
6562
6563  field.
6564  Now click on the button labeled 
6565 \begin_inset Quotes eld
6566 \end_inset
6567
6568 \SpecialChar \ldots{}
6569
6570 \begin_inset Quotes erd
6571 \end_inset
6572
6573  to open a file dialog and navigate to the directory containing the 
6574 \begin_inset Flex Code
6575 status collapsed
6576
6577 \begin_layout Plain Layout
6578 lyxeditor.exe
6579 \end_layout
6580
6581 \end_inset
6582
6583  program (which is installed by default on Cygwin along with the LyX executable).
6584  Select 
6585 \begin_inset Flex Code
6586 status collapsed
6587
6588 \begin_layout Plain Layout
6589 lyxeditor.exe
6590 \end_layout
6591
6592 \end_inset
6593
6594  and then specify the program arguments as 
6595 \begin_inset Flex Code
6596 status collapsed
6597
6598 \begin_layout Plain Layout
6599 -g %f %l
6600 \end_layout
6601
6602 \end_inset
6603
6604 .
6605  In this way, you will be using the 
6606 \emph on
6607 lyxsocket
6608 \emph default
6609  for communicating with LyX.
6610  If, for whatever reason, you want to use the 
6611 \emph on
6612 lyxpipe
6613 \emph default
6614 , omit the 
6615 \begin_inset Flex Code
6616 status collapsed
6617
6618 \begin_layout Plain Layout
6619 -g
6620 \end_layout
6621
6622 \end_inset
6623
6624  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6625 \end_layout
6626
6627 \begin_layout Standard
6628 In yap, reverse search is triggered by double-click.
6629 \end_layout
6630
6631 \begin_layout Subsubsection*
6632 SumatraPDF (Cygwin)
6633 \end_layout
6634
6635 \begin_layout Standard
6636 In order to use SumatraPDF for inverse search, enter 
6637 \begin_inset Flex Code
6638 status collapsed
6639
6640 \begin_layout Plain Layout
6641 SumatraPDF.sh
6642 \end_layout
6643
6644 \end_inset
6645
6646  in the viewer setting in 
6647 \begin_inset Flex MenuItem
6648 status collapsed
6649
6650 \begin_layout Plain Layout
6651 Preferences\SpecialChar \menuseparator
6652 File Handling\SpecialChar \menuseparator
6653 File formats\SpecialChar \menuseparator
6654 PDF (pdflatex)
6655 \end_layout
6656
6657 \end_inset
6658
6659 , where 
6660 \begin_inset Flex Code
6661 status collapsed
6662
6663 \begin_layout Plain Layout
6664 SumatraPDF.sh
6665 \end_layout
6666
6667 \end_inset
6668
6669  is the following script (to be placed in your command PATH, 
6670 \begin_inset Flex Code
6671 status collapsed
6672
6673 \begin_layout Plain Layout
6674 /usr/local/bin
6675 \end_layout
6676
6677 \end_inset
6678
6679  being the best choice):
6680 \end_layout
6681
6682 \begin_layout LyX-Code
6683 #!/bin/bash
6684 \begin_inset Newline newline
6685 \end_inset
6686
6687 cd $(dirname $1)
6688 \begin_inset Newline newline
6689 \end_inset
6690
6691 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6692 \end_layout
6693
6694 \begin_layout Standard
6695 This wrapper script is needed because SumatraPDF is a native Windows application
6696  and does not understand the posix paths used by the Cygwin version of LyX.
6697  If SumatraPDF.exe is not in your command PATH, use its full posix path in
6698  the script above.
6699  The 
6700 \begin_inset Flex Code
6701 status collapsed
6702
6703 \begin_layout Plain Layout
6704 -g
6705 \end_layout
6706
6707 \end_inset
6708
6709  enables communication via the 
6710 \emph on
6711 lyxsocket
6712 \emph default
6713 .
6714  Again, omit the 
6715 \begin_inset Flex Code
6716 status collapsed
6717
6718 \begin_layout Plain Layout
6719 -g
6720 \end_layout
6721
6722 \end_inset
6723
6724  option if you want to use the 
6725 \emph on
6726 lyxpipe
6727 \emph default
6728 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6729 \end_layout
6730
6731 \begin_layout Standard
6732 Reverse search is triggered by double-click.
6733 \end_layout
6734
6735 \begin_layout Section
6736 Forward search
6737 \end_layout
6738
6739 \begin_layout Standard
6740 To make forward search possible you need to provide generated output PDF/DVI
6741  file with additional information about TeX sources.
6742  This can be done via the methods described in the section 
6743 \begin_inset CommandInset ref
6744 LatexCommand ref
6745 reference "sub:rev-search"
6746
6747 \end_inset
6748
6749 .
6750 \end_layout
6751
6752 \begin_layout Standard
6753 Secondly you need to configure LyX for using your viewers in 
6754 \begin_inset Flex MenuItem
6755 status collapsed
6756
6757 \begin_layout Plain Layout
6758 Preferences\SpecialChar \menuseparator
6759 Output\SpecialChar \menuseparator
6760 General
6761 \end_layout
6762
6763 \end_inset
6764
6765 .
6766  Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6767  PDF
6768 \begin_inset Foot
6769 status collapsed
6770
6771 \begin_layout Plain Layout
6772 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6773 ip
6774 \end_layout
6775
6776 \end_inset
6777
6778 .
6779  Some other viewers allow at least reloading and positioning to particular
6780  page of the file --- Evince or xpdf --- for these cases you can use external
6781  call of synctex.
6782  Please study the prepared examples in the Preferences dialog.
6783  The values replaced in the setting: 
6784 \begin_inset Flex Code
6785 status collapsed
6786
6787 \begin_layout Plain Layout
6788 $$n
6789 \end_layout
6790
6791 \end_inset
6792
6793  for row number, 
6794 \begin_inset Flex Code
6795 status collapsed
6796
6797 \begin_layout Plain Layout
6798 $$t
6799 \end_layout
6800
6801 \end_inset
6802
6803  for exported temporary .tex file, 
6804 \begin_inset Flex Code
6805 status collapsed
6806
6807 \begin_layout Plain Layout
6808 $$o
6809 \end_layout
6810
6811 \end_inset
6812
6813  exported output file (either dvi or pdf, depending on which one exists
6814  in the temp dir).
6815  
6816 \end_layout
6817
6818 \begin_layout Standard
6819 When viewing, LyX dynamically choose proper preview format based on the
6820  presence of .dvi or .pdf file in the temporary directory (i.e.
6821  what format have you used for viewing this particular document).
6822  
6823 \end_layout
6824
6825 \begin_layout Chapter
6826 Special Document Classes
6827 \end_layout
6828
6829 \begin_layout Section
6830 A&A Paper
6831 \end_layout
6832
6833 \begin_layout Standard
6834 by 
6835 \noun on
6836 Peter Sütterlin
6837 \end_layout
6838
6839 \begin_layout Subsection
6840 Introduction
6841 \end_layout
6842
6843 \begin_layout Standard
6844 This section describes how LyX can be used to write articles for submission
6845  to the scientific journal 
6846 \emph on
6847 Astronomy and Astrophysics
6848 \emph default
6849  (www.edpsciences.fr/aa/ 
6850 \begin_inset Flex URL
6851 status collapsed
6852
6853 \begin_layout Plain Layout
6854
6855 http://www.edpsciences.fr/aa/
6856 \end_layout
6857
6858 \end_inset
6859
6860 ) using Version 5.01 of the document class 
6861 \family typewriter
6862 aa.cls
6863 \family default
6864 .
6865  This package can be downloaded from the ftp site
6866 \end_layout
6867
6868 \begin_layout Standard
6869 \begin_inset VSpace medskip
6870 \end_inset
6871
6872
6873 \end_layout
6874
6875 \begin_layout Standard
6876 \align center
6877 \begin_inset Flex URL
6878 status collapsed
6879
6880 \begin_layout Plain Layout
6881
6882 ftp://ftp.edpsciences.org/pub/aa/readme.html
6883 \end_layout
6884
6885 \end_inset
6886
6887
6888 \end_layout
6889
6890 \begin_layout Standard
6891 \begin_inset VSpace medskip
6892 \end_inset
6893
6894
6895 \end_layout
6896
6897 \begin_layout Standard
6898 A manual comes together with that package, and this text is not meant to
6899  replace the original manual but is merely a short guide in how to realize
6900  the correct form of your paper.
6901  
6902 \end_layout
6903
6904 \begin_layout Standard
6905 Please note that the publisher of the journal was changed from Springer
6906  to EDP Sciences starting January 1, 2001.
6907  That change involved also some slight changes to the style files, namely
6908  the removal of the thesaurus command.
6909  The LyX class aa supports the newest version of these style files, V 5.01.
6910  If you have an older version installed, please upgrade.
6911  For compatibility, the old (version 4) layout has been kept as 
6912 \family sans
6913 article (A&A V4)
6914 \family default
6915 .
6916  Please refer to the comments in 
6917 \family typewriter
6918 LyXDir/layouts/aapaper.layout
6919 \family default
6920 .
6921 \end_layout
6922
6923 \begin_layout Subsection
6924 Getting started
6925 \end_layout
6926
6927 \begin_layout Standard
6928 It is recommended you start from the example template distributed with LyX.
6929  If you are not using a template, note the following settings:
6930 \end_layout
6931
6932 \begin_layout Itemize
6933 Select 
6934 \family sans
6935 article (A&A)
6936 \family default
6937  in the 
6938 \family sans
6939 Document\SpecialChar \menuseparator
6940 Settings
6941 \family default
6942  dialog (OK, that one was obvious).
6943 \end_layout
6944
6945 \begin_layout Itemize
6946 Don't change the option 
6947 \family sans
6948 Page
6949 \begin_inset space ~
6950 \end_inset
6951
6952 style
6953 \family default
6954 : Leave it set to 
6955 \family sans
6956 default
6957 \family default
6958 .
6959  The whole layout is done by the macros, you shouldn't change anything.
6960 \end_layout
6961
6962 \begin_layout Subsection
6963 The header block
6964 \end_layout
6965
6966 \begin_layout Standard
6967 First thing to enter is the header information.
6968  It consists of seven entries, of which some are optional.
6969  They are
6970 \end_layout
6971
6972 \begin_layout Itemize
6973
6974 \family sans
6975 Title
6976 \family default
6977 : [required] 
6978 \end_layout
6979
6980 \begin_layout Itemize
6981
6982 \family sans
6983 Subtitle
6984 \family default
6985 : [optional] 
6986 \end_layout
6987
6988 \begin_layout Itemize
6989
6990 \family sans
6991 Author
6992 \family default
6993 : [required]
6994 \end_layout
6995
6996 \begin_layout Itemize
6997
6998 \family sans
6999 Address
7000 \family default
7001 : [required]
7002 \end_layout
7003
7004 \begin_layout Itemize
7005
7006 \family sans
7007 Offprints
7008 \family default
7009 : [optional] if more than one author: whom to contact for offprint requests.
7010 \end_layout
7011
7012 \begin_layout Itemize
7013
7014 \family sans
7015 Mail
7016 \family default
7017 : [optional] mail address for contacts.
7018 \end_layout
7019
7020 \begin_layout Itemize
7021
7022 \family sans
7023 Date
7024 \family default
7025 : [required].
7026  Suggested format is 
7027 \family typewriter
7028 Received: <date>; Accepted <date> 
7029 \end_layout
7030
7031 \begin_layout Standard
7032 There is no need to issue the 
7033 \family typewriter
7034
7035 \backslash
7036 maketitle
7037 \family default
7038  command, this is done automatically by LyX when the header is finished.
7039  Although the order of the single header entries doesn't matter it is advised
7040  to keep the above sequence, just to get the best optics and meets the layout
7041  of the real document.
7042 \end_layout
7043
7044 \begin_layout Standard
7045 If you want to place footnotes in the header block, e.
7046 \begin_inset space \thinspace{}
7047 \end_inset
7048
7049 g.
7050 \begin_inset space \space{}
7051 \end_inset
7052
7053 to state your present address, just use the standard footnote via the menu
7054  
7055 \family sans
7056 Insert\SpecialChar \menuseparator
7057 Footnote.
7058
7059 \family default
7060  LyX will automagically use the term 
7061 \family typewriter
7062
7063 \backslash
7064 thanks{}
7065 \family default
7066  in that case.
7067 \end_layout
7068
7069 \begin_layout Standard
7070 In addition to these topics, the macros use three additional LaTeX commands
7071  that have no counterpart in LyX:
7072 \end_layout
7073
7074 \begin_layout Itemize
7075
7076 \family typewriter
7077
7078 \backslash
7079 and
7080 \family default
7081  to separate different names for more than one author and institute, respectivel
7082 y.
7083 \end_layout
7084
7085 \begin_layout Itemize
7086
7087 \family typewriter
7088
7089 \backslash
7090 inst{<nr>}
7091 \family default
7092 to mark corresponding author/institute pairs.
7093  The institutes are numbered sequentially as they appear in the 
7094 \family sans
7095 Address
7096 \family default
7097  field, so you have to put a marker to each author.
7098 \end_layout
7099
7100 \begin_layout Itemize
7101
7102 \family typewriter
7103
7104 \backslash
7105 email{address}
7106 \family default
7107  to supply an email address for fast contact.
7108 \end_layout
7109
7110 \begin_layout Standard
7111 In all cases, the appropriate command has to be entered in LyX and marked
7112  as LaTeX code.
7113  See the examples.
7114  
7115 \end_layout
7116
7117 \begin_layout Subsection
7118 The abstract
7119 \end_layout
7120
7121 \begin_layout Standard
7122 The abstract should immediately follow the header block.
7123  With version 5 the abstract environment was changed to a command, and there
7124  is now a resctriction to only one paragraph.
7125  In addition, it should contain an entry with the keywords.
7126  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7127  command 
7128 \family typewriter
7129
7130 \backslash
7131 keywords{}
7132 \family default
7133  by hand and mark it as LaTeX code.
7134  Refer to the example paper.
7135 \end_layout
7136
7137 \begin_layout Subsection
7138 Supported environments
7139 \end_layout
7140
7141 \begin_layout Standard
7142 The A&A paper layout supports the following environments for structuring
7143  your text:
7144 \end_layout
7145
7146 \begin_layout Itemize
7147
7148 \family sans
7149 Standard
7150 \end_layout
7151
7152 \begin_layout Itemize
7153
7154 \family sans
7155 Section
7156 \end_layout
7157
7158 \begin_layout Itemize
7159
7160 \family sans
7161 Subsection
7162 \end_layout
7163
7164 \begin_layout Itemize
7165
7166 \family sans
7167 Subsubsection
7168 \end_layout
7169
7170 \begin_layout Itemize
7171
7172 \family sans
7173 Itemize
7174 \end_layout
7175
7176 \begin_layout Itemize
7177
7178 \family sans
7179 Enumerate
7180 \end_layout
7181
7182 \begin_layout Itemize
7183
7184 \family sans
7185 Description
7186 \end_layout
7187
7188 \begin_layout Itemize
7189
7190 \family sans
7191 Caption
7192 \end_layout
7193
7194 \begin_layout Itemize
7195
7196 \family sans
7197 Abstract
7198 \end_layout
7199
7200 \begin_layout Itemize
7201
7202 \family sans
7203 Acknowledgment
7204 \end_layout
7205
7206 \begin_layout Itemize
7207
7208 \family sans
7209 Bibliography
7210 \end_layout
7211
7212 \begin_layout Itemize
7213
7214 \family sans
7215 LaTeX
7216 \end_layout
7217
7218 \begin_layout Subsection
7219 Commands not supported by LyX
7220 \end_layout
7221
7222 \begin_layout Standard
7223 Some commands are not yet supported by the 
7224 \family sans
7225 paper (A&A)
7226 \family default
7227  layout for LyX.
7228  Some have already been mentioned.
7229  For the sake of completeness, they are listed all together here:
7230 \end_layout
7231
7232 \begin_layout Itemize
7233
7234 \family typewriter
7235
7236 \backslash
7237 and
7238 \end_layout
7239
7240 \begin_layout Itemize
7241
7242 \family typewriter
7243
7244 \backslash
7245 email
7246 \end_layout
7247
7248 \begin_layout Itemize
7249
7250 \family typewriter
7251
7252 \backslash
7253 appendix
7254 \end_layout
7255
7256 \begin_layout Itemize
7257
7258 \family typewriter
7259
7260 \backslash
7261 authorrunning
7262 \end_layout
7263
7264 \begin_layout Itemize
7265
7266 \family typewriter
7267
7268 \backslash
7269 inst{}
7270 \end_layout
7271
7272 \begin_layout Itemize
7273
7274 \family typewriter
7275
7276 \backslash
7277 keywords{}
7278 \end_layout
7279
7280 \begin_layout Itemize
7281
7282 \family typewriter
7283
7284 \backslash
7285 object{}
7286 \end_layout
7287
7288 \begin_layout Itemize
7289
7290 \family typewriter
7291
7292 \backslash
7293 titlerunning{}
7294 \end_layout
7295
7296 \begin_layout Standard
7297 If you want to use any of these commands, you have to enter them yourself.
7298  
7299 \series bold
7300 Do not forget to mark them as LaTeX code!
7301 \end_layout
7302
7303 \begin_layout Subsection
7304 Figure and Table Floats
7305 \end_layout
7306
7307 \begin_layout Standard
7308 LyX provides support for the necessary float environments 
7309 \family sans
7310 figure, figure*, table
7311 \family default
7312  and 
7313 \family sans
7314 table*
7315 \family default
7316 , therefore we won't tell much about it here.
7317  Refer to the 
7318 \emph on
7319 User's
7320 \begin_inset space ~
7321 \end_inset
7322
7323 Guide
7324 \emph default
7325 .
7326  Just remember that tables should be left-aligned.
7327  For that, select the table and change the alignment in 
7328 \family sans
7329 Edit\SpecialChar \menuseparator
7330 Paragraph
7331 \begin_inset space ~
7332 \end_inset
7333
7334 Settings.
7335 \end_layout
7336
7337 \begin_layout Standard
7338 There is only one special thing: the figures with caption besides the figure.
7339  To create such a figure, you have to do the following:
7340 \end_layout
7341
7342 \begin_layout Enumerate
7343 Create a wide figure float: 
7344 \family sans
7345 Insert\SpecialChar \menuseparator
7346 Float\SpecialChar \menuseparator
7347 Figure
7348 \family default
7349 , then right click in the figure and select 
7350 \family sans
7351 \bar under
7352 S
7353 \bar default
7354 pan
7355 \begin_inset space ~
7356 \end_inset
7357
7358 columns
7359 \family default
7360 .
7361 \end_layout
7362
7363 \begin_layout Enumerate
7364 Enter your caption text.
7365 \end_layout
7366
7367 \begin_layout Enumerate
7368 Press 
7369 \family sans
7370 Return
7371 \family default
7372  to move the cursor above the caption.
7373 \end_layout
7374
7375 \begin_layout Enumerate
7376 Insert your figure
7377 \end_layout
7378
7379 \begin_layout Enumerate
7380 Position the cursor behind the figure and insert a horizontal fill: 
7381 \family sans
7382 Insert\SpecialChar \menuseparator
7383 Special
7384 \begin_inset space ~
7385 \end_inset
7386
7387 Character\SpecialChar \menuseparator
7388 Horizontal
7389 \begin_inset space ~
7390 \end_inset
7391
7392 Fill
7393 \family default
7394 .
7395 \end_layout
7396
7397 \begin_layout Enumerate
7398 Switch to LaTeX mode: 
7399 \family sans
7400 M-c
7401 \begin_inset space ~
7402 \end_inset
7403
7404 t
7405 \family default
7406 .
7407 \end_layout
7408
7409 \begin_layout Enumerate
7410 Enter 
7411 \family typewriter
7412
7413 \backslash
7414 parbox[b]{55mm}{
7415 \family default
7416 .
7417  
7418 \series bold
7419 Do not close the brace!
7420 \end_layout
7421
7422 \begin_layout Enumerate
7423 Position the cursor behind the caption text, switch to LaTeX mode and insert
7424  the closing brace: 
7425 \family sans
7426 M-c
7427 \begin_inset space ~
7428 \end_inset
7429
7430 t
7431 \family default
7432  
7433 \family typewriter
7434 }
7435 \family default
7436 .
7437 \end_layout
7438
7439 \begin_layout Standard
7440 Also, refer to the figures in the example paper.
7441 \end_layout
7442
7443 \begin_layout Subsection
7444 Referee layout
7445 \end_layout
7446
7447 \begin_layout Standard
7448 For submission, the paper has to be formated in a special double-spacing
7449  layout.
7450  For this purpose, you have to give the option 
7451 \family typewriter
7452 referee
7453 \family default
7454  to the documentclass.
7455  This must be done using the extra class options field in the 
7456 \family sans
7457 Document\SpecialChar \menuseparator
7458 Settings
7459 \family default
7460  dialog.
7461  Just enter the string 
7462 \family typewriter
7463 referee
7464 \family default
7465  there.
7466 \end_layout
7467
7468 \begin_layout Subsection
7469 The example paper
7470 \end_layout
7471
7472 \begin_layout Standard
7473 The 
7474 \family sans
7475 Examples
7476 \family default
7477  directory contains an example paper written with LyX.
7478  It is the example paper from the original macro package, translated to
7479  LyX.
7480  Use it for inspiration, and compare the original LaTeX code with LyX way
7481  of writing.
7482 \end_layout
7483
7484 \begin_layout Section
7485 AASTeX
7486 \end_layout
7487
7488 \begin_layout Standard
7489 by 
7490 \noun on
7491 Mike Ressler
7492 \end_layout
7493
7494 \begin_layout Subsection
7495 Introduction
7496 \end_layout
7497
7498 \begin_layout Standard
7499 AASTeX is a set of macros produced by the American Astronomical Society
7500  to facilitate electronic manuscript submission to the three journals they
7501  publish: the Astrophysical Journal (including the Letters and Supplement),
7502  the Astronomical Journal, and the Publications of the Astronomical Society
7503  of the Pacific.
7504  LyX has proven to be an excellent tool for generating these documents,
7505  especially given its equation, citation, and figure handling capabilities.
7506  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7507  is the version described here, or higher.
7508  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7509  incompatible with LyX.
7510  The AASTeX package may be downloaded from the AASTeX Web site
7511 \end_layout
7512
7513 \begin_layout Standard
7514 \begin_inset VSpace medskip
7515 \end_inset
7516
7517
7518 \end_layout
7519
7520 \begin_layout Standard
7521 \align center
7522 \begin_inset Flex URL
7523 status collapsed
7524
7525 \begin_layout Plain Layout
7526
7527 http://www.journals.uchicago.edu/AAS/AASTeX
7528 \end_layout
7529
7530 \end_inset
7531
7532
7533 \end_layout
7534
7535 \begin_layout Standard
7536 \begin_inset VSpace medskip
7537 \end_inset
7538
7539
7540 \end_layout
7541
7542 \begin_layout Standard
7543 A complete user guide is contained in that package and you should familiarize
7544  yourself with it thoroughly before embarking on writing a paper in LyX.
7545  LyX will not reduce the need to figure out all the AASTeX commands, it
7546  will only reduce the drudgery of typing everything in.
7547  It is your responsibility to ensure that the final exported LaTeX document
7548  conforms completely to the requirements of the journal to which you are
7549  submitting your paper.
7550 \end_layout
7551
7552 \begin_layout Subsection
7553 Starting a New Paper
7554 \end_layout
7555
7556 \begin_layout Standard
7557 I strongly suggest that you start with the AASTeX template file.
7558  Click on 
7559 \family sans
7560 File\SpecialChar \menuseparator
7561 New from
7562 \family default
7563  
7564 \family sans
7565 Template
7566 \family default
7567 , enter the new file name, then choose the 
7568 \family typewriter
7569 aastex.lyx
7570 \family default
7571  template.
7572  This will show the most common fields found in a manuscript.
7573  Simply overwrite the existing text (including the brackets, 
7574 \family typewriter
7575 <>
7576 \family default
7577 ) with the correct information.
7578  Many of the AASTeX commands and environments can be implemented directly
7579  in LyX, but some cannot: most noticeably 
7580 \family typewriter
7581
7582 \backslash
7583 altaffilmark
7584 \family default
7585  and 
7586 \family typewriter
7587
7588 \backslash
7589 altaffiltext
7590 \family default
7591 , which should stick out like a sore thumb if you actually just opened the
7592  template file.
7593  For commands such as these, the LaTeX code must be entered directly and
7594  marked as such.
7595  Such commands are referred to as TeX code, or Evil Red Text.
7596  I tried to minimize the amount of TeX code needed in an AASTeX document,
7597  but there is still a bit more required than any of us would like.
7598 \end_layout
7599
7600 \begin_layout Subsection
7601 Finishing Your Paper
7602 \end_layout
7603
7604 \begin_layout Standard
7605 When the paper is finished to your satisfaction and previews/prints correctly,
7606  there are a few 
7607 \begin_inset Quotes eld
7608 \end_inset
7609
7610 postprocessing
7611 \begin_inset Quotes erd
7612 \end_inset
7613
7614  actions which need to be done before you submit it to the journals.
7615  
7616 \end_layout
7617
7618 \begin_layout Enumerate
7619 Export your paper as a LaTeX file (
7620 \family sans
7621 File\SpecialChar \menuseparator
7622 Export\SpecialChar \menuseparator
7623 LaTeX
7624 \family default
7625 ).
7626  
7627 \end_layout
7628
7629 \begin_layout Enumerate
7630 Edit the resulting 
7631 \family typewriter
7632 .tex
7633 \family default
7634  file with your favorite text editor
7635 \end_layout
7636
7637 \begin_deeper
7638 \begin_layout Enumerate
7639 remove the comment lines before the 
7640 \family typewriter
7641
7642 \backslash
7643 documentclass
7644 \family default
7645  command
7646 \end_layout
7647
7648 \begin_layout Enumerate
7649 remove the 
7650 \family typewriter
7651
7652 \backslash
7653 usepackage...{fontenc}
7654 \family default
7655  line if it appears (usually just after 
7656 \family typewriter
7657
7658 \backslash
7659 documentclass
7660 \family default
7661 }; also remove the 
7662 \family typewriter
7663
7664 \backslash
7665 secnumdepth
7666 \family default
7667  line if it appears.
7668 \end_layout
7669
7670 \begin_layout Enumerate
7671 remove everything between (and including) the 
7672 \family typewriter
7673
7674 \backslash
7675 makeatletter
7676 \family default
7677  and 
7678 \family typewriter
7679
7680 \backslash
7681 makeatother
7682 \family default
7683  commands, except for any commands you specifically put into the LaTeX preamble
7684  (which should appear immediately after the 
7685 \begin_inset Quotes eld
7686 \end_inset
7687
7688 User specified LaTeX commands
7689 \begin_inset Quotes erd
7690 \end_inset
7691
7692  comment in the 
7693 \family typewriter
7694 .tex
7695 \family default
7696  file).
7697 \end_layout
7698
7699 \end_deeper
7700 \begin_layout Enumerate
7701 Run the resulting file through LaTeX to make sure it still processes correctly.
7702 \end_layout
7703
7704 \begin_layout Enumerate
7705 Reread the journal requirements to make sure your filenames and formats
7706  are correct.
7707 \end_layout
7708
7709 \begin_layout Enumerate
7710 Submit it.
7711 \end_layout
7712
7713 \begin_layout Subsection
7714 Comments On Specific Commands
7715 \end_layout
7716
7717 \begin_layout Standard
7718 I will not describe the detailed usage of the individual AASTeX commands:
7719  the AASTeX User Guide (
7720 \family typewriter
7721 aasguide.tex
7722 \family default
7723 ) gives a good description of each.
7724  Thus it's probably easiest for me to go down the list as found in the guide
7725  and offer comments where necessary.
7726  So let's begin \SpecialChar \ldots{}
7727
7728 \end_layout
7729
7730 \begin_layout Subsubsection
7731 Things that work as expected
7732 \end_layout
7733
7734 \begin_layout Standard
7735 \begin_inset ERT
7736 status open
7737
7738 \begin_layout Plain Layout
7739
7740
7741 \backslash
7742 begin{sloppypar}
7743 \end_layout
7744
7745 \end_inset
7746
7747
7748 \end_layout
7749
7750 \begin_layout Standard
7751 Because they work as you might expect, I simply list them and the section
7752  they are found in: 
7753 \family typewriter
7754
7755 \backslash
7756 documentclass
7757 \family default
7758  (2.1.1), 
7759 \family typewriter
7760
7761 \backslash
7762 begin{document}
7763 \family default
7764  (2.2), 
7765 \family typewriter
7766
7767 \backslash
7768 title
7769 \family default
7770  (2.3), 
7771 \family typewriter
7772
7773 \backslash
7774 author
7775 \family default
7776  (2.3), 
7777 \family typewriter
7778
7779 \backslash
7780 affil
7781 \family default
7782  (2.3), 
7783 \family typewriter
7784
7785 \backslash
7786 abstract
7787 \family default
7788  (2.4), 
7789 \family typewriter
7790
7791 \backslash
7792 keywords
7793 \family default
7794  (2.5), 
7795 \family typewriter
7796
7797 \backslash
7798 section
7799 \family default
7800  (2.7), 
7801 \family typewriter
7802
7803 \backslash
7804 subsection
7805 \family default
7806  (2.7), 
7807 \family typewriter
7808
7809 \backslash
7810 subsubsection
7811 \family default
7812  (2.7), 
7813 \family typewriter
7814
7815 \backslash
7816 paragraph
7817 \family default
7818  (2.7), 
7819 \family typewriter
7820
7821 \backslash
7822 facility
7823 \family default
7824  (2.10), 
7825 \family typewriter
7826
7827 \backslash
7828 begin{displaymath}
7829 \family default
7830  (2.12), 
7831 \family typewriter
7832
7833 \backslash
7834 begin{equation}
7835 \family default
7836  (2.12), 
7837 \family typewriter
7838
7839 \backslash
7840 begin{eqnarray}
7841 \family default
7842  (2.12), 
7843 \family typewriter
7844
7845 \backslash
7846 begin{mathletters}
7847 \family default
7848  (2.12), 
7849 \family typewriter
7850
7851 \backslash
7852 begin{thebibliography}
7853 \family default
7854  (2.13.1), 
7855 \family typewriter
7856
7857 \backslash
7858 bibitem
7859 \family default
7860  (2.13.2), all the cite commands and their variations (2.13.2), the generic
7861  graphicx figure commands (2.14.1), 
7862 \family typewriter
7863
7864 \backslash
7865 begin{table}
7866 \family default
7867  (2.15.4), 
7868 \family typewriter
7869
7870 \backslash
7871 begin{tabular}
7872 \family default
7873  (2.15.4), 
7874 \family typewriter
7875
7876 \backslash
7877 caption
7878 \family default
7879  (2.15.4), 
7880 \family typewriter
7881
7882 \backslash
7883 label
7884 \family default
7885  (2.15.4, amongst other places), 
7886 \family typewriter
7887
7888 \backslash
7889 tablerefs
7890 \family default
7891  (2.15.5), 
7892 \family typewriter
7893
7894 \backslash
7895 tablecomments
7896 \family default
7897  (2.15.5), 
7898 \family typewriter
7899
7900 \backslash
7901 url
7902 \family default
7903  (2.17.4), 
7904 \family typewriter
7905
7906 \backslash
7907 end{document}
7908 \family default
7909  (2.18).
7910 \end_layout
7911
7912 \begin_layout Standard
7913 The following style options also work correctly: 
7914 \family typewriter
7915 longabstract
7916 \family default
7917  (2.4), 
7918 \family typewriter
7919 preprint
7920 \family default
7921  (3.2.1), 
7922 \family typewriter
7923 preprint2
7924 \family default
7925  (3.2.2), 
7926 \family typewriter
7927 eqsecnum
7928 \family default
7929  (3.3), 
7930 \family typewriter
7931 flushrt
7932 \family default
7933  (3.4).
7934  Simply put them in the 
7935 \family sans
7936 Options
7937 \family default
7938  box in 
7939 \family sans
7940 Layout\SpecialChar \menuseparator
7941 Document
7942 \family default
7943 .
7944 \end_layout
7945
7946 \begin_layout Standard
7947 \begin_inset ERT
7948 status open
7949
7950 \begin_layout Plain Layout
7951
7952
7953 \backslash
7954 end{sloppypar}
7955 \end_layout
7956
7957 \end_inset
7958
7959
7960 \end_layout
7961
7962 \begin_layout Subsubsection
7963 Things that work, but require more comment
7964 \end_layout
7965
7966 \begin_layout Standard
7967 The following items work, but require a little more discussion:
7968 \end_layout
7969
7970 \begin_layout Itemize
7971 These items are reserved for use by the journal editors, but you can put
7972  them into the LaTeX preamble if you feel compelled to do so: 
7973 \family typewriter
7974
7975 \backslash
7976 received
7977 \family default
7978
7979 \family typewriter
7980
7981 \backslash
7982 revised
7983 \family default
7984
7985 \family typewriter
7986
7987 \backslash
7988 accepted
7989 \family default
7990
7991 \family typewriter
7992
7993 \backslash
7994 ccc
7995 \family default
7996
7997 \family typewriter
7998
7999 \backslash
8000 cpright
8001 \family default
8002  (all from 2.1.3)
8003 \end_layout
8004
8005 \begin_layout Itemize
8006 These items may be placed in the LaTeX preamble, and are included as blanks
8007  in the template file: 
8008 \family typewriter
8009
8010 \backslash
8011 slugcomment
8012 \family default
8013  (2.1.4), 
8014 \family typewriter
8015
8016 \backslash
8017 shorttitle
8018 \family default
8019  (2.1.5), 
8020 \family typewriter
8021
8022 \backslash
8023 shortauthors
8024 \family default
8025  (2.1.5)
8026 \end_layout
8027
8028 \begin_layout Itemize
8029
8030 \family typewriter
8031
8032 \backslash
8033 email
8034 \family default
8035  (2.3) – can only be used 
8036 \begin_inset Quotes eld
8037 \end_inset
8038
8039 standalone
8040 \begin_inset Quotes erd
8041 \end_inset
8042
8043 , not in the middle of a paragraph.
8044  Use TeX code if you need to embed it.
8045 \end_layout
8046
8047 \begin_layout Itemize
8048
8049 \family typewriter
8050
8051 \backslash
8052 and
8053 \family default
8054  (2.3) – will have extra {} after it.
8055  This should not cause an error.
8056 \end_layout
8057
8058 \begin_layout Itemize
8059
8060 \family typewriter
8061
8062 \backslash
8063 notetoeditor
8064 \family default
8065  (2.6) – can only be used 
8066 \begin_inset Quotes eld
8067 \end_inset
8068
8069 standalone
8070 \begin_inset Quotes erd
8071 \end_inset
8072
8073 , not in the middle of a paragraph.
8074  Use TeX code if you need to embed it.
8075 \end_layout
8076
8077 \begin_layout Itemize
8078
8079 \family typewriter
8080
8081 \backslash
8082 placetable
8083 \family default
8084  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8085  hand
8086 \end_layout
8087
8088 \begin_layout Itemize
8089
8090 \family typewriter
8091
8092 \backslash
8093 placefigure
8094 \family default
8095  (2.8) – same as for 
8096 \family typewriter
8097
8098 \backslash
8099 placetable
8100 \end_layout
8101
8102 \begin_layout Itemize
8103
8104 \family typewriter
8105
8106 \backslash
8107 acknowledgements
8108 \family default
8109  (2.9) – will have extra {} after it.
8110  This should not cause an error.
8111 \end_layout
8112
8113 \begin_layout Itemize
8114
8115 \family typewriter
8116
8117 \backslash
8118 appendix
8119 \family default
8120  (2.11) – will have extra {} after it.
8121  This should not cause an error.
8122 \end_layout
8123
8124 \begin_layout Itemize
8125
8126 \family typewriter
8127
8128 \backslash
8129 figcaption
8130 \family default
8131  (2.14.2) – you can insert an optional filename argument by placing the cursor
8132  at the beginning of the text and selecting 
8133 \family sans
8134 Insert\SpecialChar \menuseparator
8135 Short Title
8136 \family default
8137 .
8138  
8139 \begin_inset Quotes eld
8140 \end_inset
8141
8142 Short Title
8143 \begin_inset Quotes erd
8144 \end_inset
8145
8146  inserts an optional argument of the type needed by 
8147 \family typewriter
8148
8149 \backslash
8150 figcaption
8151 \family default
8152 .
8153  Hopefully it will be renamed someday.
8154 \end_layout
8155
8156 \begin_layout Itemize
8157
8158 \family typewriter
8159
8160 \backslash
8161 objectname
8162 \family default
8163  (2.17.1) – same as 
8164 \family typewriter
8165
8166 \backslash
8167 figcaption
8168 \family default
8169  for the catalog ID optional parameter
8170 \end_layout
8171
8172 \begin_layout Itemize
8173
8174 \family typewriter
8175
8176 \backslash
8177 dataset
8178 \family default
8179  (2.17.1) – same as 
8180 \family typewriter
8181
8182 \backslash
8183 figcaption
8184 \family default
8185  for the catalog ID optional parameter
8186 \end_layout
8187
8188 \begin_layout Subsubsection
8189 Things not implemented, use TeX code
8190 \end_layout
8191
8192 \begin_layout Standard
8193 \begin_inset ERT
8194 status open
8195
8196 \begin_layout Plain Layout
8197
8198
8199 \backslash
8200 begin{sloppypar}
8201 \end_layout
8202
8203 \end_inset
8204
8205
8206 \end_layout
8207
8208 \begin_layout Standard
8209
8210 \family typewriter
8211
8212 \backslash
8213 altaffilmark
8214 \family default
8215  (2.3), 
8216 \family typewriter
8217
8218 \backslash
8219 altaffiltext
8220 \family default
8221  (2.3), 
8222 \family typewriter
8223
8224 \backslash
8225 eqnum
8226 \family default
8227  (2.12), 
8228 \family typewriter
8229
8230 \backslash
8231 setcounter{equation}
8232 \family default
8233  (2.12), Journal name abbreviations (2.13.4), 
8234 \family typewriter
8235
8236 \backslash
8237 figurenum
8238 \family default
8239  (2.14.1), 
8240 \family typewriter
8241
8242 \backslash
8243 epsscale
8244 \family default
8245  (2.14.1), 
8246 \family typewriter
8247
8248 \backslash
8249 plotone
8250 \family default
8251  (2.14.1), 
8252 \family typewriter
8253
8254 \backslash
8255 plottwo
8256 \family default
8257  (2.14.1), 
8258 \family typewriter
8259
8260 \backslash
8261 tablenum
8262 \family default
8263  (2.15.4), 
8264 \family typewriter
8265
8266 \backslash
8267 tableline
8268 \family default
8269  (2.15.4, insert it as the first element in the lefthand cell after where
8270  you want it.
8271  Don't use any of LyX's rules in the table), 
8272 \family typewriter
8273
8274 \backslash
8275 tablenotemark
8276 \family default
8277  (2.15.5), 
8278 \family typewriter
8279
8280 \backslash
8281 tablenotetext
8282 \family default
8283  (2.15.5), much of Misc (2.17, except 
8284 \family typewriter
8285
8286 \backslash
8287 objectname
8288 \family default
8289
8290 \family typewriter
8291
8292 \backslash
8293 dataset
8294 \family default
8295
8296 \family typewriter
8297
8298 \backslash
8299 url
8300 \family default
8301 , and 
8302 \family typewriter
8303
8304 \backslash
8305 email
8306 \family default
8307 ; see above), 
8308 \family typewriter
8309
8310 \backslash
8311 singlespace
8312 \family default
8313  (3.1), 
8314 \family typewriter
8315
8316 \backslash
8317 doublespace
8318 \family default
8319  (3.1), 
8320 \family typewriter
8321
8322 \backslash
8323 onecolumn
8324 \family default
8325  (3.2), 
8326 \family typewriter
8327
8328 \backslash
8329 twocolumn
8330 \family default
8331  (3.2)
8332 \end_layout
8333
8334 \begin_layout Standard
8335 \begin_inset ERT
8336 status open
8337
8338 \begin_layout Plain Layout
8339
8340
8341 \backslash
8342 end{sloppypar}
8343 \end_layout
8344
8345 \end_inset
8346
8347
8348 \end_layout
8349
8350 \begin_layout Subsubsection
8351 Things that cannot be implemented
8352 \end_layout
8353
8354 \begin_layout Standard
8355 \SpecialChar \ldots{}
8356  at least in any meaningful sort of way, so I suggest ignoring them.
8357  They are the references environment (2.13.3), and the deluxetable environment
8358  (2.15).
8359  If you really, really need to use deluxetable, I suggest editing it in
8360  a separate file with a text editor, then using 
8361 \family sans
8362 Insert\SpecialChar \menuseparator
8363 Child
8364 \begin_inset space ~
8365 \end_inset
8366
8367 Document
8368 \family default
8369  to include it in your LyX document.
8370  See the 
8371 \family typewriter
8372 aas_sample.lyx
8373 \family default
8374  file to see an example of this.
8375 \end_layout
8376
8377 \begin_layout Subsection
8378 FAQs, Tips, Tricks, and Other Ruminations
8379 \end_layout
8380
8381 \begin_layout Subsubsection
8382 Getting LyX and AASTeX to cooperate
8383 \end_layout
8384
8385 \begin_layout Standard
8386 It can be a bit tricky to get LyX to recognize a new layout and document
8387  class.
8388  When all else fails, do this:
8389 \end_layout
8390
8391 \begin_layout Enumerate
8392 Make certain that LaTeX can find AASTeX.
8393  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8394  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8395 \family typewriter
8396 sample.tex
8397 \family default
8398 .
8399 \end_layout
8400
8401 \begin_layout Enumerate
8402 Make certain that 
8403 \family typewriter
8404 aastex.layout
8405 \family default
8406  appears in LyX's 
8407 \family typewriter
8408 layouts
8409 \family default
8410  folder
8411 \end_layout
8412
8413 \begin_layout Enumerate
8414 Rerun 
8415 \family sans
8416 Tools\SpecialChar \menuseparator
8417 Reconfigure
8418 \family default
8419  in LyX, then restart LyX.
8420 \end_layout
8421
8422 \begin_layout Enumerate
8423 Open a regular new file, not from a template.
8424  Does AASTeX appear in the class list in 
8425 \family sans
8426 Document\SpecialChar \menuseparator
8427 Settings
8428 \family default
8429 ?
8430 \end_layout
8431
8432 \begin_layout Standard
8433 If you get a warning from an existing AASTeX document about not being able
8434  to find the AASTeX layout or a message about 
8435 \begin_inset Quotes eld
8436 \end_inset
8437
8438 You should not mix title layouts with normal ones
8439 \begin_inset Quotes erd
8440 \end_inset
8441
8442 , things haven't been installed correctly.
8443 \end_layout
8444
8445 \begin_layout Subsubsection
8446 LaTeX error processing a table 
8447 \end_layout
8448
8449 \begin_layout Standard
8450 LyX, by default, attempts to center the table caption/title.
8451  This seems to produce a bad interaction in AASTeX so you should click somewhere
8452  in the caption/title, then select 
8453 \family sans
8454 Edit\SpecialChar \menuseparator
8455 Paragraph
8456 \begin_inset space ~
8457 \end_inset
8458
8459 Settings
8460 \family default
8461 , then set the 
8462 \family sans
8463 Alignment
8464 \family default
8465  to 
8466 \family sans
8467 Block
8468 \family default
8469 .
8470  This took care of it for me.
8471 \end_layout
8472
8473 \begin_layout Subsubsection
8474 References
8475 \end_layout
8476
8477 \begin_layout Standard
8478 A couple of things: 1) I have noticed some funny spacing in the reference
8479  entries in the text.
8480  When you enter the bibliography item data, make sure their is 
8481 \emph on
8482 no
8483 \emph default
8484  space between the last author and the parenthesis setting off the year;
8485  
8486 \emph on
8487 e.
8488 \begin_inset space \thinspace{}
8489 \end_inset
8490
8491 g.
8492 \begin_inset space \space{}
8493 \end_inset
8494
8495
8496 \emph default
8497 type 
8498 \family typewriter
8499 Ressler(1992)
8500 \family default
8501 , not 
8502 \family typewriter
8503 Ressler (1992)
8504 \family default
8505 .
8506  2) Entering the references at all is not obvious.
8507  The easiest thing is to start typing your first reference at the end of
8508  the document, then mark it as type 
8509 \family sans
8510 References
8511 \family default
8512 .
8513  That will put a small gray box in front of what you just typed.
8514  Click on the box to fill in the rest of the information.
8515  For new references, go to the end of an existing reference and press return.
8516  That will create a new line with its own box, etc.
8517 \end_layout
8518
8519 \begin_layout Subsubsection
8520 Including EPS files
8521 \end_layout
8522
8523 \begin_layout Standard
8524 Even though AASTeX provides its own figure commands (
8525 \family typewriter
8526
8527 \backslash
8528 plotone
8529 \family default
8530 , for example), I much prefer LaTeX's standard figure commands (with the
8531  default graphicx).
8532  You can insert the 
8533 \family typewriter
8534
8535 \backslash
8536 plotone
8537 \family default
8538 , etc.
8539 \begin_inset space ~
8540 \end_inset
8541
8542 commands as TeX code into a Figure Float box if you desire, but I never
8543  have much luck getting the layout right.
8544  With the standard graphics, LyX will insert a 
8545 \family typewriter
8546
8547 \backslash
8548 usepackage{graphicx}
8549 \family default
8550  command into the LaTeX preamble and handle the figures in the standard
8551  LaTeX2e way, interspersing the figures in the text.
8552  I believe ApJ accepts figures exactly this way now; AJ might still use
8553  the 
8554 \begin_inset Quotes eld
8555 \end_inset
8556
8557 stack everything at the end
8558 \begin_inset Quotes erd
8559 \end_inset
8560
8561  technique.
8562 \end_layout
8563
8564 \begin_layout Subsubsection
8565 Things I could have done, but didn't
8566 \end_layout
8567
8568 \begin_layout Standard
8569 There are a few 
8570 \begin_inset Quotes eld
8571 \end_inset
8572
8573 pretty
8574 \begin_inset Quotes erd
8575 \end_inset
8576
8577  things I could have implemented, but chose not to.
8578  For instance, I saw no point in double-spacing the text in the LyX window,
8579  even though it is double-spaced in the paper manuscript.
8580  Also, I chose not to make separate layouts for the preprint and preprint2
8581  styles.
8582  Since I assume you will spend most of your time in the plain manuscript
8583  mode anyway, I decided not to chew up more disk space with this.
8584  
8585 \end_layout
8586
8587 \begin_layout Subsection
8588 Final Caveat
8589 \end_layout
8590
8591 \begin_layout Standard
8592 Your mileage may vary.
8593  I've now had papers published by both ApJ and AJ that have had 98% of the
8594  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8595  cleanups.
8596  I have had no trouble with the submission process, and I'm sure the journals
8597  were never aware that there might be a difference.
8598  So, go forth and publish!
8599 \end_layout
8600
8601 \begin_layout Section
8602 AMS LaTeX
8603 \end_layout
8604
8605 \begin_layout Standard
8606 by 
8607 \noun on
8608 David Johnson; updated by Richard Heck
8609 \end_layout
8610
8611 \begin_layout Standard
8612 \begin_inset VSpace bigskip
8613 \end_inset
8614
8615
8616 \end_layout
8617
8618 \begin_layout Standard
8619 \noindent
8620 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8621  papers to be submitted to American Mathematical Society publications.
8622  The layouts are not tailored to a specific journal, but easily can be.
8623  You should refer to the AMS documentation for specific instructions for
8624  each journal (usually it will entail only changing a single line in the
8625  TeX output).
8626  That documentation is available on the Web at 
8627 \begin_inset Flex URL
8628 status open
8629
8630 \begin_layout Plain Layout
8631
8632 http://www.ams.org
8633 \end_layout
8634
8635 \end_inset
8636
8637  or by ftp at 
8638 \begin_inset Flex URL
8639 status open
8640
8641 \begin_layout Plain Layout
8642
8643 ftp://ftp.ams.org/pub/tex/amslatex/
8644 \end_layout
8645
8646 \end_inset
8647
8648 .
8649  These layouts are appropriate, and useful, for any mathematical writing.
8650  
8651 \end_layout
8652
8653 \begin_layout Standard
8654 There are two basic AMS LaTeX layouts: 
8655 \end_layout
8656
8657 \begin_layout Itemize
8658 amsart: The standard AMS article format.
8659 \end_layout
8660
8661 \begin_layout Itemize
8662 amsbook: the standard AMS book (really, monograph) format.
8663  
8664 \end_layout
8665
8666 \begin_layout Standard
8667 The layouts themselves contain only the minimum necessary to use the AMS
8668  classes.
8669  They do not, in particular, contain any of the `theorem' environments used
8670  for setting theorems, lemmas, and the like.
8671  These are contained, instead, in the 
8672 \begin_inset Flex Code
8673 status collapsed
8674
8675 \begin_layout Plain Layout
8676 Theorems (AMS)
8677 \end_layout
8678
8679 \end_inset
8680
8681  module, which is loaded by default when when you select one of the AMS
8682  classes.
8683  (It can also be used with other classes and can be removed, if you would
8684  rather use something else.) Less commonly used environments are in the 
8685 \begin_inset Flex Code
8686 status collapsed
8687
8688 \begin_layout Plain Layout
8689 Theorems (AMS-Extended)
8690 \end_layout
8691
8692 \end_inset
8693
8694  module, which must be loaded manually.
8695 \end_layout
8696
8697 \begin_layout Standard
8698 By default, theorems and the like are numbered consecutively throughout
8699  the document, but this may be modified by loading the module 
8700 \begin_inset Flex Code
8701 status collapsed
8702
8703 \begin_layout Plain Layout
8704 Theorems (Order by Section)
8705 \end_layout
8706
8707 \end_inset
8708
8709  or, if you are using 
8710 \begin_inset Flex Code
8711 status collapsed
8712
8713 \begin_layout Plain Layout
8714 book (AMS)
8715 \end_layout
8716
8717 \end_inset
8718
8719 , the module 
8720 \begin_inset Flex Code
8721 status collapsed
8722
8723 \begin_layout Plain Layout
8724 Theorems (Order by Chapter)
8725 \end_layout
8726
8727 \end_inset
8728
8729 .
8730  These will number the results as 
8731 \begin_inset Formula $n.m$
8732 \end_inset
8733
8734 , where the first number refers to the section (or chapter) and the second
8735  refers to the total number of results so far in that section (or chapter).
8736  Many environments are also available unnumbered.
8737  These are indicated by an asterisk at the end.
8738  If you happen to want 
8739 \emph on
8740 only
8741 \emph default
8742  unnumbered results, the module 
8743 \begin_inset Flex Code
8744 status collapsed
8745
8746 \begin_layout Plain Layout
8747 Theorems (Starred)
8748 \end_layout
8749
8750 \end_inset
8751
8752  provides that option.
8753 \end_layout
8754
8755 \begin_layout Standard
8756 Note that these modules do not 
8757 \emph on
8758 have
8759 \emph default
8760  to be used with the AMS classes.
8761  It is perfectly possible to use the 
8762 \begin_inset Flex Code
8763 status collapsed
8764
8765 \begin_layout Plain Layout
8766 Theorems (AMS)
8767 \end_layout
8768
8769 \end_inset
8770
8771  module, and the others mentioned, with other classes, such as 
8772 \begin_inset Flex Code
8773 status collapsed
8774
8775 \begin_layout Plain Layout
8776 article
8777 \end_layout
8778
8779 \end_inset
8780
8781
8782 \begin_inset Flex Code
8783 status collapsed
8784
8785 \begin_layout Plain Layout
8786 report
8787 \end_layout
8788
8789 \end_inset
8790
8791
8792 \begin_inset Flex Code
8793 status collapsed
8794
8795 \begin_layout Plain Layout
8796 book (KOMA-script)
8797 \end_layout
8798
8799 \end_inset
8800
8801 , and so forth.
8802 \end_layout
8803
8804 \begin_layout Subsection
8805 What these layouts provide
8806 \end_layout
8807
8808 \begin_layout Standard
8809 There is a long list of included environments provided by these layouts.
8810  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8811  variety of `theorem' environments.
8812  However, the AMS recommends the environments that are available in LyX.
8813  
8814 \end_layout
8815
8816 \begin_layout Standard
8817 The following environments—as well as the standard environments, such as
8818  
8819 \begin_inset Flex Noun
8820 status collapsed
8821
8822 \begin_layout Plain Layout
8823 section
8824 \end_layout
8825
8826 \end_inset
8827
8828
8829 \begin_inset Flex Noun
8830 status collapsed
8831
8832 \begin_layout Plain Layout
8833 bibliography
8834 \end_layout
8835
8836 \end_inset
8837
8838
8839 \begin_inset Flex Noun
8840 status collapsed
8841
8842 \begin_layout Plain Layout
8843 title
8844 \end_layout
8845
8846 \end_inset
8847
8848
8849 \begin_inset Flex Noun
8850 status collapsed
8851
8852 \begin_layout Plain Layout
8853 author
8854 \end_layout
8855
8856 \end_inset
8857
8858 , and 
8859 \begin_inset Flex Noun
8860 status collapsed
8861
8862 \begin_layout Plain Layout
8863 date
8864 \end_layout
8865
8866 \end_inset
8867
8868 —are provided by 
8869 \begin_inset Flex Code
8870 status collapsed
8871
8872 \begin_layout Plain Layout
8873 article (AMS)
8874 \end_layout
8875
8876 \end_inset
8877
8878  and 
8879 \begin_inset Flex Code
8880 status collapsed
8881
8882 \begin_layout Plain Layout
8883 book (AMS)
8884 \end_layout
8885
8886 \end_inset
8887
8888 :
8889 \end_layout
8890
8891 \begin_layout Description
8892 Address This should be the author's permanent address.
8893 \end_layout
8894
8895 \begin_layout Description
8896 Current
8897 \begin_inset space ~
8898 \end_inset
8899
8900 Address This should be the author's temporary address at the time of submission,
8901  if different from the Address.
8902 \end_layout
8903
8904 \begin_layout Description
8905 Email Author's e-mail address
8906 \end_layout
8907
8908 \begin_layout Description
8909 URL Author's Web address, if desired.
8910 \end_layout
8911
8912 \begin_layout Description
8913 Keywords Key words or phrases used to identify specific topics discussed
8914  in the paper.
8915 \end_layout
8916
8917 \begin_layout Description
8918 Subjectclass These refer to the AMS Subject Classifications, published and
8919  described in 
8920 \emph on
8921 Mathematical Reviews
8922 \emph default
8923 .
8924  These are also available online at the AMS cites listed above.
8925 \end_layout
8926
8927 \begin_layout Description
8928 Thanks
8929 \end_layout
8930
8931 \begin_layout Description
8932 Dedicatory
8933 \end_layout
8934
8935 \begin_layout Description
8936 Translator
8937 \end_layout
8938
8939 \begin_layout Standard
8940 The following environments are provided by both the 
8941 \begin_inset Flex Code
8942 status collapsed
8943
8944 \begin_layout Plain Layout
8945 Theorems
8946 \end_layout
8947
8948 \end_inset
8949
8950  and 
8951 \begin_inset Flex Code
8952 status collapsed
8953
8954 \begin_layout Plain Layout
8955 Theorems (AMS)
8956 \end_layout
8957
8958 \end_inset
8959
8960  modules, in the latter case in both starred (unnumbered) and unstarred
8961  (numbered) versions.
8962  These same environments are provided only in the starred versions by the
8963  
8964 \begin_inset Flex Code
8965 status collapsed
8966
8967 \begin_layout Plain Layout
8968 Theorems (Starred)
8969 \end_layout
8970
8971 \end_inset
8972
8973  module:
8974 \end_layout
8975
8976 \begin_layout Theorem
8977 This is typically used for the statements of major results.
8978  
8979 \end_layout
8980
8981 \begin_layout Corollary*
8982 This is used for statements which follow fairly directly from previous statement
8983 s.
8984  Again, these can be major results.
8985  
8986 \end_layout
8987
8988 \begin_layout Lemma
8989 These are smaller results needed to prove other statements.
8990 \end_layout
8991
8992 \begin_layout Proposition
8993 These are less major results which (hopefully) add to the general theory
8994  being discussed.
8995 \end_layout
8996
8997 \begin_layout Conjecture
8998 These are statements provided without justification, which the author does
8999  not know how to prove, but which seem to be true (to the author, at least).
9000 \end_layout
9001
9002 \begin_layout Definition*
9003 Guess what this is for.
9004  The font is different for this environment than for the previous ones.
9005  
9006 \end_layout
9007
9008 \begin_layout Example*
9009 Used for examples illustrating proven results.
9010 \end_layout
9011
9012 \begin_layout Problem
9013 It's not really known what this is for.
9014  You should figure it out.
9015 \end_layout
9016
9017 \begin_layout Exercise*
9018 Write a description for this one.
9019 \end_layout
9020
9021 \begin_layout Remark
9022 This environment is also a type of theorem, usually a lesser sort of observation.
9023 \end_layout
9024
9025 \begin_layout Claim*
9026 Often used in the course of giving a proof of a larger result.
9027 \end_layout
9028
9029 \begin_layout Case
9030 Generally, these are used to break up long arguments, using specific instances
9031  of some condition.
9032  
9033 \end_layout
9034
9035 \begin_layout Case
9036 The numbering scheme for cases is on its own, not together with other numbered
9037  statements.
9038  
9039 \end_layout
9040
9041 \begin_layout Proof
9042 At the end of this environment, a QED symbol (usually a square, but it can
9043  vary with different styles) is placed.
9044  If you want to have other environments within this one—for example, Case
9045  environments—and have the QED symbol appear only after them, then the other
9046  environments need to be nested within the proof environment.
9047  See the section 
9048 \emph on
9049 Nesting Environments
9050 \emph default
9051  of the 
9052 \emph on
9053 User's Guide
9054 \emph default
9055  for information on nesting.
9056 \end_layout
9057
9058 \begin_layout Standard
9059 And these environments are provided by 
9060 \begin_inset Flex Code
9061 status collapsed
9062
9063 \begin_layout Plain Layout
9064 Theorems (AMS-Extended)
9065 \end_layout
9066
9067 \end_inset
9068
9069 :
9070 \end_layout
9071
9072 \begin_layout Criterion*
9073 A required condition.
9074 \end_layout
9075
9076 \begin_layout Algorithm*
9077 A general procedure to be used.
9078 \end_layout
9079
9080 \begin_layout Axiom*
9081 This is a property or statement taken as true within the system being discussed.
9082 \end_layout
9083
9084 \begin_layout Condition*
9085 Sometimes used to state a condition assumed within the present context of
9086  discussion.
9087 \end_layout
9088
9089 \begin_layout Note*
9090 Similar to a Remark.
9091 \end_layout
9092
9093 \begin_layout Notation*
9094 Used for the explanation of, yes, notation.
9095 \end_layout
9096
9097 \begin_layout Summary
9098 Do we really need to tell you? 
9099 \end_layout
9100
9101 \begin_layout Acknowledgement*
9102 Acknowledgement.
9103 \end_layout
9104
9105 \begin_layout Conclusion*
9106 Sometimes used at the end of a long train of argument.
9107 \end_layout
9108
9109 \begin_layout Fact
9110 Used in a way similar to Proposition, though perhaps lower on the scale.
9111 \end_layout
9112
9113 \begin_layout Standard
9114 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9115  fonts packages.
9116  They need to be available on your system in order to use these environments.
9117 \end_layout
9118
9119 \begin_layout Section
9120 AGU journals (
9121 \family sans
9122 aguplus
9123 \family default
9124 )
9125 \end_layout
9126
9127 \begin_layout Standard
9128 by 
9129 \shape smallcaps
9130 Martin Vermeer
9131 \end_layout
9132
9133 \begin_layout Subsection
9134 Description
9135 \end_layout
9136
9137 \begin_layout Standard
9138 These are the layout files for some of the journals of the American Geophysical
9139  Society.
9140  It is assumed that you have both the AGU's own class files and AGUplus
9141  installed (everything to be found at
9142 \begin_inset Flex URL
9143 status collapsed
9144
9145 \begin_layout Plain Layout
9146
9147 ftp://ftp.agu.org/journals/latex/journals
9148 \end_layout
9149
9150 \end_inset
9151
9152 ).
9153 \end_layout
9154
9155 \begin_layout Subsection
9156 New styles
9157 \end_layout
9158
9159 \begin_layout Standard
9160 Redefined are 
9161 \family sans
9162 Paragraph
9163 \family default
9164
9165 \family sans
9166 Paragraph*
9167 \family default
9168 .
9169  They are still called this in the LyX GUI, though their LaTeX equivalents
9170  in the AGU classes are 
9171 \family sans
9172 Subsubsubsection
9173 \family default
9174  and 
9175 \family sans
9176 Subsubsubsection*
9177 \family default
9178 .
9179 \end_layout
9180
9181 \begin_layout Standard
9182 Newly defined styles are 
9183 \family sans
9184 Left_Header
9185 \family default
9186
9187 \family sans
9188 Right_Header
9189 \family default
9190
9191 \family sans
9192 Received
9193 \family default
9194
9195 \family sans
9196 Revised
9197 \family default
9198
9199 \family sans
9200 Accepted
9201 \family default
9202
9203 \family sans
9204 CCC
9205 \family default
9206
9207 \family sans
9208 PaperId
9209 \family default
9210
9211 \family sans
9212 AuthorAddr
9213 \family default
9214
9215 \family sans
9216 SlugComment
9217 \family default
9218 .
9219  These are mostly manuscript attributes and defined in the AGU class documentati
9220 on.
9221 \end_layout
9222
9223 \begin_layout Standard
9224 I suspect this is still badly incomplete.
9225 \end_layout
9226
9227 \begin_layout Subsection
9228 New floats
9229 \end_layout
9230
9231 \begin_layout Standard
9232
9233 \family sans
9234 Planotable
9235 \family default
9236  and 
9237 \family sans
9238 Plate
9239 \family default
9240 .
9241  We also have a new 
9242 \family sans
9243 Table_Caption
9244 \family default
9245 .
9246 \end_layout
9247
9248 \begin_layout Subsection
9249 Supported journals
9250 \end_layout
9251
9252 \begin_layout Itemize
9253
9254 \emph on
9255 Journal of Geophysical Research
9256 \emph default
9257
9258 \family typewriter
9259 jgrga.layout
9260 \family default
9261  — Martin Vermeer
9262 \end_layout
9263
9264 \begin_layout Standard
9265 Add your own, it isn't so hard! Look at the 
9266 \family typewriter
9267 jgrga.layout
9268 \family default
9269  example and 
9270 \family typewriter
9271 aguplus.inc
9272 \family default
9273 .
9274 \end_layout
9275
9276 \begin_layout Subsection
9277 Bugs and things to remember
9278 \end_layout
9279
9280 \begin_layout Standard
9281 In order to use the new layouts, you must remember to do the following for
9282  a new document:
9283 \end_layout
9284
9285 \begin_layout Enumerate
9286
9287 \emph on
9288 Turn off babel
9289 \emph default
9290 .
9291  This can be done in the 
9292 \family sans
9293 Layout\SpecialChar \menuseparator
9294 Document
9295 \family default
9296  or 
9297 \family sans
9298 Document\SpecialChar \menuseparator
9299 Settings
9300 \family default
9301  menu item.
9302  (AGU articles are always in English, right? So 
9303 \emph on
9304 don't
9305 \emph default
9306  choose a language.)
9307 \end_layout
9308
9309 \begin_layout Enumerate
9310 Enter 
9311 \family typewriter
9312 jgrga
9313 \family default
9314  into the document's 
9315 \family sans
9316 Extra Options
9317 \family default
9318  field.
9319  (Yes, this is a bug.)
9320 \end_layout
9321
9322 \begin_layout Enumerate
9323 Make sure you use the 
9324 \family typewriter
9325 agu.bst
9326 \family default
9327  bibliography style, by entering 
9328 \family sans
9329 agu
9330 \family default
9331  into the second field of the BibTeX inset.
9332  None of the standard styles will do.
9333 \end_layout
9334
9335 \begin_layout Section
9336 Broadway
9337 \end_layout
9338
9339 \begin_layout Standard
9340 by 
9341 \shape smallcaps
9342 Garst Reese
9343 \end_layout
9344
9345 \begin_layout Subsection
9346 Introduction
9347 \end_layout
9348
9349 \begin_layout Standard
9350 Broadway is for writing plays.
9351  The format is more decorative than Hollywood, and much less standardized.
9352  This format should be suitable for workshops.
9353 \end_layout
9354
9355 \begin_layout Subsection
9356 Special problems
9357 \end_layout
9358
9359 \begin_layout Standard
9360 The same as in Hollywood.
9361 \end_layout
9362
9363 \begin_layout Subsection
9364 Special features
9365 \end_layout
9366
9367 \begin_layout Standard
9368 Insert the 
9369 \family sans
9370 Speaker
9371 \family default
9372  names as labels then cross-reference the label to insert the name.
9373  The cross-reference dialog will show the current cast of characters.
9374 \end_layout
9375
9376 \begin_layout Subsection
9377 Paper size and Margins
9378 \end_layout
9379
9380 \begin_layout Standard
9381 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9382 \end_layout
9383
9384 \begin_layout Subsection
9385 Environments
9386 \end_layout
9387
9388 \begin_layout Standard
9389 The following environments are available.
9390  You can use broadway.bind to get the bind keys shown at the right.
9391 \end_layout
9392
9393 \begin_layout Itemize
9394
9395 \family sans
9396 Standard
9397 \begin_inset Newline newline
9398 \end_inset
9399
9400
9401 \family default
9402 You should not have to use this, but it is here for anything that does not
9403  fit otherwise.
9404 \end_layout
9405
9406 \begin_layout Itemize
9407
9408 \family sans
9409 Narrative
9410 \begin_inset space \hfill{}
9411 \end_inset
9412
9413 M-z n
9414 \begin_inset Newline newline
9415 \end_inset
9416
9417
9418 \family default
9419 Used to describe stage setting and the action.
9420  First use of speaker names in all CAPs.
9421 \end_layout
9422
9423 \begin_layout Itemize
9424
9425 \family sans
9426 ACT
9427 \begin_inset space \hfill{}
9428 \end_inset
9429
9430 M-z a
9431 \begin_inset Newline newline
9432 \end_inset
9433
9434
9435 \family default
9436 Automatically numbered.
9437  On screen it will be arabic, but will print as Roman.
9438 \end_layout
9439
9440 \begin_layout Itemize
9441
9442 \family sans
9443 ACT*
9444 \begin_inset space \hfill{}
9445 \end_inset
9446
9447 M-z S at
9448 \begin_inset Newline newline
9449 \end_inset
9450
9451
9452 \family default
9453 Subtitle for 
9454 \family sans
9455 ACT.
9456
9457 \family default
9458  It is just centered text.
9459 \end_layout
9460
9461 \begin_layout Itemize
9462
9463 \family sans
9464 SCENE
9465 \begin_inset space \hfill{}
9466 \end_inset
9467
9468 M-z S-S
9469 \begin_inset Newline newline
9470 \end_inset
9471
9472
9473 \family default
9474 Not automatically numbered.
9475  You supply the number.
9476  This is because I couldn't figure out how.
9477 \end_layout
9478
9479 \begin_layout Itemize
9480
9481 \family sans
9482 AT_RISE:
9483 \begin_inset space \hfill{}
9484 \end_inset
9485
9486 M-z S-R
9487 \begin_inset Newline newline
9488 \end_inset
9489
9490
9491 \family default
9492 A special case of Narrative to describe the setting and action as the curtain
9493  rises.
9494 \end_layout
9495
9496 \begin_layout Itemize
9497
9498 \family sans
9499 Speaker
9500 \begin_inset space \hfill{}
9501 \end_inset
9502
9503 M-z s
9504 \begin_inset Newline newline
9505 \end_inset
9506
9507
9508 \family default
9509 The speaker's (actor's) title, centered in all CAPS.
9510 \end_layout
9511
9512 \begin_layout Itemize
9513
9514 \family sans
9515 Parenthetical
9516 \begin_inset space \hfill{}
9517 \end_inset
9518
9519 M-z p
9520 \begin_inset Newline newline
9521 \end_inset
9522
9523
9524 \family default
9525 Instructions to the speaker.
9526  The parentheses are automatically inserted.
9527  The ( will appear on screen, but both will be in the printed play.
9528  This environment is only used within 
9529 \family sans
9530 Dialogue
9531 \family default
9532 .
9533 \end_layout
9534
9535 \begin_layout Itemize
9536
9537 \family sans
9538 Dialogue
9539 \begin_inset space \hfill{}
9540 \end_inset
9541
9542 M-z d
9543 \begin_inset Newline newline
9544 \end_inset
9545
9546
9547 \family default
9548 What the Speaker says.
9549 \end_layout
9550
9551 \begin_layout Itemize
9552
9553 \family sans
9554 CURTAIN
9555 \begin_inset space \hfill{}
9556 \end_inset
9557
9558 M-z S-C
9559 \begin_inset Newline newline
9560 \end_inset
9561
9562
9563 \family default
9564 The curtain comes down.
9565 \end_layout
9566
9567 \begin_layout Itemize
9568
9569 \family sans
9570 Title
9571 \begin_inset space \hfill{}
9572 \end_inset
9573
9574 M-z S-T
9575 \end_layout
9576
9577 \begin_layout Itemize
9578
9579 \family sans
9580 Author
9581 \begin_inset space \hfill{}
9582 \end_inset
9583
9584 M-z S-A
9585 \end_layout
9586
9587 \begin_layout Itemize
9588
9589 \family sans
9590 Right_Address
9591 \begin_inset space \hfill{}
9592 \end_inset
9593
9594 M-z r
9595 \end_layout
9596
9597 \begin_layout Standard
9598 Hello there.
9599 \end_layout
9600
9601 \begin_layout Section
9602 Dinbrief
9603 \end_layout
9604
9605 \begin_layout Standard
9606 The document class 
9607 \family sans
9608 dinbrief
9609 \family default
9610  can be used to type letters according to German conventions.
9611  A template file is included in 
9612 \family typewriter
9613 .../lyx/share/templates
9614 \family default
9615  for you to use as a starting point.
9616 \end_layout
9617
9618 \begin_layout Section
9619 EGS journals (
9620 \family sans
9621 egs
9622 \family default
9623 )
9624 \end_layout
9625
9626 \begin_layout Standard
9627 by 
9628 \shape smallcaps
9629 Martin Vermeer
9630 \end_layout
9631
9632 \begin_layout Subsection
9633 Description
9634 \end_layout
9635
9636 \begin_layout Standard
9637 This is the layout file for the European Geophysical Society journals.
9638  The needed 
9639 \family typewriter
9640 egs.cls
9641 \family default
9642  can be downloaded from the web site of the EGS under 
9643 \begin_inset Flex URL
9644 status collapsed
9645
9646 \begin_layout Plain Layout
9647
9648 www.copernicus.org
9649 \end_layout
9650
9651 \end_inset
9652
9653 .
9654 \end_layout
9655
9656 \begin_layout Subsection
9657 New styles
9658 \end_layout
9659
9660 \begin_layout Standard
9661
9662 \family sans
9663 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9664  Accepted
9665 \family default
9666
9667 \family sans
9668 Offsets
9669 \family default
9670 .
9671  The current layout file is unfortunately very unmodular and would benefit
9672  from using the various 
9673 \family typewriter
9674 std*.inc
9675 \family default
9676  file inclusions.
9677 \end_layout
9678
9679 \begin_layout Section
9680 Elsevier Journals
9681 \end_layout
9682
9683 \begin_layout Standard
9684 By 
9685 \noun on
9686 Rod Pinna
9687 \end_layout
9688
9689 \begin_layout Standard
9690 Elsevier Science Publishers B.V.
9691  provides a standard LaTeX document class (
9692 \family typewriter
9693 elsart.cls
9694 \family default
9695 ) for submitting articles to their various journals.
9696  The style file can be downloaded directly from their web site: 
9697 \begin_inset Flex URL
9698 status collapsed
9699
9700 \begin_layout Plain Layout
9701
9702 http://www.elsevier.com/wps/find/authorsview.authors/latex
9703 \end_layout
9704
9705 \end_inset
9706
9707 .
9708  Instructions are supplied along with the class file, which details the
9709  requirements of the publishers.
9710  LyX includes a package that allows for the use of this class, by a layout
9711  and a template file.
9712  Installation of the class file is the same as for any other LaTeX package;
9713  instructions are provided in the Elsevier documentation.
9714 \end_layout
9715
9716 \begin_layout Standard
9717 To make use of 
9718 \family typewriter
9719 elsart.cls
9720 \family default
9721 , a file 
9722 \family typewriter
9723 elsart.layout
9724 \family default
9725  is supplied.
9726  As the Elsevier class file is based mainly on the standard article class,
9727  most of the normal functionality is provided.
9728  The Elsevier class defines a number of mathematical environments, which
9729  are similar to the AMS environments.
9730  These commands are all described in the Elsevier documentation, and are
9731  available in LyX.
9732 \end_layout
9733
9734 \begin_layout Standard
9735 The easiest way to use the Elsevier style is to base documents on the included
9736  template file.
9737  It is best not to use options such as fancy headings or the geometry package,
9738  as elements such as these are defined by Elsevier in their style file.
9739  Ideally, no extra packages except those mentioned in the Elsevier documentation
9740  should be used.
9741  Essentially, Elsevier require as 
9742 \begin_inset Quotes eld
9743 \end_inset
9744
9745 clean
9746 \begin_inset Quotes erd
9747 \end_inset
9748
9749  a LaTeX file as possible, as their intention is to take the supplied file
9750  and replace the class file with one for the particular journal to which
9751  the paper has been submitted.
9752  This also means that not too much time should be spent on the formating
9753  of the document.
9754  When it comes to be published, this will change anyway.
9755  The rest of the usage for this layout is substantially the same as for
9756  the normal article class.
9757  For details of what Elsevier do and don't allow, refer to their documentation.
9758 \end_layout
9759
9760 \begin_layout Section
9761 Foils [aka 
9762 \family sans
9763 FoilTeX
9764 \family default
9765 ]
9766 \begin_inset CommandInset label
9767 LatexCommand label
9768 name "sec:foiltex"
9769
9770 \end_inset
9771
9772
9773 \end_layout
9774
9775 \begin_layout Standard
9776 by 
9777 \noun on
9778 Allan Rae
9779 \end_layout
9780
9781 \begin_layout Subsection
9782 Introduction
9783 \end_layout
9784
9785 \begin_layout Standard
9786 This section describes how to use LyX to make slides for overhead projectors.
9787  There are two document classes that can do this: the default slides class
9788  and the 
9789 \family sans
9790 FoilTeX
9791 \family default
9792  slides class.
9793  This section documents the latter.
9794 \end_layout
9795
9796 \begin_layout Standard
9797 I'm going to say this again, nice and clear, so that there's no misunderstanding
9798 :
9799 \end_layout
9800
9801 \begin_layout Standard
9802 \begin_inset VSpace bigskip
9803 \end_inset
9804
9805
9806 \end_layout
9807
9808 \begin_layout Standard
9809 \align center
9810
9811 \size large
9812 This section documents the class 
9813 \begin_inset Quotes eld
9814 \end_inset
9815
9816
9817 \family sans
9818 slides (FoilTeX)
9819 \family default
9820
9821 \begin_inset Quotes erd
9822 \end_inset
9823
9824  
9825 \emph on
9826 only.
9827 \end_layout
9828
9829 \begin_layout Standard
9830 \begin_inset VSpace bigskip
9831 \end_inset
9832
9833
9834 \end_layout
9835
9836 \begin_layout Standard
9837 If you're looking for the documentation for 
9838 \begin_inset Quotes eld
9839 \end_inset
9840
9841
9842 \family sans
9843 slides (default)
9844 \family default
9845
9846 \begin_inset Quotes erd
9847 \end_inset
9848
9849 , check out section
9850 \begin_inset space ~
9851 \end_inset
9852
9853
9854 \begin_inset CommandInset ref
9855 LatexCommand ref
9856 reference "sec:slitex"
9857
9858 \end_inset
9859
9860 .
9861  If your machine doesn't have the 
9862 \family sans
9863 foils
9864 \family default
9865  class [
9866 \begin_inset Quotes eld
9867 \end_inset
9868
9869
9870 \family sans
9871 slides (FoilTeX)
9872 \family default
9873
9874 \begin_inset Quotes erd
9875 \end_inset
9876
9877 ] installed, you'll probably have to use the default 
9878 \family sans
9879 slides
9880 \family default
9881  class, which isn't quite as good as 
9882 \family sans
9883 foils.
9884 \end_layout
9885
9886 \begin_layout Standard
9887 The 
9888 \family sans
9889 foils
9890 \family default
9891  class is designed for use with version 2.1 of the 
9892 \family sans
9893 foils.cls
9894 \family default
9895  LaTeX class file which is now an integral part of LaTeX2e.
9896 \end_layout
9897
9898 \begin_layout Subsection
9899 Getting Started
9900 \end_layout
9901
9902 \begin_layout Standard
9903 Obviously, to use this document class, you need to select 
9904 \begin_inset Quotes eld
9905 \end_inset
9906
9907
9908 \family sans
9909 slides (FoilTeX)
9910 \family default
9911
9912 \begin_inset Quotes erd
9913 \end_inset
9914
9915  from the 
9916 \family sans
9917 Class
9918 \family default
9919  entry in the 
9920 \family sans
9921 Document
9922 \begin_inset space ~
9923 \end_inset
9924
9925 Layout
9926 \family default
9927  dialog.
9928  There are some settings in the 
9929 \family sans
9930 Document
9931 \begin_inset space ~
9932 \end_inset
9933
9934 Layout
9935 \family default
9936  dialog that you should know about that are specific to this class:
9937 \end_layout
9938
9939 \begin_layout Itemize
9940 Don't change the options 
9941 \family sans
9942 Sides
9943 \family default
9944  and 
9945 \family sans
9946 Columns
9947 \family default
9948  on the 
9949 \family sans
9950 Document
9951 \begin_inset space ~
9952 \end_inset
9953
9954 Layout
9955 \family default
9956  dialog.
9957  They're ignored by the 
9958 \family sans
9959 foils
9960 \family default
9961  class.
9962 \end_layout
9963
9964 \begin_layout Itemize
9965 The default font size is 20
9966 \begin_inset space \thinspace{}
9967 \end_inset
9968
9969 pt with the other options being 17
9970 \begin_inset space \thinspace{}
9971 \end_inset
9972
9973 pt, 25
9974 \begin_inset space \thinspace{}
9975 \end_inset
9976
9977 pt and 30
9978 \begin_inset space \thinspace{}
9979 \end_inset
9980
9981 pt.
9982 \end_layout
9983
9984 \begin_layout Itemize
9985 The default font is 
9986 \family sans
9987 sans
9988 \family default
9989  
9990 \family sans
9991 serif
9992 \family default
9993  but all math equations are still typeset in the usual roman font.
9994 \end_layout
9995
9996 \begin_layout Itemize
9997
9998 \family sans
9999 FoilTeX
10000 \family default
10001  supports A4 and Letter paper sizes as well as a special size for working
10002  with 35
10003 \begin_inset space \thinspace{}
10004 \end_inset
10005
10006 mm slides.
10007  It doesn't support A5, B5, legal or executive paper sizes.
10008 \end_layout
10009
10010 \begin_layout Itemize
10011 Don't bother changing the 
10012 \family sans
10013 Float Placement
10014 \family default
10015  settings because they are ignored anyway.
10016  All floats appear where they are defined in the text.
10017 \end_layout
10018
10019 \begin_layout Itemize
10020 The 
10021 \family sans
10022 Pagestyle
10023 \family default
10024  setting behaves a bit differently for this class.
10025  
10026 \family sans
10027 FoilTeX
10028 \family default
10029  provides extensive footer and header capabilities including a user-defined
10030  logo.
10031  See section
10032 \begin_inset space ~
10033 \end_inset
10034
10035
10036 \begin_inset CommandInset ref
10037 LatexCommand ref
10038 reference "sec:foilfoot"
10039
10040 \end_inset
10041
10042  for more details.
10043  The title page is treated differently to all other pages in the document
10044  and is 
10045 \emph on
10046 always
10047 \emph default
10048  unnumbered and 
10049 \emph on
10050 always
10051 \emph default
10052  has the logo centered at the bottom of the page (if one is defined).
10053  The possible page style choices and what they do are as follows:
10054 \end_layout
10055
10056 \begin_deeper
10057 \begin_layout Labeling
10058 \labelwidthstring MMMMMMM
10059
10060 \family sans
10061 \series bold
10062 empty
10063 \family default
10064 \series default
10065  The final output contains no page numbers, or other headers or footers
10066  (except footnotes of course).
10067  
10068 \end_layout
10069
10070 \begin_layout Labeling
10071 \labelwidthstring MMMMMMM
10072
10073 \family sans
10074 \series bold
10075 plain
10076 \family default
10077 \series default
10078  The final output contains page numbers centered at the bottom of the page.
10079  No other headings or footers (other than footnotes).
10080 \end_layout
10081
10082 \begin_layout Labeling
10083 \labelwidthstring MMMMMMM
10084
10085 \series bold
10086 foilheadings
10087 \series default
10088  Page numbers in lower right corner.
10089  Additional headers and footers are also shown.
10090  This is also the default.
10091 \end_layout
10092
10093 \begin_layout Labeling
10094 \labelwidthstring MMMMMMM
10095
10096 \series bold
10097 fancy
10098 \series default
10099  Gives you access to the 
10100 \family sans
10101 fancyheadings
10102 \family default
10103  package although its use with 
10104 \family sans
10105 FoilTeX
10106 \family default
10107  is discouraged by the writer of the 
10108 \family sans
10109 FoilTeX
10110 \family default
10111  package because of some potential page layout clashes.
10112 \end_layout
10113
10114 \end_deeper
10115 \begin_layout Subsubsection
10116 Extra Options
10117 \end_layout
10118
10119 \begin_layout Standard
10120 The following options may be used in the extra class options in the 
10121 \family sans
10122 Document\SpecialChar \menuseparator
10123 Settings
10124 \family default
10125  dialog.
10126 \end_layout
10127
10128 \begin_layout Labeling
10129 \labelwidthstring MMMMMMx
10130
10131 \series bold
10132 35mmSlide
10133 \series default
10134  This sets up the page layout for 7.33
10135 \begin_inset space \thinspace{}
10136 \end_inset
10137
10138 in by 11
10139 \begin_inset space \thinspace{}
10140 \end_inset
10141
10142 in paper, which is about the same aspect ratio as a 35
10143 \begin_inset space \thinspace{}
10144 \end_inset
10145
10146 mm slide, making it a bit easier to work with this medium.
10147 \end_layout
10148
10149 \begin_layout Labeling
10150 \labelwidthstring MMMMMMx
10151
10152 \series bold
10153 headrule
10154 \series default
10155  Places a rule across the page below the header on every page except the
10156  title page.
10157 \end_layout
10158
10159 \begin_layout Labeling
10160 \labelwidthstring MMMMMMx
10161
10162 \series bold
10163 footrule
10164 \series default
10165  Places a rule across the page above the footer on every page except the
10166  title page.
10167 \end_layout
10168
10169 \begin_layout Labeling
10170 \labelwidthstring MMMMMMx
10171
10172 \series bold
10173 dvips
10174 \series default
10175  This is automatically set each time you create a new 
10176 \family sans
10177 foils
10178 \family default
10179  document.
10180  This option tells 
10181 \family sans
10182 FoilTeX
10183 \family default
10184  to use the dvips driver to rotate those pages that are set as landscape
10185  foils.
10186 \end_layout
10187
10188 \begin_layout Labeling
10189 \labelwidthstring MMMMMMx
10190
10191 \series bold
10192 landscape
10193 \series default
10194  Simply changes the page dimensions to those of a landscape page but doesn't
10195  do any rotation.
10196  Thus if you use this option you need to use an external program to rotate
10197  each page or feed your paper through your printer as landscape.
10198  Note that this option effectively reverses the roles of the 
10199 \family sans
10200 Foilhead
10201 \family default
10202  and 
10203 \family sans
10204 Rotatefoilhead
10205 \family default
10206  environments (don't worry these are described in the next section).
10207 \end_layout
10208
10209 \begin_layout Labeling
10210 \labelwidthstring MMMMMMx
10211
10212 \series bold
10213 leqno
10214 \series default
10215  Equation numbers on the left.
10216 \end_layout
10217
10218 \begin_layout Labeling
10219 \labelwidthstring MMMMMMx
10220
10221 \series bold
10222 fleqn
10223 \series default
10224  Flush-left equations.
10225 \end_layout
10226
10227 \begin_layout Subsection
10228 Supported Environments
10229 \end_layout
10230
10231 \begin_layout Standard
10232 Most of the environments commonly supported in other classes are also supported
10233  by the 
10234 \family sans
10235 foils
10236 \family default
10237  class.
10238  There are several additional environments provided by 
10239 \family sans
10240 FoilTeX
10241 \family default
10242  as well as a couple added by LyX.
10243  The following environments are shared with other classes:
10244 \end_layout
10245
10246 \begin_layout Standard
10247 \begin_inset ERT
10248 status open
10249
10250 \begin_layout Plain Layout
10251
10252
10253 \backslash
10254 begin{multicols}{2}
10255 \end_layout
10256
10257 \end_inset
10258
10259
10260 \end_layout
10261
10262 \begin_layout Itemize
10263
10264 \family sans
10265 Standard
10266 \end_layout
10267
10268 \begin_layout Itemize
10269
10270 \family sans
10271 Itemize
10272 \end_layout
10273
10274 \begin_layout Itemize
10275
10276 \family sans
10277 Enumerate
10278 \end_layout
10279
10280 \begin_layout Itemize
10281
10282 \family sans
10283 Description
10284 \end_layout
10285
10286 \begin_layout Itemize
10287
10288 \family sans
10289 List
10290 \end_layout
10291
10292 \begin_layout Itemize
10293
10294 \family sans
10295 LyX-Code
10296 \end_layout
10297
10298 \begin_layout Itemize
10299
10300 \family sans
10301 Verse
10302 \end_layout
10303
10304 \begin_layout Itemize
10305
10306 \family sans
10307 Quote
10308 \end_layout
10309
10310 \begin_layout Itemize
10311
10312 \family sans
10313 Quotation
10314 \end_layout
10315
10316 \begin_layout Itemize
10317
10318 \family sans
10319 Title
10320 \end_layout
10321
10322 \begin_layout Itemize
10323
10324 \family sans
10325 Author
10326 \end_layout
10327
10328 \begin_layout Itemize
10329
10330 \family sans
10331 Date
10332 \end_layout
10333
10334 \begin_layout Itemize
10335
10336 \family sans
10337 Abstract
10338 \end_layout
10339
10340 \begin_layout Itemize
10341
10342 \family sans
10343 Bibliography
10344 \end_layout
10345
10346 \begin_layout Itemize
10347
10348 \family sans
10349 Address
10350 \end_layout
10351
10352 \begin_layout Itemize
10353
10354 \family sans
10355 RightAddress
10356 \end_layout
10357
10358 \begin_layout Itemize
10359
10360 \family sans
10361 Caption
10362 \end_layout
10363
10364 \begin_layout Itemize
10365
10366 \family sans
10367 Comment
10368 \end_layout
10369
10370 \begin_layout Standard
10371 \begin_inset ERT
10372 status open
10373
10374 \begin_layout Plain Layout
10375
10376
10377 \backslash
10378 end{multicols}
10379 \end_layout
10380
10381 \end_inset
10382
10383
10384 \end_layout
10385
10386 \begin_layout Standard
10387 That is, all the major environments apart from the sectioning environments.
10388  Since foils are essentially self-contained sections, with a title and body,
10389  
10390 \family sans
10391 FoilTeX
10392 \family default
10393  provides specific commands for starting new foils and these are:
10394 \end_layout
10395
10396 \begin_layout Itemize
10397
10398 \family sans
10399 Foilhead
10400 \end_layout
10401
10402 \begin_layout Itemize
10403
10404 \family sans
10405 Rotatefoilhead
10406 \end_layout
10407
10408 \begin_layout Standard
10409 LyX also provides slightly modified versions of these two environments called:
10410 \end_layout
10411
10412 \begin_layout Itemize
10413
10414 \family sans
10415 ShortFoilhead
10416 \end_layout
10417
10418 \begin_layout Itemize
10419
10420 \family sans
10421 ShortRotatefoilhead
10422 \end_layout
10423
10424 \begin_layout Standard
10425 and the differences will be explained in the next section.
10426 \end_layout
10427
10428 \begin_layout Standard
10429 Since foils are often used in presenting ideas or new theorems and such
10430  
10431 \family sans
10432 FoilTeX
10433 \family default
10434  also provides a comprehensive box of goodies for presenting them:
10435 \end_layout
10436
10437 \begin_layout Standard
10438 \begin_inset ERT
10439 status open
10440
10441 \begin_layout Plain Layout
10442
10443
10444 \backslash
10445 begin{multicols}{2}
10446 \end_layout
10447
10448 \end_inset
10449
10450
10451 \end_layout
10452
10453 \begin_layout Itemize
10454
10455 \family sans
10456 Theorem
10457 \end_layout
10458
10459 \begin_layout Itemize
10460
10461 \family sans
10462 Lemma
10463 \end_layout
10464
10465 \begin_layout Itemize
10466
10467 \family sans
10468 Corollary
10469 \end_layout
10470
10471 \begin_layout Itemize
10472
10473 \family sans
10474 Proposition
10475 \end_layout
10476
10477 \begin_layout Itemize
10478
10479 \family sans
10480 Definition
10481 \end_layout
10482
10483 \begin_layout Itemize
10484
10485 \family sans
10486 Proof
10487 \end_layout
10488
10489 \begin_layout Itemize
10490
10491 \family sans
10492 Theorem*
10493 \end_layout
10494
10495 \begin_layout Itemize
10496
10497 \family sans
10498 Lemma*
10499 \end_layout
10500
10501 \begin_layout Itemize
10502
10503 \family sans
10504 Corollary*
10505 \end_layout
10506
10507 \begin_layout Itemize
10508
10509 \family sans
10510 Proposition*
10511 \end_layout
10512
10513 \begin_layout Itemize
10514
10515 \family sans
10516 Definition*
10517 \end_layout
10518
10519 \begin_layout Standard
10520 \begin_inset ERT
10521 status open
10522
10523 \begin_layout Plain Layout
10524
10525
10526 \backslash
10527 end{multicols}
10528 \end_layout
10529
10530 \end_inset
10531
10532
10533 \end_layout
10534
10535 \begin_layout Standard
10536 The starred versions are unnumbered while the unstarred versions are numbered.
10537  There are also two list environments added by LyX and these are:
10538 \end_layout
10539
10540 \begin_layout Itemize
10541
10542 \family sans
10543 TickList
10544 \end_layout
10545
10546 \begin_layout Itemize
10547
10548 \family sans
10549 CrossList
10550 \end_layout
10551
10552 \begin_layout Standard
10553
10554 \family sans
10555 FoilTeX
10556 \family default
10557  provides some powerful header and footer capabilities that are best set
10558  in the preamble although they may be set at any point in a document.
10559  If you want to change these settings in your document the best place to
10560  do so is at the very top of a foil, i.
10561 \begin_inset space \thinspace{}
10562 \end_inset
10563
10564 g.
10565 \emph on
10566
10567 \begin_inset space \space{}
10568 \end_inset
10569
10570
10571 \emph default
10572 straight after the foilhead.
10573 \end_layout
10574
10575 \begin_layout Standard
10576 For this purpose, the following command styles are provided [
10577 \shape smallcaps
10578 Martin Vermeer
10579 \shape default
10580 ]:
10581 \end_layout
10582
10583 \begin_layout Standard
10584 \begin_inset ERT
10585 status open
10586
10587 \begin_layout Plain Layout
10588
10589
10590 \backslash
10591 begin{multicols}{2}
10592 \end_layout
10593
10594 \end_inset
10595
10596
10597 \end_layout
10598
10599 \begin_layout Itemize
10600
10601 \family sans
10602 My
10603 \begin_inset space ~
10604 \end_inset
10605
10606 Logo
10607 \end_layout
10608
10609 \begin_layout Itemize
10610
10611 \family sans
10612 Restriction
10613 \end_layout
10614
10615 \begin_layout Itemize
10616
10617 \family sans
10618 Right
10619 \begin_inset space ~
10620 \end_inset
10621
10622 Footer
10623 \end_layout
10624
10625 \begin_layout Itemize
10626
10627 \family sans
10628 Right
10629 \begin_inset space ~
10630 \end_inset
10631
10632 Header
10633 \end_layout
10634
10635 \begin_layout Itemize
10636
10637 \family sans
10638 Left
10639 \begin_inset space ~
10640 \end_inset
10641
10642 Header
10643 \end_layout
10644
10645 \begin_deeper
10646 \begin_layout Standard
10647 \begin_inset space ~
10648 \end_inset
10649
10650
10651 \end_layout
10652
10653 \end_deeper
10654 \begin_layout Standard
10655 \begin_inset ERT
10656 status open
10657
10658 \begin_layout Plain Layout
10659
10660
10661 \backslash
10662 end{multicols}
10663 \end_layout
10664
10665 \end_inset
10666
10667
10668 \end_layout
10669
10670 \begin_layout Standard
10671 There are also a few commands provided by 
10672 \family sans
10673 FoilTeX
10674 \family default
10675  that aren't directly supported by LyX but I'll tell you what they do and
10676  how to use them in section
10677 \begin_inset space ~
10678 \end_inset
10679
10680
10681 \begin_inset CommandInset ref
10682 LatexCommand ref
10683 reference "sec:unsuppfoils"
10684
10685 \end_inset
10686
10687 .
10688 \end_layout
10689
10690 \begin_layout Subsection
10691 Building a Set of Foils
10692 \end_layout
10693
10694 \begin_layout Standard
10695 This section will give a simple introduction to using the different environments
10696  to build a set of foils.
10697  If you want to see an example set of foils, take a look at the 
10698 \family typewriter
10699 Foils.lyx
10700 \family default
10701  file you find in LyX's 
10702 \family typewriter
10703 examples
10704 \family default
10705  folder.
10706 \end_layout
10707
10708 \begin_layout Subsubsection
10709 Give It a Title Page
10710 \end_layout
10711
10712 \begin_layout Standard
10713 Unlike other classes that provide 
10714 \family sans
10715 Title
10716 \family default
10717
10718 \family sans
10719 Author
10720 \family default
10721
10722 \family sans
10723 Date
10724 \family default
10725  and 
10726 \family sans
10727 Abstract
10728 \family default
10729  environments, 
10730 \family sans
10731 foils
10732 \family default
10733  creates the title on a page of its own.
10734  If you leave out the 
10735 \family sans
10736 Date
10737 \family default
10738  environment LaTeX will substitute the current date (every time you regenerate
10739  the output).
10740 \end_layout
10741
10742 \begin_layout Subsubsection
10743 Start a New Foil
10744 \end_layout
10745
10746 \begin_layout Standard
10747 As I mentioned earlier, there are four ways of starting a new foil.
10748  For portrait foils you should use 
10749 \family sans
10750 Foilhead
10751 \family default
10752  or 
10753 \family sans
10754 ShortFoilhead.
10755
10756 \family default
10757  The difference between these two environments is the amount of space between
10758  the title of the foil (the foilhead) and the body of the foil.
10759 \end_layout
10760
10761 \begin_layout Standard
10762 Landscape foils are generated using the 
10763 \family sans
10764 Rotatefoilhead
10765 \family default
10766  and 
10767 \family sans
10768 ShortRotatefoilhead
10769 \family default
10770  environments.
10771  Again the only difference is the spacing between foilhead and body.
10772  Both of the short versions have 0.5 inches less separation between the foilhead
10773  and the body.
10774  
10775 \end_layout
10776
10777 \begin_layout Standard
10778 One problem with the support for landscape foils is the requirement that
10779  you have to use the 
10780 \family typewriter
10781 dvips
10782 \family default
10783  driver to generate the PostScript output otherwise the foils won't be rotated.
10784  It is possible to get landscape foils even if you haven't got the 
10785 \family typewriter
10786 dvips
10787 \family default
10788  driver provided you can feed your foils sideways through your printer ;-)
10789 \end_layout
10790
10791 \begin_layout Subsubsection
10792 Theorems, Lemmas, Proofs and more
10793 \end_layout
10794
10795 \begin_layout Standard
10796 Due to a small bug in LyX you can't have two of the same type of these environme
10797 nts directly following each other.
10798  They must be separated by something.
10799  If you try, you will just be extending the previous environment as if you
10800  had merged the two environments together.
10801  So, how do you get around this problem? The simplest option is to insert
10802  some text between the two environments or add a 
10803 \family sans
10804 LaTeX
10805 \family default
10806  environment between the two with just a 
10807 \begin_inset Quotes eld
10808 \end_inset
10809
10810
10811 \family typewriter
10812 %
10813 \family default
10814
10815 \begin_inset Quotes erd
10816 \end_inset
10817
10818  in it.
10819  This will force LyX to produce two separate environments and hence the
10820  correct LaTeX output.
10821  An example is provided in the example file included with the LyX distribution.
10822  Remember, this problem only occurs if you are trying to place two of the
10823  same type of theorem-like environments one directly after the other.
10824 \end_layout
10825
10826 \begin_layout Subsubsection
10827 Lists
10828 \end_layout
10829
10830 \begin_layout Standard
10831 You get all the commonly supported list styles found in other classes as
10832  well as two new ones.
10833  I'll only describe the new ones here.
10834  If you want to find out more about the other list environments check out
10835  the 
10836 \emph on
10837 User's Guide.
10838
10839 \emph default
10840  If you intend to use itemized lists you might also want to read about the
10841  
10842 \family sans
10843 Itemize
10844 \begin_inset space ~
10845 \end_inset
10846
10847 Bullet
10848 \begin_inset space ~
10849 \end_inset
10850
10851 Selection
10852 \family default
10853  dialog described above in section
10854 \begin_inset space ~
10855 \end_inset
10856
10857
10858 \begin_inset CommandInset ref
10859 LatexCommand ref
10860 reference "sec:bullet"
10861
10862 \end_inset
10863
10864 .
10865 \end_layout
10866
10867 \begin_layout Standard
10868 The two new list styles, 
10869 \family sans
10870 TickList
10871 \family default
10872  and 
10873 \family sans
10874 CrossList
10875 \family default
10876 , are designed to make it easier for you to create lists of do's and don'ts
10877  or right and wrong by providing dedicated environments that use a tick
10878  or a cross as the label of the list.
10879  These lists are in fact dedicated variants of the 
10880 \family sans
10881 Itemize
10882 \family default
10883  environment.
10884  They do however require that you have the 
10885 \family typewriter
10886 psnfss
10887 \family default
10888  packages installed.
10889 \end_layout
10890
10891 \begin_layout Subsubsection
10892 Figures and Tables
10893 \end_layout
10894
10895 \begin_layout Standard
10896
10897 \family sans
10898 FoilTeX
10899 \family default
10900  redefines the floating tables and figures so that they appear exactly where
10901  they are in the text rather than pushing them to the top of the page or
10902  to some user specified location.
10903  In fact if you change the float placement settings they are simply ignored.
10904 \end_layout
10905
10906 \begin_layout Subsubsection
10907 Page Headers and Footers
10908 \begin_inset CommandInset label
10909 LatexCommand label
10910 name "sec:foilfoot"
10911
10912 \end_inset
10913
10914
10915 \end_layout
10916
10917 \begin_layout Standard
10918
10919 \family sans
10920 My
10921 \begin_inset space ~
10922 \end_inset
10923
10924 Logo
10925 \family default
10926  and 
10927 \family sans
10928 Restriction
10929 \family default
10930  are two commands used to control the left-footer text string.
10931  The first is meant to allow you to include a graphic logo on your foils
10932  and defaults to 
10933 \begin_inset Quotes eld
10934 \end_inset
10935
10936 -Typeset by 
10937 \family sans
10938 FoilTeX
10939 \family default
10940 -
10941 \begin_inset Quotes erd
10942 \end_inset
10943
10944 .
10945  While the second is meant to provide a classification for the audience,
10946  
10947 \emph on
10948 e.
10949 \begin_inset space \thinspace{}
10950 \end_inset
10951
10952 g.
10953 \emph default
10954
10955 \begin_inset space \space{}
10956 \end_inset
10957
10958 Confidential.
10959  It is empty by default.
10960 \end_layout
10961
10962 \begin_layout Standard
10963 The remaining page corners can be filled by 
10964 \family sans
10965 Right
10966 \begin_inset space ~
10967 \end_inset
10968
10969 Footer
10970 \family default
10971  (which defaults to page numbers), 
10972 \family sans
10973 Right
10974 \begin_inset space ~
10975 \end_inset
10976
10977 Header
10978 \family default
10979  (top right) and 
10980 \family sans
10981 Left
10982 \begin_inset space ~
10983 \end_inset
10984
10985 Header
10986 \family default
10987  (top left).
10988 \end_layout
10989
10990 \begin_layout Subsection
10991 Unsupported 
10992 \family sans
10993 FoilTeX
10994 \family default
10995  Goodies
10996 \begin_inset CommandInset label
10997 LatexCommand label
10998 name "sec:unsuppfoils"
10999
11000 \end_inset
11001
11002
11003 \end_layout
11004
11005 \begin_layout Standard
11006 All the commands mentioned below need to be set in a 
11007 \family sans
11008 LaTeX
11009 \family default
11010  environment or as 
11011 \family sans
11012 TeX
11013 \family default
11014  within another environment.
11015 \end_layout
11016
11017 \begin_layout Subsubsection
11018 Lengths
11019 \end_layout
11020
11021 \begin_layout Standard
11022 All lengths are adjusted using the 
11023 \family typewriter
11024
11025 \backslash
11026 setlength{
11027 \family default
11028 \emph on
11029 lengthname
11030 \family typewriter
11031 \emph default
11032 }{
11033 \family default
11034 \emph on
11035 newlength
11036 \family typewriter
11037 \emph default
11038 }
11039 \family default
11040  command.
11041  Where 
11042 \emph on
11043 lengthname
11044 \emph default
11045  should be replaced by the name given to the length you want to change and
11046  
11047 \emph on
11048 newlength
11049 \emph default
11050  is the length value.
11051  All lengths should be specified in units of length such as inches (
11052 \family typewriter
11053 in
11054 \family default
11055 ), millimeters (
11056 \family typewriter
11057 mm
11058 \family default
11059 ) or points (
11060 \family typewriter
11061 pt
11062 \family default
11063 ) or relative to some document or font-based length such as 
11064 \family typewriter
11065
11066 \backslash
11067 textwidth
11068 \family default
11069 .
11070  
11071 \end_layout
11072
11073 \begin_layout Standard
11074 It's possible to change the spacing between a foilhead and the body of the
11075  foil by adjusting the length specified by 
11076 \family typewriter
11077
11078 \backslash
11079 foilheadskip
11080 \family default
11081 .
11082  For example, to make 
11083 \emph on
11084 all
11085 \emph default
11086  foilheads 0.5
11087 \begin_inset space \space{}
11088 \end_inset
11089
11090 in closer to their bodies put the following in the preamble: 
11091 \family typewriter
11092
11093 \backslash
11094 setlength{
11095 \backslash
11096 foilheadskip}{-0.5in}
11097 \end_layout
11098
11099 \begin_layout Standard
11100 The spacings around floats can be adjusted by setting these lengths:
11101 \end_layout
11102
11103 \begin_layout Labeling
11104 \labelwidthstring MMMMMMMMMMM
11105
11106 \family typewriter
11107
11108 \backslash
11109 abovefloatskip
11110 \family default
11111  Separation between the text and the top of the float
11112 \end_layout
11113
11114 \begin_layout Labeling
11115 \labelwidthstring MMMMMMMMMMM
11116
11117 \family typewriter
11118
11119 \backslash
11120 abovecaptionskip
11121 \family default
11122  Separation between the float and the caption
11123 \end_layout
11124
11125 \begin_layout Labeling
11126 \labelwidthstring MMMMMMMMMMM
11127
11128 \family typewriter
11129
11130 \backslash
11131 belowcaptionskip
11132 \family default
11133  Separation between the caption and the following text
11134 \end_layout
11135
11136 \begin_layout Labeling
11137 \labelwidthstring MMMMMMMMMMM
11138
11139 \family typewriter
11140
11141 \backslash
11142 captionwidth
11143 \family default
11144  You can make the captions narrower than the surrounding text by adjusting
11145  this length.
11146  Best done relative to 
11147 \family typewriter
11148
11149 \backslash
11150 textwidth
11151 \family default
11152 .
11153 \end_layout
11154
11155 \begin_layout Standard
11156 There are also several title page related lengths that you may find useful
11157  if you have a long title or several authors:
11158 \end_layout
11159
11160 \begin_layout Labeling
11161 \labelwidthstring MMMMMMMMMMM
11162
11163 \family typewriter
11164
11165 \backslash
11166 abovetitleskip
11167 \family default
11168  Separation from headers to 
11169 \family sans
11170 Title
11171 \end_layout
11172
11173 \begin_layout Labeling
11174 \labelwidthstring MMMMMMMMMMM
11175
11176 \family typewriter
11177
11178 \backslash
11179 titleauthorskip
11180 \family default
11181  between 
11182 \family sans
11183 Title
11184 \family default
11185  and 
11186 \family sans
11187 Author
11188 \family default
11189  environments
11190 \end_layout
11191
11192 \begin_layout Labeling
11193 \labelwidthstring MMMMMMMMMMM
11194
11195 \family typewriter
11196
11197 \backslash
11198 authorauthorskip
11199 \family default
11200  between multiple 
11201 \family sans
11202 Author
11203 \family default
11204  lines
11205 \end_layout
11206
11207 \begin_layout Labeling
11208 \labelwidthstring MMMMMMMMMMM
11209
11210 \family typewriter
11211
11212 \backslash
11213 authordateskip
11214 \family default
11215  between the 
11216 \family sans
11217 Author
11218 \family default
11219  and the 
11220 \family sans
11221 Date
11222 \end_layout
11223
11224 \begin_layout Labeling
11225 \labelwidthstring MMMMMMMMMMM
11226
11227 \family typewriter
11228
11229 \backslash
11230 dateabstractskip
11231 \family default
11232  between the 
11233 \family sans
11234 Date
11235 \family default
11236  and the 
11237 \family sans
11238 Abstract
11239 \end_layout
11240
11241 \begin_layout Standard
11242 The last length related command affects all the list environments.
11243  If you place 
11244 \family typewriter
11245
11246 \backslash
11247 zerolistvertdimens
11248 \family default
11249  
11250 \emph on
11251 inside
11252 \emph default
11253  a list environment then all the vertical spacing between the list items
11254  is removed.
11255  Note that this is a command not a length so it doesn't require 
11256 \family typewriter
11257
11258 \backslash
11259 setlength
11260 \family default
11261  like the stuff mentioned above.
11262 \end_layout
11263
11264 \begin_layout Subsubsection
11265 Headers and Footers
11266 \end_layout
11267
11268 \begin_layout Standard
11269 The 
11270 \family typewriter
11271
11272 \backslash
11273 LogoOn
11274 \family default
11275  and 
11276 \family typewriter
11277
11278 \backslash
11279 LogoOff
11280 \family default
11281  commands control whether the logo in the 
11282 \family sans
11283 MyLogo
11284 \family default
11285  definition appear on a given page.
11286  If you put 
11287 \family typewriter
11288
11289 \backslash
11290 LogoOff
11291 \family default
11292  in the preamble then none of the foils will have the logo on them.
11293  If you don't want the logo on a particular page place the 
11294 \family typewriter
11295
11296 \backslash
11297 LogoOff
11298 \family default
11299  directly after the foilhead of that page and the 
11300 \family typewriter
11301
11302 \backslash
11303 LogoOn
11304 \family default
11305  directly after the next foilhead.
11306 \end_layout
11307
11308 \begin_layout Standard
11309 If you decide to use the 
11310 \family sans
11311 fancy
11312 \family default
11313  page style setting in the 
11314 \family sans
11315 Document
11316 \begin_inset space ~
11317 \end_inset
11318
11319 Layout
11320 \family default
11321  dialog you should probably add 
11322 \family typewriter
11323
11324 \backslash
11325 let
11326 \backslash
11327 headwidth
11328 \backslash
11329 textwidth
11330 \family default
11331  to your preamble so headers and footers on landscape pages are correctly
11332  placed when rotated.
11333  This is due to some clashes between the page layouts provided by the 
11334 \family sans
11335 fancyheadings
11336 \family default
11337  package and the 
11338 \family sans
11339 foils
11340 \family default
11341  class.
11342 \end_layout
11343
11344 \begin_layout Section
11345 Hollywood (Hollywood spec scripts)
11346 \end_layout
11347
11348 \begin_layout Standard
11349 by 
11350 \shape smallcaps
11351 Garst Reese
11352 \end_layout
11353
11354 \begin_layout Subsection
11355 Introduction
11356 \end_layout
11357
11358 \begin_layout Standard
11359 Getting the format of a Hollywood script right is a 
11360 \begin_inset Quotes eld
11361 \end_inset
11362
11363 rite of passage.
11364 \begin_inset Quotes erd
11365 \end_inset
11366
11367  It is designed to make the readers focus on content and to be easy and
11368  familiar for the actors to read.
11369  Each page of a script should be one minute of film.
11370  Nothing goes in a script that you cannot see or hear on screen.
11371  The courier 12 pt font should be used throughout.
11372  No italics.
11373 \end_layout
11374
11375 \begin_layout Subsection
11376 Special problems
11377 \end_layout
11378
11379 \begin_layout Standard
11380 Speakers' lines should NEVER break in mid-sentence.
11381  If a speaker's lines continue over a page break, repeat the 
11382 \family sans
11383 Speaker
11384 \family default
11385  title followed by (Cont'd).
11386 \end_layout
11387
11388 \begin_layout Subsection
11389 Special features
11390 \end_layout
11391
11392 \begin_layout Standard
11393 Insert the 
11394 \family sans
11395 Speaker
11396 \family default
11397  names as labels then cross-reference the label to insert the name.
11398  The cross-reference dialog will show the current cast of characters.
11399  You can use this to insert the speaker name in narratives also.
11400 \end_layout
11401
11402 \begin_layout Subsection
11403 Paper size and Margins
11404 \end_layout
11405
11406 \begin_layout Standard
11407 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11408 \end_layout
11409
11410 \begin_layout Subsection
11411 Environments
11412 \end_layout
11413
11414 \begin_layout Standard
11415 The following environments are available.
11416  You can use hollywood.bind to get the bind keys shown at the right.
11417 \end_layout
11418
11419 \begin_layout Itemize
11420
11421 \family sans
11422 Standard
11423 \begin_inset Newline newline
11424 \end_inset
11425
11426
11427 \family default
11428 Used where nothing else works.
11429  Try to avoid it.
11430 \end_layout
11431
11432 \begin_layout Itemize
11433
11434 \family sans
11435 FADE_IN
11436 \family default
11437 :
11438 \begin_inset space \hfill{}
11439 \end_inset
11440
11441
11442 \family sans
11443 M-z S-I
11444 \family default
11445
11446 \begin_inset Newline newline
11447 \end_inset
11448
11449 Usually followed by something like 
11450 \begin_inset Quotes eld
11451 \end_inset
11452
11453 on Sally waking up.
11454 \begin_inset Quotes erd
11455 \end_inset
11456
11457
11458 \end_layout
11459
11460 \begin_layout Itemize
11461
11462 \family sans
11463 INT:
11464 \begin_inset space \hfill{}
11465 \end_inset
11466
11467 M-z i
11468 \begin_inset Newline newline
11469 \end_inset
11470
11471
11472 \family default
11473 Introduces a new INTERIOR camera set-up.
11474  Always followed by DAY or NIGHT, or something similar to define the lighting
11475  required.
11476  Everthing on this line in CAPS.
11477 \end_layout
11478
11479 \begin_layout Itemize
11480
11481 \family sans
11482 EXT:
11483 \begin_inset space \hfill{}
11484 \end_inset
11485
11486 M-z e
11487 \begin_inset Newline newline
11488 \end_inset
11489
11490
11491 \family default
11492 Introduces a new EXTERIOR camera set-up.
11493  Everthing on this line in CAPS.
11494 \end_layout
11495
11496 \begin_layout Itemize
11497
11498 \family sans
11499 Speaker
11500 \begin_inset space \hfill{}
11501 \end_inset
11502
11503 M-z s
11504 \begin_inset Newline newline
11505 \end_inset
11506
11507
11508 \family default
11509 The character speaking.
11510 \end_layout
11511
11512 \begin_layout Itemize
11513
11514 \family sans
11515 Parenthetical
11516 \begin_inset space \hfill{}
11517 \end_inset
11518
11519 M-z p
11520 \begin_inset Newline newline
11521 \end_inset
11522
11523
11524 \family default
11525 Instructions to the speaker.
11526  The () are automatically inserted, but only the ( will show in LyX.
11527  Both will be printed.
11528 \end_layout
11529
11530 \begin_layout Itemize
11531
11532 \family sans
11533 Dialogue
11534 \begin_inset space \hfill{}
11535 \end_inset
11536
11537 M-z d
11538 \begin_inset Newline newline
11539 \end_inset
11540
11541
11542 \family default
11543 What the 
11544 \family sans
11545 Speaker
11546 \family default
11547  says.
11548 \end_layout
11549
11550 \begin_layout Itemize
11551
11552 \family sans
11553 Transition
11554 \begin_inset space \hfill{}
11555 \end_inset
11556
11557 M-z t
11558 \begin_inset Newline newline
11559 \end_inset
11560
11561
11562 \family default
11563 Camera movement instruction.
11564  e.
11565 \begin_inset space \thinspace{}
11566 \end_inset
11567
11568 g.
11569 \begin_inset space \space{}
11570 \end_inset
11571
11572 CUT TO:
11573 \end_layout
11574
11575 \begin_layout Itemize
11576
11577 \family sans
11578 FADE OUT:
11579 \begin_inset space \hfill{}
11580 \end_inset
11581
11582 M-z S-I
11583 \end_layout
11584
11585 \begin_layout Itemize
11586
11587 \family sans
11588 Author
11589 \begin_inset space \hfill{}
11590 \end_inset
11591
11592 M-z S-A
11593 \end_layout
11594
11595 \begin_layout Itemize
11596
11597 \family sans
11598 Title
11599 \begin_inset space \hfill{}
11600 \end_inset
11601
11602 M-z S-T
11603 \end_layout
11604
11605 \begin_layout Itemize
11606
11607 \family sans
11608 Right_Address
11609 \begin_inset space \hfill{}
11610 \end_inset
11611
11612 M-z r
11613 \end_layout
11614
11615 \begin_layout Subsection
11616 Script jargon
11617 \end_layout
11618
11619 \begin_layout Itemize
11620 (O.S) — off screen
11621 \end_layout
11622
11623 \begin_layout Itemize
11624 (V.0) — voice over
11625 \end_layout
11626
11627 \begin_layout Itemize
11628 b.
11629 \begin_inset space \thinspace{}
11630 \end_inset
11631
11632 g.
11633  — background
11634 \end_layout
11635
11636 \begin_layout Itemize
11637 C.U.
11638  — close-up
11639 \end_layout
11640
11641 \begin_layout Itemize
11642 PAN — camera movement
11643 \end_layout
11644
11645 \begin_layout Itemize
11646 INSERT — cut to close-up of
11647 \end_layout
11648
11649 \begin_layout Section
11650 ijmpc and ijmpd
11651 \end_layout
11652
11653 \begin_layout Standard
11654 by 
11655 \noun on
11656 Panayotis Papasotiriou
11657 \end_layout
11658
11659 \begin_layout Subsection
11660 Overview
11661 \end_layout
11662
11663 \begin_layout Standard
11664 The ijmpc package is a set of macros that facilitates electronic manuscript
11665  submission to the 
11666 \emph on
11667 International Journal of Modern Physics C
11668 \emph default
11669 .
11670  Similarly, the ijmpd package is for creating manuscripts to be submitted
11671  to the 
11672 \emph on
11673 International Journal of Modern Physics D
11674 \emph default
11675 .
11676  Both journals are published by World Scientific.
11677  The corresponding document classes are named 
11678 \family typewriter
11679 ws-ijmpc.cls
11680 \family default
11681  and 
11682 \family typewriter
11683 ws-ijmpd.cls
11684 \family default
11685 , respectively.
11686  These files, together with instructions for the authors, can be downloaded
11687  from the sites 
11688 \begin_inset Flex URL
11689 status collapsed
11690
11691 \begin_layout Plain Layout
11692
11693 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11694 \end_layout
11695
11696 \end_inset
11697
11698  and 
11699 \begin_inset Flex URL
11700 status collapsed
11701
11702 \begin_layout Plain Layout
11703
11704 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11705 \end_layout
11706
11707 \end_inset
11708
11709 .
11710  Both packages are modified versions of the standard 
11711 \begin_inset Quotes eld
11712 \end_inset
11713
11714 article
11715 \begin_inset Quotes erd
11716 \end_inset
11717
11718  package, and they are almost (but not exactly) identical.
11719  Most of their features are supported by LyX.
11720  I have used LyX successfully to write articles submitted to both journals
11721  without any problem.
11722 \end_layout
11723
11724 \begin_layout Subsection
11725 Writing a paper
11726 \end_layout
11727
11728 \begin_layout Standard
11729 As usual, the easiest way to write a paper is to start with a template.
11730  Click on 
11731 \family sans
11732 File\SpecialChar \menuseparator
11733 New from
11734 \family default
11735  
11736 \family sans
11737 \bar under
11738 T
11739 \bar default
11740 emplate
11741 \family default
11742 , then choose the 
11743 \family typewriter
11744 ijmpc.lyx
11745 \family default
11746  or 
11747 \family typewriter
11748 ijmpd.lyx
11749 \family default
11750  template.
11751  This will give an (almost) empty document that includes the most common
11752  fields found in a manuscript.
11753  Simply overwrite the existing text (including the brackets, 
11754 \family typewriter
11755 <>
11756 \family default
11757 ) with your text.
11758  You should keep in mind the following remarks.
11759 \end_layout
11760
11761 \begin_layout Enumerate
11762 LyX won't let you change the font size and the page style of the document,
11763  because such modifications are not allowed by both packages.
11764 \end_layout
11765
11766 \begin_layout Enumerate
11767 The language of the document should not be changed.
11768  Before previewing your paper, be sure that the babel package is not used.
11769  To do this, click on 
11770 \family sans
11771 Tools\SpecialChar \menuseparator
11772 Preferences
11773 \family default
11774 , select the 
11775 \family sans
11776 Lang Opts
11777 \family default
11778  tab, deselect the 
11779 \family sans
11780 Use babel
11781 \family default
11782  checkbox in the language settings, and click on 
11783 \family sans
11784 Apply
11785 \family default
11786  (or 
11787 \family sans
11788 Save
11789 \family default
11790 , if you wish to make this change permanent).
11791 \end_layout
11792
11793 \begin_layout Enumerate
11794 The 
11795 \begin_inset Quotes eld
11796 \end_inset
11797
11798 Keywords
11799 \begin_inset Quotes erd
11800 \end_inset
11801
11802  style must be used to define keywords.
11803 \end_layout
11804
11805 \begin_layout Enumerate
11806 The ijmpc package provides a style named 
11807 \begin_inset Quotes eld
11808 \end_inset
11809
11810 Classification Codes
11811 \begin_inset Quotes erd
11812 \end_inset
11813
11814 , which can be used to define classification codes, such as PACS numbers.
11815  Note that this facility is not supported by the ijmpd package.
11816 \end_layout
11817
11818 \begin_layout Enumerate
11819 Several new environments are available: 
11820 \begin_inset Quotes eld
11821 \end_inset
11822
11823 Definition
11824 \begin_inset Quotes erd
11825 \end_inset
11826
11827
11828 \begin_inset Quotes eld
11829 \end_inset
11830
11831 Step
11832 \begin_inset Quotes erd
11833 \end_inset
11834
11835
11836 \begin_inset Quotes eld
11837 \end_inset
11838
11839 Example
11840 \begin_inset Quotes erd
11841 \end_inset
11842
11843
11844 \begin_inset Quotes eld
11845 \end_inset
11846
11847 Remark
11848 \begin_inset Quotes erd
11849 \end_inset
11850
11851
11852 \begin_inset Quotes eld
11853 \end_inset
11854
11855 Notation
11856 \begin_inset Quotes erd
11857 \end_inset
11858
11859
11860 \begin_inset Quotes eld
11861 \end_inset
11862
11863 Theorem
11864 \begin_inset Quotes erd
11865 \end_inset
11866
11867
11868 \begin_inset Quotes eld
11869 \end_inset
11870
11871 Proof
11872 \begin_inset Quotes erd
11873 \end_inset
11874
11875
11876 \begin_inset Quotes eld
11877 \end_inset
11878
11879 Corollary
11880 \begin_inset Quotes erd
11881 \end_inset
11882
11883
11884 \begin_inset Quotes eld
11885 \end_inset
11886
11887 Lemma
11888 \begin_inset Quotes erd
11889 \end_inset
11890
11891
11892 \begin_inset Quotes eld
11893 \end_inset
11894
11895 Proposition
11896 \begin_inset Quotes erd
11897 \end_inset
11898
11899
11900 \begin_inset Quotes eld
11901 \end_inset
11902
11903 Prop
11904 \begin_inset Quotes erd
11905 \end_inset
11906
11907
11908 \begin_inset Quotes eld
11909 \end_inset
11910
11911 Question
11912 \begin_inset Quotes erd
11913 \end_inset
11914
11915
11916 \begin_inset Quotes eld
11917 \end_inset
11918
11919 Claim
11920 \begin_inset Quotes erd
11921 \end_inset
11922
11923 , and 
11924 \begin_inset Quotes eld
11925 \end_inset
11926
11927 Conjecture
11928 \begin_inset Quotes erd
11929 \end_inset
11930
11931 .
11932  Their use is more or less obvious.
11933  LyX supports all these environments; it will use the proper label, text
11934  style, and numbering scheme for each of them.
11935 \end_layout
11936
11937 \begin_layout Enumerate
11938 Both packages use basic citations; the natbib package should not be used.
11939  In LyX, citation references are shown as usual; in the output, citations
11940  are shown as superscripts.
11941  If you want to use a citation as normal text, you should use the 
11942 \family typewriter
11943 refcite
11944 \family default
11945  command, e.
11946 \begin_inset space \thinspace{}
11947 \end_inset
11948
11949 g.
11950 \begin_inset space \space{}
11951 \end_inset
11952
11953
11954 \begin_inset Quotes eld
11955 \end_inset
11956
11957 See Ref.
11958 \begin_inset space \space{}
11959 \end_inset
11960
11961
11962 \family typewriter
11963
11964 \backslash
11965 refcite{key}
11966 \family default
11967
11968 \begin_inset Quotes erd
11969 \end_inset
11970
11971 .
11972 \end_layout
11973
11974 \begin_layout Enumerate
11975 There is no 
11976 \begin_inset Quotes eld
11977 \end_inset
11978
11979 Acknowledgments
11980 \begin_inset Quotes erd
11981 \end_inset
11982
11983  section in both packages.
11984  To put acknowledgments, just use the 
11985 \begin_inset Quotes eld
11986 \end_inset
11987
11988 Section*
11989 \begin_inset Quotes erd
11990 \end_inset
11991
11992  environment.
11993 \end_layout
11994
11995 \begin_layout Enumerate
11996 Appendices may be added to the paper, 
11997 \emph on
11998 after
11999 \emph default
12000  the Acknowledgments and 
12001 \shape italic
12002 before
12003 \shape default
12004  the References.
12005  LyX provides a special environment, called 
12006 \begin_inset Quotes eld
12007 \end_inset
12008
12009 Appendices Section
12010 \begin_inset Quotes erd
12011 \end_inset
12012
12013  which marks the beginning of the appendices.
12014  This environment should be left blank; it just sends a LaTeX command, but
12015  nothing is really printed.
12016  In LyX, the word 
12017 \begin_inset Quotes eld
12018 \end_inset
12019
12020 Appendix
12021 \begin_inset Quotes erd
12022 \end_inset
12023
12024  is printed with blue letters, as a signal that all sections after that
12025  point are appendices.
12026  To write an appendix, use the 
12027 \begin_inset Quotes eld
12028 \end_inset
12029
12030 Appendix
12031 \begin_inset Quotes erd
12032 \end_inset
12033
12034  environment.
12035  LyX will number each appendix with capital letters, as required by both
12036  journals.
12037  Note that 
12038 \begin_inset Quotes eld
12039 \end_inset
12040
12041 Appendices Section
12042 \begin_inset Quotes erd
12043 \end_inset
12044
12045  
12046 \emph on
12047 must
12048 \emph default
12049  be present before the first appendix; if not, all appendices will be numbered
12050  as normal sections in the output.
12051 \end_layout
12052
12053 \begin_layout Enumerate
12054 The ijmpc and the ijmpd packages use the 
12055 \family typewriter
12056 tbl
12057 \family default
12058  command to implement table captions.
12059  As a result, a table created by LyX is printed correctly, but its caption
12060  is ignored.
12061  However, you can use some TeX code to overcome this problem, so that captions
12062  are printed as expected.
12063  To do so, create a float table as usual, remove the caption, and replace
12064  it with the TeX code 
12065 \family typewriter
12066
12067 \backslash
12068 tbl{
12069 \emph on
12070 your table caption
12071 \emph default
12072 }{
12073 \family default
12074  (sic); you must also the TeX code 
12075 \family typewriter
12076 }
12077 \family default
12078  immediately after the tabular material.
12079  Study the example table included in the template files to see how this
12080  trick is implemented.
12081  Alternatively, If you need table captions, you should implement the whole
12082  table float in a 
12083 \family typewriter
12084 .tex
12085 \family default
12086  file, then include this file to the LyX document (
12087 \family sans
12088 Insert\SpecialChar \menuseparator
12089 File\SpecialChar \menuseparator
12090 Child
12091 \begin_inset space ~
12092 \end_inset
12093
12094 Document
12095 \family default
12096 ).
12097  Details on how to create a table float can be found in the files 
12098 \family typewriter
12099 ws-ijmpc.tex
12100 \family default
12101  and 
12102 \family typewriter
12103 ws-ijmpd.tex
12104 \family default
12105 , included in the corresponding packages.
12106 \end_layout
12107
12108 \begin_layout Subsection
12109 Preparing a paper for submission
12110 \end_layout
12111
12112 \begin_layout Standard
12113 Before you submit your paper you must export the LyX document as a LaTeX
12114  file (
12115 \family sans
12116 File\SpecialChar \menuseparator
12117 Export\SpecialChar \menuseparator
12118 LaTeX
12119 \family default
12120 )
12121 \begin_inset Foot
12122 status open
12123
12124 \begin_layout Plain Layout
12125 Actually you have the choice between LaTeX (plain) and pdflatex.
12126  If you intend to use pdflatex to prepare the paper, you should use the
12127  pdflatex option so that included graphics are converted to PDF format,
12128  ready for use by pdflatex.
12129 \end_layout
12130
12131 \end_inset
12132
12133 , then make the following changes to the resulting 
12134 \family typewriter
12135 .tex
12136 \family default
12137  file.
12138 \end_layout
12139
12140 \begin_layout Enumerate
12141 Remove the comment lines before the 
12142 \family typewriter
12143
12144 \backslash
12145 documentclass
12146 \family default
12147  command.
12148 \end_layout
12149
12150 \begin_layout Enumerate
12151 Remove everything between (and including) the 
12152 \family typewriter
12153
12154 \backslash
12155 makeatletter
12156 \family default
12157  and 
12158 \family typewriter
12159
12160 \backslash
12161 makeatother
12162 \family default
12163  commands, except for any commands you specifically put into the LaTeX preamble.
12164 \end_layout
12165
12166 \begin_layout Standard
12167 The modified 
12168 \family typewriter
12169 .tex
12170 \family default
12171  file should be saved and processed through LaTeX as many times as necessary.
12172  You may also want to check the resulting 
12173 \family typewriter
12174 .dvi
12175 \family default
12176  document.
12177 \end_layout
12178
12179 \begin_layout Subsection
12180 Use of TeX code
12181 \end_layout
12182
12183 \begin_layout Standard
12184 The use of TeX code is reduced to two commands, which must be placed at
12185  the top of the document.
12186  If you started writing your paper by using the 
12187 \family typewriter
12188 ijmpc.lyx
12189 \family default
12190  or the 
12191 \family typewriter
12192 ijmpd.lyx
12193 \family default
12194  template, the TeX code needed is already in its place; you usually don't
12195  need to delete it.
12196  You may only modify the first TeX code to specify the information printed
12197  to the top of odd and even pages (authors' names and short paper's title,
12198  respectively).
12199  This TeX code must have the form 
12200 \family typewriter
12201
12202 \backslash
12203 markboth{Authors' Names}{Short Paper's Title}
12204 \family default
12205 .
12206 \end_layout
12207
12208 \begin_layout Section
12209 iopart
12210 \end_layout
12211
12212 \begin_layout Standard
12213 by 
12214 \noun on
12215 Uwe Stöhr
12216 \end_layout
12217
12218 \begin_layout Subsection
12219 Overview
12220 \end_layout
12221
12222 \begin_layout Standard
12223 The iopart package provides a document class to create electronic manuscript
12224  submission to the journals published by the Institute of Physics.
12225  Instructions for the authors how to create a paper using the iopart class
12226  can be downloaded together with the iopart package from the site 
12227 \begin_inset Flex URL
12228 status collapsed
12229
12230 \begin_layout Plain Layout
12231
12232 ftp://ftp.iop.org/pub/journals/latex2e
12233 \end_layout
12234
12235 \end_inset
12236
12237 .
12238 \end_layout
12239
12240 \begin_layout Subsection
12241 Writing a paper
12242 \end_layout
12243
12244 \begin_layout Standard
12245 The easiest way to write a paper is to start with the file 
12246 \emph on
12247 IOP-article.lyx
12248 \emph default
12249  that is available in LyX's examples files folder.
12250  Open this file, save it under a new name, and start writing.
12251  The example file explains how to use the special text environments.
12252  Here are the most important advices:
12253 \end_layout
12254
12255 \begin_layout Itemize
12256 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12257  two options 
12258 \family sans
12259 Use AMS math package
12260 \family default
12261  in the document settings under 
12262 \family sans
12263 Math Options
12264 \family default
12265  are not used!
12266 \end_layout
12267
12268 \begin_layout Itemize
12269
12270 \size normal
12271 The title environment defines the kind of your paper.
12272  So use one of the following environments for the title:
12273 \end_layout
12274
12275 \begin_deeper
12276 \begin_layout Itemize
12277
12278 \family sans
12279 \size normal
12280 Title
12281 \family default
12282  for a Paper
12283 \end_layout
12284
12285 \begin_layout Itemize
12286
12287 \family sans
12288 \size normal
12289 Review
12290 \family default
12291  for a Review
12292 \end_layout
12293
12294 \begin_layout Itemize
12295
12296 \family sans
12297 \size normal
12298 Topical
12299 \family default
12300  for a Topical review
12301 \end_layout
12302
12303 \begin_layout Itemize
12304
12305 \family sans
12306 \size normal
12307 Comment
12308 \family default
12309  for a Comment
12310 \end_layout
12311
12312 \begin_layout Itemize
12313
12314 \family sans
12315 \size normal
12316 Note
12317 \family default
12318  for a Note
12319 \end_layout
12320
12321 \begin_layout Itemize
12322
12323 \family sans
12324 \size normal
12325 Paper
12326 \family default
12327  for a Paper (same as Title)
12328 \end_layout
12329
12330 \begin_layout Itemize
12331
12332 \family sans
12333 \size normal
12334 Prelim
12335 \family default
12336  for a Preliminary communication
12337 \end_layout
12338
12339 \begin_layout Itemize
12340
12341 \family sans
12342 \size normal
12343 Rapid
12344 \family default
12345  for a Rapid communication
12346 \end_layout
12347
12348 \begin_layout Itemize
12349
12350 \family sans
12351 \size normal
12352 Letter
12353 \family default
12354  for a Letter to the editor
12355 \end_layout
12356
12357 \end_deeper
12358 \begin_layout Itemize
12359
12360 \size normal
12361 All title environments except of 
12362 \family sans
12363 Letter
12364 \family default
12365  can have an optional short title.
12366 \end_layout
12367
12368 \begin_layout Itemize
12369 There is a general title environment 
12370 \family sans
12371 Article
12372 \family default
12373  which is not directly supported by the LyX.
12374  This can be used as TeX code when your document doesn't fit into one of
12375  the other title types.
12376 \end_layout
12377
12378 \begin_layout Standard
12379 For more informations like hints for special table and formula formatting,
12380  look at the IOP author guidelines.
12381 \end_layout
12382
12383 \begin_layout Section
12384 Kluwer
12385 \end_layout
12386
12387 \begin_layout Standard
12388 by 
12389 \noun on
12390 Panayotis Papasotiriou
12391 \end_layout
12392
12393 \begin_layout Subsection
12394 Overview
12395 \end_layout
12396
12397 \begin_layout Standard
12398 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12399  that facilitates electronic manuscript submission to the journals they
12400  publish.
12401  Most known of them (at least in my domain of interest) are 
12402 \emph on
12403 Astrophysics and Space Science
12404 \emph default
12405  and 
12406 \emph on
12407 Solar Physics
12408 \emph default
12409 , but there are many others (see a complete list at 
12410 \begin_inset Flex URL
12411 status open
12412
12413 \begin_layout Plain Layout
12414
12415 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12416 \end_layout
12417
12418 \end_inset
12419
12420 ).
12421  The Kluwer package may be downloaded from the site 
12422 \begin_inset Flex URL
12423 status collapsed
12424
12425 \begin_layout Plain Layout
12426
12427 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12428 \end_layout
12429
12430 \end_inset
12431
12432 .
12433  A complete user guide is contained in that package (but it can also be
12434  downloaded separately).
12435 \end_layout
12436
12437 \begin_layout Standard
12438 LyX supports many features of the package but not everything.
12439  However, the TeX code needed is reduced to some 
12440 \begin_inset Quotes eld
12441 \end_inset
12442
12443 peculiar
12444 \begin_inset Quotes erd
12445 \end_inset
12446
12447  commands of the package (see
12448 \begin_inset space ~
12449 \end_inset
12450
12451
12452 \begin_inset CommandInset ref
12453 LatexCommand ref
12454 reference "subsec:kluwer_peculiarities"
12455
12456 \end_inset
12457
12458 ).
12459  I have recently used LyX to write an article submitted to the 
12460 \emph on
12461 Astrophysics and Space Science
12462 \emph default
12463  without any problem.
12464 \end_layout
12465
12466 \begin_layout Subsection
12467 Writing a paper
12468 \end_layout
12469
12470 \begin_layout Standard
12471 The easiest way to write a paper is to start with the Kluwer template file.
12472  Click on 
12473 \family sans
12474 File\SpecialChar \menuseparator
12475 New from
12476 \family default
12477  
12478 \family sans
12479 Template
12480 \family default
12481 , then choose the 
12482 \family typewriter
12483 kluwer.lyx
12484 \family default
12485  template.
12486  This will give an (almost) empty document that includes the most common
12487  fields found in a manuscript and a short description of their use.
12488  As in most templates, simply overwrite the existing text (including the
12489  brackets, 
12490 \family typewriter
12491 <>
12492 \family default
12493 ) with the correct information.
12494 \end_layout
12495
12496 \begin_layout Subsection
12497 Preparing a paper for submission
12498 \end_layout
12499
12500 \begin_layout Standard
12501 As in the AASTeX package, before you submit your paper to a journal you
12502  must 
12503 \begin_inset Quotes eld
12504 \end_inset
12505
12506 postprocess
12507 \begin_inset Quotes erd
12508 \end_inset
12509
12510  it as follows.
12511 \end_layout
12512
12513 \begin_layout Enumerate
12514 Export your paper as a LaTeX file.
12515  To do this, click on 
12516 \family sans
12517 File\SpecialChar \menuseparator
12518 Export\SpecialChar \menuseparator
12519 LaTeX
12520 \family default
12521 .
12522  
12523 \end_layout
12524
12525 \begin_layout Enumerate
12526 Edit the resulting 
12527 \family typewriter
12528 .tex
12529 \family default
12530  file with a text editor and make the following changes
12531 \end_layout
12532
12533 \begin_deeper
12534 \begin_layout Enumerate
12535 remove the comment lines before the 
12536 \family typewriter
12537
12538 \backslash
12539 documentclass
12540 \family default
12541  command,
12542 \end_layout
12543
12544 \begin_layout Enumerate
12545 remove everything between (and including) the 
12546 \family typewriter
12547
12548 \backslash
12549 makeatletter
12550 \family default
12551  and 
12552 \family typewriter
12553
12554 \backslash
12555 makeatother
12556 \family default
12557  commands, except for any commands you specifically put into the LaTeX preamble.
12558 \end_layout
12559
12560 \begin_layout Standard
12561 Save the resulting 
12562 \family typewriter
12563 .tex
12564 \family default
12565  file.
12566 \end_layout
12567
12568 \end_deeper
12569 \begin_layout Enumerate
12570 Run the 
12571 \family typewriter
12572 .tex
12573 \family default
12574  file through LaTeX as many times as necessary (usually up to three).
12575 \end_layout
12576
12577 \begin_layout Enumerate
12578 View the resulting 
12579 \family typewriter
12580 .dvi
12581 \family default
12582  document using, e.
12583 \begin_inset space \thinspace{}
12584 \end_inset
12585
12586 g.
12587 \begin_inset space \space{}
12588 \end_inset
12589
12590
12591 \family sans
12592 xdvi
12593 \family default
12594 , and check if everything is OK (it should, if you didn't make any mistake).
12595 \end_layout
12596
12597 \begin_layout Subsection
12598 \begin_inset Quotes eld
12599 \end_inset
12600
12601 Peculiarities
12602 \begin_inset Quotes erd
12603 \end_inset
12604
12605  of the Kluwer package
12606 \begin_inset CommandInset label
12607 LatexCommand label
12608 name "subsec:kluwer_peculiarities"
12609
12610 \end_inset
12611
12612
12613 \end_layout
12614
12615 \begin_layout Standard
12616 The Kluwer package has the following 
12617 \begin_inset Quotes eld
12618 \end_inset
12619
12620 peculiarities
12621 \begin_inset Quotes erd
12622 \end_inset
12623
12624 .
12625 \end_layout
12626
12627 \begin_layout Enumerate
12628 It is possible to write multiple articles in the same LaTeX file
12629 \begin_inset Foot
12630 status collapsed
12631
12632 \begin_layout Plain Layout
12633 I can't imagine any good reason to do this.
12634 \end_layout
12635
12636 \end_inset
12637
12638 .
12639  Each article must be included in the environment 
12640 \begin_inset Quotes eld
12641 \end_inset
12642
12643 article
12644 \begin_inset Quotes erd
12645 \end_inset
12646
12647 .
12648  Unfortunately, this environment cannot be omitted, even if you write just
12649  one article.
12650  Therefore, each article starts with the command 
12651 \family typewriter
12652
12653 \backslash
12654 begin{article}
12655 \family default
12656  and, obviously, ends with the command 
12657 \family typewriter
12658
12659 \backslash
12660 end{article}
12661 \family default
12662 .
12663  Although this can be implemented in LyX, I didn't included it, since it
12664  looks ugly and can confuse the novice user.
12665  Therefore, you need to enter them directly and mark them as LaTeX code
12666  (the well-known 
12667 \begin_inset Quotes eld
12668 \end_inset
12669
12670 TeX code
12671 \begin_inset Quotes erd
12672 \end_inset
12673
12674 ).
12675 \end_layout
12676
12677 \begin_layout Enumerate
12678 Information given at the beginning of the article (i.
12679 \begin_inset space \thinspace{}
12680 \end_inset
12681
12682 g.
12683 \begin_inset space \space{}
12684 \end_inset
12685
12686 title, subtitle, author, institution, running title, running author, abstract
12687  and keywords) must be included in an environment called 
12688 \begin_inset Quotes eld
12689 \end_inset
12690
12691 opening
12692 \begin_inset Quotes erd
12693 \end_inset
12694
12695 .
12696  This is not implemented in LyX, so you must enter title, subtitle etc.
12697 \begin_inset space ~
12698 \end_inset
12699
12700 between two TeX code lines (
12701 \family typewriter
12702
12703 \backslash
12704 begin{opening}
12705 \family default
12706  and 
12707 \family typewriter
12708
12709 \backslash
12710 end{opening}
12711 \family default
12712 ).
12713 \end_layout
12714
12715 \begin_layout Enumerate
12716 According to the user manual, the label of each bibliography item must be
12717  written as 
12718 \family typewriter
12719
12720 \backslash
12721 protect
12722 \backslash
12723 citeauthoryear{
12724 \family default
12725 \emph on
12726 author(s)
12727 \family typewriter
12728 \emph default
12729 }{
12730 \family default
12731 \emph on
12732 year
12733 \family typewriter
12734 \emph default
12735 }
12736 \family default
12737 .
12738 \end_layout
12739
12740 \begin_layout Standard
12741 The 
12742 \family typewriter
12743 kluwer.lyx
12744 \family default
12745  template takes care of all these 
12746 \begin_inset Quotes eld
12747 \end_inset
12748
12749 peculiarities
12750 \begin_inset Quotes erd
12751 \end_inset
12752
12753 .
12754  If you start a new paper using this template you don't need to do anything
12755  special.
12756  Just 
12757 \end_layout
12758
12759 \begin_layout Enumerate
12760 don't delete the TeX code included in the template, and
12761 \end_layout
12762
12763 \begin_layout Enumerate
12764 copy the example bibliography item included in the template and modify it
12765  as necessary to enter new bibliography items.
12766 \end_layout
12767
12768 \begin_layout Section
12769 Koma-Script
12770 \end_layout
12771
12772 \begin_layout Standard
12773 by 
12774 \noun on
12775 Bernd Rellermeyer
12776 \end_layout
12777
12778 \begin_layout Subsection
12779 Overview
12780 \end_layout
12781
12782 \begin_layout Standard
12783 The LyX document classes 
12784 \emph on
12785 article (koma-script)
12786 \emph default
12787
12788 \emph on
12789 report (koma-script)
12790 \emph default
12791
12792 \emph on
12793 book
12794 \emph default
12795  
12796 \emph on
12797 (koma-script)
12798 \emph default
12799 , and 
12800 \emph on
12801 letter
12802 \emph default
12803  
12804 \emph on
12805 (koma-script)
12806 \emph default
12807  correspond to the LaTeX document classes 
12808 \family typewriter
12809 scrartcl.cls
12810 \family default
12811
12812 \family typewriter
12813 scrreprt.cls
12814 \family default
12815
12816 \family typewriter
12817 scrbook.cls
12818 \family default
12819 , and 
12820 \family typewriter
12821 scrlettr.cls
12822 \family default
12823 , resp.
12824 \begin_inset space ~
12825 \end_inset
12826
12827 of the Koma-Script family.
12828  They are replacements for the standard document classes 
12829 \family typewriter
12830 article.cls
12831 \family default
12832
12833 \family typewriter
12834 report.cls
12835 \family default
12836
12837 \family typewriter
12838 book.cls
12839 \family default
12840  and 
12841 \family typewriter
12842 letter.cls
12843 \family default
12844 , resp., and fit better to European typography conventions in a number of
12845  points.
12846 \end_layout
12847
12848 \begin_layout Itemize
12849 Standard character size is 11pt in 
12850 \emph on
12851 article (koma-script)
12852 \emph default
12853
12854 \emph on
12855 report (koma-script)
12856 \emph default
12857 , and 
12858 \emph on
12859 book (koma-script)
12860 \emph default
12861 , and 12pt in 
12862 \emph on
12863 letter (koma-script)
12864 \emph default
12865 .
12866 \end_layout
12867
12868 \begin_layout Itemize
12869 Headings, labels of the description environment, and a number of elements
12870  of the 
12871 \emph on
12872 letter (koma-script)
12873 \emph default
12874  document class are set in a bold sans serif font.
12875 \begin_inset Foot
12876 status collapsed
12877
12878 \begin_layout Plain Layout
12879 There is a big difference between the bold sans serif old cm fonts and new
12880  ec fonts, especially in the appearance of headings.
12881  In comparison, the ec bold sans serif fonts look a bit thin.
12882  Here the LaTeX package 
12883 \family typewriter
12884 cmsd.sty by
12885 \family default
12886  
12887 \shape smallcaps
12888 Walter Schmidt
12889 \shape default
12890  helps to produce the 
12891 \begin_inset Quotes eld
12892 \end_inset
12893
12894 usual
12895 \begin_inset Quotes erd
12896 \end_inset
12897
12898  appearance when using the ec fonts.
12899 \end_layout
12900
12901 \end_inset
12902
12903  The numbering of chapter headings is made in the same way as the numbering
12904  of section headings, that is without the extra line 
12905 \begin_inset Quotes eld
12906 \end_inset
12907
12908 Chapter\SpecialChar \ldots{}
12909
12910 \begin_inset Quotes erd
12911 \end_inset
12912
12913 .
12914  In addition, the appearance of the headings can be modified by using a
12915  number of options (in LyX to be entered in the field 
12916 \family sans
12917 Extra
12918 \begin_inset space ~
12919 \end_inset
12920
12921 Options
12922 \family default
12923  of the dialog 
12924 \family sans
12925 Layout\SpecialChar \menuseparator
12926 Document
12927 \family default
12928 ).
12929  
12930 \end_layout
12931
12932 \begin_layout Itemize
12933 The main means in the Koma-Script document classes to design the type area
12934  are the options 
12935 \family sans
12936 BCOR
12937 \family default
12938  and 
12939 \family sans
12940 DIV
12941 \family default
12942  (in LyX to be entered in the extra class options field in the dialog 
12943 \family sans
12944 Document\SpecialChar \menuseparator
12945 Settings
12946 \family default
12947 ).
12948  They make a clearer modification of page margins possible as do the options
12949  of the dialog 
12950 \family sans
12951 Document\SpecialChar \menuseparator
12952 Settings
12953 \family default
12954 .
12955  
12956 \end_layout
12957
12958 \begin_layout Itemize
12959 The LaTeX document classes of the Koma-Script family define a number of
12960  additional commands.
12961  Those part of it which makes sense in LyX is implemented in corresponding
12962  paragraph types.
12963 \end_layout
12964
12965 \begin_layout Standard
12966 Detailed descriptions of the LaTeX document classes of the Koma-Script family
12967  can be found in the Koma-Script documentation 
12968 \emph on
12969 scrguide
12970 \emph default
12971  (German) and 
12972 \emph on
12973 scrguien
12974 \emph default
12975  (English).
12976 \end_layout
12977
12978 \begin_layout Subsection
12979 article (koma-script), report (koma-script), and book (koma-script)
12980 \end_layout
12981
12982 \begin_layout Standard
12983 The document classes 
12984 \emph on
12985 article (koma-script)
12986 \emph default
12987
12988 \emph on
12989 report (koma-script)
12990 \emph default
12991 , and 
12992 \emph on
12993 book
12994 \emph default
12995  
12996 \emph on
12997 (koma-script)
12998 \emph default
12999  are implemented in the layout files 
13000 \family typewriter
13001 scrartcl.layout
13002 \family default
13003
13004 \family typewriter
13005 scrreprt.layout
13006 \family default
13007 , and 
13008 \family typewriter
13009 scrbook.layout
13010 \family default
13011 , resp.
13012  They contain all the paragraph types of the corresponding standard document
13013  classes 
13014 \emph on
13015 article
13016 \emph default
13017
13018 \emph on
13019 report
13020 \emph default
13021 , and 
13022 \emph on
13023 book
13024 \emph default
13025 , resp., partly modified, with the exception of the LyX specific 
13026 \family sans
13027 List
13028 \family default
13029 -type, which is replaced by the new 
13030 \family sans
13031 Labeling
13032 \family default
13033 -type having the same functionality.
13034  Beside the 
13035 \family sans
13036 Labeling
13037 \family default
13038 -Type there is a number of new paragraph types added.
13039  They are 
13040 \emph on
13041 not
13042 \emph default
13043  part of 
13044 \emph on
13045 letter (koma-script)
13046 \emph default
13047 .
13048 \end_layout
13049
13050 \begin_layout Itemize
13051
13052 \family sans
13053 Addpart, Addchap
13054 \family default
13055
13056 \family sans
13057 Addsec
13058 \family default
13059 : are equivalents to 
13060 \family sans
13061 Part*, Chapter*
13062 \family default
13063  and 
13064 \family sans
13065 Section*
13066 \family default
13067 , resp., additionally inserting an entry in the table of contents.
13068  
13069 \family sans
13070 Addpart
13071 \family default
13072  and 
13073 \family sans
13074 Addchap
13075 \family default
13076  are not contained in 
13077 \emph on
13078 article (koma-script)
13079 \emph default
13080 .
13081 \end_layout
13082
13083 \begin_layout Itemize
13084
13085 \family sans
13086 Addchap*
13087 \family default
13088
13089 \family sans
13090 Addsec*
13091 \family default
13092 : behave exactly as 
13093 \family sans
13094 Addchap
13095 \family default
13096  and 
13097 \family sans
13098 Addsec
13099 \family default
13100 , resp., additionally clearing running heads.
13101  
13102 \family sans
13103 Addchap*
13104 \family default
13105  is not contained in 
13106 \emph on
13107 article (koma-script)
13108 \emph default
13109 .
13110 \begin_inset Foot
13111 status collapsed
13112
13113 \begin_layout Plain Layout
13114 There is also an 
13115 \family typewriter
13116
13117 \backslash
13118 addpart*
13119 \family default
13120  command in 
13121 \emph on
13122 book (koma-script)
13123 \emph default
13124  and in 
13125 \emph on
13126 report (koma-script)
13127 \emph default
13128 , but since this is identical to 
13129 \family sans
13130 Part*
13131 \family default
13132 , is has not been implemented in LyX.
13133 \end_layout
13134
13135 \end_inset
13136
13137
13138 \end_layout
13139
13140 \begin_layout Itemize
13141
13142 \family sans
13143 Minisec
13144 \family default
13145 : generates a heading directly above the following paragraph in the standard
13146  character size without affecting the structure of the document.
13147 \end_layout
13148
13149 \begin_layout Itemize
13150
13151 \family sans
13152 Captionabove
13153 \family default
13154  and 
13155 \family sans
13156 Captionbelow
13157 \family default
13158  are special captions which respect the different space settings needed
13159  for captions placed above or below an element (if you follow strict typographic
13160  rules, you might want to place table captions always above the table).
13161  You can also use the class option 
13162 \family typewriter
13163 tablecaptionsabove
13164 \family default
13165 , which will switch 
13166 \family sans
13167 caption
13168 \family default
13169  to 
13170 \family sans
13171 captionabove
13172 \family default
13173  for tables and 
13174 \family sans
13175 captionbelow
13176 \family default
13177  for figures.
13178  You need at least Koma-Script version 2.8q to use this.
13179 \end_layout
13180
13181 \begin_layout Itemize
13182
13183 \family sans
13184 Dictum
13185 \family default
13186 : can be used to set a bonmot, e.
13187 \begin_inset space \thinspace{}
13188 \end_inset
13189
13190 g.
13191 \begin_inset space \space{}
13192 \end_inset
13193
13194 at the beginning of a chapter.
13195  If you use the optional argument (
13196 \family sans
13197 Insert\SpecialChar \menuseparator
13198 Short
13199 \begin_inset space ~
13200 \end_inset
13201
13202 Title
13203 \family default
13204 ), you can insert the dictum's author there.
13205  Dictum and author are separated by a line.
13206  You need at least Koma-Script version 2.8q to use this.
13207  
13208 \family sans
13209 Dictum
13210 \family default
13211  is not contained in 
13212 \emph on
13213 article (koma-script)
13214 \emph default
13215 .
13216 \end_layout
13217
13218 \begin_layout Standard
13219 The following types, together with the standard types 
13220 \family sans
13221 Title
13222 \family default
13223
13224 \family sans
13225 Author
13226 \family default
13227 , and 
13228 \family sans
13229 Date
13230 \family default
13231 , form the title area of the document.
13232  They must be entered ahead of the first 
13233 \begin_inset Quotes eld
13234 \end_inset
13235
13236 ordinary
13237 \begin_inset Quotes erd
13238 \end_inset
13239
13240  paragraph.
13241 \begin_inset Foot
13242 status collapsed
13243
13244 \begin_layout Plain Layout
13245 The corresponding LaTeX commands must appear before the 
13246 \family typewriter
13247
13248 \backslash
13249 maketitle
13250 \family default
13251  command.
13252 \end_layout
13253
13254 \end_inset
13255
13256  When such a type is used more than once, the latter usage overwrites the
13257  former one, that means, for every type only the latest usage is valid.
13258  The order of the different types however has, like 
13259 \family sans
13260 Title
13261 \family default
13262
13263 \family sans
13264 Author
13265 \family default
13266 , and 
13267 \family sans
13268 Date
13269 \family default
13270 , no effect on the appearance of the produced document.
13271 \end_layout
13272
13273 \begin_layout Itemize
13274
13275 \family sans
13276 Subject
13277 \family default
13278 : produces a centered paragraph above the ordinary title (
13279 \family sans
13280 Title
13281 \family default
13282
13283 \family sans
13284 Author
13285 \family default
13286
13287 \family sans
13288 Date
13289 \family default
13290 ) for the subject of the document.
13291 \end_layout
13292
13293 \begin_layout Itemize
13294
13295 \family sans
13296 Publishers
13297 \family default
13298 : produces a centered paragraph below the ordinary title (
13299 \family sans
13300 Title
13301 \family default
13302
13303 \family sans
13304 Author
13305 \family default
13306
13307 \family sans
13308 Date
13309 \family default
13310 ) for the publishers' name.
13311 \end_layout
13312
13313 \begin_layout Itemize
13314
13315 \family sans
13316 Dedication
13317 \family default
13318 : in 
13319 \emph on
13320 report (koma-script)
13321 \emph default
13322  and 
13323 \emph on
13324 book (koma-script)
13325 \emph default
13326  produces a centered paragraph on its own page behind the title page, or
13327  in 
13328 \emph on
13329 article (koma-script)
13330 \emph default
13331  produces a centered paragraph below the ordinary title (
13332 \family sans
13333 Title
13334 \family default
13335
13336 \family sans
13337 Author
13338 \family default
13339
13340 \family sans
13341 Date
13342 \family default
13343
13344 \family sans
13345 Publishers
13346 \family default
13347 ) for a dedication.
13348 \end_layout
13349
13350 \begin_layout Itemize
13351
13352 \family sans
13353 Titlehead
13354 \family default
13355 : produces a left aligned paragraph above the ordinary title (
13356 \family sans
13357 Title
13358 \family default
13359
13360 \family sans
13361 Author
13362 \family default
13363
13364 \family sans
13365 Date
13366 \family default
13367
13368 \family sans
13369 Subject
13370 \family default
13371 ) for a document`s head.
13372 \end_layout
13373
13374 \begin_layout Itemize
13375
13376 \family sans
13377 Uppertitleback
13378 \family default
13379 : produces in a double-sided print in 
13380 \emph on
13381 report (koma-script)
13382 \emph default
13383  and 
13384 \emph on
13385 book (koma-script)
13386 \emph default
13387  a left-aligned paragraph at the top of the title page`s back or has no
13388  effect in a single-sided print or in 
13389 \emph on
13390 article (koma-script)
13391 \emph default
13392 .
13393 \end_layout
13394
13395 \begin_layout Itemize
13396
13397 \family sans
13398 Lowertitleback
13399 \family default
13400 : produces in a double-sided print in 
13401 \emph on
13402 report (koma-script)
13403 \emph default
13404  and 
13405 \emph on
13406 book (koma-script)
13407 \emph default
13408  a left-aligned paragraph at the bottom of the title page`s back or has
13409  no effect in a single-sided print or in 
13410 \emph on
13411 article (koma-script)
13412 \emph default
13413 .
13414 \end_layout
13415
13416 \begin_layout Itemize
13417
13418 \family sans
13419 Extratitle
13420 \family default
13421 : produces a special 
13422 \begin_inset Quotes eld
13423 \end_inset
13424
13425 dirty
13426 \begin_inset Quotes erd
13427 \end_inset
13428
13429  page ahead of the actual document containing a paragraph without special
13430  formatting.
13431 \end_layout
13432
13433 \begin_layout Standard
13434 The layout files for the document classes 
13435 \emph on
13436 article (koma-script)
13437 \emph default
13438
13439 \emph on
13440 report (koma-script)
13441 \emph default
13442 , and 
13443 \emph on
13444 book (koma-script)
13445 \emph default
13446  do include the file 
13447 \family typewriter
13448 scrmacros.inc
13449 \family default
13450 .
13451  This is thought of as a place to define your own types.
13452  Copy scrmacros
13453 \family typewriter
13454 .inc
13455 \family default
13456  in your personal layout directory and edit the file!
13457 \end_layout
13458
13459 \begin_layout Subsection
13460 letter (koma-script)
13461 \end_layout
13462
13463 \begin_layout Standard
13464 \begin_inset ERT
13465 status open
13466
13467 \begin_layout Plain Layout
13468
13469
13470 \backslash
13471 begin{sloppypar}
13472 \end_layout
13473
13474 \end_inset
13475
13476
13477 \end_layout
13478
13479 \begin_layout Standard
13480 \noindent
13481 The document class 
13482 \emph on
13483 letter (koma-script)
13484 \emph default
13485  is implemented in the layout file 
13486 \family typewriter
13487 scrlettr.layout
13488 \family default
13489 .
13490  It contains all the paragraph types of the corresponding standard document
13491  class 
13492 \emph on
13493 letter
13494 \emph default
13495 , partly modified, with the exception of the LyX specific types 
13496 \family sans
13497 LyX-Code
13498 \family default
13499  and 
13500 \family sans
13501 Comment
13502 \family default
13503  and the 
13504 \family sans
13505 List
13506 \family default
13507  type, which is replaced by the new 
13508 \family sans
13509 Labeling
13510 \family default
13511  type.
13512  In addition, it contains, in contrast to the standard document class, the
13513  standard types 
13514 \family sans
13515 LaTeX
13516 \family default
13517
13518 \family sans
13519 Quotation
13520 \family default
13521
13522 \family sans
13523 Quote
13524 \family default
13525 , and 
13526 \family sans
13527 Verse
13528 \family default
13529 .
13530  Furthermore, there are a number of new letter specific types.
13531 \end_layout
13532
13533 \begin_layout Standard
13534 \begin_inset ERT
13535 status open
13536
13537 \begin_layout Plain Layout
13538
13539
13540 \backslash
13541 end{sloppypar}
13542 \end_layout
13543
13544 \end_inset
13545
13546
13547 \end_layout
13548
13549 \begin_layout Standard
13550 The appearance of the letter produced by this document class can be controlled
13551  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13552 \begin_inset Foot
13553 status collapsed
13554
13555 \begin_layout Plain Layout
13556 For example, the standard appearance of the letter`s heading, consisting
13557  of name and address, is quite self-willed.
13558  An 
13559 \begin_inset Quotes eld
13560 \end_inset
13561
13562 ordinary
13563 \begin_inset Quotes erd
13564 \end_inset
13565
13566  heading is produced by the following LaTeX commands in the preamble:
13567 \end_layout
13568
13569 \begin_layout LyX-Code
13570
13571 \backslash
13572 firsthead{
13573 \backslash
13574 parbox[b]{
13575 \backslash
13576 textwidth}
13577 \end_layout
13578
13579 \begin_layout LyX-Code
13580   {
13581 \backslash
13582 ignorespaces 
13583 \backslash
13584 fromname
13585 \backslash
13586
13587 \backslash
13588  
13589 \backslash
13590 ignorespaces 
13591 \backslash
13592 fromaddress}} 
13593 \end_layout
13594
13595 \begin_layout LyX-Code
13596
13597 \backslash
13598 nexthead{
13599 \backslash
13600 parbox[b]{
13601 \backslash
13602 textwidth}
13603 \end_layout
13604
13605 \begin_layout LyX-Code
13606   {
13607 \backslash
13608 ignorespaces 
13609 \backslash
13610 fromname 
13611 \backslash
13612 hfill 
13613 \backslash
13614 ignorespaces 
13615 \backslash
13616 pagename
13617 \backslash
13618  
13619 \backslash
13620 thepage}}
13621 \end_layout
13622
13623 \end_inset
13624
13625  A detailed German description of such LaTeX commands can be found in the
13626  Koma-Script documentation 
13627 \emph on
13628 scrguide
13629 \emph default
13630 .
13631  With it, the letter's author can produce his personal letter layout.
13632 \end_layout
13633
13634 \begin_layout Standard
13635 The types 
13636 \family sans
13637 Letter
13638 \family default
13639  and 
13640 \family sans
13641 Opening
13642 \family default
13643  define the beginning of the letter and must be used in every letter.
13644  To emphasize them in the LyX document class, they are marked with the letter
13645  
13646 \shape italic
13647 L
13648 \shape default
13649  or 
13650 \shape italic
13651 O
13652 \shape default
13653 , resp.
13654 \begin_inset space ~
13655 \end_inset
13656
13657 in the left margin.
13658  It is possible to write any number of letters in one file.
13659  An 
13660 \family sans
13661 Opening
13662 \family default
13663  type produces a new letter using the same addressee and a 
13664 \family sans
13665 Letter
13666 \family default
13667  type produces a new addressee.
13668  The types 
13669 \family sans
13670 Closing
13671 \family default
13672
13673 \family sans
13674 PS
13675 \family default
13676
13677 \family sans
13678 CC
13679 \family default
13680 , and 
13681 \family sans
13682 Encl
13683 \family default
13684  are ordinary paragraph types and can also be used several times in one
13685  and the same letter.
13686 \end_layout
13687
13688 \begin_layout Itemize
13689
13690 \family sans
13691 Letter
13692 \family default
13693 : produces a paragraph for the addressee and implicitly defines the beginning
13694  of the letter.
13695 \end_layout
13696
13697 \begin_layout Itemize
13698
13699 \family sans
13700 Opening
13701 \family default
13702 : produces a paragraph for the form of address and implicitly produces a
13703  new letter.
13704 \end_layout
13705
13706 \begin_layout Itemize
13707
13708 \family sans
13709 Closing
13710 \family default
13711 : produces a paragraph for a close.
13712 \end_layout
13713
13714 \begin_layout Itemize
13715
13716 \family sans
13717 PS
13718 \family default
13719 : produces a paragraph for a postscript.
13720 \end_layout
13721
13722 \begin_layout Itemize
13723
13724 \family sans
13725 CC
13726 \family default
13727 : produces a paragraph for a distribution list.
13728 \end_layout
13729
13730 \begin_layout Itemize
13731
13732 \family sans
13733 Encl
13734 \family default
13735 : produces a paragraph for enclosures.
13736 \end_layout
13737
13738 \begin_layout Standard
13739 The types 
13740 \family sans
13741 Name
13742 \family default
13743
13744 \family sans
13745 Signature
13746 \family default
13747
13748 \family sans
13749 Address
13750 \family default
13751
13752 \family sans
13753 Telephone
13754 \family default
13755
13756 \family sans
13757 Place
13758 \family default
13759
13760 \family sans
13761 Backaddress
13762 \family default
13763
13764 \family sans
13765 Specialmail
13766 \family default
13767
13768 \family sans
13769 Location
13770 \family default
13771
13772 \family sans
13773 Title
13774 \family default
13775 , and 
13776 \family sans
13777 Subject
13778 \family default
13779  are input types provided with a label to enter information, which will
13780  be processed by the document class.
13781 \begin_inset Foot
13782 status open
13783
13784 \begin_layout Plain Layout
13785 It could be seen as a matter of inconsequence, that the types 
13786 \family sans
13787 Letter
13788 \family default
13789  and 
13790 \family sans
13791 Opening
13792 \family default
13793  described above are not such input types as well.
13794  Because of the special meaning of those types, however, I have implemented
13795  them as ordinary paragraph types with a one letter mark in the left margin.
13796  Moreover, it would affect my feeling of symmetry, if the 
13797 \family sans
13798 Opening
13799 \family default
13800  type and the 
13801 \family sans
13802 Closing
13803 \family default
13804  type had such a serious different appearance.
13805 \end_layout
13806
13807 \end_inset
13808
13809  The types must be used ahead of the corresponding 
13810 \family sans
13811 Opening
13812 \family default
13813  type.
13814 \end_layout
13815
13816 \begin_layout Standard
13817 An implementation of these types in a WYSIWYG fashion does not seem to make
13818  sense, because the real appearance of the produced letter does not only
13819  depend on the usage of the particular type, but also on other factors.
13820  For example, a signature entered in the 
13821 \family sans
13822 Signature
13823 \family default
13824  type will in the standard behavior appear in the produced letter only,
13825  when in the same letter also a 
13826 \family sans
13827 Closing
13828 \family default
13829  type is used.
13830  The entered value of the 
13831 \family sans
13832 Telephone
13833 \family default
13834  type will in the standard behavior not appear in the produced letter at
13835  all.
13836  The possibility to design the letter`s heading freely is already indicated
13837  in a footnote above.
13838 \end_layout
13839
13840 \begin_layout Standard
13841 The input types can also be used as empty paragraphs.
13842  This makes sense e.
13843 \begin_inset space \thinspace{}
13844 \end_inset
13845
13846 g.
13847 \begin_inset space \space{}
13848 \end_inset
13849
13850 for the 
13851 \family sans
13852 Signature
13853 \family default
13854  type.
13855  If the 
13856 \family sans
13857 Signature
13858 \family default
13859  type is not used at all, in the standard behavior the value of the 
13860 \family sans
13861 Name
13862 \family default
13863  type is used as signature, whereas if an empty 
13864 \family sans
13865 Signature
13866 \family default
13867  type is used, no signature value is defined.
13868 \end_layout
13869
13870 \begin_layout Standard
13871 By using the input types it is possible to write a letter template, containing
13872  filled input types with your personal dates (name, address, etc.) and empty
13873  input types for other dates you want to enter.
13874 \end_layout
13875
13876 \begin_layout Itemize
13877
13878 \family sans
13879 Name
13880 \family default
13881 : sender's name, in the standard behavior appears as a centered paragraph
13882  in small caps in the letter`s heading.
13883 \end_layout
13884
13885 \begin_layout Itemize
13886
13887 \family sans
13888 Signature
13889 \family default
13890 : sender's signature, in the standard behavior appears below the 
13891 \family sans
13892 Closing
13893 \family default
13894  type.
13895  If no 
13896 \family sans
13897 Signature
13898 \family default
13899  type is used, the value of the 
13900 \family sans
13901 Name
13902 \family default
13903  type appears instead.
13904 \end_layout
13905
13906 \begin_layout Itemize
13907
13908 \family sans
13909 Address
13910 \family default
13911 : sender's address, in the standard behavior appears in a centered paragraph
13912  in the letter`s heading below the sender's name.
13913 \end_layout
13914
13915 \begin_layout Itemize
13916
13917 \family sans
13918 Telephone
13919 \family default
13920 : sender's telephone number, in the standard behavior only sets the LaTeX
13921  variable 
13922 \family typewriter
13923
13924 \backslash
13925 telephonenum
13926 \family default
13927 .
13928 \end_layout
13929
13930 \begin_layout Itemize
13931
13932 \family sans
13933 Place
13934 \family default
13935 : place of the letter`s making.
13936 \end_layout
13937
13938 \begin_layout Itemize
13939
13940 \family sans
13941 Date
13942 \family default
13943 : date of the letter`s making.
13944  
13945 \family sans
13946 Place
13947 \family default
13948  and 
13949 \family sans
13950 Date
13951 \family default
13952 , in the standard behavior, produce the place and the date in a right-aligned
13953  line below the addressee's field.
13954  If an empty 
13955 \family sans
13956 Date
13957 \family default
13958  type is used, neither place nor date appear, independent of the value of
13959  the 
13960 \family sans
13961 Place
13962 \family default
13963  type.
13964  If no 
13965 \family sans
13966 Date
13967 \family default
13968  type is used, the date of the letter `s production is used.
13969 \end_layout
13970
13971 \begin_layout Itemize
13972
13973 \family sans
13974 Backaddress
13975 \family default
13976 : sender`s back address, in the standard behavior appears above the addressee's
13977  field in a small sans serif font.
13978 \end_layout
13979
13980 \begin_layout Itemize
13981
13982 \family sans
13983 Specialmail
13984 \family default
13985 : special mail information, in the standard behavior appears underlined
13986  above the addressee's field below the back address.
13987 \end_layout
13988
13989 \begin_layout Itemize
13990
13991 \family sans
13992 Location
13993 \family default
13994 : additional information, in the standard behavior appears on right side
13995  below the addressee`s field.
13996 \end_layout
13997
13998 \begin_layout Itemize
13999
14000 \family sans
14001 Title
14002 \family default
14003 : the letter's title, in the standard behavior appears in a big, bold, sans
14004  serif font above the subject.
14005 \end_layout
14006
14007 \begin_layout Itemize
14008
14009 \family sans
14010 Subject
14011 \family default
14012 : the letter's subject, in the standard behavior appears in a bold font
14013  above the 
14014 \family sans
14015 Opening
14016 \family default
14017  paragraph.
14018 \end_layout
14019
14020 \begin_layout Standard
14021 The types 
14022 \family sans
14023 Yourref
14024 \family default
14025
14026 \family sans
14027 Yourmail
14028 \family default
14029
14030 \family sans
14031 Myref
14032 \family default
14033
14034 \family sans
14035 Customer
14036 \family default
14037 , and 
14038 \family sans
14039 Invoice
14040 \family default
14041  produce a business letter like line above the 
14042 \family sans
14043 Title
14044 \family default
14045  line containing the fields 
14046 \begin_inset Quotes eld
14047 \end_inset
14048
14049 Your ref.
14050 \begin_inset Quotes erd
14051 \end_inset
14052
14053
14054 \begin_inset Quotes eld
14055 \end_inset
14056
14057 Your letter of
14058 \begin_inset Quotes erd
14059 \end_inset
14060
14061
14062 \begin_inset Quotes eld
14063 \end_inset
14064
14065 Our ref.
14066 \begin_inset Quotes erd
14067 \end_inset
14068
14069
14070 \begin_inset Quotes eld
14071 \end_inset
14072
14073 Customer no.
14074 \begin_inset Quotes erd
14075 \end_inset
14076
14077
14078 \begin_inset Quotes eld
14079 \end_inset
14080
14081 Invoice no.
14082 \begin_inset Quotes erd
14083 \end_inset
14084
14085 , and 
14086 \begin_inset Quotes eld
14087 \end_inset
14088
14089 Date
14090 \begin_inset Quotes erd
14091 \end_inset
14092
14093 .
14094  For the date field, the value of the 
14095 \family sans
14096 Date
14097 \family default
14098  type is used.
14099  If one of these 
14100 \begin_inset Quotes eld
14101 \end_inset
14102
14103 business letter types
14104 \begin_inset Quotes erd
14105 \end_inset
14106
14107  is used, the value of the 
14108 \family sans
14109 Place
14110 \family default
14111  type however does not appear, but only the LaTeX variable 
14112 \family typewriter
14113
14114 \backslash
14115 fromplace
14116 \family default
14117  is set.
14118  The ordinary output of place and date in a right-aligned line below the
14119  addressee`s field is suppressed.
14120  The types are implemented as input types provided with a label and must
14121  be used ahead of the corresponding 
14122 \family sans
14123 Opening
14124 \family default
14125  type.
14126 \end_layout
14127
14128 \begin_layout Itemize
14129
14130 \family sans
14131 Yourref
14132 \family default
14133 : Your ref.
14134 \end_layout
14135
14136 \begin_layout Itemize
14137
14138 \family sans
14139 Yourmail
14140 \family default
14141 : Your letter of.
14142 \end_layout
14143
14144 \begin_layout Itemize
14145
14146 \family sans
14147 Myref
14148 \family default
14149 : Our ref.
14150 \end_layout
14151
14152 \begin_layout Itemize
14153
14154 \family sans
14155 Customer
14156 \family default
14157 : Customer no.
14158 \end_layout
14159
14160 \begin_layout Itemize
14161
14162 \family sans
14163 Invoice
14164 \family default
14165 : Invoice no.
14166 \end_layout
14167
14168 \begin_layout Subsection
14169 The new letter class: letter (koma-script v.2)
14170 \end_layout
14171
14172 \begin_layout Standard
14173 by 
14174 \noun on
14175 Jürgen Spitzmüller
14176 \end_layout
14177
14178 \begin_layout Standard
14179 \begin_inset VSpace medskip
14180 \end_inset
14181
14182
14183 \end_layout
14184
14185 \begin_layout Standard
14186 \noindent
14187 Koma-Script version 2.8 has introduced a new letter class 
14188 \family typewriter
14189 scrlttr2
14190 \family default
14191  which supersedes the now unsupported 
14192 \family typewriter
14193 scrlettr
14194 \family default
14195 .
14196  It has — on the LaTeX side — a completely new interface and is not compatible
14197  with the old class.
14198  Therefore, LyX supports both, though it is recommended you use the new
14199  class.
14200 \end_layout
14201
14202 \begin_layout Standard
14203 This class covers the same functionality as 
14204 \emph on
14205 letter (koma-script),
14206 \emph default
14207  and a few more.
14208  The basic items are 
14209 \family sans
14210 Address
14211 \family default
14212  (receiver's address, same as 
14213 \family sans
14214 Letter
14215 \family default
14216  in the old layout), 
14217 \family sans
14218 Opening
14219 \family default
14220 , and 
14221 \family sans
14222 Closing
14223 \family default
14224 .
14225  
14226 \family sans
14227 NextAddress
14228 \family default
14229  will start a new letter (i.
14230 \begin_inset space \thinspace{}
14231 \end_inset
14232
14233 g.
14234 \begin_inset space \space{}
14235 \end_inset
14236
14237 you can write several letters per document).
14238  New elements are sender's 
14239 \family sans
14240 E-Mail
14241 \family default
14242
14243 \family sans
14244 URL
14245 \family default
14246
14247 \family sans
14248 Fax
14249 \family default
14250
14251 \family sans
14252 Bank
14253 \family default
14254  and the possibility to use a 
14255 \family sans
14256 Logo
14257 \family default
14258  (via 
14259 \family sans
14260 Insert\SpecialChar \menuseparator
14261 Graphics
14262 \family default
14263 ) in the header.
14264 \end_layout
14265
14266 \begin_layout Standard
14267 The biggest improvement is, though, that the letter's layout is configurable
14268  to meet almost any needs.
14269  This can be done via the preamble or with a special style file (Letter
14270  Class Option, extension 
14271 \family typewriter
14272 *.lco
14273 \family default
14274 ), that will be read in as a class option.
14275 \begin_inset Foot
14276 status collapsed
14277
14278 \begin_layout Plain Layout
14279 The KOMA package comes with some default 
14280 \family typewriter
14281 *.lco
14282 \family default
14283  files.
14284  There is, for instance, a 
14285 \family typewriter
14286 DIN.lco
14287 \family default
14288  file that follows german typesetting rules, or a 
14289 \family typewriter
14290 KOMAold.lco
14291 \family default
14292  that provides the default layout of the old 
14293 \family typewriter
14294 scrlettr
14295 \family default
14296  class.
14297  The latter can be loaded with the class option 
14298 \family typewriter
14299 KOMAold
14300 \family default
14301 , inserted via the 
14302 \family sans
14303 \bar under
14304 L
14305 \bar default
14306 ayout\SpecialChar \menuseparator
14307
14308 \bar under
14309 D
14310 \bar default
14311 ocument\SpecialChar \menuseparator
14312 Extra Options
14313 \family default
14314  field.
14315 \end_layout
14316
14317 \end_inset
14318
14319  Have a look at the 
14320 \emph on
14321 koma-letter2
14322 \emph default
14323  template that is included in LyX for examples.
14324  A detailed description is to be found in the Koma-Script documentation
14325  (
14326 \emph on
14327 scrguide
14328 \emph default
14329 ).
14330 \end_layout
14331
14332 \begin_layout Subsection
14333 Problems
14334 \end_layout
14335
14336 \begin_layout Standard
14337 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14338  some problems.
14339 \end_layout
14340
14341 \begin_layout Itemize
14342 The chapter number of a 
14343 \family sans
14344 Chapter
14345 \family default
14346  type appears on a line of its own above the chapter heading instead of
14347  appearing in the same line ahead of it.
14348  The cause for that is the LyX internal behavior for the labeltype 
14349 \family sans
14350 Counter_Chapter
14351 \family default
14352  in the layout file.
14353 \end_layout
14354
14355 \begin_layout Itemize
14356 The headings of the types 
14357 \family sans
14358 Addchap
14359 \family default
14360  and 
14361 \family sans
14362 Addsec
14363 \family default
14364  are only put in the 
14365 \begin_inset Quotes eld
14366 \end_inset
14367
14368 true
14369 \begin_inset Quotes erd
14370 \end_inset
14371
14372  LaTeX table of contents, but not in the LyX table of contents (
14373 \family sans
14374 Document\SpecialChar \menuseparator
14375 Table
14376 \begin_inset space ~
14377 \end_inset
14378
14379 of
14380 \begin_inset space ~
14381 \end_inset
14382
14383 Contents
14384 \family default
14385 ).
14386 \end_layout
14387
14388 \begin_layout Itemize
14389 The paragraphs in a 
14390 \emph on
14391 letter
14392 \emph default
14393  document class appear in a skip separation mode, not indented.
14394  This is the standard behavior, no special LaTeX commands are needed for
14395  that.
14396  But in the 
14397 \family sans
14398 Document\SpecialChar \menuseparator
14399 Settings
14400 \family default
14401  dialog the corresponding radio button indicates 
14402 \family sans
14403 Indent
14404 \family default
14405 .
14406  A 
14407 \family sans
14408 Skip
14409 \family default
14410  value always has the effect that extra LaTeX commands are inserted in the
14411  document to produce the gap, which is not what is wanted in this case.
14412 \end_layout
14413
14414 \begin_layout Section
14415 Latex8 (IEEE Conference Papers)
14416 \end_layout
14417
14418 \begin_layout Standard
14419 by 
14420 \noun on
14421 Allan Rae
14422 \end_layout
14423
14424 \begin_layout Subsection
14425 Introduction
14426 \end_layout
14427
14428 \begin_layout Standard
14429 Since this class is specifically for writing submissions to IEEE sponsored
14430  conferences I strongly recommend that you get a copy of their Authors Kit.
14431  The 
14432 \family sans
14433 latex.sty
14434 \family default
14435  package and associated bibliography style file is included in the kit.
14436  The Authors Kit is usually sent out by email once your initial submission
14437  has been accepted.
14438  There is a lot of useful information in the Authors Kit explaining formatting
14439  restrictions and so on and I will assume you have read this since that
14440  means I don't have to repeat it all here.
14441 \end_layout
14442
14443 \begin_layout Subsection
14444 Getting Started
14445 \end_layout
14446
14447 \begin_layout Standard
14448 [AR\SpecialChar \@.
14449  more to come]
14450 \end_layout
14451
14452 \begin_layout Subsection
14453 Supported Environments
14454 \end_layout
14455
14456 \begin_layout Itemize
14457
14458 \family sans
14459 Standard
14460 \end_layout
14461
14462 \begin_layout Itemize
14463
14464 \family sans
14465 Title
14466 \end_layout
14467
14468 \begin_layout Itemize
14469
14470 \family sans
14471 Author
14472 \end_layout
14473
14474 \begin_layout Itemize
14475
14476 \family sans
14477 E-mail
14478 \end_layout
14479
14480 \begin_layout Itemize
14481
14482 \family sans
14483 Affiliation
14484 \end_layout
14485
14486 \begin_layout Itemize
14487
14488 \family sans
14489 Abstract
14490 \end_layout
14491
14492 \begin_layout Itemize
14493
14494 \family sans
14495 Section
14496 \end_layout
14497
14498 \begin_layout Itemize
14499
14500 \family sans
14501 SubSection
14502 \end_layout
14503
14504 \begin_layout Itemize
14505
14506 \family sans
14507 Caption
14508 \end_layout
14509
14510 \begin_layout Subsection
14511 Differences Between Screen and Paper
14512 \end_layout
14513
14514 \begin_layout Standard
14515 There are slight differences in appearance mainly with the presentation
14516  of section counters.
14517  On screen the trailing period of the section counter is missing but it
14518  will appear in the output so don't let this worry you.
14519 \end_layout
14520
14521 \begin_layout Section
14522 Memoir
14523 \end_layout
14524
14525 \begin_layout Standard
14526 By 
14527 \noun on
14528 Jürgen Spitzmüller
14529 \end_layout
14530
14531 \begin_layout Subsection
14532 Overview
14533 \end_layout
14534
14535 \begin_layout Standard
14536 Memoir is a very powerful and constantly evolving class.
14537  It has been designed with regard to fictional and non-fictional literature.
14538  Its aim is to let the user have maximum control over the typesetting of
14539  his document.
14540  Memoir is based on the standard book class, but it can also emulate the
14541  article class (see below).
14542 \end_layout
14543
14544 \begin_layout Standard
14545 Peter Wilson, the developer of Memoir, is known as the author of lots of
14546  useful packages in the LaTeX world.
14547  Most of them have been merged with Memoir.
14548  Therefore, it is much easier to layout the table of contents, appendices,
14549  chapter designs and such.
14550  LyX, though, does not support all of these goodies natively.
14551  Some of them might be added to forthcoming releases
14552 \begin_inset Foot
14553 status collapsed
14554
14555 \begin_layout Plain Layout
14556 You are invited to send suggestions to 
14557 \begin_inset Flex URL
14558 status collapsed
14559
14560 \begin_layout Plain Layout
14561
14562 lyx-devel@lists.lyx.org
14563 \end_layout
14564
14565 \end_inset
14566
14567 .
14568 \end_layout
14569
14570 \end_inset
14571
14572 , lots will probably never, due to the limitations of LyX's framework.
14573  Of course you can still use all features with the help of some native LaTeX
14574  commands (TeX code
14575 \begin_inset Foot
14576 status collapsed
14577
14578 \begin_layout Plain Layout
14579 Cf.
14580 \begin_inset ERT
14581 status collapsed
14582
14583 \begin_layout Plain Layout
14584
14585
14586 \backslash
14587  
14588 \end_layout
14589
14590 \end_inset
14591
14592 section
14593 \begin_inset space ~
14594 \end_inset
14595
14596
14597 \begin_inset CommandInset ref
14598 LatexCommand ref
14599 reference "sec:Inserting-TeX-Code"
14600
14601 \end_inset
14602
14603  for details.
14604 \end_layout
14605
14606 \end_inset
14607
14608 ).
14609  In this section, we can only list those features which are natively supported
14610  by LyX.
14611  For detailed descriptions (and for the rest of features) we recommend you
14612  have a look at the detailed manual of the Memoir class
14613 \begin_inset Foot
14614 status collapsed
14615
14616 \begin_layout Plain Layout
14617 Cf.
14618 \begin_inset ERT
14619 status collapsed
14620
14621 \begin_layout Plain Layout
14622
14623
14624 \backslash
14625  
14626 \end_layout
14627
14628 \end_inset
14629
14630
14631 \begin_inset Flex URL
14632 status collapsed
14633
14634 \begin_layout Plain Layout
14635
14636 CTAN:/macros/latex/memoir/memman.pdf
14637 \end_layout
14638
14639 \end_inset
14640
14641 .
14642 \end_layout
14643
14644 \end_inset
14645
14646 , which is not only a user guide for the class, but also both a comprehensive
14647  description on good typesetting and a superb example for good typesetting
14648  itself.
14649 \end_layout
14650
14651 \begin_layout Subsection
14652 Basic features and restrictions
14653 \end_layout
14654
14655 \begin_layout Standard
14656 Memoir supports basically all features of the standard book classes.
14657  There are, however, some differences, as follows:
14658 \end_layout
14659
14660 \begin_layout Description
14661 Font
14662 \begin_inset space ~
14663 \end_inset
14664
14665 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14666 \end_layout
14667
14668 \begin_layout Description
14669 Page
14670 \begin_inset space ~
14671 \end_inset
14672
14673 style: The fancy page style is not supported, due to a command clash between
14674  Memoir and the fancyhdr package (they both define a command with the same
14675  name, which confuses LaTeX).
14676  Instead, Memoir comes with a number of its own page styles (see 
14677 \family sans
14678 Layout\SpecialChar \menuseparator
14679 Document\SpecialChar \menuseparator
14680 Page
14681 \begin_inset space ~
14682 \end_inset
14683
14684 Style
14685 \family default
14686 ).
14687  If you want to use these for the chapter pages, you have to use the command
14688  
14689 \family typewriter
14690
14691 \backslash
14692 chapterstyle
14693 \family default
14694  in the main text or in preamble (e.
14695 \begin_inset space \thinspace{}
14696 \end_inset
14697
14698 g.
14699 \begin_inset space \space{}
14700 \end_inset
14701
14702
14703 \family typewriter
14704
14705 \backslash
14706 chapterstyle{companion}
14707 \family default
14708 ).
14709 \end_layout
14710
14711 \begin_layout Description
14712 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14713  optional argument in the standard classes.
14714  With this, you can specify an alternative version of the title for the
14715  table of contents and the headers (for instance, if the title is too long).
14716  In LyX, you can do this via 
14717 \family sans
14718 Insert\SpecialChar \menuseparator
14719 Short
14720 \begin_inset space ~
14721 \end_inset
14722
14723 Title
14724 \family default
14725  at the beginning of a chapter/section.
14726  Memoir features a second optional argument and thus separates the table
14727  of contents from the header.
14728  You can define three variants of a title with this: one for the main text,
14729  one for the table of contents, and one for the headers.
14730  Simply insert two optional arguments if you need this feature, the first
14731  one containing the short title for the Table of Contents, the second one
14732  containing an alternative short title for the headers.
14733 \end_layout
14734
14735 \begin_layout Description
14736 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14737  of contents, the list of figures and the list of table start a new page
14738  automatically.
14739  Memoir does not follow this route.
14740  You have to insert a page break yourself, if you want to have one.
14741 \end_layout
14742
14743 \begin_layout Description
14744 Titlepage: For some unknown reason, Memoir uses pagination on the title
14745  page (in the standard classes, title pages are 
14746 \begin_inset Quotes eld
14747 \end_inset
14748
14749 empty
14750 \begin_inset Quotes erd
14751 \end_inset
14752
14753 , i.
14754 \begin_inset space \thinspace{}
14755 \end_inset
14756
14757 g.
14758 \begin_inset space \space{}
14759 \end_inset
14760
14761 without pagina).
14762  If you want an empty title page, type 
14763 \family typewriter
14764
14765 \backslash
14766 aliaspagestyle{title}{empty}
14767 \family default
14768  in the preamble.
14769 \end_layout
14770
14771 \begin_layout Description
14772 Article: With the class option 
14773 \emph on
14774 article
14775 \emph default
14776  (to be inserted in 
14777 \family sans
14778 Layout\SpecialChar \menuseparator
14779 Document\SpecialChar \menuseparator
14780 Extra
14781 \begin_inset space ~
14782 \end_inset
14783
14784 Options
14785 \family default
14786 ), you can emulate article style.
14787  That is, counters (footnotes, figures, tables etc.) will not be reset on
14788  new chapters, chapters don't start a new page (but are—in contrary to 
14789 \begin_inset Quotes eld
14790 \end_inset
14791
14792 real
14793 \begin_inset Quotes erd
14794 \end_inset
14795
14796  article classes—still allowed), parts, though, use their own page, as in
14797  book.
14798 \end_layout
14799
14800 \begin_layout Description
14801 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14802  font commands, which have been used in the old LaTeX version 2.09 (e.
14803 \begin_inset space \thinspace{}
14804 \end_inset
14805
14806 g.
14807 \begin_inset space \space{}
14808 \end_inset
14809
14810
14811 \family typewriter
14812
14813 \backslash
14814 rm
14815 \family default
14816
14817 \family typewriter
14818
14819 \backslash
14820 it
14821 \family default
14822 ).
14823  It produces an error and stops LaTeX whenever such a command appears.
14824  The class option 
14825 \emph on
14826 oldfontcommands
14827 \emph default
14828  reallows the commands and spits out warnings instead (which does at least
14829  not stop LaTeX).
14830  Since a lot of packages and particularly BibTeX style files are still using
14831  those commands, we have decided to use this option by default.
14832 \end_layout
14833
14834 \begin_layout Subsection
14835 Extra features
14836 \end_layout
14837
14838 \begin_layout Standard
14839 We will only describe the features supported by LyX (which is not much currently
14840 ).
14841  Please consult the Memoir manual
14842 \begin_inset Foot
14843 status collapsed
14844
14845 \begin_layout Plain Layout
14846 Cf.
14847 \begin_inset ERT
14848 status collapsed
14849
14850 \begin_layout Plain Layout
14851
14852
14853 \backslash
14854  
14855 \end_layout
14856
14857 \end_inset
14858
14859
14860 \begin_inset Flex URL
14861 status collapsed
14862
14863 \begin_layout Plain Layout
14864
14865 CTAN:/macros/latex/memoir/memman.pdf
14866 \end_layout
14867
14868 \end_inset
14869
14870 .
14871 \end_layout
14872
14873 \end_inset
14874
14875  for details.
14876 \end_layout
14877
14878 \begin_layout Description
14879 Abstract: You may wonder why an abstract is an extra feature.
14880  Well, it is in book class.
14881  Usually books don't have abstracts.
14882  Memoir, however, has.
14883  You can use it wherever and how often you like.
14884 \end_layout
14885
14886 \begin_layout Description
14887 Chapterprecis: You may know this older typesetting style: The contents of
14888  a chapter are summarized below the title and also in the table of contents
14889  (e.
14890 \begin_inset space \thinspace{}
14891 \end_inset
14892
14893 g.
14894 \begin_inset space \space{}
14895 \end_inset
14896
14897
14898 \emph on
14899 Our hero arrives in Troia; he loses some friends; he finds others
14900 \emph default
14901 ).
14902  Chapterprecis does exactly this.
14903  It is therefore only sensible below a chapter.
14904 \end_layout
14905
14906 \begin_layout Description
14907 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14908  The epigraph environment provides an elegant way of typesetting such a
14909  motto.
14910  The motto itself (text) and its author (source) are divided by a short
14911  line.
14912  Unfortunately, we have to fool LyX a bit here again, since the environment
14913  needs two arguments (text and source).
14914  In this case, we have to use curly brackets (in TeX mode) between the two
14915  arguments: 
14916 \emph on
14917 <smart slogan>
14918 \emph default
14919  
14920 \family typewriter
14921 }{
14922 \family default
14923  
14924 \emph on
14925 <author of the slogan>.
14926 \end_layout
14927
14928 \begin_layout Description
14929 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14930  complex figurative poems).
14931  LyX can only support a few of them.
14932  One is poemtitle, which is a centered title for poems, which will also
14933  be added to the table of contents (verse is the standard environment for
14934  poems.
14935  Memoir has some enhanced versions of verse, but you need to use TeX code,
14936  because they have to be nested inside regular verse environments, which
14937  is not possible with LyX).
14938 \end_layout
14939
14940 \begin_layout Description
14941 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14942 \end_layout
14943
14944 \begin_layout Section
14945 Article (mwart), book (mwbk) and report (mwrep)
14946 \begin_inset Argument
14947 status collapsed
14948
14949 \begin_layout Plain Layout
14950 The 
14951 \family typewriter
14952 mw
14953 \family default
14954  Classes
14955 \end_layout
14956
14957 \end_inset
14958
14959
14960 \end_layout
14961
14962 \begin_layout Standard
14963 by 
14964 \noun on
14965 Tomasz Luczak
14966 \end_layout
14967
14968 \begin_layout Standard
14969 The LyX document classes 
14970 \emph on
14971 article (mwart)
14972 \emph default
14973
14974 \emph on
14975 report (mwrep)
14976 \emph default
14977  and 
14978 \emph on
14979 book
14980 \emph default
14981  
14982 \emph on
14983 (mwbk)
14984 \emph default
14985  correspond to the LaTeX document classes 
14986 \family typewriter
14987 mwart.cls
14988 \family default
14989
14990 \family typewriter
14991 mwrep.cls
14992 \family default
14993  and 
14994 \family typewriter
14995 mwbk.cls
14996 \family default
14997 , resp.
14998  They are replacements for the standard document classes 
14999 \family typewriter
15000 article.cls
15001 \family default
15002
15003 \family typewriter
15004 report.cls
15005 \family default
15006  and 
15007 \family typewriter
15008 book.cls
15009 \family default
15010 , resp., and fit better to Polish typography conventions in a number of points.
15011  
15012 \end_layout
15013
15014 \begin_layout Standard
15015 Basic differences:
15016 \end_layout
15017
15018 \begin_layout Itemize
15019 Unnumbered titles (with star, e.
15020 \begin_inset space \thinspace{}
15021 \end_inset
15022
15023 g.
15024 \begin_inset space \space{}
15025 \end_inset
15026
15027
15028 \family sans
15029 Section*
15030 \family default
15031 ) are added into table of contents,
15032 \end_layout
15033
15034 \begin_layout Itemize
15035 Additional page styles:
15036 \end_layout
15037
15038 \begin_deeper
15039 \begin_layout Description
15040 uheadings header with separated lines,
15041 \end_layout
15042
15043 \begin_layout Description
15044 myheadings custom header, contents headers via commands: 
15045 \family typewriter
15046
15047 \backslash
15048 markright
15049 \family default
15050  and 
15051 \family typewriter
15052
15053 \backslash
15054 markboth
15055 \family default
15056 ,
15057 \end_layout
15058
15059 \begin_layout Description
15060 myuheadings custom header with separated lines,
15061 \end_layout
15062
15063 \begin_layout Description
15064 outer page number is placed on outer side of page
15065 \end_layout
15066
15067 \end_deeper
15068 \begin_layout Itemize
15069 Options 
15070 \end_layout
15071
15072 \begin_deeper
15073 \begin_layout Description
15074 rmheadings serif titles — default,
15075 \end_layout
15076
15077 \begin_layout Description
15078 sfheadings sansserif titles,
15079 \end_layout
15080
15081 \begin_layout Description
15082 authortitle on title page first placed is author next title — default,
15083 \end_layout
15084
15085 \begin_layout Description
15086 titleauthor on title page first placed is title next author,
15087 \end_layout
15088
15089 \begin_layout Description
15090 withmarginpar reserve place on page for margins.
15091 \end_layout
15092
15093 \end_deeper
15094 \begin_layout Section
15095 Paper
15096 \end_layout
15097
15098 \begin_layout Standard
15099 The document class 
15100 \family sans
15101 paper
15102 \family default
15103  provides an alternative to the standard 
15104 \family sans
15105 article
15106 \family default
15107  class.
15108  It provides similar functionality, but you might prefer this layout with
15109  sans serif sections, headings, and more.
15110 \end_layout
15111
15112 \begin_layout Section
15113 RevTeX4
15114 \end_layout
15115
15116 \begin_layout Standard
15117 by 
15118 \noun on
15119 Amir Karger
15120 \end_layout
15121
15122 \begin_layout Standard
15123 \begin_inset VSpace bigskip
15124 \end_inset
15125
15126
15127 \end_layout
15128
15129 \begin_layout Standard
15130 \noindent
15131 The 
15132 \family sans
15133 Revtex
15134 \begin_inset space ~
15135 \end_inset
15136
15137 4
15138 \family default
15139  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15140 \begin_inset Formula $\beta$
15141 \end_inset
15142
15143  release of May, 1999) class.
15144 \end_layout
15145
15146 \begin_layout Standard
15147 LyX has a 
15148 \family sans
15149 Revtex
15150 \family default
15151  textclass, which works with RevTeX 3.1.
15152  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15153  That means that it doesn't interact very well with LyX, which requires
15154  LaTeX2e, although it has been kludged to work.
15155  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15156  LyX with the 
15157 \family sans
15158 RevTeX
15159 \begin_inset space ~
15160 \end_inset
15161
15162 4
15163 \family default
15164  textclass should also be pretty easy to use.
15165 \end_layout
15166
15167 \begin_layout Standard
15168 These documents are supposed to be used in 
15169 \emph on
15170 addition
15171 \emph default
15172  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15173  macros, and assume you'll know what to put in the preamble if necessary.
15174 \end_layout
15175
15176 \begin_layout Subsection
15177 Installation
15178 \end_layout
15179
15180 \begin_layout Standard
15181 All you need to do is install RevTeX 4, as described in the package's README
15182  file.
15183  The package can be found at The RevTeX 4 Web Site 
15184 \begin_inset Flex URL
15185 status collapsed
15186
15187 \begin_layout Plain Layout
15188
15189 http://publish.aps.org/revtex4/
15190 \end_layout
15191
15192 \end_inset
15193
15194 .
15195  Install it somewhere that LaTeX can see it.
15196  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15197  (i.
15198 \begin_inset space \thinspace{}
15199 \end_inset
15200
15201 g.
15202 \begin_inset space \space{}
15203 \end_inset
15204
15205 not the directory where you installed the class file.) Then, if you reconfigure
15206  LyX, it will find the class file and let you use the RevTeX4 textclass.
15207 \end_layout
15208
15209 \begin_layout Standard
15210 Probably the easiest way to get started is either to import a RevTeX 4 document
15211  using 
15212 \family typewriter
15213 tex2lyx
15214 \family default
15215 , or to use the 
15216 \family sans
15217 Revtex
15218 \begin_inset space ~
15219 \end_inset
15220
15221 4
15222 \family default
15223  template, found in the templates directory.
15224 \end_layout
15225
15226 \begin_layout Subsection
15227 Preamble Matter
15228 \end_layout
15229
15230 \begin_layout Standard
15231 Optional arguments to 
15232 \family typewriter
15233
15234 \backslash
15235 documentclass
15236 \family default
15237 , like 
15238 \begin_inset Quotes eld
15239 \end_inset
15240
15241 preprint
15242 \begin_inset Quotes erd
15243 \end_inset
15244
15245  and 
15246 \begin_inset Quotes eld
15247 \end_inset
15248
15249 aps
15250 \begin_inset Quotes erd
15251 \end_inset
15252
15253 , go in the 
15254 \family sans
15255 E
15256 \bar under
15257 x
15258 \bar default
15259 tra
15260 \begin_inset space ~
15261 \end_inset
15262
15263 Options
15264 \family default
15265  field in the 
15266 \family sans
15267 Document
15268 \begin_inset space ~
15269 \end_inset
15270
15271 Layout
15272 \family default
15273  dialog, as usual.
15274  Remember that in RevTeX, at least one optional argument is required! 
15275 \end_layout
15276
15277 \begin_layout Standard
15278 Other preamble matter, like 
15279 \family typewriter
15280
15281 \backslash
15282 draft
15283 \family default
15284  etc.
15285 \begin_inset space ~
15286 \end_inset
15287
15288 goes in the 
15289 \family sans
15290 LaTeX
15291 \begin_inset space ~
15292 \end_inset
15293
15294 Preamble
15295 \family default
15296  dialog, also as usual.
15297 \end_layout
15298
15299 \begin_layout Subsection
15300 Layouts
15301 \end_layout
15302
15303 \begin_layout Standard
15304 The layouts basically correspond to the commands in RevTeX4.0.
15305  For example, the Email layout corresponds to 
15306 \family typewriter
15307
15308 \backslash
15309 email{}
15310 \family default
15311 .
15312  Note that (at least as of RevTeX 4.0 Beta), the 
15313 \family sans
15314 Address
15315 \family default
15316  and 
15317 \family sans
15318 Affiliation
15319 \family default
15320  layouts are exactly equivalent, so you shouldn't need to use both.
15321 \begin_inset Foot
15322 status collapsed
15323
15324 \begin_layout Plain Layout
15325 In case you're curious, both were included so that 
15326 \family typewriter
15327 tex2lyx
15328 \family default
15329  would be able to translate both 
15330 \family typewriter
15331
15332 \backslash
15333 address
15334 \family default
15335  and 
15336 \family typewriter
15337
15338 \backslash
15339 affiliation
15340 \family default
15341 .
15342 \end_layout
15343
15344 \end_inset
15345
15346
15347 \end_layout
15348
15349 \begin_layout Subsection
15350 Important Notes
15351 \end_layout
15352
15353 \begin_layout Standard
15354 There are a couple of important unique aspects of RevTeX 4 which might cause
15355  bugs that will be even more confusing in LyX.
15356 \end_layout
15357
15358 \begin_layout Standard
15359 In RevTeX, the 
15360 \family typewriter
15361
15362 \backslash
15363 thanks
15364 \family default
15365  command goes 
15366 \emph on
15367 outside
15368 \emph default
15369  the 
15370 \family typewriter
15371
15372 \backslash
15373 author
15374 \family default
15375  command.
15376  The LyX equivalent is that there is a separate Thanks layout.
15377  Do 
15378 \emph on
15379 not
15380 \emph default
15381  write footnotes in the 
15382 \family sans
15383 Author
15384 \family default
15385  layout, or weird things may happen.
15386  See the RevTeX 4 documentation for more details.
15387 \end_layout
15388
15389 \begin_layout Standard
15390 Also, the 
15391 \family sans
15392 Author
15393 \begin_inset space ~
15394 \end_inset
15395
15396 Email
15397 \family default
15398
15399 \family sans
15400 Author
15401 \begin_inset space ~
15402 \end_inset
15403
15404 URL
15405 \family default
15406 , and 
15407 \family sans
15408 Thanks
15409 \family default
15410  layouts must be placed 
15411 \emph on
15412 in between
15413 \emph default
15414  the 
15415 \family sans
15416 Author
15417 \family default
15418  layout and the corresponding 
15419 \family sans
15420 Address
15421 \family default
15422  (or equivalent 
15423 \family sans
15424 Affiliation
15425 \family default
15426 ) layout.
15427  If you put the 
15428 \family sans
15429 Thanks
15430 \family default
15431  after the 
15432 \family sans
15433 Address
15434 \family default
15435 , the LaTeX won't compile.
15436 \end_layout
15437
15438 \begin_layout Subsection
15439 Drawbacks
15440 \end_layout
15441
15442 \begin_layout Standard
15443 The main problem with this layout is that you can't use the optional arguments
15444  to layouts like Email and Title.
15445  (The problem is not unique to this layout; you can't use optional arguments
15446  to the Section layouts either.) This means that after you export that file
15447  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15448  need to edit the LaTeX file with a text editor to add the optional arguments
15449  to set, e.
15450 \begin_inset space \thinspace{}
15451 \end_inset
15452
15453 g.
15454 \begin_inset space \space{}
15455 \end_inset
15456
15457 the running title for the page headers.
15458  Lacking these layouts makes the 
15459 \family typewriter
15460
15461 \backslash
15462 altaffiliation
15463 \family default
15464  (and the equivalent 
15465 \family typewriter
15466
15467 \backslash
15468 altaddress
15469 \family default
15470 ) useless, so the corresponding layouts don't exist, and will have to be
15471  added by hand.
15472 \begin_inset Foot
15473 status collapsed
15474
15475 \begin_layout Plain Layout
15476
15477 \emph on
15478 Note from JMarc:
15479 \emph default
15480  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15481  has not been updated yet to take advantage of it.
15482 \end_layout
15483
15484 \end_inset
15485
15486  
15487 \end_layout
15488
15489 \begin_layout Section
15490 Springer Journals (
15491 \family sans
15492 svjour
15493 \family default
15494 )
15495 \end_layout
15496
15497 \begin_layout Standard
15498 by 
15499 \noun on
15500 Martin Vermeer
15501 \end_layout
15502
15503 \begin_layout Subsection
15504 Description
15505 \end_layout
15506
15507 \begin_layout Standard
15508 These are the layout files for some of the journal formats used by Springer
15509  Verlag and listed on 
15510 \begin_inset Flex URL
15511 status collapsed
15512
15513 \begin_layout Plain Layout
15514
15515 http://www.springer.de/author/tex/help-journals.html
15516 \end_layout
15517
15518 \end_inset
15519
15520 , where you should also go to fetch the class files (yes, these are LaTeX2e
15521  now!).
15522  It is a modular system: the things common to all journals are implemented
15523  in 
15524 \family typewriter
15525 svjour.inc
15526 \family default
15527 , which journal-specific layout files (such as, e.
15528 \begin_inset space \thinspace{}
15529 \end_inset
15530
15531 g.
15532 \begin_inset space \space{}
15533 \end_inset
15534
15535
15536 \family typewriter
15537 svjog.layout
15538 \family default
15539  for Journal of Geodesy) can include.
15540 \end_layout
15541
15542 \begin_layout Standard
15543 This means that implementing support for any other Springer journal on this
15544  list is as simple as writing your own 
15545 \family typewriter
15546 sv
15547 \family default
15548 <myjournal>
15549 \family typewriter
15550 .layout
15551 \family default
15552  file following the outline given in 
15553 \family typewriter
15554 svjog.layout
15555 \family default
15556 .
15557  
15558 \end_layout
15559
15560 \begin_layout Standard
15561 It is reasonably well tested only for the Journal of Geodesy.
15562  
15563 \family typewriter
15564 svjour
15565 \family default
15566  and 
15567 \family typewriter
15568 svjog
15569 \family default
15570  come with the standard LyX distribution.
15571  Install the relevant class file (downloaded from Springer) in a proper
15572  directory, reconfigure LaTeX (in the teTeX case by running 
15573 \family typewriter
15574 texhash
15575 \family default
15576 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15577  and it should work.
15578 \end_layout
15579
15580 \begin_layout Subsection
15581 New styles
15582 \end_layout
15583
15584 \begin_layout Standard
15585 A large number of theorem-like styles — 
15586 \family sans
15587 Claim, Conjecture,
15588 \family default
15589  
15590 \family sans
15591 \SpecialChar \ldots{}
15592 Theorem
15593 \family default
15594 .
15595 \end_layout
15596
15597 \begin_layout Standard
15598
15599 \family sans
15600 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15601  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15602 \family default
15603 .
15604  See the Springer class file documentation for details.
15605 \end_layout
15606
15607 \begin_layout Subsection
15608 Supported journals
15609 \end_layout
15610
15611 \begin_layout Itemize
15612
15613 \emph on
15614 Journal of Geodesy
15615 \emph default
15616
15617 \family typewriter
15618 svjog.layout
15619 \family default
15620  — Martin Vermeer
15621 \end_layout
15622
15623 \begin_layout Itemize
15624
15625 \emph on
15626 Probability Theory and Related Fields
15627 \emph default
15628
15629 \family typewriter
15630 svprobth.layout
15631 \family default
15632  — Jean-Marc Lasgouttes
15633 \end_layout
15634
15635 \begin_layout Standard
15636 Add your own, it isn't so hard!
15637 \end_layout
15638
15639 \begin_layout Subsection
15640 Credits
15641 \end_layout
15642
15643 \begin_layout Standard
15644 These files are partly based on the older 
15645 \family typewriter
15646 ejour2.layout
15647 \family default
15648 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15649  file from Springer.
15650  All this, and the 
15651 \family typewriter
15652 ejour2
15653 \family default
15654  layout, are now defunct.
15655  Jean-Marc Lasgouttes helped out big in making me find my way around the
15656  LyX layout file mechanism.
15657 \end_layout
15658
15659 \begin_layout Subsection
15660 Bugs
15661 \end_layout
15662
15663 \begin_layout Standard
15664 Probably.
15665  But probably less than in the old hacked-LaTeX 
15666 \family typewriter
15667 ejour2
15668 \family default
15669 .
15670 \end_layout
15671
15672 \begin_layout Standard
15673 Limitations e.
15674 \begin_inset space \thinspace{}
15675 \end_inset
15676
15677 g.: does not display the number for theorem-like layouts, just #.
15678 \end_layout
15679
15680 \begin_layout Section
15681 Slides [aka 
15682 \noun on
15683 SliTeX
15684 \noun default
15685 ]
15686 \begin_inset CommandInset label
15687 LatexCommand label
15688 name "sec:slitex"
15689
15690 \end_inset
15691
15692
15693 \end_layout
15694
15695 \begin_layout Standard
15696 by 
15697 \noun on
15698 John Weiss
15699 \noun default
15700  
15701 \end_layout
15702
15703 \begin_layout Subsection
15704 Introduction
15705 \end_layout
15706
15707 \begin_layout Standard
15708 This section describes how to use LyX to make slides for overhead projectors.
15709  There are two document classes that can do this: the default slides class
15710  and the 
15711 \family sans
15712 FoilTeX
15713 \family default
15714  slides class.
15715  This section documents the former.
15716 \end_layout
15717
15718 \begin_layout Standard
15719 I'm going to say this again, nice and clear, so that there's no misunderstanding
15720 :
15721 \end_layout
15722
15723 \begin_layout Standard
15724 \begin_inset VSpace bigskip
15725 \end_inset
15726
15727
15728 \end_layout
15729
15730 \begin_layout Standard
15731 \align center
15732
15733 \size large
15734 This section documents the class 
15735 \begin_inset Quotes eld
15736 \end_inset
15737
15738
15739 \family sans
15740 slides (default)
15741 \family default
15742
15743 \begin_inset Quotes erd
15744 \end_inset
15745
15746  
15747 \emph on
15748 only.
15749 \end_layout
15750
15751 \begin_layout Standard
15752 \begin_inset VSpace bigskip
15753 \end_inset
15754
15755
15756 \end_layout
15757
15758 \begin_layout Standard
15759 If you're looking for the documentation for 
15760 \begin_inset Quotes eld
15761 \end_inset
15762
15763
15764 \family sans
15765 slides (FoilTeX)
15766 \family default
15767
15768 \begin_inset Quotes erd
15769 \end_inset
15770
15771 , check out section
15772 \begin_inset space ~
15773 \end_inset
15774
15775
15776 \begin_inset CommandInset ref
15777 LatexCommand ref
15778 reference "sec:foiltex"
15779
15780 \end_inset
15781
15782 .
15783  The 
15784 \family sans
15785 foils
15786 \family default
15787  class [
15788 \begin_inset Quotes eld
15789 \end_inset
15790
15791
15792 \family sans
15793 slides (FoilTeX)
15794 \family default
15795
15796 \begin_inset Quotes erd
15797 \end_inset
15798
15799 ] is actually somewhat better than the default 
15800 \family sans
15801 slides
15802 \family default
15803  class,
15804 \begin_inset Foot
15805 status collapsed
15806
15807 \begin_layout Plain Layout
15808 \SpecialChar \ldots{}
15809 or so I've been told repeatedly by its advocates.
15810  Having never used it, I have no idea if this claim is true or not.
15811 \end_layout
15812
15813 \end_inset
15814
15815  which this section documents.
15816 \end_layout
15817
15818 \begin_layout Standard
15819 This class is the LaTeX2e improvement of the old 
15820 \noun on
15821 SliTeX
15822 \noun default
15823  package.
15824  Every LaTeX2e distribution includes this class [which I'll just refer to
15825  as 
15826 \begin_inset Quotes eld
15827 \end_inset
15828
15829
15830 \family sans
15831 slides
15832 \family default
15833
15834 \begin_inset Quotes erd
15835 \end_inset
15836
15837  from now on], so you're bound to have it.
15838  As I noted earlier, there are other classes, such as 
15839 \family sans
15840 foils
15841 \family default
15842 , which also produce slides for overhead projectors and do a better job
15843  at it.
15844  However, there are some things which 
15845 \family sans
15846 slides
15847 \family default
15848  can do which the others can't, such as generate overlays.
15849  Read on to learn more!
15850 \end_layout
15851
15852 \begin_layout Subsection
15853 Getting Started
15854 \begin_inset CommandInset label
15855 LatexCommand label
15856 name "sec:slidesetup"
15857
15858 \end_inset
15859
15860
15861 \end_layout
15862
15863 \begin_layout Standard
15864 Obviously, to use this document class, you need to select 
15865 \begin_inset Quotes eld
15866 \end_inset
15867
15868
15869 \family sans
15870 slides (default)
15871 \family default
15872
15873 \begin_inset Quotes erd
15874 \end_inset
15875
15876  from the class list in the 
15877 \family sans
15878 Document\SpecialChar \menuseparator
15879 Settings
15880 \family default
15881  dialog.
15882  There are some other special things you should know about this class:
15883 \end_layout
15884
15885 \begin_layout Itemize
15886 Don't bother changing the options 
15887 \family sans
15888 Sides and Columns
15889 \family default
15890 .
15891  They're not supported by the 
15892 \family sans
15893 slides
15894 \family default
15895  class, anyways.
15896 \end_layout
15897
15898 \begin_layout Itemize
15899 The option 
15900 \family sans
15901 Page
15902 \begin_inset space ~
15903 \end_inset
15904
15905 style
15906 \family default
15907  behaves a bit differently for this class.
15908  The possible choices and what they do are as follows:
15909 \end_layout
15910
15911 \begin_deeper
15912 \begin_layout Description
15913
15914 \family sans
15915 plain
15916 \family default
15917  The final output contains page numbers in the lower right corner.
15918 \end_layout
15919
15920 \begin_layout Description
15921
15922 \family sans
15923 headings
15924 \family default
15925  Like 
15926 \family sans
15927 plain
15928 \family default
15929 , but also prints out any time markers you've put in.
15930  This is the default.
15931 \end_layout
15932
15933 \begin_layout Description
15934
15935 \family sans
15936 empty
15937 \family default
15938  The final output contains no page numbers, time markers, or alignment markers.
15939 \end_layout
15940
15941 \end_deeper
15942 \begin_layout Itemize
15943 The 
15944 \family sans
15945 slides
15946 \family default
15947  class has an extra option: 
15948 \family typewriter
15949 clock
15950 \family default
15951 .
15952  To use it, put 
15953 \begin_inset Quotes eld
15954 \end_inset
15955
15956
15957 \family typewriter
15958 clock
15959 \family default
15960
15961 \begin_inset Quotes erd
15962 \end_inset
15963
15964  in the extra class options.
15965 \end_layout
15966
15967 \begin_deeper
15968 \begin_layout Standard
15969 Using this options allows you to add time markers to 
15970 \family sans
15971 Note
15972 \family default
15973 s.
15974  See section
15975 \begin_inset space ~
15976 \end_inset
15977
15978
15979 \begin_inset CommandInset ref
15980 LatexCommand ref
15981 reference "sec:slideNote"
15982
15983 \end_inset
15984
15985  for more details.
15986 \end_layout
15987
15988 \end_deeper
15989 \begin_layout Standard
15990 You can also use the template file 
15991 \begin_inset Quotes eld
15992 \end_inset
15993
15994
15995 \family typewriter
15996 slides.lyx
15997 \family default
15998
15999 \begin_inset Quotes erd
16000 \end_inset
16001
16002  to automatically set up a document to use the 
16003 \family sans
16004 slides
16005 \family default
16006  class [using 
16007 \family sans
16008 File\SpecialChar \menuseparator
16009 New
16010 \begin_inset space ~
16011 \end_inset
16012
16013 from
16014 \begin_inset space ~
16015 \end_inset
16016
16017 Template
16018 \family default
16019  to open your new document].
16020  The template file also contains some examples of the special paragraph
16021  environments used by this class.
16022  I'll describe those next.
16023 \end_layout
16024
16025 \begin_layout Subsection
16026 Paragraph Environments
16027 \end_layout
16028
16029 \begin_layout Subsubsection
16030 Supported Environments
16031 \end_layout
16032
16033 \begin_layout Standard
16034 The first thing you'll notice when you start up a new 
16035 \family sans
16036 slides
16037 \family default
16038  document is the font size and type: it's the equivalent of the size 
16039 \begin_inset Quotes eld
16040 \end_inset
16041
16042
16043 \family sans
16044 Largest
16045 \family default
16046
16047 \begin_inset Quotes erd
16048 \end_inset
16049
16050  in the 
16051 \family sans
16052 Sans
16053 \begin_inset space ~
16054 \end_inset
16055
16056 Serif
16057 \family default
16058  font.
16059  This is also what's used in the output.
16060  Think of this as a 
16061 \begin_inset Quotes eld
16062 \end_inset
16063
16064 visual cue
16065 \begin_inset Quotes erd
16066 \end_inset
16067
16068  to remind you that this is a slide.
16069  Your final slides will use a larger font; ergo, you'll have less space.
16070  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16071 \end_layout
16072
16073 \begin_layout Standard
16074 The next thing that becomes obvious is the changes to the paragraph environment
16075  pull-down box [at the far-left end of the toolbar].
16076  Most of the paragraph environments you're used to seeing are missing.
16077  There are also five new ones.
16078  That's because the 
16079 \family sans
16080 slides
16081 \family default
16082  class itself only supports certain paragraph environments:
16083 \end_layout
16084
16085 \begin_layout Itemize
16086
16087 \family sans
16088 Standard
16089 \end_layout
16090
16091 \begin_layout Itemize
16092
16093 \family sans
16094 Itemize
16095 \end_layout
16096
16097 \begin_layout Itemize
16098
16099 \family sans
16100 Enumerate
16101 \end_layout
16102
16103 \begin_layout Itemize
16104
16105 \family sans
16106 Description
16107 \end_layout
16108
16109 \begin_layout Itemize
16110
16111 \family sans
16112 List
16113 \end_layout
16114
16115 \begin_layout Itemize
16116
16117 \family sans
16118 Quotation
16119 \end_layout
16120
16121 \begin_layout Itemize
16122
16123 \family sans
16124 Quote
16125 \end_layout
16126
16127 \begin_layout Itemize
16128
16129 \family sans
16130 Verse
16131 \end_layout
16132
16133 \begin_layout Itemize
16134
16135 \family sans
16136 Caption
16137 \end_layout
16138
16139 \begin_layout Itemize
16140
16141 \family sans
16142 LyX-Code
16143 \end_layout
16144
16145 \begin_layout Itemize
16146
16147 \family sans
16148 Comment
16149 \end_layout
16150
16151 \begin_layout Standard
16152 All of the other standard environments, including the section-heading environmen
16153 ts, aren't used in the 
16154 \family sans
16155 slides
16156 \family default
16157  class.
16158 \end_layout
16159
16160 \begin_layout Standard
16161 On the other hand, you'll notice the following new environments:
16162 \end_layout
16163
16164 \begin_layout Itemize
16165
16166 \family sans
16167 Slide
16168 \end_layout
16169
16170 \begin_layout Itemize
16171
16172 \family sans
16173 Overlay
16174 \end_layout
16175
16176 \begin_layout Itemize
16177
16178 \family sans
16179 Note
16180 \end_layout
16181
16182 \begin_layout Itemize
16183
16184 \family sans
16185 InvisibleText
16186 \end_layout
16187
16188 \begin_layout Itemize
16189
16190 \family sans
16191 VisibleText
16192 \end_layout
16193
16194 \begin_layout Standard
16195 These five are kind of quirky, due to a 
16196 \begin_inset Quotes eld
16197 \end_inset
16198
16199 feature
16200 \begin_inset Quotes erd
16201 \end_inset
16202
16203  in LyX.
16204  You see, LyX doesn't permit you to nest any other paragraph environment
16205  into an empty environment.
16206  Now, that's fine and dandy, but it means that you wouldn't be able to start
16207  a slide with anything except plain text.
16208  To deal with this, I've performed a little 
16209 \begin_inset Quotes eld
16210 \end_inset
16211
16212 LaTeX magic.
16213 \begin_inset Quotes erd
16214 \end_inset
16215
16216  
16217 \end_layout
16218
16219 \begin_layout Subsubsection
16220 Quirks of the New Environments
16221 \begin_inset CommandInset label
16222 LatexCommand label
16223 name "sec:slideQuirk"
16224
16225 \end_inset
16226
16227
16228 \end_layout
16229
16230 \begin_layout Standard
16231 All five of the new paragraph environments are somewhat quirky due to inherent
16232  limitiations in the current version of LyX.
16233  As I just mentioned, LyX forbids environments that begin with another environme
16234 nt.
16235  To get around this, the 
16236 \family sans
16237 Slide
16238 \family default
16239  environment isn't a paragraph environment as described in the 
16240 \emph on
16241 User's Guide
16242 \emph default
16243 .
16244  
16245 \end_layout
16246
16247 \begin_layout Standard
16248 You should consider 
16249 \family sans
16250 Slide
16251 \family default
16252
16253 \family sans
16254 Overlay
16255 \family default
16256 , and 
16257 \family sans
16258 Note
16259 \family default
16260  to be 
16261 \begin_inset Quotes eld
16262 \end_inset
16263
16264 pseudo-environments.
16265 \begin_inset Quotes erd
16266 \end_inset
16267
16268  They look like a section heading or a 
16269 \begin_inset Quotes eld
16270 \end_inset
16271
16272
16273 \family sans
16274 Caption
16275 \family default
16276 ,
16277 \begin_inset Quotes erd
16278 \end_inset
16279
16280  but really begin a [and, if necessary, end the previous] paragraph environment.
16281  Likewise, treat 
16282 \family sans
16283 InvisibleText
16284 \family default
16285  and 
16286 \family sans
16287 VisibleText
16288 \family default
16289  as 
16290 \begin_inset Quotes eld
16291 \end_inset
16292
16293 pseudo-commands.
16294 \begin_inset Quotes erd
16295 \end_inset
16296
16297  These two perform some action.
16298 \end_layout
16299
16300 \begin_layout Standard
16301 A common feature of all five environments, 
16302 \family sans
16303 Slide
16304 \family default
16305
16306 \family sans
16307 Overlay
16308 \family default
16309
16310 \family sans
16311 Note
16312 \family default
16313
16314 \family sans
16315 InvisibleText
16316 \family default
16317  and 
16318 \family sans
16319 VisibleText
16320 \family default
16321 , is a rather long-ish label.
16322  The text following this label — ordinarily the contents of the paragraph
16323  environment — is utterly irrelevant for 
16324 \family sans
16325 Slide
16326 \family default
16327
16328 \family sans
16329 Overlay
16330 \family default
16331
16332 \family sans
16333 Note
16334 \family default
16335
16336 \family sans
16337 InvisibleText
16338 \family default
16339  and 
16340 \family sans
16341 VisibleText
16342 \family default
16343 .
16344  LyX completely ignores it.
16345  In fact, you can leave these five environments completely empty.
16346  
16347 \end_layout
16348
16349 \begin_layout Standard
16350 While you don't 
16351 \emph on
16352 have
16353 \emph default
16354  to put any text after the rather long-ish label, you might want to.
16355  This could be a short description of the contents of the 
16356 \family sans
16357 Slide
16358 \family default
16359 , for example.
16360  In that case, enter your descriptive comment and hit 
16361 \family sans
16362 Return
16363 \family default
16364  as you normally would.
16365 \end_layout
16366
16367 \begin_layout Standard
16368 If, on the other hand, you don't want to enter any descriptive text, you'll
16369  hit another LyX quirk.
16370  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16371  environment until you put something in the old one.
16372  So, do this:
16373 \end_layout
16374
16375 \begin_layout Itemize
16376 Start entering the text that will 
16377 \emph on
16378 follow
16379 \emph default
16380  the new 
16381 \family sans
16382 Slide
16383 \family default
16384
16385 \family sans
16386 Overlay
16387 \family default
16388
16389 \family sans
16390 Note
16391 \family default
16392
16393 \family sans
16394 InvisibleText
16395 \family default
16396  or 
16397 \family sans
16398 VisibleText
16399 \family default
16400 .
16401  
16402 \end_layout
16403
16404 \begin_layout Itemize
16405 Now move to the beginning of that paragraph.
16406  
16407 \end_layout
16408
16409 \begin_layout Itemize
16410 Next, hit 
16411 \family sans
16412 Return
16413 \family default
16414 .
16415  
16416 \end_layout
16417
16418 \begin_layout Itemize
16419 Finally, change this new, empty paragraph to a 
16420 \family sans
16421 Slide
16422 \family default
16423
16424 \family sans
16425 Overlay
16426 \family default
16427
16428 \family sans
16429 Note
16430 \family default
16431
16432 \family sans
16433 InvisibleText
16434 \family default
16435  or 
16436 \family sans
16437 VisibleText
16438 \family default
16439 .
16440  
16441 \end_layout
16442
16443 \begin_layout Standard
16444 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16445
16446 \end_layout
16447
16448 \begin_layout Subsection
16449 Making a Presentation with 
16450 \family sans
16451 Slide
16452 \family default
16453
16454 \family sans
16455 Overlay
16456 \family default
16457  and 
16458 \family sans
16459 Note
16460 \end_layout
16461
16462 \begin_layout Subsubsection
16463 Using the 
16464 \family sans
16465 Slide
16466 \family default
16467  Environment
16468 \end_layout
16469
16470 \begin_layout Standard
16471 If you're expecting this section to teach you how to actually make a presentatio
16472 n, you'll be sorely disappointed.
16473  Naturally, I'll describe all of the ways the 
16474 \family sans
16475 slides
16476 \family default
16477  class can assist you in preparing the materials for a presentation.
16478  Filling in the contents, however, is up to you.
16479  [Then again, that 
16480 \emph on
16481 is
16482 \emph default
16483  the LyX philosophy.]
16484 \end_layout
16485
16486 \begin_layout Standard
16487 Choosing the 
16488 \family sans
16489 Slide
16490 \family default
16491  environment [in the manner described in section
16492 \begin_inset space ~
16493 \end_inset
16494
16495
16496 \begin_inset CommandInset ref
16497 LatexCommand ref
16498 reference "sec:slideQuirk"
16499
16500 \end_inset
16501
16502 ] tells LyX to begin a new slide [duh].
16503  The label for this environment/
16504 \begin_inset Quotes erd
16505 \end_inset
16506
16507 pseudo-command
16508 \begin_inset Quotes erd
16509 \end_inset
16510
16511  is an 
16512 \begin_inset Quotes eld
16513 \end_inset
16514
16515 ASCII line,
16516 \begin_inset Quotes erd
16517 \end_inset
16518
16519  in cool blue, followed by the label, 
16520 \begin_inset Quotes eld
16521 \end_inset
16522
16523 NewSlide:
16524 \begin_inset Quotes erd
16525 \end_inset
16526
16527 .
16528  Any text or paragraph environments that follow this one go on the new slide.
16529  It's that simple.
16530 \end_layout
16531
16532 \begin_layout Standard
16533 Slides are probably the only time you'll need to forcibly end pages in LyX
16534  (this can be specified in the 
16535 \family sans
16536 Paragraph Layout
16537 \family default
16538  dialog).
16539  In fact, you'll want to, once you finish entering the contents of one slide.
16540  If you've entered more text than can physically fit on a slide, the extra
16541  overflows onto a new slide.
16542  I don't recommend doing this, however, since the overflow slide won't have
16543  any page number on it.
16544  Furthermore, it may interfere with any 
16545 \family sans
16546 Overlay
16547 \family default
16548  you've made to accompany the oversized 
16549 \family sans
16550 Slide
16551 \family default
16552 .
16553 \end_layout
16554
16555 \begin_layout Standard
16556 The 
16557 \family sans
16558 Overlay
16559 \family default
16560  and 
16561 \family sans
16562 Note
16563 \family default
16564  environments work the same way as the 
16565 \family sans
16566 Slide
16567 \family default
16568  environment.
16569  They both create an 
16570 \begin_inset Quotes eld
16571 \end_inset
16572
16573 ASCII line
16574 \begin_inset Quotes erd
16575 \end_inset
16576
16577  followed by a label [
16578 \begin_inset Quotes eld
16579 \end_inset
16580
16581 NewOverlay:
16582 \begin_inset Quotes erd
16583 \end_inset
16584
16585  and 
16586 \begin_inset Quotes eld
16587 \end_inset
16588
16589 NewNote:
16590 \begin_inset Quotes erd
16591 \end_inset
16592
16593 , respectively].
16594  The color is a stunning magenta instead of blue, and the 
16595 \begin_inset Quotes eld
16596 \end_inset
16597
16598 ASCII line
16599 \begin_inset Quotes erd
16600 \end_inset
16601
16602  will look different, in style and in length.
16603  The label fonts of all three also differ from one another.
16604 \end_layout
16605
16606 \begin_layout Standard
16607 As with a 
16608 \family sans
16609 Slide
16610 \family default
16611 , if the contents of a 
16612 \family sans
16613 Note
16614 \family default
16615  or 
16616 \family sans
16617 Overlay
16618 \family default
16619  exceed the physical size of a slide or sheet of paper, the extra will overflow
16620  onto a new sheet.
16621  Again, you should avoid this.
16622  It defeats the whole purpose of 
16623 \family sans
16624 Note
16625 \family default
16626 s and 
16627 \family sans
16628 Overlay
16629 \family default
16630 s.
16631 \end_layout
16632
16633 \begin_layout Subsubsection
16634 Using 
16635 \family sans
16636 Overlay
16637 \family default
16638  with 
16639 \family sans
16640 Slide
16641 \end_layout
16642
16643 \begin_layout Standard
16644 The idea behind an 
16645 \family sans
16646 Overlay
16647 \family default
16648  is a slide that sits atop another slide.
16649  Perhaps you wish to discuss a figure on the main 
16650 \family sans
16651 Slide
16652 \family default
16653  before displaying the text associated with it.
16654  One way to accomplish this is tape a flap of dark paper over the part of
16655  the 
16656 \family sans
16657 Slide
16658 \family default
16659  you want to display later.
16660  This method fails, however, if you wish to overlap one graph with another,
16661  for example.
16662  You would then have to fumble while speaking to align the two separate,
16663  overlapping 
16664 \family sans
16665 Slide
16666 \family default
16667 s to align the two graphs.
16668  The use of an 
16669 \family sans
16670 Overlay
16671 \family default
16672  environment in both cases makes life much easier.
16673 \end_layout
16674
16675 \begin_layout Standard
16676 Each 
16677 \family sans
16678 Overlay
16679 \family default
16680  receives the page number of its 
16681 \begin_inset Quotes eld
16682 \end_inset
16683
16684 parent
16685 \begin_inset Quotes erd
16686 \end_inset
16687
16688  
16689 \family sans
16690 Slide
16691 \family default
16692 , appended by 
16693 \begin_inset Quotes eld
16694 \end_inset
16695
16696
16697 \family typewriter
16698 -a
16699 \family default
16700
16701 \begin_inset Quotes erd
16702 \end_inset
16703
16704 .
16705 \begin_inset Foot
16706 status collapsed
16707
16708 \begin_layout Plain Layout
16709 Presumably, mutliple 
16710 \family sans
16711 Overlay
16712 \family default
16713 s would have 
16714 \begin_inset Quotes eld
16715 \end_inset
16716
16717
16718 \family typewriter
16719 -a
16720 \family default
16721
16722 \begin_inset Quotes erd
16723 \end_inset
16724
16725
16726 \begin_inset Quotes eld
16727 \end_inset
16728
16729
16730 \family typewriter
16731 -b
16732 \family default
16733
16734 \begin_inset Quotes erd
16735 \end_inset
16736
16737
16738 \begin_inset Quotes eld
16739 \end_inset
16740
16741
16742 \family typewriter
16743 -c
16744 \family default
16745
16746 \begin_inset Quotes erd
16747 \end_inset
16748
16749 , etc.
16750 \begin_inset space ~
16751 \end_inset
16752
16753 appended to the page number of the parent 
16754 \family sans
16755 Slide
16756 \family default
16757 .
16758  
16759 \end_layout
16760
16761 \end_inset
16762
16763  Clearly, you want the contents of both the 
16764 \family sans
16765 Slide
16766 \family default
16767  and the 
16768 \family sans
16769 Overlay
16770 \family default
16771  to each fit on a single physical slide! You should probably consider an
16772  
16773 \family sans
16774 Overlay
16775 \family default
16776  as 
16777 \begin_inset Quotes eld
16778 \end_inset
16779
16780 part of
16781 \begin_inset Quotes erd
16782 \end_inset
16783
16784  a 
16785 \family sans
16786 Slide
16787 \family default
16788 .
16789  Indeed, the LyX 
16790 \family sans
16791 slides
16792 \family default
16793  class provides a visual cue for this: the label at the start of an 
16794 \family sans
16795 Overlay
16796 \family default
16797  is shorter than that at the start of a 
16798 \family sans
16799 Slide
16800 \family default
16801 .
16802  Lastly, when you generate printable output, you'll find alignment markers
16803  in all four corners of both the 
16804 \family sans
16805 Overlay
16806 \family default
16807  page and its parent 
16808 \family sans
16809 Slide
16810 \family default
16811 .
16812  These will assist you in lining up the two physical slides.
16813 \end_layout
16814
16815 \begin_layout Standard
16816 The major problem in overlaying two slides is aligning the contents of the
16817  two transparencies.
16818  How much space should you leave for that graph on the second slide? Worse
16819  still, what if you want a graph and a sentence on second slide, but there
16820  is text on the main transparency that goes in between them? You could try
16821  and insert vertical space of the right size.
16822  The better way is to use 
16823 \family sans
16824 InvisibleText
16825 \family default
16826  and 
16827 \family sans
16828 VisibleText
16829 \family default
16830 .
16831 \end_layout
16832
16833 \begin_layout Standard
16834 As their names imply, 
16835 \family sans
16836 InvisibleText
16837 \family default
16838  and 
16839 \family sans
16840 VisibleText
16841 \family default
16842  are two command-like paragraph environments that make all subsequent text
16843  invisible and visible, respectively.
16844  Note from section
16845 \begin_inset space ~
16846 \end_inset
16847
16848
16849 \begin_inset CommandInset ref
16850 LatexCommand ref
16851 reference "sec:slideQuirk"
16852
16853 \end_inset
16854
16855  that you don't place anything 
16856 \emph on
16857 into
16858 \emph default
16859  these two environments, however.
16860  When you create an 
16861 \family sans
16862 InvisibleText
16863 \family default
16864 , it inserts a centered, sky-blue label into the page reading 
16865 \begin_inset Quotes eld
16866 \end_inset
16867
16868 <Invisible Text Follows>
16869 \begin_inset Quotes erd
16870 \end_inset
16871
16872 .
16873  For paragraphs following this label, the parts of the 
16874 \family sans
16875 Slide
16876 \family default
16877  [or 
16878 \family sans
16879 Overlay
16880 \family default
16881 ; it doesn't matter which] where they would be contain instead blank space.
16882  
16883 \end_layout
16884
16885 \begin_layout Standard
16886 For 
16887 \family sans
16888 VisibleText
16889 \family default
16890 , the corresponding centered label is 
16891 \begin_inset Quotes eld
16892 \end_inset
16893
16894 <Visible Text Follows>
16895 \begin_inset Quotes erd
16896 \end_inset
16897
16898  in blazing green.
16899  Paragraphs following this label behave normally.
16900  Note that the beginning of a new 
16901 \family sans
16902 Slide
16903 \family default
16904
16905 \family sans
16906 Overlay
16907 \family default
16908 , or 
16909 \family sans
16910 Note
16911 \family default
16912  automatically shuts off an 
16913 \family sans
16914 InvisibleText
16915 \family default
16916 .
16917  It's therefore not necessary to use 
16918 \family sans
16919 VisibleText
16920 \family default
16921  at the end of a 
16922 \family sans
16923 Slide
16924 \family default
16925 .
16926 \end_layout
16927
16928 \begin_layout Standard
16929 By now, it should be obvious how to create overlay transparencies using
16930  the proper combination of 
16931 \family sans
16932 InvisibleText
16933 \family default
16934  and 
16935 \family sans
16936 VisibleText
16937 \family default
16938  on a 
16939 \family sans
16940 Slide
16941 \family default
16942  and 
16943 \family sans
16944 Overlay
16945 \family default
16946 :
16947 \end_layout
16948
16949 \begin_layout Enumerate
16950 Create a 
16951 \family sans
16952 Slide
16953 \family default
16954 , including everything that will appear on it, whether on the main slide
16955  or on the 
16956 \family sans
16957 Overlay
16958 \family default
16959 .
16960 \end_layout
16961
16962 \begin_layout Enumerate
16963 Before each figure or paragraph that will appear only on the 
16964 \family sans
16965 Overlay
16966 \family default
16967 , insert an 
16968 \family sans
16969 InvisibleText
16970 \family default
16971  environment.
16972  If necessary, insert a 
16973 \family sans
16974 VisibleText
16975 \family default
16976  environment after the 
16977 \family sans
16978 Overlay
16979 \family default
16980 -only text.
16981 \end_layout
16982
16983 \begin_layout Enumerate
16984 Start an 
16985 \family sans
16986 Overlay
16987 \family default
16988  immediately following the 
16989 \family sans
16990 Slide
16991 \family default
16992 .
16993 \end_layout
16994
16995 \begin_layout Enumerate
16996 Copy the contents of this 
16997 \family sans
16998 Slide
16999 \family default
17000  into the 
17001 \family sans
17002 Overlay
17003 \family default
17004 .
17005 \end_layout
17006
17007 \begin_layout Enumerate
17008 Within the 
17009 \family sans
17010 Overlay
17011 \family default
17012 , change all of the 
17013 \family sans
17014 InvisibleText
17015 \family default
17016  lines to 
17017 \family sans
17018 VisibleText
17019 \family default
17020  and vice-versa.
17021 \end_layout
17022
17023 \begin_layout Standard
17024 That's it.
17025  You've just made an 
17026 \family sans
17027 Overlay
17028 \family default
17029 .
17030 \end_layout
17031
17032 \begin_layout Standard
17033 There's one problem with the way I've designed the LyX 
17034 \family sans
17035 slides
17036 \family default
17037  class: you can't make text in the middle of a paragraph invisible, nor
17038  make text in the middle of an invisible paragraph visible again.
17039  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17040 \begin_inset Foot
17041 status collapsed
17042
17043 \begin_layout Plain Layout
17044 The commands of interest are: 
17045 \end_layout
17046
17047 \begin_layout Itemize
17048
17049 \family typewriter
17050 {
17051 \backslash
17052 invisible \SpecialChar \ldots{}
17053  }
17054 \end_layout
17055
17056 \begin_layout Itemize
17057
17058 \family typewriter
17059 {
17060 \backslash
17061 visible \SpecialChar \ldots{}
17062  }
17063 \end_layout
17064
17065 \begin_layout Plain Layout
17066 \SpecialChar \ldots{}
17067 and need to be marked as TeX.
17068  The text whose 
17069 \begin_inset Quotes eld
17070 \end_inset
17071
17072 visibility
17073 \begin_inset Quotes erd
17074 \end_inset
17075
17076  you wish to change goes in between the brackets [and after the 
17077 \family typewriter
17078
17079 \backslash
17080 invisible
17081 \family default
17082  or 
17083 \family typewriter
17084
17085 \backslash
17086 visible
17087 \family default
17088  command].
17089  If you don't know how to mark text as TeX, see the appropriate section
17090  of the 
17091 \emph on
17092 User's Guide
17093 \emph default
17094 .
17095 \end_layout
17096
17097 \end_inset
17098
17099
17100 \end_layout
17101
17102 \begin_layout Subsubsection
17103 Using 
17104 \family sans
17105 Note
17106 \family default
17107  with 
17108 \family sans
17109 Slide
17110 \family default
17111
17112 \begin_inset CommandInset label
17113 LatexCommand label
17114 name "sec:slideNote"
17115
17116 \end_inset
17117
17118
17119 \end_layout
17120
17121 \begin_layout Standard
17122 Like an 
17123 \family sans
17124 Overlay
17125 \family default
17126 , a 
17127 \family sans
17128 Note
17129 \family default
17130  is associated with a 
17131 \begin_inset Quotes eld
17132 \end_inset
17133
17134 parent
17135 \begin_inset Quotes erd
17136 \end_inset
17137
17138  
17139 \family sans
17140 Slide
17141 \family default
17142 .
17143  Here, too, the LyX 
17144 \family sans
17145 slides
17146 \family default
17147  class provides visual cues.
17148  The label for a 
17149 \family sans
17150 Note
17151 \family default
17152  is shorter than that of a 
17153 \family sans
17154 Slide
17155 \family default
17156  [yet longer than that of an 
17157 \family sans
17158 Overlay
17159 \family default
17160 ] and, like the label of an 
17161 \family sans
17162 Overlay
17163 \family default
17164  is shockingly magenta.
17165  Additionally, the printed 
17166 \family sans
17167 Note
17168 \family default
17169  has the page number of its 
17170 \begin_inset Quotes eld
17171 \end_inset
17172
17173 parent
17174 \begin_inset Quotes erd
17175 \end_inset
17176
17177  
17178 \family sans
17179 Slide
17180 \family default
17181 , appended by 
17182 \begin_inset Quotes eld
17183 \end_inset
17184
17185
17186 \family typewriter
17187 -
17188 \family default
17189 1
17190 \begin_inset Quotes erd
17191 \end_inset
17192
17193
17194 \begin_inset Quotes eld
17195 \end_inset
17196
17197
17198 \family typewriter
17199 -
17200 \family default
17201 2
17202 \begin_inset Quotes erd
17203 \end_inset
17204
17205
17206 \begin_inset Quotes eld
17207 \end_inset
17208
17209
17210 \family typewriter
17211 -
17212 \family default
17213 3
17214 \begin_inset Quotes erd
17215 \end_inset
17216
17217 , etc.
17218  You can have multiple 
17219 \family sans
17220 Note
17221 \family default
17222 s associated with a single 
17223 \family sans
17224 Slide
17225 \family default
17226 , and, as with 
17227 \family sans
17228 Slide
17229 \family default
17230  and 
17231 \family sans
17232 Overlay
17233 \family default
17234 , you'll probably want to break up long 
17235 \family sans
17236 Note
17237 \family default
17238 s so that they fit on a single sheet of paper.
17239 \end_layout
17240
17241 \begin_layout Standard
17242 The purpose of a 
17243 \family sans
17244 Note
17245 \family default
17246  is obvious: it contains anything additional you might want to say about
17247  a 
17248 \family sans
17249 Slide
17250 \family default
17251 .
17252  It could also be used as a sheet of reminders for a particular 
17253 \family sans
17254 Slide
17255 \family default
17256 .
17257  In the case of the latter, you might want to make use of time markers.
17258  Currently, the LyX 
17259 \family sans
17260 slides
17261 \family default
17262  class has no 
17263 \begin_inset Quotes eld
17264 \end_inset
17265
17266 native
17267 \begin_inset Quotes erd
17268 \end_inset
17269
17270  support for time markers, a 
17271 \noun on
17272 SliTeX
17273 \noun default
17274  feature.
17275  So, you'll have to resort to using the LaTeX codes.
17276 \end_layout
17277
17278 \begin_layout Standard
17279 To use time markers, you'll need to specify the extra class option 
17280 \begin_inset Quotes eld
17281 \end_inset
17282
17283
17284 \family typewriter
17285 clock
17286 \family default
17287
17288 \begin_inset Quotes erd
17289 \end_inset
17290
17291  [see section
17292 \begin_inset space ~
17293 \end_inset
17294
17295
17296 \begin_inset CommandInset ref
17297 LatexCommand ref
17298 reference "sec:slidesetup"
17299
17300 \end_inset
17301
17302 ].
17303  This option turns on timing marks, which will appear in the lower-left-hand
17304  corner of every 
17305 \family sans
17306 Note
17307 \family default
17308  you generate.
17309  To set what appears in the time marker, you use the LaTeX commands 
17310 \begin_inset Quotes eld
17311 \end_inset
17312
17313
17314 \family typewriter
17315
17316 \backslash
17317 settime{}
17318 \family default
17319
17320 \begin_inset Quotes erd
17321 \end_inset
17322
17323  and 
17324 \begin_inset Quotes eld
17325 \end_inset
17326
17327
17328 \family typewriter
17329
17330 \backslash
17331 addtime{}
17332 \family default
17333
17334 \begin_inset Quotes erd
17335 \end_inset
17336
17337 .
17338  The arguments of both commands are time measured in seconds.
17339  
17340 \begin_inset Quotes eld
17341 \end_inset
17342
17343
17344 \family typewriter
17345
17346 \backslash
17347 settime{}
17348 \family default
17349
17350 \begin_inset Quotes erd
17351 \end_inset
17352
17353  sets the time marker to a given time.
17354  
17355 \begin_inset Quotes eld
17356 \end_inset
17357
17358
17359 \family typewriter
17360
17361 \backslash
17362 addtime{}
17363 \family default
17364
17365 \begin_inset Quotes erd
17366 \end_inset
17367
17368  increments the time marker by the specified amount.
17369  Using time markers and 
17370 \family sans
17371 Note
17372 \family default
17373 s in this fashion, you can remind yourself how much time to spend on a particula
17374
17375 \family sans
17376 Slide
17377 \family default
17378 .
17379 \end_layout
17380
17381 \begin_layout Standard
17382 There's one last feature to describe.
17383  Clearly, you'd like to print out all of your 
17384 \family sans
17385 Slide
17386 \family default
17387 s and 
17388 \family sans
17389 Overlay
17390 \family default
17391 s on transparencies while printing all of your 
17392 \family sans
17393 Note
17394 \family default
17395 s on plain paper.
17396  However, a 
17397 \family sans
17398 Note
17399 \family default
17400  
17401 \emph on
17402 must
17403 \emph default
17404  follow the 
17405 \family sans
17406 Slide
17407 \family default
17408  with which it is associated.
17409  What's a person to do?
17410 \end_layout
17411
17412 \begin_layout Standard
17413 Luckily, there are two LaTeX commands that allow you to select what to print
17414  out.
17415  Both must be placed into the preamble of your document.
17416  The command 
17417 \begin_inset Quotes eld
17418 \end_inset
17419
17420
17421 \family typewriter
17422
17423 \backslash
17424 onlyslides{
17425 \backslash
17426 slides}
17427 \family default
17428
17429 \begin_inset Quotes erd
17430 \end_inset
17431
17432  will cause the output to contain only the 
17433 \family sans
17434 Slide
17435 \family default
17436 s and 
17437 \family sans
17438 Overlay
17439 \family default
17440 s.
17441  Correspondingly, the command 
17442 \begin_inset Quotes eld
17443 \end_inset
17444
17445
17446 \family typewriter
17447
17448 \backslash
17449 onlynotes{
17450 \backslash
17451 notes}
17452 \family default
17453
17454 \begin_inset Quotes erd
17455 \end_inset
17456
17457  prevents the output of anything but 
17458 \family sans
17459 Note
17460 \family default
17461 s.
17462  I'd advise placing both commands in the preamble and initially comment
17463  both out.
17464  You can then preview your entire presentation as you write.
17465  When you're done writing, you can then uncomment one of the two to select
17466  what you want to print.
17467  I like to uncomment 
17468 \begin_inset Quotes eld
17469 \end_inset
17470
17471
17472 \family typewriter
17473
17474 \backslash
17475 onlyslides{
17476 \backslash
17477 slides}
17478 \family default
17479
17480 \begin_inset Quotes erd
17481 \end_inset
17482
17483  , print to a file with 
17484 \begin_inset Quotes eld
17485 \end_inset
17486
17487
17488 \family typewriter
17489 -slides
17490 \family default
17491
17492 \begin_inset Quotes erd
17493 \end_inset
17494
17495  in its name, comment it back out, then uncomment 
17496 \begin_inset Quotes eld
17497 \end_inset
17498
17499
17500 \family typewriter
17501
17502 \backslash
17503 onlynotes{
17504 \backslash
17505 notes}
17506 \family default
17507
17508 \begin_inset Quotes erd
17509 \end_inset
17510
17511  and print to a 
17512 \begin_inset Quotes eld
17513 \end_inset
17514
17515
17516 \family typewriter
17517 *-notes.ps
17518 \family default
17519
17520 \begin_inset Quotes erd
17521 \end_inset
17522
17523  file.
17524  I can then send either file to a printer, loading transparencies or plain
17525  paper as appropriate.
17526 \end_layout
17527
17528 \begin_layout Standard
17529 You can also provide other arguments to the 
17530 \begin_inset Quotes eld
17531 \end_inset
17532
17533
17534 \family typewriter
17535
17536 \backslash
17537 onlyslides{}
17538 \family default
17539
17540 \begin_inset Quotes erd
17541 \end_inset
17542
17543  and 
17544 \begin_inset Quotes eld
17545 \end_inset
17546
17547
17548 \family typewriter
17549
17550 \backslash
17551 onlynotes{}
17552 \family default
17553
17554 \begin_inset Quotes erd
17555 \end_inset
17556
17557  commands.
17558  See a good LaTeX book for details.
17559 \end_layout
17560
17561 \begin_layout Subsection
17562 The 
17563 \family sans
17564 slides
17565 \family default
17566  Class Template File
17567 \end_layout
17568
17569 \begin_layout Standard
17570 I have also provided a template file, 
17571 \begin_inset Quotes eld
17572 \end_inset
17573
17574
17575 \family typewriter
17576 slides.lyx
17577 \family default
17578
17579 \begin_inset Quotes erd
17580 \end_inset
17581
17582 , with the 
17583 \family sans
17584 slides
17585 \family default
17586  class.
17587  To use it, begin your new presentation with 
17588 \family sans
17589 \bar under
17590 F
17591 \bar default
17592 ile\SpecialChar \menuseparator
17593 New
17594 \begin_inset space ~
17595 \end_inset
17596
17597 from
17598 \begin_inset space ~
17599 \end_inset
17600
17601
17602 \bar under
17603 T
17604 \bar default
17605 emplate
17606 \family default
17607 .
17608  Your new LyX presentation file will contain an example 
17609 \family sans
17610 Slide
17611 \family default
17612  – 
17613 \family sans
17614 Overlay
17615 \family default
17616  – 
17617 \family sans
17618 Note
17619 \family default
17620  triplet.
17621  The 
17622 \family sans
17623 Slide
17624 \family default
17625  and 
17626 \family sans
17627 Overlay
17628 \family default
17629  additionally contain an example of the use of 
17630 \family sans
17631 InvisibleText
17632 \family default
17633  and 
17634 \family sans
17635 VisibleText
17636 \family default
17637 .
17638  Lastly, the preamble will contain:
17639 \end_layout
17640
17641 \begin_layout LyX-Code
17642 % Uncomment to print out only slides and overlays
17643 \end_layout
17644
17645 \begin_layout LyX-Code
17646 %
17647 \end_layout
17648
17649 \begin_layout LyX-Code
17650 %
17651 \backslash
17652 onlyslides{
17653 \backslash
17654 slides}
17655 \begin_inset Newline newline
17656 \end_inset
17657
17658  
17659 \end_layout
17660
17661 \begin_layout LyX-Code
17662 % Uncomment to print out only notes
17663 \end_layout
17664
17665 \begin_layout LyX-Code
17666 %
17667 \end_layout
17668
17669 \begin_layout LyX-Code
17670 %
17671 \backslash
17672 onlynotes{
17673 \backslash
17674 notes}
17675 \end_layout
17676
17677 \begin_layout Standard
17678 One final thing: I created this class to support the LaTeX2e 
17679 \begin_inset Quotes eld
17680 \end_inset
17681
17682
17683 \noun on
17684 SliTeX
17685 \noun default
17686  emulation
17687 \begin_inset Quotes erd
17688 \end_inset
17689
17690  class, one of the built-in LaTeX2e classes.
17691  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17692  built-in slide class.
17693  It's here if you want it or need it.
17694  There exist other LaTeX2e classes for creating presentations, such as the
17695  
17696 \family sans
17697 Foils
17698 \family default
17699  class [see section
17700 \begin_inset space ~
17701 \end_inset
17702
17703
17704 \begin_inset CommandInset ref
17705 LatexCommand ref
17706 reference "sec:foiltex"
17707
17708 \end_inset
17709
17710 ] or the 
17711 \begin_inset Quotes eld
17712 \end_inset
17713
17714
17715 \family typewriter
17716 seminar
17717 \family default
17718
17719 \begin_inset Quotes erd
17720 \end_inset
17721
17722  package [present on some TeX distributions].
17723  The latter is not yet supported under LyX.
17724 \begin_inset Foot
17725 status collapsed
17726
17727 \begin_layout Plain Layout
17728 Perhaps you can take on the task\SpecialChar \ldots{}
17729
17730 \end_layout
17731
17732 \end_inset
17733
17734  I know nothing about these other classes.
17735  Try them out to see what sort of alternative they provide.
17736 \end_layout
17737
17738 \begin_layout Chapter
17739 LyX Features needing Extra Software
17740 \end_layout
17741
17742 \begin_layout Section
17743 Checking TeX
17744 \end_layout
17745
17746 \begin_layout Standard
17747 by 
17748 \noun on
17749 Asger Alstrup
17750 \end_layout
17751
17752 \begin_layout Subsection
17753 Introduction
17754 \end_layout
17755
17756 \begin_layout Standard
17757 If you have the 
17758 \family typewriter
17759 chktex
17760 \family default
17761  program installed
17762 \begin_inset Foot
17763 status collapsed
17764
17765 \begin_layout Plain Layout
17766
17767 \family typewriter
17768 chktex
17769 \family default
17770  is not yet available when you are using the LaTeX distribution MiKTeX.
17771 \end_layout
17772
17773 \end_inset
17774
17775 , you'll find in the 
17776 \family sans
17777 Tools
17778 \family default
17779  menu the entry: 
17780 \family sans
17781 Check
17782 \begin_inset space ~
17783 \end_inset
17784
17785 TeX
17786 \family default
17787 .
17788  You can get 
17789 \family typewriter
17790 chktex
17791 \family default
17792  it from CTAN, 
17793 \begin_inset CommandInset href
17794 LatexCommand href
17795 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17796
17797 \end_inset
17798
17799 .
17800 \end_layout
17801
17802 \begin_layout Standard
17803 The 
17804 \family sans
17805 ChkTeX
17806 \family default
17807  package is a program that was written by 
17808 \begin_inset Flex Noun
17809 status collapsed
17810
17811 \begin_layout Plain Layout
17812 Jens T.
17813 \begin_inset space ~
17814 \end_inset
17815
17816 Berger Thielemann
17817 \end_layout
17818
17819 \end_inset
17820
17821  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17822  and easy to forget.
17823  The program runs over your LaTeX file, checks the integrity of the file,
17824  and flags some common errors.
17825  In other technical words, it is 
17826 \family typewriter
17827 lint
17828 \family default
17829  for LaTeX.
17830 \end_layout
17831
17832 \begin_layout Standard
17833 Well, what is a syntax checker doing in LyX which is supposed to produce
17834  correct LaTeX anyways? The answer is simple: Just as 
17835 \family typewriter
17836 Lint
17837 \family default
17838  not only checks the 
17839 \emph on
17840 syntax
17841 \emph default
17842  of C programs, but also does 
17843 \emph on
17844 semantic
17845 \emph default
17846  checks for type-errors, 
17847 \family sans
17848 ChkTeX
17849 \family default
17850  catches some common 
17851 \emph on
17852 typographic
17853 \emph default
17854  errors, in addition to the syntactical ones.
17855  Specifically, 
17856 \family sans
17857 ChkTeX
17858 \family default
17859  is capable of detecting several common errors, such as
17860 \end_layout
17861
17862 \begin_layout Itemize
17863 Ellipsis detection:
17864 \begin_inset Newline newline
17865 \end_inset
17866
17867 Use \SpecialChar \ldots{}
17868  instead of ...
17869 \end_layout
17870
17871 \begin_layout Itemize
17872 No space in front of/after parenthesis:
17873 \begin_inset Newline newline
17874 \end_inset
17875
17876 ( wrong spacing )
17877 \end_layout
17878
17879 \begin_layout Itemize
17880 Enforcement of normal space after common abbreviations:
17881 \begin_inset Newline newline
17882 \end_inset
17883
17884 e.
17885 \begin_inset space \thinspace{}
17886 \end_inset
17887
17888 g.
17889 \begin_inset space \space{}
17890 \end_inset
17891
17892 is too wide spacing.
17893 \end_layout
17894
17895 \begin_layout Itemize
17896 Enforcement of end-of-sentence space when the last sentence ends with a
17897  capital letter:
17898 \begin_inset Newline newline
17899 \end_inset
17900
17901 This is a TEST.
17902  And this is wrong spacing.
17903 \end_layout
17904
17905 \begin_layout Itemize
17906 Space in front of labels and similar commands:
17907 \begin_inset Newline newline
17908 \end_inset
17909
17910 The label should stick right up to the text to avoid falling to a wrong
17911  page.
17912  
17913 \begin_inset CommandInset label
17914 LatexCommand label
17915 name "sec:chktex"
17916
17917 \end_inset
17918
17919  
17920 \begin_inset Foot
17921 status collapsed
17922
17923 \begin_layout Plain Layout
17924 This footnote is in danger of falling off to a wrong page
17925 \end_layout
17926
17927 \end_inset
17928
17929  The label is separated too much.
17930 \end_layout
17931
17932 \begin_layout Itemize
17933 Space in front of references, instead of hard spaces:
17934 \begin_inset Newline newline
17935 \end_inset
17936
17937 In you are in bad luck, the text will break right between the referenced
17938  text and reference number, and that's a pity.
17939  See section 
17940 \begin_inset CommandInset ref
17941 LatexCommand ref
17942 reference "sec:chktex"
17943
17944 \end_inset
17945
17946 .
17947 \end_layout
17948
17949 \begin_layout Itemize
17950 Use of 
17951 \begin_inset Quotes eld
17952 \end_inset
17953
17954 x
17955 \begin_inset Quotes erd
17956 \end_inset
17957
17958  instead of 
17959 \begin_inset Formula $\times$
17960 \end_inset
17961
17962  between numbers:
17963 \begin_inset Newline newline
17964 \end_inset
17965
17966 2x2 looks cheap compared to 
17967 \begin_inset Formula $2\times2$
17968 \end_inset
17969
17970 .
17971 \end_layout
17972
17973 \begin_layout Standard
17974 and more \SpecialChar \ldots{}
17975  It is an invaluable tool when you are 
17976 \begin_inset Quotes eld
17977 \end_inset
17978
17979 finishing up
17980 \begin_inset Quotes erd
17981 \end_inset
17982
17983  your document before printing, and you should run it right after the obligatory
17984  spelling check, and before you go fine tuning the typesetting.
17985 \end_layout
17986
17987 \begin_layout Subsection
17988 How to use it
17989 \end_layout
17990
17991 \begin_layout Standard
17992 If you have the program installed, usage is as simple as choosing 
17993 \family sans
17994 Tools\SpecialChar \menuseparator
17995 Check
17996 \begin_inset space ~
17997 \end_inset
17998
17999 TeX
18000 \family default
18001 .
18002  This will make LyX generate a LaTeX file of your document, start 
18003 \family sans
18004 ChkTeX
18005 \family default
18006  to check it, and then make LyX insert 
18007 \begin_inset Quotes eld
18008 \end_inset
18009
18010 error boxes
18011 \begin_inset Quotes erd
18012 \end_inset
18013
18014  with the warnings from 
18015 \family sans
18016 ChkTeX
18017 \family default
18018 , if there were any.
18019  The warnings will be placed close to the point of the mistake, and you
18020  can quickly find them by using the 
18021 \family sans
18022 Navigate\SpecialChar \menuseparator
18023 Error
18024 \family default
18025  menu item, or the shortcut key 
18026 \family sans
18027 C-g
18028 \family default
18029  from the default 
18030 \family typewriter
18031 cua
18032 \family default
18033  bind file.
18034  Open the error boxes by clicking on them with the mouse, or use the shortcut
18035  key 
18036 \family sans
18037 C-i
18038 \family default
18039  from 
18040 \family typewriter
18041 cua
18042 \family default
18043  bindings, or the corresponding 
18044 \family sans
18045 C-o
18046 \family default
18047  for the alternate 
18048 \family typewriter
18049 emacs
18050 \family default
18051  bind file.
18052  Read the warning and correct the mistake, if it is a mistake.
18053  If you have trouble understanding what the warning is about, you can safely
18054  ignore it.
18055  Remember that there is a hidden layer between the document on screen and
18056  the technical details in invoking 
18057 \family sans
18058 ChkTeX
18059 \family default
18060 , and this gap can make some warnings seem arcane or just right down plain
18061  silly.
18062 \end_layout
18063
18064 \begin_layout Standard
18065 This document is an excellent testing bed for the feature, and it should
18066  provide quite a few warnings for you to fiddle with.
18067  Since computers are only so smart, expect most of the warnings to be false
18068  alarms, though.
18069 \end_layout
18070
18071 \begin_layout Subsection
18072 How to fine tune it
18073 \end_layout
18074
18075 \begin_layout Standard
18076 Sometimes, you'll find that 
18077 \family sans
18078 ChkTeX
18079 \family default
18080  makes more noise than suits your mood.
18081  Then you can choose not to use it, wait until your mood changes, or try
18082  to customize 
18083 \family sans
18084 ChkTeX
18085 \family default
18086  to get better along with you.
18087  Another choice in the most desperate situations is to use 
18088 \family sans
18089 View\SpecialChar \menuseparator
18090 Remove
18091 \begin_inset space ~
18092 \end_inset
18093
18094 All
18095 \begin_inset space ~
18096 \end_inset
18097
18098 Error
18099 \begin_inset space ~
18100 \end_inset
18101
18102 Boxes
18103 \family default
18104 , which will get rid of all warnings instantly.
18105 \end_layout
18106
18107 \begin_layout Standard
18108 Although 
18109 \family sans
18110 ChkTeX
18111 \family default
18112  
18113 \emph on
18114 is
18115 \emph default
18116  very configurable and extensible, you shouldn't expect to solve all problems
18117  with 
18118 \family sans
18119 ChkTeX
18120 \family default
18121  in LyX this way.
18122  Since LyX has to generate a somewhat special LaTeX file to be able to match
18123  the line numbers from the 
18124 \family sans
18125 ChkTeX
18126 \family default
18127  output
18128 \begin_inset Foot
18129 status collapsed
18130
18131 \begin_layout Plain Layout
18132 You can inspect the specific output from 
18133 \family sans
18134 chktex
18135 \family default
18136  by using 
18137 \family sans
18138 Edit\SpecialChar \menuseparator
18139 View
18140 \begin_inset space ~
18141 \end_inset
18142
18143 LaTeX
18144 \begin_inset space ~
18145 \end_inset
18146
18147 Log
18148 \family default
18149  right after a 
18150 \family sans
18151 chktex
18152 \family default
18153  run.
18154 \end_layout
18155
18156 \end_inset
18157
18158  to the internal document structure, some of the warnings will not seen
18159  to appear correctly.
18160  There are two things you can do about this:
18161 \end_layout
18162
18163 \begin_layout Itemize
18164 Fine tune the 
18165 \family sans
18166 ChkTeX
18167 \family default
18168  invocation command line in 
18169 \family sans
18170 Preferences
18171 \family default
18172  (tabs 
18173 \family sans
18174 Outputs
18175 \family default
18176
18177 \family sans
18178 Misc
18179 \family default
18180 ), or the global 
18181 \family sans
18182 ChkTeX
18183 \family default
18184  installation configuration file (usually with the file 
18185 \family typewriter
18186 chktexrc
18187 \family default
18188 ).
18189  See below to learn what warnings can be enabled and disabled on the command
18190  line.
18191  
18192 \end_layout
18193
18194 \begin_layout Itemize
18195 Export your document as a raw LaTeX file using 
18196 \family sans
18197 File\SpecialChar \menuseparator
18198 Export\SpecialChar \menuseparator
18199 LaTeX
18200 \family default
18201  and run 
18202 \family typewriter
18203 chktex
18204 \family default
18205  manually on that.
18206  Invoked in this way, it can be a hassle to find the corresponding place
18207  in the document inside LyX, but with a little patience, you should be able
18208  to do it.
18209 \end_layout
18210
18211 \begin_layout Standard
18212 Here follows the warning messages that can be enabled and disabled in 
18213 \family sans
18214 Preferences
18215 \family default
18216 .
18217  Use 
18218 \family typewriter
18219 -n#
18220 \family default
18221  to disable a warning, and 
18222 \family typewriter
18223 -w#
18224 \family default
18225  to enable a warning.
18226  The emphasized entries are disabled by default, because the default is
18227  "
18228 \family typewriter
18229 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18230 \family default
18231 ".
18232 \end_layout
18233
18234 \begin_layout Standard
18235 Notice that you should only use the options that enable and disable warnings,
18236  because LyX relies on some of the other command line parameters to be set
18237  in a specific way to have a chance to communicate with 
18238 \family typewriter
18239 chktex
18240 \family default
18241 .
18242 \end_layout
18243
18244 \begin_layout Enumerate
18245
18246 \size small
18247 \emph on
18248 Command terminated with space.
18249 \end_layout
18250
18251 \begin_layout Enumerate
18252
18253 \size small
18254 Non-breaking space (
18255 \begin_inset Quotes eld
18256 \end_inset
18257
18258
18259 \family typewriter
18260 ~
18261 \family default
18262
18263 \begin_inset Quotes erd
18264 \end_inset
18265
18266 ) should have been used.
18267 \end_layout
18268
18269 \begin_layout Enumerate
18270
18271 \size small
18272 \emph on
18273 You should enclose the previous parenthesis with 
18274 \begin_inset Quotes eld
18275 \end_inset
18276
18277
18278 \family typewriter
18279 {}
18280 \family default
18281
18282 \begin_inset Quotes erd
18283 \end_inset
18284
18285 .
18286 \end_layout
18287
18288 \begin_layout Enumerate
18289
18290 \size small
18291 Italic correction (
18292 \begin_inset Quotes eld
18293 \end_inset
18294
18295
18296 \family typewriter
18297
18298 \backslash
18299 /
18300 \family default
18301
18302 \begin_inset Quotes erd
18303 \end_inset
18304
18305 ) found in non-italic buffer.
18306 \end_layout
18307
18308 \begin_layout Enumerate
18309
18310 \size small
18311 Italic correction (
18312 \begin_inset Quotes eld
18313 \end_inset
18314
18315
18316 \family typewriter
18317
18318 \backslash
18319 /
18320 \family default
18321
18322 \begin_inset Quotes erd
18323 \end_inset
18324
18325 ) found more than once.
18326 \end_layout
18327
18328 \begin_layout Enumerate
18329
18330 \size small
18331 \emph on
18332 No italic correction (
18333 \begin_inset Quotes eld
18334 \end_inset
18335
18336
18337 \family typewriter
18338
18339 \backslash
18340 /
18341 \family default
18342
18343 \begin_inset Quotes erd
18344 \end_inset
18345
18346 ) found.
18347 \end_layout
18348
18349 \begin_layout Enumerate
18350
18351 \size small
18352 Accent command 
18353 \begin_inset Quotes eld
18354 \end_inset
18355
18356
18357 \family typewriter
18358 cmd
18359 \family default
18360
18361 \begin_inset Quotes erd
18362 \end_inset
18363
18364  needs use of 
18365 \begin_inset Quotes eld
18366 \end_inset
18367
18368
18369 \family typewriter
18370 cmd
18371 \family default
18372
18373 \begin_inset Quotes erd
18374 \end_inset
18375
18376 .
18377 \end_layout
18378
18379 \begin_layout Enumerate
18380
18381 \size small
18382 Wrong length of dash may have been used.
18383 \end_layout
18384
18385 \begin_layout Enumerate
18386
18387 \size small
18388 \emph on
18389 \begin_inset Quotes eld
18390 \end_inset
18391
18392
18393 \family typewriter
18394 %s
18395 \family default
18396
18397 \begin_inset Quotes erd
18398 \end_inset
18399
18400  expected, found 
18401 \begin_inset Quotes eld
18402 \end_inset
18403
18404
18405 \family typewriter
18406 %s
18407 \family default
18408
18409 \begin_inset Quotes erd
18410 \end_inset
18411
18412 .
18413 \end_layout
18414
18415 \begin_layout Enumerate
18416
18417 \size small
18418 Solo 
18419 \begin_inset Quotes eld
18420 \end_inset
18421
18422
18423 \family typewriter
18424 %s
18425 \family default
18426
18427 \begin_inset Quotes erd
18428 \end_inset
18429
18430  found.
18431 \end_layout
18432
18433 \begin_layout Enumerate
18434
18435 \size small
18436 You should use 
18437 \begin_inset Quotes eld
18438 \end_inset
18439
18440
18441 \family typewriter
18442 %s
18443 \family default
18444
18445 \begin_inset Quotes erd
18446 \end_inset
18447
18448  to achieve an ellipsis.
18449 \end_layout
18450
18451 \begin_layout Enumerate
18452
18453 \size small
18454 Inter-word spacing (
18455 \begin_inset Quotes eld
18456 \end_inset
18457
18458
18459 \family typewriter
18460
18461 \backslash
18462
18463 \family default
18464  
18465 \begin_inset Quotes eld
18466 \end_inset
18467
18468 ) should perhaps be used.
18469 \end_layout
18470
18471 \begin_layout Enumerate
18472
18473 \size small
18474 Inter-sentence spacing (
18475 \begin_inset Quotes eld
18476 \end_inset
18477
18478
18479 \family typewriter
18480
18481 \backslash
18482 @
18483 \family default
18484
18485 \begin_inset Quotes erd
18486 \end_inset
18487
18488 ) should perhaps be used.
18489 \end_layout
18490
18491 \begin_layout Enumerate
18492
18493 \size small
18494 Could not find argument for command.
18495 \end_layout
18496
18497 \begin_layout Enumerate
18498
18499 \size small
18500 No match found for 
18501 \begin_inset Quotes eld
18502 \end_inset
18503
18504
18505 \family typewriter
18506 %s
18507 \family default
18508
18509 \begin_inset Quotes erd
18510 \end_inset
18511
18512 .
18513 \end_layout
18514
18515 \begin_layout Enumerate
18516
18517 \size small
18518 Math mode still on at end of LaTeX file.
18519 \end_layout
18520
18521 \begin_layout Enumerate
18522
18523 \size small
18524 Number of 
18525 \begin_inset Quotes eld
18526 \end_inset
18527
18528
18529 \family typewriter
18530 char
18531 \family default
18532
18533 \begin_inset Quotes erd
18534 \end_inset
18535
18536  doesn't match the number of 
18537 \begin_inset Quotes eld
18538 \end_inset
18539
18540
18541 \family typewriter
18542 char
18543 \family default
18544
18545 \begin_inset Quotes erd
18546 \end_inset
18547
18548 .
18549 \end_layout
18550
18551 \begin_layout Enumerate
18552
18553 \size small
18554 You should use either 
18555 \family typewriter
18556
18557 \begin_inset Quotes eld
18558 \end_inset
18559
18560
18561 \family default
18562  or 
18563 \family typewriter
18564
18565 \begin_inset Quotes erd
18566 \end_inset
18567
18568
18569 \family default
18570  as an alternative to 
18571 \begin_inset Quotes eld
18572 \end_inset
18573
18574
18575 \family typewriter
18576 "
18577 \family default
18578
18579 \begin_inset Quotes erd
18580 \end_inset
18581
18582 .
18583 \end_layout
18584
18585 \begin_layout Enumerate
18586
18587 \size small
18588 You should use "
18589 \family typewriter
18590 '
18591 \family default
18592 " (ASCII 39) instead of "
18593 \family typewriter
18594 ´
18595 \family default
18596 " (ASCII 180).
18597 \end_layout
18598
18599 \begin_layout Enumerate
18600
18601 \size small
18602 User-specified pattern found.
18603 \end_layout
18604
18605 \begin_layout Enumerate
18606
18607 \size small
18608 This command might not be intended.
18609 \end_layout
18610
18611 \begin_layout Enumerate
18612
18613 \size small
18614 \emph on
18615 Comment displayed.
18616 \end_layout
18617
18618 \begin_layout Enumerate
18619
18620 \size small
18621 Either 
18622 \family typewriter
18623 ''
18624 \backslash
18625 ,'
18626 \family default
18627  or 
18628 \family typewriter
18629 '
18630 \backslash
18631 ,''
18632 \family default
18633  will look better.
18634 \end_layout
18635
18636 \begin_layout Enumerate
18637
18638 \size small
18639 Delete this space to maintain correct page references.
18640 \end_layout
18641
18642 \begin_layout Enumerate
18643
18644 \size small
18645 \emph on
18646 You might wish to put this between a pair of 
18647 \begin_inset Quotes eld
18648 \end_inset
18649
18650
18651 \family typewriter
18652 {}
18653 \family default
18654
18655 \begin_inset Quotes erd
18656 \end_inset
18657
18658 .
18659 \end_layout
18660
18661 \begin_layout Enumerate
18662
18663 \size small
18664 You ought to remove spaces in front of punctuation.
18665 \end_layout
18666
18667 \begin_layout Enumerate
18668
18669 \size small
18670 Could not execute LaTeX command.
18671 \end_layout
18672
18673 \begin_layout Enumerate
18674
18675 \size small
18676 Don't use 
18677 \family typewriter
18678
18679 \backslash
18680 /
18681 \family default
18682  in front of small punctuation.
18683 \end_layout
18684
18685 \begin_layout Enumerate
18686
18687 \family typewriter
18688 \size small
18689 $
18690 \backslash
18691 times$
18692 \family default
18693  may look prettier here.
18694 \end_layout
18695
18696 \begin_layout Enumerate
18697
18698 \size small
18699 \emph on
18700 Multiple spaces detected in output.
18701 \end_layout
18702
18703 \begin_layout Enumerate
18704
18705 \size small
18706 This text may be ignored.
18707 \end_layout
18708
18709 \begin_layout Enumerate
18710
18711 \size small
18712 Use 
18713 \family typewriter
18714
18715 \begin_inset Quotes eld
18716 \end_inset
18717
18718
18719 \family default
18720  to begin quotation, not 
18721 \family typewriter
18722 '
18723 \family default
18724 .
18725 \end_layout
18726
18727 \begin_layout Enumerate
18728
18729 \size small
18730 Use 
18731 \family typewriter
18732 '
18733 \family default
18734  to end quotation, not 
18735 \family typewriter
18736
18737 \begin_inset Quotes eld
18738 \end_inset
18739
18740
18741 \family default
18742 .
18743 \end_layout
18744
18745 \begin_layout Enumerate
18746
18747 \size small
18748 Don't mix quotes.
18749 \end_layout
18750
18751 \begin_layout Enumerate
18752
18753 \size small
18754 You should perhaps use 
18755 \begin_inset Quotes eld
18756 \end_inset
18757
18758
18759 \family typewriter
18760 cmd
18761 \family default
18762
18763 \begin_inset Quotes erd
18764 \end_inset
18765
18766  instead.
18767 \end_layout
18768
18769 \begin_layout Enumerate
18770
18771 \size small
18772 You should put a space in front of/after parenthesis.
18773 \end_layout
18774
18775 \begin_layout Enumerate
18776
18777 \size small
18778 You should avoid spaces in front of/after parenthesis.
18779 \end_layout
18780
18781 \begin_layout Enumerate
18782
18783 \size small
18784 \emph on
18785 You should not use punctuation in front of/after quotes.
18786 \end_layout
18787
18788 \begin_layout Enumerate
18789
18790 \size small
18791 Double space found.
18792 \end_layout
18793
18794 \begin_layout Enumerate
18795
18796 \size small
18797 You should put punctuation outside inner/inside display math mode.
18798 \end_layout
18799
18800 \begin_layout Enumerate
18801
18802 \size small
18803 You ought to not use primitive TeX in LaTeX code.
18804 \end_layout
18805
18806 \begin_layout Enumerate
18807
18808 \size small
18809 You should remove spaces in front of 
18810 \begin_inset Quotes eld
18811 \end_inset
18812
18813
18814 \family typewriter
18815 %s
18816 \family default
18817
18818 \begin_inset Quotes erd
18819 \end_inset
18820
18821
18822 \end_layout
18823
18824 \begin_layout Enumerate
18825
18826 \size small
18827 \begin_inset Quotes eld
18828 \end_inset
18829
18830
18831 \family typewriter
18832 %s
18833 \family default
18834
18835 \begin_inset Quotes erd
18836 \end_inset
18837
18838  is normally not followed by 
18839 \begin_inset Quotes eld
18840 \end_inset
18841
18842
18843 \family typewriter
18844 %c
18845 \family default
18846
18847 \begin_inset Quotes erd
18848 \end_inset
18849
18850 .
18851 \end_layout
18852
18853 \begin_layout Standard
18854 In later versions of LyX, we hope to provide a more complete interface to
18855  this tool (and it's smaller cousin 
18856 \family typewriter
18857 lacheck
18858 \family default
18859 ) to exploit the full power of it.
18860  But it's not exactly useless as it is now: go try it on one of your existing
18861  documents of a certain length and be surprised.
18862 \end_layout
18863
18864 \begin_layout Section
18865 Version Control in LyX
18866 \end_layout
18867
18868 \begin_layout Standard
18869 by
18870 \noun on
18871  Lars Gullik Bjønnes 
18872 \noun default
18873 and 
18874 \noun on
18875 Pavel Sanda
18876 \end_layout
18877
18878 \begin_layout Subsection
18879 Introduction
18880 \end_layout
18881
18882 \begin_layout Standard
18883 A friend of mine wanted to try LyX for a group project.
18884  When he didn't find support for version control or file locking, he dropped
18885  it.
18886  This angered me a bit, so I thought that I should at least make support
18887  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18888  This has been done.
18889  LyX now supports some of the most basic RCS/CVS/SVN commands.
18890  If you need something a bit more sophisticated you will have to do that
18891  manually in a terminal.
18892 \end_layout
18893
18894 \begin_layout Standard
18895 Before you begin to use the version control features in LyX, you should
18896  be familiar with RCS/CVS/SVN usage before start using it under LyX.
18897  Also note that CVS support is not as good as subversion support so we advice
18898  using SVN instead.
18899  Good place to start with Subversion is SVN Book
18900 \begin_inset Foot
18901 status open
18902
18903 \begin_layout Plain Layout
18904 \begin_inset CommandInset href
18905 LatexCommand href
18906 target "http://svnbook.red-bean.com/"
18907
18908 \end_inset
18909
18910
18911 \end_layout
18912
18913 \end_inset
18914
18915 .
18916  In case of RCS you should read 
18917 \begin_inset Quotes eld
18918 \end_inset
18919
18920 rcsintro
18921 \begin_inset Quotes erd
18922 \end_inset
18923
18924  (a man file, read it with 
18925 \family typewriter
18926 man rcsintro
18927 \family default
18928 ).
18929  This file describes all the basic features of RCS.
18930  You should especially notice the comment about a RCS directory, and the
18931  notion of a master RCS file (the file ending in 
18932 \family typewriter
18933 ,v
18934 \family default
18935 ).
18936 \end_layout
18937
18938 \begin_layout Standard
18939 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18940  package—no guarantees are made for older versions.
18941  Most of the log messages are not currently displayed after operations —
18942  you can check them in Messages pane if unsure.
18943 \end_layout
18944
18945 \begin_layout Standard
18946 For introducing your own external commands consult vc-command in the manual
18947  of LyX functions.
18948 \end_layout
18949
18950 \begin_layout Subsection
18951 RCS commands in LyX
18952 \end_layout
18953
18954 \begin_layout Standard
18955 The following sections describe the RCS commands supported by LyX.
18956  You can find them in the 
18957 \family sans
18958 File\SpecialChar \menuseparator
18959 Version
18960 \begin_inset space ~
18961 \end_inset
18962
18963 Control
18964 \family default
18965  submenu.
18966  LyX was tested against RCS 5.7.
18967 \end_layout
18968
18969 \begin_layout Subsubsection
18970
18971 \family sans
18972 Register
18973 \end_layout
18974
18975 \begin_layout Standard
18976 If your document is not under revision control, this is the only item shown
18977  in the menu.
18978  And if it is under revision control, the 
18979 \family sans
18980 Register
18981 \family default
18982  item is not visible.
18983  
18984 \end_layout
18985
18986 \begin_layout Standard
18987 This command registers your document with RCS (unless you are under the
18988  directory managed by CVS)\SpecialChar \@.
18989  You are asked interactively to supply an initial
18990  description of the document.
18991  The document is now set in Read-Only mode and you have to 
18992 \family sans
18993 Check
18994 \begin_inset space ~
18995 \end_inset
18996
18997 Out
18998 \begin_inset space ~
18999 \end_inset
19000
19001 For
19002 \begin_inset space ~
19003 \end_inset
19004
19005 Edit
19006 \family default
19007 , before making any changes to it.
19008  A document under revision control has a 
19009 \begin_inset Quotes eld
19010 \end_inset
19011
19012 [RCS:<version> <locker>]
19013 \begin_inset Quotes erd
19014 \end_inset
19015
19016  item tagged to the filename in the minibuffer.
19017 \end_layout
19018
19019 \begin_layout Standard
19020 RCS command that is run: 
19021 \family typewriter
19022 ci -q -u -i -t-"<initial description>" <file-name>
19023 \end_layout
19024
19025 \begin_layout Standard
19026 Read 
19027 \family typewriter
19028 man ci
19029 \family default
19030  to understand the switches.
19031  
19032 \end_layout
19033
19034 \begin_layout Subsubsection
19035
19036 \family sans
19037 Check In Changes
19038 \end_layout
19039
19040 \begin_layout Standard
19041 When you are finished editing a file, you check in your changes.
19042  When you do this, you are asked for a description of the changes.
19043  This is stored in the history log.
19044  The version number is bumped, your changes are applied to the master RCS
19045  file, the document is unlocked and set to Read-Only mode.
19046  
19047 \end_layout
19048
19049 \begin_layout Standard
19050 RCS command: 
19051 \family typewriter
19052 ci -q -u -m"<description>" <file-name>
19053 \end_layout
19054
19055 \begin_layout Subsubsection
19056
19057 \family sans
19058 Check Out For Edit
19059 \end_layout
19060
19061 \begin_layout Standard
19062 By doing this you lock the document so that only you can edit it.
19063  This will also make the document Read-Write only for you.
19064  You will usually continue editing for a while and when you are finished
19065  you check in your changes.
19066  The status line is changed to reflect that you have locked the file.
19067  
19068 \end_layout
19069
19070 \begin_layout Standard
19071 RCS command: 
19072 \family typewriter
19073 co -q -l <file-name>
19074 \end_layout
19075
19076 \begin_layout Subsubsection
19077
19078 \family sans
19079 Revert To Repository Version
19080 \end_layout
19081
19082 \begin_layout Standard
19083 This will discard all changes made to the document since the last check
19084  in.
19085  You get a warning before changes are discarded.
19086 \end_layout
19087
19088 \begin_layout Standard
19089 RCS command: 
19090 \family typewriter
19091 co -f -u<version> <file-name>
19092 \end_layout
19093
19094 \begin_layout Subsubsection
19095
19096 \family sans
19097 Undo Last Checkin
19098 \end_layout
19099
19100 \begin_layout Standard
19101 This makes as if the last check in never happened.
19102  No changes are made to the document loaded into LyX, but the last version
19103  is removed from the master RCS file.
19104  
19105 \end_layout
19106
19107 \begin_layout Standard
19108 RCS command: 
19109 \family typewriter
19110 rcs -o<version> <file-name>
19111 \end_layout
19112
19113 \begin_layout Subsubsection
19114
19115 \family sans
19116 Show History
19117 \end_layout
19118
19119 \begin_layout Standard
19120 This shows the complete history of the RCS document.
19121  The output of 
19122 \family typewriter
19123 rlog <file-name>
19124 \family default
19125  is shown in a browser.
19126  See 
19127 \family typewriter
19128 man rlog
19129 \family default
19130  for more info.
19131 \end_layout
19132
19133 \begin_layout Subsubsection
19134 Revision info
19135 \end_layout
19136
19137 \begin_layout Standard
19138 LyX supports RCS version number information (only), see 
19139 \begin_inset CommandInset ref
19140 LatexCommand ref
19141 reference "sub:VCS-Revision-Information"
19142
19143 \end_inset
19144
19145  for details.
19146 \end_layout
19147
19148 \begin_layout Subsection
19149 CVS commands in LyX
19150 \end_layout
19151
19152 \begin_layout Standard
19153 A subset of CVS operations is supported by LyX.
19154  You can find the commands in the 
19155 \family sans
19156 File\SpecialChar \menuseparator
19157 Version
19158 \begin_inset space ~
19159 \end_inset
19160
19161 Control
19162 \family default
19163  submenu.
19164  The version control system SVN is more powerful, so please use it instead
19165  of CVS if possible.
19166 \end_layout
19167
19168 \begin_layout Subsubsection
19169
19170 \family sans
19171 General CVS usage
19172 \end_layout
19173
19174 \begin_layout Standard
19175 If you start from scratch with CVS you have to create your repository and
19176  checkout the working copy with external tools.
19177  If you're using a client-server setup you may need to login before doing
19178  the first repository checkout.
19179 \end_layout
19180
19181 \begin_layout Standard
19182 If your documents are under revision control and others are using the same
19183  repository problems arise when different changes to the same document at
19184  the same location happen.
19185  Standard CVS repositories doesn't operate with a file locking mechanism.
19186  This may be surprising, but conflicts only occur if people disagree on
19187  the proper content of the same part of a document.
19188  So, if co-workers are used to communicate regularly, these conflicts occur
19189  rarely.
19190  If they don't communicate they have a fundamental problem anyway.
19191  Nevertheless some people like to work with so called 
19192 \begin_inset Quotes eld
19193 \end_inset
19194
19195 reserved checkouts
19196 \begin_inset Quotes erd
19197 \end_inset
19198
19199 .
19200  If they do so the working copy of all files is readonly when checked out
19201  first and the user starts editing after using a special command to make
19202  the working copy writable.
19203  When the changes are checked in the working copy returns to readonly state.
19204  With LyX one has to edit the 
19205 \begin_inset Flex Code
19206 status collapsed
19207
19208 \begin_layout Plain Layout
19209 .cvsrc
19210 \end_layout
19211
19212 \end_inset
19213
19214  file and add the line 
19215 \begin_inset Flex Code
19216 status collapsed
19217
19218 \begin_layout Plain Layout
19219 cvs -r
19220 \end_layout
19221
19222 \end_inset
19223
19224  to work with reserved checkouts.
19225  The benefit is the possibility to see who is using a writable copy of some
19226  document.
19227  It's not guaranteed only one user makes a copy writable.
19228 \end_layout
19229
19230 \begin_layout Standard
19231 LyX tries to guess if you're using reserved or non-reserved checkouts.
19232  If your working copy is readonly or it is writable and an additional copy
19233  of your document exists in the CVS/Base sub-directory a reserved otherwise
19234  a non-reserved checkout is assumed.
19235  When a reserved checkout is detected you have to use 
19236 \begin_inset Flex MenuItem
19237 status collapsed
19238
19239 \begin_layout Plain Layout
19240 Check Out
19241 \end_layout
19242
19243 \end_inset
19244
19245  to make your working copy writable if it's readonly.
19246  After doing so the 
19247 \begin_inset Flex MenuItem
19248 status collapsed
19249
19250 \begin_layout Plain Layout
19251 Check In
19252 \end_layout
19253
19254 \end_inset
19255
19256  operation is possible and that makes your working copy readonly again after
19257  transferring your changes to the repository.
19258 \end_layout
19259
19260 \begin_layout Standard
19261 More information about CVS can be found here 
19262 \begin_inset Flex URL
19263 status collapsed
19264
19265 \begin_layout Plain Layout
19266
19267 http://www.nongnu.org/cvs
19268 \end_layout
19269
19270 \end_inset
19271
19272  and here 
19273 \begin_inset Flex URL
19274 status collapsed
19275
19276 \begin_layout Plain Layout
19277
19278 http://ximbiot.com/cvs
19279 \end_layout
19280
19281 \end_inset
19282
19283 .
19284 \end_layout
19285
19286 \begin_layout Standard
19287 Read 
19288 \family typewriter
19289 man cvs
19290 \family default
19291  to understand the sub-commands and the switches mentioned below.
19292 \end_layout
19293
19294 \begin_layout Subsubsection
19295
19296 \family sans
19297 Register
19298 \end_layout
19299
19300 \begin_layout Standard
19301 If your document is not under revision control, this is the only item shown
19302  in the menu.
19303  And if it is under revision control, the 
19304 \family sans
19305 \bar under
19306 R
19307 \bar default
19308 egister
19309 \family default
19310  item is not visible.
19311  
19312 \end_layout
19313
19314 \begin_layout Standard
19315 This command registers in CVS your document 
19316 \emph on
19317
19318 \begin_inset Flex Strong
19319 status collapsed
19320
19321 \begin_layout Plain Layout
19322
19323 \emph on
19324 only
19325 \end_layout
19326
19327 \end_inset
19328
19329
19330 \emph default
19331  in case you have already the documents directory under CVS control (in
19332  particular 
19333 \family typewriter
19334 CVS/Entries
19335 \family default
19336  file exists).
19337  This means you have to create or checkout the archive by yourself using
19338  external tools.
19339  (In case you forget that step LyX registers the document with RCS.)
19340 \end_layout
19341
19342 \begin_layout Standard
19343 Then you are asked interactively to supply an initial description of the
19344  document.
19345  Don't forget that registered file is not yet checked in.
19346 \end_layout
19347
19348 \begin_layout Standard
19349 CVS command that is run: 
19350 \family typewriter
19351 cvs -q add -m"<entered message>" "<file-name>"
19352 \end_layout
19353
19354 \begin_layout Standard
19355 The term 
19356 \family typewriter
19357 "<file-name>"
19358 \family default
19359  above and for all other CVS commands is an abbreviation for 
19360 \begin_inset Quotes eld
19361 \end_inset
19362
19363 change the current working directory to file location and use the file name
19364  without path component as argument
19365 \begin_inset Quotes erd
19366 \end_inset
19367
19368 .
19369 \end_layout
19370
19371 \begin_layout Subsubsection
19372
19373 \family sans
19374 Check In Changes
19375 \end_layout
19376
19377 \begin_layout Standard
19378 When you are finished editing a file, you commit your changes.
19379  When you do this and you had changed the document, you are asked for a
19380  description of the changes.
19381  After that changes are written to the repository.
19382  In case you didn't change the document and a reserved checkout is detected
19383  the reservation made on 
19384 \begin_inset Flex MenuItem
19385 status collapsed
19386
19387 \begin_layout Plain Layout
19388 Check Out
19389 \end_layout
19390
19391 \end_inset
19392
19393  is undone.
19394 \end_layout
19395
19396 \begin_layout Labeling
19397 \labelwidthstring 00.00.0000
19398 CVS
19399 \begin_inset space ~
19400 \end_inset
19401
19402 command: 
19403 \begin_inset space ~
19404 \end_inset
19405
19406
19407 \begin_inset Newline newline
19408 \end_inset
19409
19410
19411 \begin_inset Flex Code
19412 status collapsed
19413
19414 \begin_layout Plain Layout
19415 cvs 
19416 \family typewriter
19417 -q commit -m"<description>" "<file-name>"
19418 \end_layout
19419
19420 \end_inset
19421
19422  or
19423 \begin_inset Newline newline
19424 \end_inset
19425
19426
19427 \begin_inset Flex Code
19428 status collapsed
19429
19430 \begin_layout Plain Layout
19431 cvs -q unedit 
19432 \family typewriter
19433 "<file-name>"
19434 \end_layout
19435
19436 \end_inset
19437
19438
19439 \end_layout
19440
19441 \begin_layout Subsubsection
19442
19443 \family sans
19444 Check Out Changes
19445 \end_layout
19446
19447 \begin_layout Standard
19448 When you are sharing a repository with others, you may have to incorporate
19449  their changes into your working copy.
19450 \end_layout
19451
19452 \begin_layout Standard
19453 CVS command: 
19454 \family typewriter
19455 cvs -q update "<file-name>"
19456 \end_layout
19457
19458 \begin_layout Standard
19459 If a readonly checkout is detected the working copy is made writable and
19460  reserved.
19461 \end_layout
19462
19463 \begin_layout Standard
19464 CVS command: 
19465 \family typewriter
19466 cvs -q edit "<file-name>"
19467 \end_layout
19468
19469 \begin_layout Subsubsection
19470
19471 \family sans
19472 Revert To Repository Version
19473 \end_layout
19474
19475 \begin_layout Standard
19476 This will discard all changes made to the document since the last check
19477  in.
19478  You get a warning before changes are discarded.
19479  Firstly the file is deleted, secondly CVS update command is run.
19480 \end_layout
19481
19482 \begin_layout Standard
19483 CVS command: 
19484 \family typewriter
19485 cvs -q update "<file-name>"
19486 \end_layout
19487
19488 \begin_layout Standard
19489 If a reserved checkout is detected and the working copy has no changes only
19490  the reservation is undone.
19491 \end_layout
19492
19493 \begin_layout Standard
19494 CVS command: 
19495 \family typewriter
19496 cvs -q unedit "<file-name>"
19497 \end_layout
19498
19499 \begin_layout Subsubsection
19500 Update of the local directory checkout from repository
19501 \end_layout
19502
19503 \begin_layout Standard
19504 Once your documents gets more complex, containing sub-documents and pictures,
19505  including external 
19506 \begin_inset Flex Code
19507 status collapsed
19508
19509 \begin_layout Plain Layout
19510 .tex
19511 \end_layout
19512
19513 \end_inset
19514
19515  files and so on using version control becomes more complicated.
19516  LyX supports updating the whole tree in which resides the document.
19517  This become especially useful once you cooperate with people which neither
19518  have detailed knowledge about CVS usage nor they have ambition to commit
19519  additional material to the repository.
19520  You have to organize the files structure so that all external files are
19521  in the same directory or subdirectories of the document.
19522  It's good practice anyway to store multipart documents in an extra directory.
19523 \end_layout
19524
19525 \begin_layout Standard
19526 The 
19527 \begin_inset Flex Code
19528 status collapsed
19529
19530 \begin_layout Plain Layout
19531 Update local directory from repository
19532 \end_layout
19533
19534 \end_inset
19535
19536  command updates the whole directory.
19537  If local changes are detected user is warned before update starts.
19538  In case of merge conflicts both versions of the conflicting document parts
19539  are placed in the final document.
19540  You have to review and correct the result of the merge.
19541  You'll find the conflicts enclosed in pairs of 
19542 \begin_inset Flex Code
19543 status collapsed
19544
19545 \begin_layout Plain Layout
19546 <<<<<<<
19547 \end_layout
19548
19549 \end_inset
19550
19551  and 
19552 \begin_inset Flex Code
19553 status collapsed
19554
19555 \begin_layout Plain Layout
19556 >>>>>>>
19557 \end_layout
19558
19559 \end_inset
19560
19561  separated by 
19562 \begin_inset Flex Code
19563 status collapsed
19564
19565 \begin_layout Plain Layout
19566 =======
19567 \end_layout
19568
19569 \end_inset
19570
19571 .
19572  The first part is your version as before the update operation with the
19573  document name prepended.
19574  The second one is the repository version with the version number after
19575  the sequence of 
19576 \begin_inset Flex Code
19577 status collapsed
19578
19579 \begin_layout Plain Layout
19580 >
19581 \end_layout
19582
19583 \end_inset
19584
19585  signs.
19586 \end_layout
19587
19588 \begin_layout Labeling
19589 \labelwidthstring 00.00.0000
19590 CVS
19591 \begin_inset space ~
19592 \end_inset
19593
19594 commands: 
19595 \begin_inset space ~
19596 \end_inset
19597
19598
19599 \begin_inset Newline newline
19600 \end_inset
19601
19602
19603 \begin_inset Flex Code
19604 status collapsed
19605
19606 \begin_layout Plain Layout
19607 cd $path; cvs diff 
19608 \family typewriter
19609 "."
19610 \end_layout
19611
19612 \end_inset
19613
19614  (Ask if changes are detected.)
19615 \begin_inset Newline newline
19616 \end_inset
19617
19618
19619 \begin_inset Flex Code
19620 status collapsed
19621
19622 \begin_layout Plain Layout
19623 cd $path; cvs -q update 
19624 \family typewriter
19625 "."
19626 \end_layout
19627
19628 \end_inset
19629
19630
19631 \end_layout
19632
19633 \begin_layout Standard
19634 where 
19635 \begin_inset Flex Code
19636 status collapsed
19637
19638 \begin_layout Plain Layout
19639 $path
19640 \end_layout
19641
19642 \end_inset
19643
19644  stands for the path to the document.
19645 \end_layout
19646
19647 \begin_layout Subsubsection
19648
19649 \family sans
19650 Show History
19651 \end_layout
19652
19653 \begin_layout Standard
19654 This shows the complete history of the CVS document.
19655  The output of 
19656 \family typewriter
19657 cvs log "<file-name>"
19658 \family default
19659  is shown in a browser.
19660 \end_layout
19661
19662 \begin_layout Subsection
19663 SVN commands in LyX
19664 \end_layout
19665
19666 \begin_layout Standard
19667 SVN is now partially supported by LyX.
19668  You can find the commands in the 
19669 \family sans
19670 File\SpecialChar \menuseparator
19671 Version
19672 \begin_inset space ~
19673 \end_inset
19674
19675 Control
19676 \family default
19677  submenu.
19678  Please note that if you use password protected access to repository via
19679  ssh, you will be asked in terminal window.
19680  LyX was tested against SVN 1.5 and 1.6
19681 \begin_inset Foot
19682 status open
19683
19684 \begin_layout Plain Layout
19685 Most of the commands will work with 1.4 too, see 
19686 \begin_inset CommandInset ref
19687 LatexCommand ref
19688 reference "sub:SVN-Repo-Update"
19689
19690 \end_inset
19691
19692 .
19693 \end_layout
19694
19695 \end_inset
19696
19697
19698 \end_layout
19699
19700 \begin_layout Subsubsection
19701
19702 \family sans
19703 Register
19704 \end_layout
19705
19706 \begin_layout Standard
19707 If your document is not under revision control, this is the only item shown
19708  in the menu.
19709  And if it is under revision control, the 
19710 \family sans
19711 \bar under
19712 R
19713 \bar default
19714 egister
19715 \family default
19716  item is not visible.
19717  
19718 \end_layout
19719
19720 \begin_layout Standard
19721 This command registers in SVN your document ONLY in case you have already
19722  the documents directory under SVN control (in particular 
19723 \family typewriter
19724 .svn/entries
19725 \family default
19726  file exists).
19727  This means you have to checkout the archive by yourself.
19728  
19729 \end_layout
19730
19731 \begin_layout Standard
19732 Then you are asked interactively to supply an initial description of the
19733  document.
19734  Don't forget that registered file is not yet commited.
19735 \end_layout
19736
19737 \begin_layout Standard
19738 SVN command that is run: 
19739 \family typewriter
19740 svn add -q 
19741 \begin_inset Quotes eld
19742 \end_inset
19743
19744 <file-name>
19745 \begin_inset Quotes erd
19746 \end_inset
19747
19748
19749 \end_layout
19750
19751 \begin_layout Standard
19752 Read 
19753 \family typewriter
19754 man svn
19755 \family default
19756  to understand the switches.
19757  
19758 \end_layout
19759
19760 \begin_layout Subsubsection
19761
19762 \family sans
19763 Check In Changes
19764 \end_layout
19765
19766 \begin_layout Standard
19767 When you are finished editing a file, you commit your changes.
19768  When you do this, you are asked for a description of the changes.
19769  After that changes are commited.
19770 \end_layout
19771
19772 \begin_layout Standard
19773 SVN command:
19774 \begin_inset Foot
19775 status collapsed
19776
19777 \begin_layout Plain Layout
19778 In case locking is not enabled.
19779  See Section 
19780 \begin_inset CommandInset ref
19781 LatexCommand ref
19782 reference "subsec:SVN-File-Locking"
19783
19784 \end_inset
19785
19786 .
19787 \end_layout
19788
19789 \end_inset
19790
19791  
19792 \family typewriter
19793 svn commit -q -m"<description>" <file-name>
19794 \end_layout
19795
19796 \begin_layout Subsubsection
19797
19798 \family sans
19799 Check Out For Edit
19800 \end_layout
19801
19802 \begin_layout Standard
19803 Updates the changes of this file from the repository.
19804  Be sure you understand SVN merging and conflicts resolving before using
19805  this function, because all conflicts has to be resolved manually by you!
19806 \end_layout
19807
19808 \begin_layout Standard
19809 SVN command:
19810 \begin_inset Foot
19811 status collapsed
19812
19813 \begin_layout Plain Layout
19814 Ditto.
19815 \end_layout
19816
19817 \end_inset
19818
19819  
19820 \family typewriter
19821 svn update --non-interactive 
19822 \begin_inset Quotes eld
19823 \end_inset
19824
19825 <file-name>
19826 \begin_inset Quotes erd
19827 \end_inset
19828
19829
19830 \end_layout
19831
19832 \begin_layout Subsubsection
19833
19834 \family sans
19835 Revert To Repository Version
19836 \end_layout
19837
19838 \begin_layout Standard
19839 This will discard all changes made to the document since the last check
19840  in.
19841  You get a warning before changes are discarded.
19842  
19843 \end_layout
19844
19845 \begin_layout Standard
19846 SVN command: 
19847 \family typewriter
19848 svn revert -q 
19849 \begin_inset Quotes eld
19850 \end_inset
19851
19852 <file-name>
19853 \begin_inset Quotes erd
19854 \end_inset
19855
19856
19857 \end_layout
19858
19859 \begin_layout Subsubsection
19860 \begin_inset CommandInset label
19861 LatexCommand label
19862 name "sub:SVN-Repo-Update"
19863
19864 \end_inset
19865
19866 Update of the local directory checkout from repository
19867 \begin_inset Foot
19868 status collapsed
19869
19870 \begin_layout Plain Layout
19871 Note that this command will work only with subversion 
19872 \begin_inset Formula $\geqq1.5$
19873 \end_inset
19874
19875
19876 \end_layout
19877
19878 \end_inset
19879
19880
19881 \end_layout
19882
19883 \begin_layout Standard
19884 All the commands above have one shortcomming - they deal with the current
19885  document only.
19886  Once your document contains pictures, includes external 
19887 \begin_inset Flex Code
19888 status collapsed
19889
19890 \begin_layout Plain Layout
19891 .tex
19892 \end_layout
19893
19894 \end_inset
19895
19896  files and so on administration becomes more complicated.
19897  LyX now supports updating the whole tree in which resides the document
19898 \begin_inset Foot
19899 status collapsed
19900
19901 \begin_layout Plain Layout
19902 One need to organize the files structure so that all external files are
19903  in the same directory or subdirectories of the document.
19904  
19905 \end_layout
19906
19907 \end_inset
19908
19909 .
19910  This become especially useful once you cooperate with people which neither
19911  know about subversion management nor they have ambition to commit additional
19912  material to the repository.
19913  
19914 \end_layout
19915
19916 \begin_layout Standard
19917 \begin_inset Flex Code
19918 status collapsed
19919
19920 \begin_layout Plain Layout
19921 Update local directory from repository
19922 \end_layout
19923
19924 \end_inset
19925
19926  command updates the whole directory and in case of merge conflicts local
19927  version of the files are left, so no unintended data loss occurs.
19928  If local changes are detected user is warned before update starts.
19929 \end_layout
19930
19931 \begin_layout Labeling
19932 \labelwidthstring 00.00.0000
19933 SVN
19934 \begin_inset space ~
19935 \end_inset
19936
19937 commands: 
19938 \begin_inset space ~
19939 \end_inset
19940
19941
19942 \begin_inset Newline newline
19943 \end_inset
19944
19945
19946 \begin_inset Flex Code
19947 status collapsed
19948
19949 \begin_layout Plain Layout
19950 svn diff $path
19951 \end_layout
19952
19953 \end_inset
19954
19955  (Ask if changes are detected.)
19956 \begin_inset Newline newline
19957 \end_inset
19958
19959
19960 \begin_inset Flex Code
19961 status collapsed
19962
19963 \begin_layout Plain Layout
19964 svn update --accept mine-full $path
19965 \end_layout
19966
19967 \end_inset
19968
19969
19970 \end_layout
19971
19972 \begin_layout Standard
19973 where 
19974 \begin_inset Flex Code
19975 status collapsed
19976
19977 \begin_layout Plain Layout
19978 $path
19979 \end_layout
19980
19981 \end_inset
19982
19983  stands for the path to the document.
19984 \end_layout
19985
19986 \begin_layout Subsubsection
19987
19988 \family sans
19989 Show History
19990 \end_layout
19991
19992 \begin_layout Standard
19993 This shows the complete history of the SVN document.
19994  The output of 
19995 \family typewriter
19996 svn log 
19997 \begin_inset Quotes eld
19998 \end_inset
19999
20000 <file-name>
20001 \begin_inset Quotes erd
20002 \end_inset
20003
20004
20005 \family default
20006  is shown in a browser.
20007 \end_layout
20008
20009 \begin_layout Subsubsection
20010 File Locking
20011 \begin_inset CommandInset label
20012 LatexCommand label
20013 name "subsec:SVN-File-Locking"
20014
20015 \end_inset
20016
20017
20018 \end_layout
20019
20020 \begin_layout Standard
20021 The file exchange through various revision control systems brings the problem
20022  of merge conflicts in case two different users try to edit the same (parts
20023  of) document.
20024  When such a conflict happens it needs manual resolving and one reasonable
20025  alternative is to provide some kind of locking mechanism, which guarantees
20026  that only one user is allowed to edit file at the given time.
20027 \end_layout
20028
20029 \begin_layout Standard
20030 SVN has two such mechanisms to provide mutual exclusivity for file access
20031  - locks and automatic setting of write permissions (see sec.
20032  
20033 \begin_inset CommandInset ref
20034 LatexCommand ref
20035 reference "subsec:Automatical-Locking-Property"
20036
20037 \end_inset
20038
20039 ) based on 
20040 \begin_inset Flex Code
20041 status collapsed
20042
20043 \begin_layout Plain Layout
20044 svn:needs-lock
20045 \end_layout
20046
20047 \end_inset
20048
20049  file svn property
20050 \begin_inset Foot
20051 status open
20052
20053 \begin_layout Plain Layout
20054 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20055 \end_layout
20056
20057 \end_inset
20058
20059 .
20060  If this property is detected for a given document LyX starts to use SVN
20061  locks for document editing automatically and the whole check-in/out mechanism
20062  switches to the same regimen as for RCS.
20063  This in particular means there are two different modes of file use in LyX:
20064 \end_layout
20065
20066 \begin_layout Itemize
20067 Unlocked state.
20068  The loaded file is in the read-only mode.
20069  For editing on needs to check-out.
20070  
20071 \emph on
20072 Check-out
20073 \emph default
20074  consists of updating from the repository and gaining write lock.
20075  If the lock is not possible to obtain, we remain in unlocked state.
20076 \end_layout
20077
20078 \begin_layout Itemize
20079 Locked state.
20080  The loaded file is in the 'normal' edit mode.
20081  No other user is allowed to edit the file.
20082  
20083 \emph on
20084 Check-in
20085 \emph default
20086  consists of commiting changes and releasing write-lock.
20087  If no changes have been made to the document, no commit will be produced
20088 \begin_inset Foot
20089 status collapsed
20090
20091 \begin_layout Plain Layout
20092 Don't be puzzled by the fact that you will be asked for commit message anyway.
20093 \end_layout
20094
20095 \end_inset
20096
20097  and only the write-lock will be released.
20098 \end_layout
20099
20100 \begin_layout Standard
20101 SVN commands:
20102 \end_layout
20103
20104 \begin_layout Labeling
20105 \labelwidthstring 00.00.0000
20106 Check-in:
20107 \family typewriter
20108  svn commit -q -m"<description>" "<file-name>"
20109 \begin_inset Newline newline
20110 \end_inset
20111
20112 svn unlock "<file-name>"
20113 \end_layout
20114
20115 \begin_layout Labeling
20116 \labelwidthstring 00.00.0000
20117 Check-out: 
20118 \family typewriter
20119 svn update "<file-name>"
20120 \begin_inset Newline newline
20121 \end_inset
20122
20123 svn lock "<file-name>"
20124 \end_layout
20125
20126 \begin_layout Subsubsection
20127
20128 \family typewriter
20129 \begin_inset CommandInset label
20130 LatexCommand label
20131 name "subsec:Automatical-Locking-Property"
20132
20133 \end_inset
20134
20135
20136 \family default
20137 Automatic Locking Property
20138 \end_layout
20139
20140 \begin_layout Standard
20141 The above mentioned automatic setting of write permissions of the .lyx file
20142  can be set through
20143 \family sans
20144 \bar under
20145  F
20146 \bar default
20147 ile\SpecialChar \menuseparator
20148
20149 \bar under
20150 V
20151 \bar default
20152 ersion
20153 \begin_inset space ~
20154 \end_inset
20155
20156 Control\SpecialChar \menuseparator
20157
20158 \bar under
20159 T
20160 \bar default
20161 oggle locking property
20162 \family default
20163 .
20164  This command is active only when the file is not locked on the svn server
20165  (i.e.
20166  you need to check-out before proceeding).
20167 \end_layout
20168
20169 \begin_layout Labeling
20170 \labelwidthstring 00.00.0000
20171 SVN
20172 \begin_inset space ~
20173 \end_inset
20174
20175 commands:
20176 \end_layout
20177
20178 \begin_layout Labeling
20179 \labelwidthstring 00.00.0000
20180 Set:
20181 \family typewriter
20182  svn propset svn:needs-lock ON "<file-name>"
20183 \end_layout
20184
20185 \begin_layout Labeling
20186 \labelwidthstring 00.00.0000
20187 Unset: 
20188 \family typewriter
20189 svn propdel svn:needs-lock "<file-name>"
20190 \end_layout
20191
20192 \begin_layout Subsubsection
20193 \begin_inset CommandInset label
20194 LatexCommand label
20195 name "sub:VCS-Revision-Information"
20196
20197 \end_inset
20198
20199 Revision Information in Documents
20200 \end_layout
20201
20202 \begin_layout Standard
20203 There are more possibilities how to activate revision information in our
20204  document.
20205 \end_layout
20206
20207 \begin_layout Itemize
20208 LyX supports directly:
20209 \end_layout
20210
20211 \begin_deeper
20212 \begin_layout Itemize
20213 tree revision information (
20214 \begin_inset Flex Code
20215 status collapsed
20216
20217 \begin_layout Plain Layout
20218 vcs-tree-revision
20219 \end_layout
20220
20221 \end_inset
20222
20223 ).
20224  The result is the output of the 
20225 \begin_inset Flex Code
20226 status collapsed
20227
20228 \begin_layout Plain Layout
20229 svnversion
20230 \end_layout
20231
20232 \end_inset
20233
20234  command, the following table gives you an idea, how to read the results.
20235 \end_layout
20236
20237 \begin_layout Standard
20238 \align center
20239 \begin_inset Tabular
20240 <lyxtabular version="3" rows="6" columns="2">
20241 <features tabularvalignment="middle">
20242 <column alignment="center" valignment="top" width="0">
20243 <column alignment="center" valignment="top" width="0">
20244 <row>
20245 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20246 \begin_inset Text
20247
20248 \begin_layout Plain Layout
20249 Output
20250 \end_layout
20251
20252 \end_inset
20253 </cell>
20254 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20255 \begin_inset Text
20256
20257 \begin_layout Plain Layout
20258 Meaning
20259 \end_layout
20260
20261 \end_inset
20262 </cell>
20263 </row>
20264 <row>
20265 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20266 \begin_inset Text
20267
20268 \begin_layout Plain Layout
20269 4123:4168
20270 \end_layout
20271
20272 \end_inset
20273 </cell>
20274 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20275 \begin_inset Text
20276
20277 \begin_layout Plain Layout
20278 mixed revision working copy
20279 \end_layout
20280
20281 \end_inset
20282 </cell>
20283 </row>
20284 <row>
20285 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20286 \begin_inset Text
20287
20288 \begin_layout Plain Layout
20289 4168M
20290 \end_layout
20291
20292 \end_inset
20293 </cell>
20294 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20295 \begin_inset Text
20296
20297 \begin_layout Plain Layout
20298 modified working copy
20299 \end_layout
20300
20301 \end_inset
20302 </cell>
20303 </row>
20304 <row>
20305 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20306 \begin_inset Text
20307
20308 \begin_layout Plain Layout
20309 4123S
20310 \end_layout
20311
20312 \end_inset
20313 </cell>
20314 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20315 \begin_inset Text
20316
20317 \begin_layout Plain Layout
20318 switched working copy
20319 \end_layout
20320
20321 \end_inset
20322 </cell>
20323 </row>
20324 <row>
20325 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20326 \begin_inset Text
20327
20328 \begin_layout Plain Layout
20329 4123P
20330 \end_layout
20331
20332 \end_inset
20333 </cell>
20334 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20335 \begin_inset Text
20336
20337 \begin_layout Plain Layout
20338 partial working copy, from a sparse checkout
20339 \end_layout
20340
20341 \end_inset
20342 </cell>
20343 </row>
20344 <row>
20345 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20346 \begin_inset Text
20347
20348 \begin_layout Plain Layout
20349 4123:4168MS
20350 \end_layout
20351
20352 \end_inset
20353 </cell>
20354 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20355 \begin_inset Text
20356
20357 \begin_layout Plain Layout
20358 mixed revision, modified, switched working copy
20359 \end_layout
20360
20361 \end_inset
20362 </cell>
20363 </row>
20364 </lyxtabular>
20365
20366 \end_inset
20367
20368
20369 \end_layout
20370
20371 \begin_layout Itemize
20372 file revision information.
20373  The result comes from parsing the output of 
20374 \begin_inset Flex Code
20375 status collapsed
20376
20377 \begin_layout Plain Layout
20378 svn
20379 \begin_inset space ~
20380 \end_inset
20381
20382 info
20383 \begin_inset space ~
20384 \end_inset
20385
20386 --xml
20387 \begin_inset space ~
20388 \end_inset
20389
20390 file.lyx
20391 \end_layout
20392
20393 \end_inset
20394
20395 .
20396  Supported flags are:
20397 \end_layout
20398
20399 \begin_deeper
20400 \begin_layout Itemize
20401 version number of the last commit (
20402 \begin_inset Flex Code
20403 status collapsed
20404
20405 \begin_layout Plain Layout
20406 vcs-revision
20407 \end_layout
20408
20409 \end_inset
20410
20411 )
20412 \end_layout
20413
20414 \begin_layout Itemize
20415 author of the last commit (
20416 \begin_inset Flex Code
20417 status collapsed
20418
20419 \begin_layout Plain Layout
20420 vcs-author
20421 \end_layout
20422
20423 \end_inset
20424
20425 )
20426 \end_layout
20427
20428 \begin_layout Itemize
20429 date of the last commit (
20430 \begin_inset Flex Code
20431 status collapsed
20432
20433 \begin_layout Plain Layout
20434 vcs-date
20435 \end_layout
20436
20437 \end_inset
20438
20439 )
20440 \end_layout
20441
20442 \begin_layout Itemize
20443 time of the last commit (
20444 \begin_inset Flex Code
20445 status collapsed
20446
20447 \begin_layout Plain Layout
20448 vcs-time
20449 \end_layout
20450
20451 \end_inset
20452
20453 )
20454 \end_layout
20455
20456 \end_deeper
20457 \begin_layout Standard
20458 You can obtain this info via InsetInfo (e.g.
20459  
20460 \begin_inset Flex Code
20461 status collapsed
20462
20463 \begin_layout Plain Layout
20464 info-insert buffer vcs-date
20465 \end_layout
20466
20467 \end_inset
20468
20469 ).
20470  The information will be available only when you have the file stored under
20471  svn managment (i.e.
20472  the 
20473 \begin_inset Flex Code
20474 status collapsed
20475
20476 \begin_layout Plain Layout
20477 .svn
20478 \end_layout
20479
20480 \end_inset
20481
20482  directory is available with your document).
20483 \end_layout
20484
20485 \end_deeper
20486 \begin_layout Itemize
20487 Another---a hacking one---possibility is to use svn keywords
20488 \begin_inset Foot
20489 status collapsed
20490
20491 \begin_layout Plain Layout
20492 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20493 \end_layout
20494
20495 \end_inset
20496
20497 .
20498  In short -- you set file keywords property (e.g.
20499  
20500 \family sans
20501 svn propset svn:keywords 'Rev' file.lyx
20502 \family default
20503 ) and then paste keyword TeX code
20504 \begin_inset Foot
20505 status collapsed
20506
20507 \begin_layout Plain Layout
20508 This is an easy way how to ensure that LyX won't break the line in the middle
20509  of keyword tag.
20510 \end_layout
20511
20512 \end_inset
20513
20514  tag in your document (e.g.
20515  
20516 \begin_inset ERT
20517 status open
20518
20519 \begin_layout Plain Layout
20520
20521 $Rev$
20522 \end_layout
20523
20524 \end_inset
20525
20526 ).
20527  This way svn client will automatically substitute revision number (e.g.
20528  
20529 \begin_inset ERT
20530 status open
20531
20532 \begin_layout Plain Layout
20533
20534 $Rev: 59 $
20535 \end_layout
20536
20537 \end_inset
20538
20539 ) after each update and commit.
20540  There are more problems with this approach.
20541  Firstly, the '$' character is used in TeX world for math equations, so
20542  any occurence of math formula 
20543 \begin_inset Formula $Rev$
20544 \end_inset
20545
20546  become 
20547 \begin_inset Formula $Rev:59$
20548 \end_inset
20549
20550  in your LyX document.
20551  Similarly for other keywords like Id, Date, Author, etc.
20552  Secondly svn output is dependent on your locales, so its very easy that
20553  svn would produce some problematic strings once Date is used.
20554  Thirdly you get the whole 'Rev: 59' string in your document instead of
20555  the plain number.
20556  Until subversion implements user's custom keywords it will be hard to use
20557  this approach reliably or let LyX to support it directly.
20558 \end_layout
20559
20560 \begin_layout Subsection
20561 SVN and Windows Environment
20562 \end_layout
20563
20564 \begin_layout Quote
20565 My inclination is to say that if the user cannot figure out the command
20566  line operations on their own fairly quickly, they would be well advised
20567  to use TortoiseSVN.
20568  ---P.
20569  A.
20570  Rubin
20571 \end_layout
20572
20573 \begin_layout Subsubsection
20574 Preparation
20575 \end_layout
20576
20577 \begin_layout Standard
20578 In addition to installing LyX, and having access to a Subversion repository,
20579  the user will need to install the Subversion client program.
20580  A Windows installer for the client program is available from 
20581 \begin_inset CommandInset href
20582 LatexCommand href
20583 name "CollabNet"
20584 target "http://www.collab.net/nonav/downloads/subversion/"
20585
20586 \end_inset
20587
20588 .
20589  The user may also want to install 
20590 \begin_inset CommandInset href
20591 LatexCommand href
20592 name "TortoiseSVN"
20593 target "http://tortoisesvn.tigris.org/"
20594
20595 \end_inset
20596
20597 , which integrates Subversion operations into the context (rightclick) menu
20598  of Windows Explorer.
20599  Operations done outside LyX will typically be more convenient using the
20600  Explorer context menu.
20601  Note that TortoiseSVN is not a replacement for the client program, which
20602  is what LyX itself will use.
20603 \end_layout
20604
20605 \begin_layout Subsubsection
20606 Bringing a document under Subversion control
20607 \end_layout
20608
20609 \begin_layout Standard
20610 Before a LyX document can be brought under version control in Subversion,
20611  its parent directory needs to be under version control.
20612  If the document is being added to a project already in the repository,
20613  this is accomplished by checking the project out to the directory where
20614  the new document will be placed.
20615  If the project itself is not yet under version control (for instance, if
20616  this document starts a new project), the directory must be imported into
20617  the repository.
20618  This is done outside LyX.
20619  Both import and checkout are easily accomplished from the Explorer context
20620  menu using TortoiseSVN, or alternatively can be done using the command
20621  line client at a DOS prompt.
20622  The procedure for importing the project using TortoiseSVN is described
20623  below, assuming an existing repository and a new project being started
20624  in 
20625 \family typewriter
20626 C:
20627 \backslash
20628 new project
20629 \family default
20630 .
20631  For information on using the Subversion client program, run 
20632 \family typewriter
20633 svn --help 
20634 \family default
20635 in a DOS shell.
20636 \end_layout
20637
20638 \begin_layout Enumerate
20639 Locate 
20640 \family typewriter
20641 C:
20642 \backslash
20643 new project 
20644 \family default
20645 in Windows Explorer, right click it, and select 
20646 \family typewriter
20647 TortoiseSVN > Repo-browser
20648 \family default
20649 .
20650  If necessary, adjust the URL for the repository, then click OK.
20651 \end_layout
20652
20653 \begin_layout Enumerate
20654 Right click the level of the repository under which you want to place the
20655  new project folder (typically the top level) and click 
20656 \family typewriter
20657 Create folder\SpecialChar \ldots{}
20658
20659 \family default
20660  Supply a name for the project folder and click OK.
20661  Add a message for the log file if desired, then click OK again.
20662  The new project folder should appear in the repository.
20663  Finally, click OK again to exit the repository browser.
20664 \end_layout
20665
20666 \begin_layout Enumerate
20667 Once again right click 
20668 \family typewriter
20669 C:
20670 \backslash
20671 new project
20672 \family default
20673 , this time selecting SVN Checkout\SpecialChar \ldots{}
20674  Select the URL of the project folder
20675  you just created in the repository, and set the checkout directory to 
20676 \family typewriter
20677 C:
20678 \backslash
20679 new project.
20680
20681 \family default
20682  Click OK.
20683  You will be warned about a non-empty folder; click OK to proceed.
20684  You should now have a 
20685 \family typewriter
20686 .svn
20687 \family default
20688  directory under 
20689 \family typewriter
20690 C:
20691 \backslash
20692 new project.
20693 \end_layout
20694
20695 \begin_layout Enumerate
20696 Create or open your document in LyX and click 
20697 \family sans
20698 \bar under
20699 F
20700 \bar default
20701 ile\SpecialChar \menuseparator
20702
20703 \bar under
20704 V
20705 \bar default
20706 ersion
20707 \begin_inset space ~
20708 \end_inset
20709
20710 Control\SpecialChar \menuseparator
20711
20712 \bar under
20713 R
20714 \bar default
20715 egister.
20716  
20717 \family default
20718 Add a log message and click OK to commit the document to version control.
20719 \end_layout
20720
20721 \begin_layout Standard
20722 From this point onward, you should have full functionality in the 
20723 \family sans
20724 \bar under
20725 F
20726 \bar default
20727 ile\SpecialChar \menuseparator
20728
20729 \bar under
20730 V
20731 \bar default
20732 ersion
20733 \begin_inset space ~
20734 \end_inset
20735
20736 Control
20737 \family default
20738  menu.
20739  You also have the option of checking the document in and out, viewing its
20740  history, etc.
20741  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20742  client program from a command prompt.
20743 \end_layout
20744
20745 \begin_layout Subsubsection
20746 SSH tunnel used with SVN under Windows
20747 \end_layout
20748
20749 \begin_layout Standard
20750 Compared with Linux setting up svn client to communicate over ssh under
20751  Windows is a rather troublesome task.
20752  We will at least offer some hints how to setup the client side but prior
20753  knowledge about ssh and the Windows command line is needed, also be prepared
20754  for a great deal of frustration\SpecialChar \ldots{}
20755
20756 \end_layout
20757
20758 \begin_layout Enumerate
20759 Get a svn client for windows, as described in the previous sections.
20760  When it is a fresh install run some svn command (e.g.
20761  
20762 \begin_inset Flex Code
20763 status collapsed
20764
20765 \begin_layout Plain Layout
20766 svn --version
20767 \end_layout
20768
20769 \end_inset
20770
20771 ) to create config files, which you will need to change later on.
20772 \end_layout
20773
20774 \begin_layout Enumerate
20775 Choose a ssh client for Windows.
20776  There are several possibilities, we will use the one from Putty tools
20777 \begin_inset Foot
20778 status open
20779
20780 \begin_layout Plain Layout
20781 \begin_inset Flex URL
20782 status collapsed
20783
20784 \begin_layout Plain Layout
20785
20786 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20787 \end_layout
20788
20789 \end_inset
20790
20791
20792 \end_layout
20793
20794 \end_inset
20795
20796 .
20797  You will need to set the connection up so that the client doesn't ask for
20798  any password from you.
20799  To keep things easy we will use only keys without any additional password
20800  protection etc.
20801 \end_layout
20802
20803 \begin_deeper
20804 \begin_layout Enumerate
20805 Generate keys by 
20806 \begin_inset Flex Code
20807 status collapsed
20808
20809 \begin_layout Plain Layout
20810 puttygen
20811 \end_layout
20812
20813 \end_inset
20814
20815 .
20816  Save your private .ppk key file and put the public one on the server side.
20817  If the SVN server runs on Linux, note that the format of the public key
20818  is not compatible with Linux openssh and you will need to direcly copy-paste
20819  the key from the “
20820 \emph on
20821 Public key for pasting into OpenSSH authorized_keys file
20822 \emph default
20823 :” edit field into the server's 
20824 \begin_inset Flex Code
20825 status collapsed
20826
20827 \begin_layout Plain Layout
20828 ~/.ssh/authorized_keys
20829 \end_layout
20830
20831 \end_inset
20832
20833
20834 \begin_inset Flex Code
20835 status collapsed
20836
20837 \begin_layout Plain Layout
20838 authorized_keys2
20839 \end_layout
20840
20841 \end_inset
20842
20843  file.
20844 \end_layout
20845
20846 \begin_layout Enumerate
20847 Get the Putty's 
20848 \begin_inset Flex Code
20849 status collapsed
20850
20851 \begin_layout Plain Layout
20852 plink
20853 \end_layout
20854
20855 \end_inset
20856
20857 .
20858  In the SVN config file
20859 \begin_inset Foot
20860 status collapsed
20861
20862 \begin_layout Plain Layout
20863 Exact path depends on Windows version, usually somewhere around 
20864 \begin_inset Flex Code
20865 status collapsed
20866
20867 \begin_layout Plain Layout
20868 c:
20869 \backslash
20870 Documents and Settings
20871 \backslash
20872 user
20873 \backslash
20874 Application Data
20875 \backslash
20876 Subversion
20877 \backslash
20878 config
20879 \end_layout
20880
20881 \end_inset
20882
20883  / 
20884 \begin_inset Flex Code
20885 status collapsed
20886
20887 \begin_layout Plain Layout
20888 AppData
20889 \backslash
20890 Roaming
20891 \backslash
20892 Subversion
20893 \end_layout
20894
20895 \end_inset
20896
20897 .
20898 \end_layout
20899
20900 \end_inset
20901
20902 , section [tunnels], setup ssh command, e.g.
20903  
20904 \begin_inset Flex Code
20905 status collapsed
20906
20907 \begin_layout Plain Layout
20908 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20909 \end_layout
20910
20911 \end_inset
20912
20913 .
20914 \begin_inset Foot
20915 status collapsed
20916
20917 \begin_layout Plain Layout
20918 It will usually take a lot of time to get exact command right and it depends
20919  on many things.
20920  For example do not have some remote server saved as a default session in
20921  Putty etc.
20922  If things fail, try to connect via plink without SVN first.
20923 \end_layout
20924
20925 \end_inset
20926
20927
20928 \end_layout
20929
20930 \end_deeper
20931 \begin_layout Enumerate
20932 Checkout the SVN archive, e.g.
20933  
20934 \begin_inset Flex Code
20935 status collapsed
20936
20937 \begin_layout Plain Layout
20938 svn co svn+ssh://user@server/repository_path
20939 \end_layout
20940
20941 \end_inset
20942
20943 .
20944 \end_layout
20945
20946 \begin_layout Subsubsection
20947 End-of-Line Conversions
20948 \end_layout
20949
20950 \begin_layout Standard
20951 When the collsraborators are mixing Linux and Windows environments, LyX
20952  will use different line endings inside the .lyx files.
20953  This is not a problem as far as LyX functionality is concerned, but the
20954  commit diffs will be huge and merge-conflicts prone.
20955  Fortunately SVN itself knows
20956 \begin_inset Foot
20957 status collapsed
20958
20959 \begin_layout Plain Layout
20960 \begin_inset Flex URL
20961 status collapsed
20962
20963 \begin_layout Plain Layout
20964
20965 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20966 \end_layout
20967
20968 \end_inset
20969
20970
20971 \end_layout
20972
20973 \end_inset
20974
20975  how to deal with CR/LF problems when switching .lyx files to the 
20976 \begin_inset Flex Code
20977 status collapsed
20978
20979 \begin_layout Plain Layout
20980 native
20981 \end_layout
20982
20983 \end_inset
20984
20985  mode.
20986 \begin_inset Foot
20987 status collapsed
20988
20989 \begin_layout Plain Layout
20990 For the lazy guys: 
20991 \begin_inset Flex Code
20992 status collapsed
20993
20994 \begin_layout Plain Layout
20995 svn propset svn:eol-style native FILE_NAME
20996 \end_layout
20997
20998 \end_inset
20999
21000
21001 \end_layout
21002
21003 \end_inset
21004
21005
21006 \end_layout
21007
21008 \begin_layout Subsection
21009 Further tuning
21010 \end_layout
21011
21012 \begin_layout Standard
21013 With the recent addition of the vc-command function LyX power users are
21014  allowed to create their own commands for revision control.
21015 \end_layout
21016
21017 \begin_layout Standard
21018 As an example you can see how two TortoiseSVN commands could be integrated
21019  directly:
21020 \end_layout
21021
21022 \begin_layout Description
21023 Commit: 
21024 \begin_inset Flex Code
21025 status collapsed
21026
21027 \begin_layout Plain Layout
21028 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21029 \end_layout
21030
21031 \end_inset
21032
21033
21034 \end_layout
21035
21036 \begin_layout Description
21037 Revert: 
21038 \begin_inset Flex Code
21039 status collapsed
21040
21041 \begin_layout Plain Layout
21042 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21043 \end_layout
21044
21045 \end_inset
21046
21047
21048 \end_layout
21049
21050 \begin_layout Subsection
21051 Version control and Document comparison
21052 \end_layout
21053
21054 \begin_layout Standard
21055 One of the typical uses of version control is to inspect the changes between
21056  revisions, usually by creating 
21057 \begin_inset Flex Code
21058 status collapsed
21059
21060 \begin_layout Plain Layout
21061 diff
21062 \end_layout
21063
21064 \end_inset
21065
21066  dumps.
21067  While this is useful for plain text files, it is much less useful in the
21068  case of LyX files, which have more complicated structure.
21069  Hence we provide binding to the Document comparison feature.
21070  They are two ways of calling this feature - either by direct call of 
21071 \begin_inset Flex Code
21072 status collapsed
21073
21074 \begin_layout Plain Layout
21075 VC_COMPARE
21076 \end_layout
21077
21078 \end_inset
21079
21080  LyX function (for details see LyX functions manual) or by icon/menu item
21081  
21082 \begin_inset Flex MenuItem
21083 status collapsed
21084
21085 \begin_layout Plain Layout
21086 Compare with older revision...
21087 \end_layout
21088
21089 \end_inset
21090
21091 .
21092  One can either compare two chosen revisions of the document or he can simply
21093  compare the current version of edited text with older revisions (where
21094  '
21095 \begin_inset Flex MenuItem
21096 status collapsed
21097
21098 \begin_layout Plain Layout
21099 0
21100 \end_layout
21101
21102 \end_inset
21103
21104 ' revisions back means comparison of the edited file with last commited
21105  revision).
21106  
21107 \end_layout
21108
21109 \begin_layout Standard
21110 This feature is supported for SVN and RCS though due to the more complicated
21111  versioning scheme of RCS there is a constraint -- when addressing the revisions
21112  in dialog, numbers always point to the last number in RCS revision number,
21113  i.e.
21114  '35' in '1.2.35'.
21115 \end_layout
21116
21117 \begin_layout Section
21118 Literate Programming
21119 \end_layout
21120
21121 \begin_layout Standard
21122 Updated by 
21123 \noun on
21124 Kayvan Sylvan 
21125 \noun default
21126 (kayvan@sylvan.com)
21127 \noun on
21128
21129 \noun default
21130 original documentation written by 
21131 \noun on
21132 Edmar Wienskoski Jr.
21133
21134 \noun default
21135  (edmar-w-jr@technologist.com)
21136 \end_layout
21137
21138 \begin_layout Subsection
21139 Introduction
21140 \end_layout
21141
21142 \begin_layout Standard
21143 The main purpose of this documentation is to show you how to use LyX for
21144  literate programming, where it is assumed that you are familiar with this
21145  programming technique, and know what 
21146 \begin_inset Quotes eld
21147 \end_inset
21148
21149 tangling
21150 \begin_inset Quotes erd
21151 \end_inset
21152
21153  and 
21154 \begin_inset Quotes eld
21155 \end_inset
21156
21157 weaving
21158 \begin_inset Quotes erd
21159 \end_inset
21160
21161  means.
21162  If that is not the case, please follow the web links provided in the following
21163  sections.
21164  There is a lot of good documentation out there covering old development
21165  history to the latest tools tips.
21166 \end_layout
21167
21168 \begin_layout Standard
21169 It is also assumed that you are familiar with LyX itself to a point that
21170  you are comfortable changing your LyX preferences, and X resources file.
21171  If that is not the case please refer to other LyX documentation to cover
21172  your specific needs.
21173 \end_layout
21174
21175 \begin_layout Subsection
21176 Literate Programming
21177 \end_layout
21178
21179 \begin_layout Standard
21180 From the Literate Programming FAQ: 
21181 \end_layout
21182
21183 \begin_layout Quotation
21184 Literate programming is the combination of documentation and source together
21185  in a fashion suited for reading by human beings.
21186  In fact, literate programs should be enjoyable reading, even inviting!
21187  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21188  and documentation in a single file.
21189  Literate programming tools then parse the file to produce either readable
21190  documentation or compilable source.
21191  The WEB style of literate programming was created by D.
21192 \begin_inset space \thinspace{}
21193 \end_inset
21194
21195 E.
21196  Knuth during the development of his TeX typesetting software.
21197  
21198 \end_layout
21199
21200 \begin_layout Standard
21201 Another excerpt says:
21202 \end_layout
21203
21204 \begin_layout Quotation
21205
21206 \emph on
21207 How is literate programming different from verbose commenting?
21208 \end_layout
21209
21210 \begin_layout Quotation
21211 There are three distinguishing characteristics.
21212  In order of importance, they are: 
21213 \end_layout
21214
21215 \begin_deeper
21216 \begin_layout Itemize
21217 flexible order of elaboration 
21218 \end_layout
21219
21220 \begin_layout Itemize
21221 automatic support for browsing 
21222 \end_layout
21223
21224 \begin_layout Itemize
21225 typeset documentation, especially diagrams and mathematics 
21226 \end_layout
21227
21228 \end_deeper
21229 \begin_layout Standard
21230 Now that I sparked your curiosity, take a look in the references.
21231 \end_layout
21232
21233 \begin_layout Subsubsection
21234 References
21235 \end_layout
21236
21237 \begin_layout Standard
21238 The complete Literate Programming FAQ can be found at:
21239 \end_layout
21240
21241 \begin_layout Quote
21242 Literate Programming FAQ 
21243 \begin_inset Flex URL
21244 status collapsed
21245
21246 \begin_layout Plain Layout
21247
21248 http://www.literateprogramming.com/lpfaq.pdf
21249 \end_layout
21250
21251 \end_inset
21252
21253
21254 \end_layout
21255
21256 \begin_layout Standard
21257 The FAQ lists 23 (twenty three!) different literate programming tools.
21258  Where some are specialized or 
21259 \begin_inset Quotes eld
21260 \end_inset
21261
21262 tailored
21263 \begin_inset Quotes erd
21264 \end_inset
21265
21266  for particular programming languages, while other have general scope.
21267  I selected 
21268 \noun on
21269 Noweb
21270 \noun default
21271  for my own use for several reasons:
21272 \end_layout
21273
21274 \begin_layout Itemize
21275 It can generate the documentation either in LaTeX or HTML.
21276 \end_layout
21277
21278 \begin_layout Itemize
21279 It has a open architecture, i.
21280 \begin_inset space \thinspace{}
21281 \end_inset
21282
21283 g.
21284 \begin_inset space \space{}
21285 \end_inset
21286
21287 it is easy to plug in new filters and to perform special processing that
21288  you may need.
21289  
21290 \end_layout
21291
21292 \begin_layout Itemize
21293 There is a good selection of filters available already (the HTML is one
21294  of them).
21295 \end_layout
21296
21297 \begin_layout Itemize
21298 It is free.
21299 \end_layout
21300
21301 \begin_layout Standard
21302 The Noweb web page can be found at: 
21303 \end_layout
21304
21305 \begin_layout Quote
21306 Noweb home page 
21307 \begin_inset Flex URL
21308 status collapsed
21309
21310 \begin_layout Plain Layout
21311
21312 http://www.cs.virginia.edu/~nr/noweb/
21313 \end_layout
21314
21315 \end_inset
21316
21317
21318 \end_layout
21319
21320 \begin_layout Standard
21321 Starting from there you can reach many other interesting links and even
21322  some literate program examples.
21323 \end_layout
21324
21325 \begin_layout Subsection
21326 LyX and Literate Programming
21327 \end_layout
21328
21329 \begin_layout Standard
21330 The LyX support for Literate Programming is provided by using the generic
21331  LyX converters mechanism.
21332  This support is provided in a 
21333 \begin_inset Quotes eld
21334 \end_inset
21335
21336 Noweb independent
21337 \begin_inset Quotes erd
21338 \end_inset
21339
21340  way, i.
21341 \begin_inset space \thinspace{}
21342 \end_inset
21343
21344 g.
21345 \begin_inset space \space{}
21346 \end_inset
21347
21348 you will be able to use this new LyX feature with some other literate programmin
21349 g tool of your choice by just changing your LyX preferences.
21350 \end_layout
21351
21352 \begin_layout Subsubsection
21353 Generating documents and code (weaving and tangling)
21354 \end_layout
21355
21356 \begin_layout Paragraph
21357 Selecting the document class
21358 \end_layout
21359
21360 \begin_layout Standard
21361 If you have installed Noweb and LyX successfully, whenever you open a new
21362  document or try to change the document class of an existing one, you will
21363  find that there are three new document classes available:
21364 \end_layout
21365
21366 \begin_layout Itemize
21367 Article (Noweb)
21368 \end_layout
21369
21370 \begin_layout Itemize
21371 Book (Noweb)
21372 \end_layout
21373
21374 \begin_layout Itemize
21375 Report (Noweb)
21376 \end_layout
21377
21378 \begin_layout Standard
21379 You must select one of them to create your literate documents from.
21380  
21381 \end_layout
21382
21383 \begin_layout Standard
21384 Note that literate documents are not limited to these three classes.
21385  New classes can be generated from other styles like letter or in combination
21386  with other class variations like Article (AMS).
21387  If you have special needs that cannot be covered by one of the existing
21388  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21389  will arrange to insert a new entry, or teach you how to do it.
21390 \begin_inset Foot
21391 status collapsed
21392
21393 \begin_layout Plain Layout
21394 It is very simple, it involves the creation of a file with four lines, and
21395  re-running of the auto configuration.
21396 \end_layout
21397
21398 \end_inset
21399
21400  Moreover, if you use a literate tool other than Noweb you may need to create
21401  a new set of document classes for it.
21402 \end_layout
21403
21404 \begin_layout Paragraph
21405 Typing code in
21406 \end_layout
21407
21408 \begin_layout Standard
21409 LyX enables you to write code with a layout named 
21410 \noun on
21411 Scrap
21412 \noun default
21413 .
21414 \begin_inset Foot
21415 status collapsed
21416
21417 \begin_layout Plain Layout
21418 The equivalent Noweb term is 
21419 \begin_inset Quotes eld
21420 \end_inset
21421
21422 Chunk
21423 \begin_inset Quotes erd
21424 \end_inset
21425
21426 .
21427  For historical reasons, I got used to the term 
21428 \begin_inset Quotes eld
21429 \end_inset
21430
21431 scrap
21432 \begin_inset Quotes erd
21433 \end_inset
21434
21435  introduced by other literate tool named Nuweb, which I used for many years
21436  before rendering myself to Noweb.
21437 \end_layout
21438
21439 \end_inset
21440
21441  Noweb delimits scraps like this:
21442 \end_layout
21443
21444 \begin_layout LyX-Code
21445 <<My scrap>>=
21446 \end_layout
21447
21448 \begin_layout LyX-Code
21449   code
21450 \end_layout
21451
21452 \begin_layout LyX-Code
21453   more code
21454 \end_layout
21455
21456 \begin_layout LyX-Code
21457   even more code
21458 \end_layout
21459
21460 \begin_layout LyX-Code
21461   @
21462 \end_layout
21463
21464 \begin_layout Standard
21465 The problem is that whatever is written in between the << and the 
21466 \family typewriter
21467 @
21468 \family default
21469  must be taken literally, i.
21470 \begin_inset space \thinspace{}
21471 \end_inset
21472
21473 g.
21474 \begin_inset space \space{}
21475 \end_inset
21476
21477 LyX should be prevented from making any special interpretation of what has
21478  been written.
21479  This is handled by a special layout named Scrap, that works like a normal
21480  paragraph but has a free spacing capability.
21481 \end_layout
21482
21483 \begin_layout Standard
21484 The down side of the Scrap paragraph layout is that consecutive paragraphs
21485  of code will be spaced with one empty line in the source code and also
21486  in the printed documentation.
21487  The work around is to enter each line of code within a single Scrap, with
21488  a newline (ctrl-return).
21489  The example above will look like this:
21490 \begin_inset Foot
21491 status collapsed
21492
21493 \begin_layout Plain Layout
21494 If you have a printed version of this document you will not see any difference
21495  between the previous example and this one.
21496 \end_layout
21497
21498 \end_inset
21499
21500
21501 \end_layout
21502
21503 \begin_layout LyX-Code
21504 <<My scrap>>=
21505 \begin_inset Newline newline
21506 \end_inset
21507
21508   code
21509 \begin_inset Newline newline
21510 \end_inset
21511
21512   more code
21513 \begin_inset Newline newline
21514 \end_inset
21515
21516   even more code
21517 \begin_inset Newline newline
21518 \end_inset
21519
21520   @
21521 \end_layout
21522
21523 \begin_layout Standard
21524 This layout works fine.
21525  The only real inconvenience is that you have to type ctrl-return instead
21526  of a plain return.
21527 \begin_inset Foot
21528 status collapsed
21529
21530 \begin_layout Plain Layout
21531 It is in my list of 
21532 \begin_inset Quotes eld
21533 \end_inset
21534
21535 improvements
21536 \begin_inset Quotes erd
21537 \end_inset
21538
21539  to fix that.
21540 \end_layout
21541
21542 \end_inset
21543
21544
21545 \end_layout
21546
21547 \begin_layout Standard
21548 As a special note, you can also use the 
21549 \begin_inset Quotes eld
21550 \end_inset
21551
21552 %def
21553 \begin_inset Quotes erd
21554 \end_inset
21555
21556  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21557 rence:
21558 \end_layout
21559
21560 \begin_layout LyX-Code
21561 <<My scrap>>=
21562 \begin_inset Newline newline
21563 \end_inset
21564
21565   def some_function(args):
21566 \begin_inset Newline newline
21567 \end_inset
21568
21569     "This is the doc string for this function."
21570 \begin_inset Newline newline
21571 \end_inset
21572
21573     print "My args: ", args
21574 \end_layout
21575
21576 \begin_layout LyX-Code
21577 @ %def some_function
21578 \end_layout
21579
21580 \begin_layout Standard
21581 For an example of this usage and the resulting cross-reference output, look
21582  at the Literate python program in 
21583 \emph on
21584 LIBDIR/examples/listerrors.lyx
21585 \emph default
21586  which should make this all clear.
21587 \end_layout
21588
21589 \begin_layout Paragraph
21590 Generating the documentation
21591 \end_layout
21592
21593 \begin_layout Standard
21594 At this point you already have a new document file with a proper document
21595  class, and with some code and text on it.
21596  How do I print it? The answer is simple, you select 
21597 \family sans
21598 View\SpecialChar \menuseparator
21599 DVI,
21600 \family default
21601  etc.
21602  Just like you would do for a plain document.
21603  No special procedure is required.
21604 \end_layout
21605
21606 \begin_layout Standard
21607 To help orientate you, I will now explain what happens inside LyX:
21608 \end_layout
21609
21610 \begin_layout Enumerate
21611 When the 
21612 \family sans
21613 Update\SpecialChar \menuseparator
21614 DVI
21615 \family default
21616  menu option is chosen, a LaTeX file is generated.
21617  
21618 \end_layout
21619
21620 \begin_deeper
21621 \begin_layout Standard
21622 If the document is of any literate class the generated file will be named
21623  with an extension name defined by the 
21624 \begin_inset Quotes eld
21625 \end_inset
21626
21627 literate
21628 \begin_inset Quotes erd
21629 \end_inset
21630
21631  format (defined in the Preferences panel), otherwise the file will have
21632  the usual 
21633 \family typewriter
21634 .tex
21635 \family default
21636  extension.
21637 \end_layout
21638
21639 \end_deeper
21640 \begin_layout Enumerate
21641 Note that the only difference so far is in the name of the file, no special
21642  processing is required by LyX.
21643  Given that you formatted the code using the Scrap layout that, by itself,
21644  takes care of the business.
21645 \end_layout
21646
21647 \begin_layout Enumerate
21648 If the document is of any literate class LyX will then use the internal
21649  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21650 \begin_inset Foot
21651 status collapsed
21652
21653 \begin_layout Plain Layout
21654 The converters are defined in the 
21655 \family sans
21656 Tools\SpecialChar \menuseparator
21657 Preferences
21658 \family default
21659  panel, under the 
21660 \begin_inset Quotes eld
21661 \end_inset
21662
21663 Conversion
21664 \begin_inset Quotes erd
21665 \end_inset
21666
21667  tab.
21668  See section 
21669 \emph on
21670 Converters
21671 \emph default
21672  of the 
21673 \emph on
21674 Customization
21675 \emph default
21676  manual for general information about converters.
21677 \end_layout
21678
21679 \end_inset
21680
21681  to generate the LaTeX file.
21682 \end_layout
21683
21684 \begin_deeper
21685 \begin_layout Standard
21686 Otherwise it will just skip this step.
21687 \end_layout
21688
21689 \end_deeper
21690 \begin_layout Enumerate
21691 Finally, LaTeX is invoked and the regular post processing continues as in
21692  a plain document.
21693 \end_layout
21694
21695 \begin_layout Standard
21696 Independence from a particular 
21697 \begin_inset Quotes eld
21698 \end_inset
21699
21700 literate tool
21701 \begin_inset Quotes erd
21702 \end_inset
21703
21704  is easily achieved by changing the commands that are run by the various
21705  converters.
21706 \end_layout
21707
21708 \begin_layout Paragraph
21709 Generating the code
21710 \end_layout
21711
21712 \begin_layout Standard
21713 When the build menu option is chosen or the corresponding button in the
21714  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21715  Next, LyX invokes the 
21716 \family typewriter
21717 Noweb->Program
21718 \family default
21719  converter.
21720  This converter needs to be defined by the user and is not installed by
21721  default, though the Program format is.
21722  This converter (like any other converter) will have two parts:
21723 \end_layout
21724
21725 \begin_layout Enumerate
21726 The converter program itself.
21727  This program performs the conversion from the one format to the other (in
21728  this case, from the Noweb format to the Program pseudo-format).
21729 \end_layout
21730
21731 \begin_layout Enumerate
21732 The error log parser.
21733  This is a program whose sole purpose is to rewrite error messages in a
21734  format that LyX understands.
21735  This makes it possible for LyX to place error boxes in the right places
21736  in the file buffer.
21737 \end_layout
21738
21739 \begin_layout Standard
21740 The first part, the 
21741 \begin_inset Quotes eld
21742 \end_inset
21743
21744 Converter
21745 \begin_inset Quotes erd
21746 \end_inset
21747
21748  setting, should be set to 
21749 \begin_inset Quotes eld
21750 \end_inset
21751
21752
21753 \family typewriter
21754 build-script $$i
21755 \family default
21756
21757 \begin_inset Quotes erd
21758 \end_inset
21759
21760 .
21761  This basically means that LyX will call 
21762 \begin_inset Quotes eld
21763 \end_inset
21764
21765 build-script
21766 \begin_inset Quotes erd
21767 \end_inset
21768
21769  (a program or script) with the name of the Noweb file (normally a file
21770  in the LyX temp directory).
21771  
21772 \end_layout
21773
21774 \begin_layout Standard
21775 This is an implementation of 
21776 \begin_inset Quotes eld
21777 \end_inset
21778
21779 build-script
21780 \begin_inset Quotes erd
21781 \end_inset
21782
21783  that you can place in a directory on your path:
21784 \end_layout
21785
21786 \begin_layout LyX-Code
21787 #!/bin/sh
21788 \end_layout
21789
21790 \begin_layout LyX-Code
21791 #
21792 \end_layout
21793
21794 \begin_layout LyX-Code
21795 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21796 \end_layout
21797
21798 \begin_layout Standard
21799 The next part of the converter setting is the 
21800 \begin_inset Quotes eld
21801 \end_inset
21802
21803 Flags
21804 \begin_inset Quotes erd
21805 \end_inset
21806
21807  which is to be set to 
21808 \begin_inset Quotes eld
21809 \end_inset
21810
21811
21812 \family typewriter
21813 parselog=listerrors
21814 \family default
21815
21816 \begin_inset Quotes erd
21817 \end_inset
21818
21819 .
21820  This will run any errors that are generated by the 
21821 \begin_inset Quotes eld
21822 \end_inset
21823
21824 build-script
21825 \begin_inset Quotes erd
21826 \end_inset
21827
21828  process through the 
21829 \begin_inset Quotes eld
21830 \end_inset
21831
21832 listerrors
21833 \begin_inset Quotes erd
21834 \end_inset
21835
21836  program.
21837 \end_layout
21838
21839 \begin_layout Standard
21840 The converter code looks in 
21841 \emph on
21842 MYLYXDIR/scripts
21843 \emph default
21844  first, then in 
21845 \emph on
21846 LIBDIR/scripts
21847 \emph default
21848  then on the path for the 
21849 \begin_inset Quotes eld
21850 \end_inset
21851
21852 listerrors
21853 \begin_inset Quotes erd
21854 \end_inset
21855
21856  program.
21857 \end_layout
21858
21859 \begin_layout Standard
21860 The build will normally take place in LyX's temporary directory, so the
21861  files produced by the conversion will be in that directory.
21862  LyX will copy out what it regards as the `main' file, but the 
21863 \family typewriter
21864 Noweb->Program
21865 \family default
21866  conversion may produce several files, and so most of these would then be
21867  deleted when LyX was closed.
21868  The present solution is to use a `copier',
21869 \begin_inset Foot
21870 status collapsed
21871
21872 \begin_layout Plain Layout
21873 See section 
21874 \emph on
21875 Copiers
21876 \emph default
21877  of the 
21878 \emph on
21879 Customization
21880 \emph default
21881  manual for information on these.
21882 \end_layout
21883
21884 \end_inset
21885
21886  in this case, the 
21887 \family typewriter
21888 ext_copy.py
21889 \family default
21890  script in its default mode, so that the entire contents of the temporary
21891  directory is copied.
21892  More will get copied than is needed, to be sure, but nothing will be lost.
21893  If, however, you know what extensions the generated files will have, this
21894  can be improved by using the 
21895 \family typewriter
21896 -e
21897 \family default
21898  option to 
21899 \family typewriter
21900 ext_copy
21901 \family default
21902 .
21903  This option takes a comma-separated list of extensions to copy.
21904  So, for example, if the conversion will generate only files with the extensions
21905  
21906 \family typewriter
21907 .c
21908 \family default
21909  and 
21910 \family typewriter
21911 .h
21912 \family default
21913 , then the correct definition would be:
21914 \end_layout
21915
21916 \begin_layout LyX-Code
21917 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21918 \end_layout
21919
21920 \begin_layout Standard
21921 The result will be that only files with these two extensions will be copied
21922  out.
21923 \end_layout
21924
21925 \begin_layout Paragraph
21926 Build instructions in the document
21927 \end_layout
21928
21929 \begin_layout Standard
21930 The last piece of the integration between LyX and noweb is the 
21931 \begin_inset Quotes eld
21932 \end_inset
21933
21934 build-script
21935 \begin_inset Quotes erd
21936 \end_inset
21937
21938  scrap.
21939  Generally, the instructions for building your program should be embedded
21940  in a scrap of its own.
21941  The noweb-specific 
21942 \begin_inset Quotes eld
21943 \end_inset
21944
21945 build-script
21946 \begin_inset Quotes erd
21947 \end_inset
21948
21949  above uses the notangle command to look for this scrap (called 
21950 \begin_inset Quotes eld
21951 \end_inset
21952
21953 build-script
21954 \begin_inset Quotes erd
21955 \end_inset
21956
21957 ) and runs its contents through 
21958 \begin_inset Quotes eld
21959 \end_inset
21960
21961 sh
21962 \begin_inset Quotes erd
21963 \end_inset
21964
21965 .
21966 \end_layout
21967
21968 \begin_layout Standard
21969 Typically, such a scrap would look something like this:
21970 \end_layout
21971
21972 \begin_layout LyX-Code
21973 <<build-script>>=
21974 \begin_inset Newline newline
21975 \end_inset
21976
21977 #!/bin/sh
21978 \begin_inset Newline newline
21979 \end_inset
21980
21981
21982 \begin_inset Newline newline
21983 \end_inset
21984
21985 if [ -z "${NOWEB_SOURCE}" ]
21986 \begin_inset Newline newline
21987 \end_inset
21988
21989 then
21990 \begin_inset Newline newline
21991 \end_inset
21992
21993   NOWEB_SOURCE=myfile.nw
21994 \begin_inset Newline newline
21995 \end_inset
21996
21997 fi
21998 \begin_inset Newline newline
21999 \end_inset
22000
22001 [...
22002  code to extract files ...]
22003 \begin_inset Newline newline
22004 \end_inset
22005
22006 [...
22007  code to compile files ...]
22008 \begin_inset Newline newline
22009 \end_inset
22010
22011 @
22012 \end_layout
22013
22014 \begin_layout Standard
22015 Look in 
22016 \emph on
22017 LIBDIR/examples/listerrors.lyx
22018 \emph default
22019  or in 
22020 \emph on
22021 LIBDIR/examples/Literate.lyx
22022 \emph default
22023  which implement two versions of the 
22024 \begin_inset Quotes eld
22025 \end_inset
22026
22027 listerrors
22028 \begin_inset Quotes erd
22029 \end_inset
22030
22031  program for some illustrations of how all of these pieces go together or
22032  in 
22033 \emph on
22034 LIBDIR/examples/noweb2lyx.lyx.
22035
22036 \emph default
22037  Interestingly, these three files show off the language-indepence of the
22038  LyX literate programming support since they are written in Python, C and
22039  Perl respectively.
22040 \end_layout
22041
22042 \begin_layout Subsubsection
22043 Configuring LyX
22044 \end_layout
22045
22046 \begin_layout Standard
22047 All the Literate Programming support is configured by the 
22048 \family sans
22049 Tools\SpecialChar \menuseparator
22050 Preferences
22051 \family default
22052  panel in the 
22053 \begin_inset Quotes eld
22054 \end_inset
22055
22056 Conversion
22057 \begin_inset Quotes erd
22058 \end_inset
22059
22060  tab.
22061  The important parts are:
22062 \end_layout
22063
22064 \begin_layout Description
22065 the
22066 \begin_inset space ~
22067 \end_inset
22068
22069
22070 \begin_inset Quotes eld
22071 \end_inset
22072
22073 literate
22074 \begin_inset Quotes erd
22075 \end_inset
22076
22077
22078 \begin_inset space ~
22079 \end_inset
22080
22081 format Set up via the Formats tab, this is where the Noweb-specific pieces
22082  are set up.
22083  The 
22084 \family sans
22085 GUI Name
22086 \family default
22087  is set to 
22088 \family typewriter
22089 NoWeb
22090 \family default
22091 , the file extension is set to 
22092 \family typewriter
22093 .nw
22094 \family default
22095 .
22096  This tells LyX to create a file with a 
22097 \family typewriter
22098 .nw
22099 \family default
22100  extension in the first step of the conversion process.
22101 \end_layout
22102
22103 \begin_layout Description
22104 the
22105 \begin_inset space ~
22106 \end_inset
22107
22108
22109 \family sans
22110 Program
22111 \family default
22112
22113 \begin_inset space ~
22114 \end_inset
22115
22116 format This is an empty format whose sole purpose is to be the endpoint
22117  of a conversion (which then allows us to set up a converter for it).
22118 \end_layout
22119
22120 \begin_layout Description
22121
22122 \family sans
22123 NoWeb
22124 \family default
22125 ->
22126 \family sans
22127 LaTeX
22128 \family default
22129  This converter performs the 
22130 \begin_inset Quotes eld
22131 \end_inset
22132
22133 weaving
22134 \begin_inset Quotes erd
22135 \end_inset
22136
22137  of the literate document.
22138  For Noweb, it is set to 
22139 \begin_inset Quotes eld
22140 \end_inset
22141
22142
22143 \family typewriter
22144 noweave -delay -index $$i > $$o
22145 \family default
22146
22147 \begin_inset Quotes erd
22148 \end_inset
22149
22150
22151 \end_layout
22152
22153 \begin_layout Description
22154
22155 \family sans
22156 NoWeb
22157 \family default
22158 ->
22159 \family sans
22160 Program
22161 \family default
22162  This performs the 
22163 \begin_inset Quotes eld
22164 \end_inset
22165
22166 tangling step
22167 \begin_inset Quotes erd
22168 \end_inset
22169
22170 .
22171  As stated above, the Converter is set to 
22172 \begin_inset Quotes eld
22173 \end_inset
22174
22175
22176 \family typewriter
22177 build-script $$i
22178 \family default
22179
22180 \begin_inset Quotes erd
22181 \end_inset
22182
22183 , with Flags set to 
22184 \begin_inset Quotes eld
22185 \end_inset
22186
22187
22188 \family typewriter
22189 originaldir,parselog=listerrors
22190 \family default
22191
22192 \begin_inset Quotes erd
22193 \end_inset
22194
22195 .
22196 \end_layout
22197
22198 \begin_layout Subsubsection
22199 Debug extensions
22200 \end_layout
22201
22202 \begin_layout Standard
22203 There is also a new function implemented in the LyX server, the 
22204 \begin_inset Quotes eld
22205 \end_inset
22206
22207 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22208  
22209 \end_layout
22210
22211 \begin_layout Standard
22212 When debugging code with ddd/gdb, it is possible to invoke a text editor
22213  at the current execution position with a single key stroke.
22214  The default ddd configuration for that is shift-ctrl-V.
22215  It happens that you can define the editor command line invocation in ddd
22216  by accessing the 
22217 \family sans
22218 Edit\SpecialChar \menuseparator
22219 Preferences\SpecialChar \menuseparator
22220 Helpers
22221 \family default
22222  dialog and changing the "Edit Sources" entry.
22223 \end_layout
22224
22225 \begin_layout Standard
22226 I take advantage of the new created LyX server function and this ddd feature,
22227  and set 
22228 \begin_inset Quotes eld
22229 \end_inset
22230
22231 Edit Sources
22232 \begin_inset Quotes erd
22233 \end_inset
22234
22235  to:
22236 \end_layout
22237
22238 \begin_layout LyX-Code
22239 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22240 \end_layout
22241
22242 \begin_layout Standard
22243 With this, whenever you are using ddd and find a point in the program that
22244  you want to edit, you just press shift-ctrl-V (in the ddd window), and
22245  ddd you forward this information to LyX through the LyX server and then
22246  the LyX window will show the same file with the cursor at the same position
22247  ddd was pointing to.
22248  No more guessing or long scrolling to locate a point in the program back
22249  from debugging !
22250 \end_layout
22251
22252 \begin_layout Standard
22253 Note however that you must enable the LyX server to get this feature working
22254  (it is disabled by default).
22255  You can enable it in 
22256 \family sans
22257 Preferences
22258 \family default
22259  (tabs 
22260 \family sans
22261 Inputs
22262 \family default
22263
22264 \family sans
22265 Paths
22266 \family default
22267 ) by entering in the 
22268 \family sans
22269 LyXserver pipe
22270 \family default
22271  a path like 
22272 \begin_inset Quotes eld
22273 \end_inset
22274
22275
22276 \family typewriter
22277 /home/<your-home-directory>/.lyx/lyxpipe
22278 \family default
22279
22280 \begin_inset Quotes erd
22281 \end_inset
22282
22283
22284 \end_layout
22285
22286 \begin_layout Standard
22287 Read the LyX server documentation in the 
22288 \emph on
22289 Customization Manual
22290 \emph default
22291  for further information.
22292 \end_layout
22293
22294 \begin_layout Subsubsection
22295 Toolbar extensions
22296 \end_layout
22297
22298 \begin_layout Standard
22299 There are six new buttons that can be added to your LyX toolbar.
22300  Five of these buttons are short cuts to layout styles: 
22301 \family sans
22302 Standard
22303 \family default
22304
22305 \family sans
22306 Section
22307 \family default
22308
22309 \family sans
22310 LaTeX
22311 \family default
22312
22313 \family sans
22314 LyX-Code
22315 \family default
22316 , and 
22317 \family sans
22318 Scrap
22319 \family default
22320 .
22321  The last one is a short cut to the 
22322 \begin_inset Quotes eld
22323 \end_inset
22324
22325 Build Program
22326 \begin_inset Quotes erd
22327 \end_inset
22328
22329  File menu entry.
22330  
22331 \end_layout
22332
22333 \begin_layout Standard
22334 LyX has a range of buttons that are available for tool bar customization.
22335  In my toolbar I like to combine the six short cuts above with two more:
22336  One for 
22337 \family sans
22338 View
22339 \family default
22340 \SpecialChar \menuseparator
22341
22342 \family sans
22343 Update
22344 \family default
22345 \SpecialChar \menuseparator
22346
22347 \family sans
22348 DVI
22349 \family default
22350  and the other for 
22351 \family sans
22352 View\SpecialChar \menuseparator
22353 DVI
22354 \family default
22355  File menu entries.
22356  Here is how it looks like:
22357 \end_layout
22358
22359 \begin_layout LyX-Code
22360 Toolbar
22361 \end_layout
22362
22363 \begin_layout LyX-Code
22364   Layouts
22365 \end_layout
22366
22367 \begin_layout LyX-Code
22368   Icon "layout Standard"
22369 \end_layout
22370
22371 \begin_layout LyX-Code
22372   Icon "layout Section"
22373 \end_layout
22374
22375 \begin_layout LyX-Code
22376   Icon "layout LaTeX"
22377 \end_layout
22378
22379 \begin_layout LyX-Code
22380   Icon "layout LyX-Code"
22381 \end_layout
22382
22383 \begin_layout LyX-Code
22384   Icon "layout Scrap"
22385 \end_layout
22386
22387 \begin_layout LyX-Code
22388   Separator
22389 \end_layout
22390
22391 \begin_layout LyX-Code
22392   Icon "buffer-view"
22393 \end_layout
22394
22395 \begin_layout LyX-Code
22396   Icon "buffer-typeset"
22397 \end_layout
22398
22399 \begin_layout LyX-Code
22400   Icon "build-program"
22401 \end_layout
22402
22403 \begin_layout LyX-Code
22404   Separator
22405 \end_layout
22406
22407 \begin_layout LyX-Code
22408 .
22409 \end_layout
22410
22411 \begin_layout LyX-Code
22412 .
22413 \end_layout
22414
22415 \begin_layout LyX-Code
22416 .
22417 \end_layout
22418
22419 \begin_layout LyX-Code
22420 End
22421 \end_layout
22422
22423 \begin_layout Subsubsection
22424 Colors customization
22425 \end_layout
22426
22427 \begin_layout Standard
22428 There are a number of colors in LyX that can be customized in 
22429 \family sans
22430 Preferences
22431 \family default
22432 .
22433  One of the things that bothers people is the LaTeX font color.
22434  The default color is red, since the scraps uses LaTeX font, and there is
22435  a lot of scraps in literate documents, you may get tired of seeing everything
22436  in red.
22437  You can change it by going to the tabs 
22438 \family sans
22439 Look&Feel
22440 \family default
22441
22442 \family sans
22443 Colors.
22444 \end_layout
22445
22446 \begin_layout Standard
22447 The next thing is the visible presence of the newline character in the screen.
22448  You can choose the color of this particular character and make it blend
22449  in the background.
22450  I recommend you choosing a color that is close to the background but not
22451  equal, that way you still can see it is there, but it is not bothering
22452  you anymore.
22453  
22454 \end_layout
22455
22456 \begin_layout Chapter
22457 Secrets of the LaTeX Masters
22458 \begin_inset CommandInset label
22459 LatexCommand label
22460 name "cha:secrets"
22461
22462 \end_inset
22463
22464
22465 \end_layout
22466
22467 \begin_layout Standard
22468 Though LyX is a powerful tool, it cannot hope to support everything that
22469  can be done with pure TeX/LaTeX.
22470  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22471  as long as you are not afraid to use that 
22472 \begin_inset Quotes eld
22473 \end_inset
22474
22475 TeX
22476 \begin_inset Quotes erd
22477 \end_inset
22478
22479  button on the toolbar or add things to the LaTeX preamble.
22480  This section lists some tips, tricks, and otherwise cool ideas to give
22481  your document that extra little flair.
22482  
22483 \emph on
22484 Do try this at home
22485 \emph default
22486 , just start with something a little smaller and less important than your
22487  dissertation!
22488 \end_layout
22489
22490 \begin_layout Standard
22491 Most ideas in this section require less common files in your LaTeX installation.
22492  If you have a system like TeXLive, most will already be available.
22493  A few, however, will need to be downloaded from one of the CTAN archives.
22494  Often, there are several ways to do something, or several LaTeX style files
22495  which do the same thing.
22496  We do not endorse one choice over another, we simply claim that we have
22497  done a particular task with a particular file.
22498  Put on your wizard hat, keep an eye out for dragons, and let us begin.
22499 \end_layout
22500
22501 \begin_layout Section
22502 Multiple Columns
22503 \end_layout
22504
22505 \begin_layout Standard
22506 by 
22507 \noun on
22508 Lars Gullik Bjønnes
22509 \end_layout
22510
22511 \begin_layout Subsection
22512 Purpose
22513 \end_layout
22514
22515 \begin_layout Standard
22516 The aim for this chapter
22517 \begin_inset Foot
22518 status collapsed
22519
22520 \begin_layout Plain Layout
22521 Editor's note: Lars' original chapter was a masterful description of how
22522  to use the 
22523 \family typewriter
22524 multicol
22525 \family default
22526  package.
22527  However, it was too long to flow smoothly in this document.
22528  I have therefore chosen to excerpt the most important sections here (sorry,
22529  Lars); you can read the original chapter (and more of the story!) in the
22530  example file 
22531 \family typewriter
22532 examples/multicol.lyx
22533 \family default
22534 .
22535  — mer
22536 \end_layout
22537
22538 \end_inset
22539
22540  is to show how the LaTeX package 
22541 \family typewriter
22542 multicol
22543 \family default
22544  can be used in a LyX document.
22545  As LyX doesn't support the 
22546 \family typewriter
22547 multicol
22548 \family default
22549  package natively yet, we have to use some small hacks.
22550  By reading this section it should be obvious how to do this.
22551 \end_layout
22552
22553 \begin_layout Subsection
22554 Limitations 
22555 \end_layout
22556
22557 \begin_layout Standard
22558 The 
22559 \family typewriter
22560 multicol
22561 \family default
22562  package allows switching between one and multicolumn format on the same
22563  page.
22564  Footnotes are handled correctly (for the most part), but will be placed
22565  at the bottom of the page and not under each column.
22566  LaTeX's float mechanism, however, is partly disabled in the current implementat
22567 ion.
22568  At the moment only page-wide floats can be used within the scope of the
22569  environment.
22570 \end_layout
22571
22572 \begin_layout Subsection
22573 Examples
22574 \end_layout
22575
22576 \begin_layout Subsubsection
22577 Two columns
22578 \end_layout
22579
22580 \begin_layout Standard
22581 If you want to have two columns in your text, you have use LaTeX mode to
22582  insert 
22583 \family typewriter
22584
22585 \backslash
22586 begin{multicols}{2}
22587 \family default
22588  at the point where you want the two column layout to start, and then 
22589 \family typewriter
22590
22591 \backslash
22592 end{multicols}
22593 \family default
22594  where you want it to end.
22595  Like this:
22596 \end_layout
22597
22598 \begin_layout Standard
22599 \begin_inset ERT
22600 status open
22601
22602 \begin_layout Plain Layout
22603
22604
22605 \backslash
22606 begin{multicols}{2}
22607 \end_layout
22608
22609 \end_inset
22610
22611
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 Standard
22657 \begin_inset ERT
22658 status open
22659
22660 \begin_layout Plain Layout
22661
22662
22663 \backslash
22664 end{multicols}
22665 \end_layout
22666
22667 \end_inset
22668
22669
22670 \end_layout
22671
22672 \begin_layout Subsubsection
22673 Multiple columns
22674 \end_layout
22675
22676 \begin_layout Standard
22677 The same pattern is used when you want more than two columns:
22678 \end_layout
22679
22680 \begin_layout Standard
22681 \begin_inset ERT
22682 status open
22683
22684 \begin_layout Plain Layout
22685
22686
22687 \backslash
22688 begin{multicols}{3}
22689 \end_layout
22690
22691 \end_inset
22692
22693
22694 \end_layout
22695
22696 \begin_layout Standard
22697
22698 \size footnotesize
22699 It can be imagined that my close intimacy with Sherlock Holmes had interested
22700  me deeply in crime, and that after his disappearance I never failed to
22701  read with care the various problems which came before the public.
22702  And I even attempted, more than once, for my own private satisfaction,
22703  to employ his methods in their solution, though with indifferent success.
22704  There was none, however, which appealed to me like this tragedy of Ronald
22705  Adair.
22706  As I read the evidence at the inquest, which led up to a verdict of willful
22707  murder against some person or persons unknown, I realized more clearly
22708  than I had ever done the loss which the community had sustained by the
22709  death of Sherlock Holmes.
22710  There were points about this strange business which would, I was sure,
22711  have specially appealed to him, and the efforts of the police would have
22712  been supplemented, or more probably anticipated, by the trained observation
22713  and the alert mind of the first criminal agent in Europe.
22714  All day, as I drove upon my round, I turned over the case in my mind and
22715  found no explanation which appeared to me to be adequate.
22716  At the risk of telling a twice-told tale, I will recapitulate the facts
22717  as they were known to the public at the conclusion of the inquest.
22718 \end_layout
22719
22720 \begin_layout Standard
22721 \begin_inset ERT
22722 status open
22723
22724 \begin_layout Plain Layout
22725
22726
22727 \backslash
22728 end{multicols}
22729 \end_layout
22730
22731 \end_inset
22732
22733
22734 \end_layout
22735
22736 \begin_layout Standard
22737 You can have more than 3 columns if you want to, but that might not be very
22738  pleasant for the eye.
22739 \end_layout
22740
22741 \begin_layout Subsubsection
22742 Columns inside columns
22743 \end_layout
22744
22745 \begin_layout Standard
22746 You can even have columns inside columns:
22747 \end_layout
22748
22749 \begin_layout Standard
22750 \begin_inset ERT
22751 status open
22752
22753 \begin_layout Plain Layout
22754
22755
22756 \backslash
22757 begin{multicols}{2}
22758 \end_layout
22759
22760 \end_inset
22761
22762
22763 \end_layout
22764
22765 \begin_layout Standard
22766
22767 \size footnotesize
22768 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22769  at that time governor of one of the Australian colonies.
22770  Adair's mother had returned from Australia to undergo the operation for
22771  cataract, and she, her son Ronald, and her daughter Hilda were living together
22772  at 427 Park Lane.
22773 \end_layout
22774
22775 \begin_layout Standard
22776 \begin_inset ERT
22777 status open
22778
22779 \begin_layout Plain Layout
22780
22781
22782 \backslash
22783 begin{multicols}{2}
22784 \end_layout
22785
22786 \end_inset
22787
22788
22789 \end_layout
22790
22791 \begin_layout Standard
22792
22793 \size footnotesize
22794 The youth moved in the best society–had, so far as was known, no enemies
22795  and no particular vices.
22796  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22797  had been broken off by mutual consent some months before, and there was
22798  no sign that it had left any very profound feeling behind it.
22799  For the rest {sic} the man's life moved in a narrow and conventional circle,
22800  for his habits were quiet and his nature unemotional.
22801  Yet it was upon this easy-going young aristocrat that death came, in most
22802  strange and unexpected form, between the hours of ten and eleven-twenty
22803  on the night of March 30, 1894.
22804 \end_layout
22805
22806 \begin_layout Standard
22807 \begin_inset ERT
22808 status open
22809
22810 \begin_layout Plain Layout
22811
22812
22813 \backslash
22814 end{multicols}
22815 \end_layout
22816
22817 \end_inset
22818
22819
22820 \end_layout
22821
22822 \begin_layout Standard
22823
22824 \size footnotesize
22825 Ronald Adair was fond of cards–playing continually, but never for such stakes
22826  as would hurt him.
22827  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22828  It was shown that, after dinner on the day of his death, he had played
22829  a rubber of whist at the latter club.
22830  He had also played there in the afternoon.
22831
22832 \size default
22833  
22834 \size footnotesize
22835 The evidence of those who had played with him– Mr.
22836  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22837  and that there was a fairly equal fall of the cards.
22838  Adair might have lost five pounds, but not more.
22839  His fortune was a considerable one, and such a loss could not in any way
22840  affect him.
22841  He had played nearly every day at one club or other, but he was a cautious
22842  player, and usually rose a winner.
22843  It came out in evidence that, in partnership with Colonel Moran, he had
22844  actually won as much as four hundred and twenty pounds in a sitting, some
22845  weeks before, from Godfrey Milner and Lord Balmoral.
22846  So much for his recent history as it came out at the inquest.
22847 \end_layout
22848
22849 \begin_layout Standard
22850 \begin_inset ERT
22851 status open
22852
22853 \begin_layout Plain Layout
22854
22855
22856 \backslash
22857 end{multicols}
22858 \end_layout
22859
22860 \end_inset
22861
22862
22863 \end_layout
22864
22865 \begin_layout Standard
22866 Please do read the file 
22867 \family typewriter
22868 examples/multicol.lyx
22869 \family default
22870  for more advanced examples including column and header spacing, vertical
22871  separator lines, and more.
22872 \end_layout
22873
22874 \begin_layout Section
22875 Numbering in the 
22876 \family sans
22877 Enumerate
22878 \family default
22879  Paragraph Environment
22880 \begin_inset Argument
22881 status collapsed
22882
22883 \begin_layout Plain Layout
22884 Numbering in Enumerate
22885 \end_layout
22886
22887 \end_inset
22888
22889
22890 \end_layout
22891
22892 \begin_layout Standard
22893 by 
22894 \noun on
22895 John Weiss
22896 \end_layout
22897
22898 \begin_layout Standard
22899 \begin_inset VSpace bigskip
22900 \end_inset
22901
22902
22903 \end_layout
22904
22905 \begin_layout Standard
22906 \noindent
22907 The default numbering for the 
22908 \family sans
22909 Enumerate
22910 \family default
22911  paragraph environment begins with Arabic numbers and ends with uppercase
22912  letters.
22913  Suppose, however, you wanted a different type of numbering scheme.
22914  Here's a quickie example of how to change the numbering scheme:
22915 \end_layout
22916
22917 \begin_layout LyX-Code
22918
22919 \backslash
22920 renewcommand{
22921 \backslash
22922 labelenumi}{
22923 \backslash
22924 Roman{enumi}.}
22925 \end_layout
22926
22927 \begin_layout LyX-Code
22928
22929 \backslash
22930 renewcommand{
22931 \backslash
22932 labelenumii}{
22933 \backslash
22934 Alph{enumii}.}
22935 \end_layout
22936
22937 \begin_layout LyX-Code
22938
22939 \backslash
22940 renewcommand{
22941 \backslash
22942 labelenumiii}{
22943 \backslash
22944 arabic{enumiii}.}
22945 \end_layout
22946
22947 \begin_layout LyX-Code
22948
22949 \backslash
22950 renewcommand{
22951 \backslash
22952 labelenumiv}{
22953 \backslash
22954 alph{enumiv}.)}
22955 \end_layout
22956
22957 \begin_layout Standard
22958 \SpecialChar \ldots{}
22959  which changes the numbering scheme to uppercase Roman numerals, uppercase
22960  letters, Arabic numbers, and lowercase letter.
22961 \end_layout
22962
22963 \begin_layout Standard
22964 Additionally, the previous example also adds a little bit extra to the numbering
22965  scheme.
22966  For example, the first level label actually looks like: 
22967 \begin_inset Quotes eld
22968 \end_inset
22969
22970 I.
22971 \begin_inset Quotes erd
22972 \end_inset
22973
22974 .
22975  For ease of reading, we'll describe what the numbering schemes look like
22976  using a notation something like this: <
22977 \begin_inset Quotes eld
22978 \end_inset
22979
22980 I.
22981 \begin_inset Quotes erd
22982 \end_inset
22983
22984 ,
22985 \begin_inset space ~
22986 \end_inset
22987
22988
22989 \begin_inset Quotes erd
22990 \end_inset
22991
22992 A.
22993 \begin_inset Quotes erd
22994 \end_inset
22995
22996 ,
22997 \begin_inset space ~
22998 \end_inset
22999
23000
23001 \begin_inset Quotes erd
23002 \end_inset
23003
23004 1.
23005 \begin_inset Quotes erd
23006 \end_inset
23007
23008 ,
23009 \begin_inset space ~
23010 \end_inset
23011
23012
23013 \begin_inset Quotes eld
23014 \end_inset
23015
23016 a.)
23017 \begin_inset Quotes erd
23018 \end_inset
23019
23020 >.
23021  
23022 \end_layout
23023
23024 \begin_layout Standard
23025 As you can see in the example, there is a label command for each nesting
23026  level, 
23027 \family typewriter
23028
23029 \backslash
23030 labelenumi
23031 \family default
23032  \SpecialChar \ldots{}
23033  
23034 \family typewriter
23035
23036 \backslash
23037 labelenumiv
23038 \family default
23039 , as well as a counter, 
23040 \family typewriter
23041 enumi
23042 \family default
23043  \SpecialChar \ldots{}
23044  
23045 \family typewriter
23046 enumiv
23047 \family default
23048 .
23049  There are also five 
23050 \begin_inset Quotes eld
23051 \end_inset
23052
23053 number printing
23054 \begin_inset Quotes erd
23055 \end_inset
23056
23057  commands, 
23058 \family typewriter
23059
23060 \backslash
23061 arabic{}
23062 \family default
23063
23064 \family typewriter
23065
23066 \backslash
23067 roman{}
23068 \family default
23069
23070 \family typewriter
23071
23072 \backslash
23073 Roman{}
23074 \family default
23075
23076 \family typewriter
23077
23078 \backslash
23079 alph{}
23080 \family default
23081 , and 
23082 \family typewriter
23083
23084 \backslash
23085 Alph{}
23086 \family default
23087 , each of which take one counter as an argument.
23088  You can add characters before or after these, but there's no need to add
23089  spaces.
23090 \end_layout
23091
23092 \begin_layout Standard
23093 You can get really fancy with these.
23094  For example:
23095 \end_layout
23096
23097 \begin_layout LyX-Code
23098
23099 \backslash
23100 renewcommand{
23101 \backslash
23102 labelenumi}{
23103 \backslash
23104 #
23105 \backslash
23106 Alph{enumi}
23107 \backslash
23108 #}
23109 \end_layout
23110
23111 \begin_layout LyX-Code
23112
23113 \backslash
23114 renewcommand{
23115 \backslash
23116 labelenumii}{
23117 \backslash
23118 Alph{enumi}.
23119 \backslash
23120 arabic{enumii}}
23121 \end_layout
23122
23123 \begin_layout LyX-Code
23124
23125 \backslash
23126 renewcommand{
23127 \backslash
23128 labelenumiii}{
23129 \backslash
23130 alph{enumiii}+}
23131 \end_layout
23132
23133 \begin_layout LyX-Code
23134
23135 \backslash
23136 renewcommand{
23137 \backslash
23138 labelenumiv}{(
23139 \backslash
23140 roman{enumiv})}
23141 \end_layout
23142
23143 \begin_layout Standard
23144 produces the somewhat out of hand numbering scheme: <
23145 \begin_inset Quotes eld
23146 \end_inset
23147
23148 #A#
23149 \begin_inset Quotes erd
23150 \end_inset
23151
23152 ,
23153 \begin_inset space ~
23154 \end_inset
23155
23156
23157 \begin_inset Quotes erd
23158 \end_inset
23159
23160 A.1
23161 \begin_inset Quotes erd
23162 \end_inset
23163
23164 ,
23165 \begin_inset space ~
23166 \end_inset
23167
23168
23169 \begin_inset Quotes erd
23170 \end_inset
23171
23172 a+
23173 \begin_inset Quotes erd
23174 \end_inset
23175
23176 ,
23177 \begin_inset space ~
23178 \end_inset
23179
23180
23181 \begin_inset Quotes eld
23182 \end_inset
23183
23184 (i)
23185 \begin_inset Quotes erd
23186 \end_inset
23187
23188 >.
23189  
23190 \end_layout
23191
23192 \begin_layout Section
23193 Dropped Capitals
23194 \end_layout
23195
23196 \begin_layout Standard
23197 by 
23198 \noun on
23199 Mike Ressler
23200 \end_layout
23201
23202 \begin_layout Standard
23203 \begin_inset VSpace bigskip
23204 \end_inset
23205
23206
23207 \end_layout
23208
23209 \begin_layout Standard
23210 \noindent
23211 \begin_inset ERT
23212 status collapsed
23213
23214 \begin_layout Plain Layout
23215
23216
23217 \backslash
23218 newfont{
23219 \backslash
23220 tmpfont}{cmr17 scaled 2500}{
23221 \backslash
23222 tmpfont T}
23223 \backslash
23224 vspace*{-8.4ex}
23225 \end_layout
23226
23227 \end_inset
23228
23229
23230 \end_layout
23231
23232 \begin_layout Standard
23233 \noindent
23234 \begin_inset ERT
23235 status open
23236
23237 \begin_layout Plain Layout
23238
23239
23240 \backslash
23241 hangindent=3.3em 
23242 \backslash
23243 hangafter=-3
23244 \end_layout
23245
23246 \end_inset
23247
23248  hose of you who like the style of old books probably also like 
23249 \begin_inset Quotes eld
23250 \end_inset
23251
23252 dropped capitals
23253 \begin_inset Quotes erd
23254 \end_inset
23255
23256 —those large capital letters which begin each new chapter or section.
23257  Implementing them with plain LyX/LaTeX is straightforward (assuming you
23258  know some plain TeX!) but does require a lot of work and many iterations,
23259  as you can see by all the ugly TeX-mode stuff at the beginning of this
23260  paragraph.
23261 \end_layout
23262
23263 \begin_layout Standard
23264 \begin_inset ERT
23265 status open
23266
23267 \begin_layout Plain Layout
23268
23269
23270 \backslash
23271 verb+
23272 \backslash
23273 bigdrop{-1em}{3}{ptmri}{T}+
23274 \end_layout
23275
23276 \end_inset
23277
23278 here is a much easier way of doing this, of course.
23279  The 
23280 \family typewriter
23281 dropcaps
23282 \family default
23283  (or the newer 
23284 \family typewriter
23285 dropping
23286 \family default
23287 ) package from CTAN allows a simple way to add such letters to your documents.
23288  Since this package is not a standard part of TeXLive, I can't demonstrate
23289  it within this document, but if you copy this paragraph to a new document,
23290  delete the 
23291 \begin_inset Quotes eld
23292 \end_inset
23293
23294
23295 \family typewriter
23296
23297 \backslash
23298 verb
23299 \family default
23300
23301 \begin_inset Quotes erd
23302 \end_inset
23303
23304  and the pluses from the TeX code at the beginning of the paragraph, and
23305  add 
23306 \family typewriter
23307
23308 \backslash
23309 usepackage{dropcaps}
23310 \family default
23311  to your LaTeX preamble, you will get a nice Times Roman Italic 
23312 \begin_inset Quotes eld
23313 \end_inset
23314
23315 T
23316 \begin_inset Quotes erd
23317 \end_inset
23318
23319 , whose height is three lines of text and which protrudes 1 em into the
23320  margin.
23321  (Make certain you have copied 
23322 \begin_inset Quotes eld
23323 \end_inset
23324
23325
23326 \family typewriter
23327 dropcaps.sty
23328 \family default
23329
23330 \begin_inset Quotes erd
23331 \end_inset
23332
23333  into a directory where TeX can see it.) The first argument is the amount
23334  of indentation; in this case the negative sign moves it into the margin.
23335  The second argument is the height of the letter in number of lines of text.
23336  The third argument is the font name: virtually anything which has a tfm
23337  file should work (wade through the 
23338 \family typewriter
23339 .../texmf/fonts/tfm
23340 \family default
23341  directory for possibilities).
23342  My personal favorite is 
23343 \begin_inset Quotes eld
23344 \end_inset
23345
23346
23347 \family typewriter
23348 yinit
23349 \family default
23350
23351 \begin_inset Quotes erd
23352 \end_inset
23353
23354 , a fancy German font specifically designed for dropped capitals.
23355  The fourth argument is the letter (or letters) to be dropped.
23356  The 
23357 \family typewriter
23358 dropping
23359 \family default
23360  package also offers the 
23361 \family typewriter
23362
23363 \backslash
23364 bigdrop
23365 \family default
23366  command, as well as a slightly simplified 
23367 \family typewriter
23368
23369 \backslash
23370 dropping
23371 \family default
23372  command.
23373 \end_layout
23374
23375 \begin_layout Section
23376 Non-standard Paragraph Shapes
23377 \end_layout
23378
23379 \begin_layout Standard
23380 by 
23381 \noun on
23382 Mike Ressler
23383 \end_layout
23384
23385 \begin_layout Standard
23386 \begin_inset VSpace bigskip
23387 \end_inset
23388
23389
23390 \end_layout
23391
23392 \begin_layout Standard
23393 \begin_inset ERT
23394 status collapsed
23395
23396 \begin_layout Plain Layout
23397
23398
23399 \backslash
23400 begin{sloppypar}
23401 \end_layout
23402
23403 \end_inset
23404
23405
23406 \end_layout
23407
23408 \begin_layout Standard
23409 \begin_inset ERT
23410 status collapsed
23411
23412 \begin_layout Plain Layout
23413
23414
23415 \backslash
23416 newdimen
23417 \backslash
23418 varunit 
23419 \end_layout
23420
23421 \begin_layout Plain Layout
23422
23423
23424 \backslash
23425 setlength{
23426 \backslash
23427 varunit}{4.5in}
23428 \end_layout
23429
23430 \end_inset
23431
23432
23433 \end_layout
23434
23435 \begin_layout Standard
23436 \noindent
23437 \begin_inset ERT
23438 status collapsed
23439
23440 \begin_layout Plain Layout
23441
23442
23443 \backslash
23444 parshape 19 0.45
23445 \backslash
23446 varunit 0.332
23447 \backslash
23448 varunit
23449 \end_layout
23450
23451 \begin_layout Plain Layout
23452
23453 0.40
23454 \backslash
23455 varunit 0.300
23456 \backslash
23457 varunit
23458 \end_layout
23459
23460 \begin_layout Plain Layout
23461
23462 0.35
23463 \backslash
23464 varunit 0.293
23465 \backslash
23466 varunit
23467 \end_layout
23468
23469 \begin_layout Plain Layout
23470
23471 0.30
23472 \backslash
23473 varunit 0.300
23474 \backslash
23475 varunit
23476 \end_layout
23477
23478 \begin_layout Plain Layout
23479
23480 0.25
23481 \backslash
23482 varunit 0.317
23483 \backslash
23484 varunit
23485 \end_layout
23486
23487 \begin_layout Plain Layout
23488
23489 0.20
23490 \backslash
23491 varunit 0.342
23492 \backslash
23493 varunit
23494 \end_layout
23495
23496 \begin_layout Plain Layout
23497
23498 0.15
23499 \backslash
23500 varunit 0.373
23501 \backslash
23502 varunit
23503 \end_layout
23504
23505 \begin_layout Plain Layout
23506
23507 0.10
23508 \backslash
23509 varunit 0.410
23510 \backslash
23511 varunit
23512 \end_layout
23513
23514 \begin_layout Plain Layout
23515
23516 0.05
23517 \backslash
23518 varunit 0.453
23519 \backslash
23520 varunit
23521 \end_layout
23522
23523 \begin_layout Plain Layout
23524
23525 0.00
23526 \backslash
23527 varunit 0.500
23528 \backslash
23529 varunit
23530 \end_layout
23531
23532 \begin_layout Plain Layout
23533
23534 0.05
23535 \backslash
23536 varunit 0.453
23537 \backslash
23538 varunit
23539 \end_layout
23540
23541 \begin_layout Plain Layout
23542
23543 0.10
23544 \backslash
23545 varunit 0.410
23546 \backslash
23547 varunit
23548 \end_layout
23549
23550 \begin_layout Plain Layout
23551
23552 0.15
23553 \backslash
23554 varunit 0.373
23555 \backslash
23556 varunit
23557 \end_layout
23558
23559 \begin_layout Plain Layout
23560
23561 0.20
23562 \backslash
23563 varunit 0.342
23564 \backslash
23565 varunit
23566 \end_layout
23567
23568 \begin_layout Plain Layout
23569
23570 0.25
23571 \backslash
23572 varunit 0.317
23573 \backslash
23574 varunit
23575 \end_layout
23576
23577 \begin_layout Plain Layout
23578
23579 0.30
23580 \backslash
23581 varunit 0.300
23582 \backslash
23583 varunit
23584 \end_layout
23585
23586 \begin_layout Plain Layout
23587
23588 0.35
23589 \backslash
23590 varunit 0.293
23591 \backslash
23592 varunit
23593 \end_layout
23594
23595 \begin_layout Plain Layout
23596
23597 0.40
23598 \backslash
23599 varunit 0.300
23600 \backslash
23601 varunit
23602 \end_layout
23603
23604 \begin_layout Plain Layout
23605
23606 0.45
23607 \backslash
23608 varunit 0.332
23609 \backslash
23610 varunit
23611 \end_layout
23612
23613 \begin_layout Plain Layout
23614
23615 \end_layout
23616
23617 \end_inset
23618
23619 There are times when the tyranny of rectangular paragraphs must be overthrown.
23620  In such situations, a call to the delightful plain TeX command 
23621 \family typewriter
23622
23623 \backslash
23624 parshape
23625 \family default
23626  is called for.
23627  As you can see, completely arbitrary shapes can be laid out with a suitable
23628  set of linelength definitions.
23629  While this parshape may look a bit silly and useless, one could conceive
23630  of situations such as finely tuned dropped capitals, word wrapping around
23631  non-rectangular graphics, etc.
23632  which will benefit from such handcrafting.
23633 \end_layout
23634
23635 \begin_layout Standard
23636 \begin_inset VSpace bigskip
23637 \end_inset
23638
23639
23640 \end_layout
23641
23642 \begin_layout Standard
23643 The syntax is 
23644 \family typewriter
23645
23646 \backslash
23647 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23648  #nindent #nlength
23649 \family default
23650 , where 
23651 \family typewriter
23652 numlines
23653 \family default
23654  is the number of lines of text which define the paragraph.
23655  If there turn out to be fewer lines, the shape is truncated; if there are
23656  more, the excess lines have the same dimensions as the last line of the
23657  definition.
23658  The 
23659 \family typewriter
23660 #nindent
23661 \family default
23662  and 
23663 \family typewriter
23664 #nlength
23665 \family default
23666  entries specify the indentation of the line from the left margin, and the
23667  length of the line as measured from that point.
23668  The shape applies only to the current paragraph; everything is reset to
23669  normal for the next paragraph.
23670 \end_layout
23671
23672 \begin_layout Standard
23673 \begin_inset ERT
23674 status collapsed
23675
23676 \begin_layout Plain Layout
23677
23678
23679 \backslash
23680 end{sloppypar}
23681 \end_layout
23682
23683 \end_inset
23684
23685
23686 \end_layout
23687
23688 \begin_layout Section
23689 Summary
23690 \end_layout
23691
23692 \begin_layout Standard
23693 As you can see, the examples in this section range from the useful to the
23694  whimsical.
23695  While I don't expect that anyone will ever need the paragraph shape demonstrate
23696 d in the last section, the important point is that you can do almost anything
23697  you want in LyX if you are willing to figure out how to do it in TeX and
23698  LaTeX.
23699  TeX is a fantastically powerful typesetting system and all that power is
23700  available to you since LyX uses it as its backend.
23701  Happy LyXing!
23702 \end_layout
23703
23704 \end_body
23705 \end_document