]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
Manual synchro with branch
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
2 \lyxformat 404
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 \inputencoding latin1
72 \fontencoding global
73 \font_roman default
74 \font_sans default
75 \font_typewriter default
76 \font_default_family default
77 \use_xetex false
78 \font_sc false
79 \font_osf false
80 \font_sf_scale 100
81 \font_tt_scale 100
82
83 \graphics default
84 \default_output_format default
85 \output_sync 0
86 \bibtex_command default
87 \index_command default
88 \paperfontsize 12
89 \spacing single
90 \use_hyperref true
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
95 \pdf_bookmarks true
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
99 \pdf_breaklinks false
100 \pdf_pdfborder false
101 \pdf_colorlinks true
102 \pdf_backref false
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,  pdfpagelayout=OneColumn, pdfnewwindow=true,  pdfstartview=XYZ, plainpages=false, pdfpagelabels"
105 \papersize default
106 \use_geometry false
107 \use_amsmath 0
108 \use_esint 0
109 \use_mhchem 1
110 \use_mathdots 1
111 \cite_engine basic
112 \use_bibtopic false
113 \use_indices false
114 \paperorientation portrait
115 \suppress_date false
116 \use_refstyle 0
117 \index Index
118 \shortcut idx
119 \color #008000
120 \end_index
121 \secnumdepth 3
122 \tocdepth 3
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
126 \papercolumns 1
127 \papersides 2
128 \paperpagestyle headings
129 \tracking_changes false
130 \output_changes false
131 \html_math_output 0
132 \html_be_strict true
133 \author 1 "ab" 
134 \author 2 "bbb" 
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  solves some of these problems.
4264  In particular, its rendering of math tends to look better than 
4265 \begin_inset Flex Code
4266 status collapsed
4267
4268 \begin_layout Plain Layout
4269 htlatex
4270 \end_layout
4271
4272 \end_inset
4273
4274 's, at least in simpler cases, since it renders math using a combination
4275  of HTML and CSS rather than converting the formulae to images.
4276  But more complex formula tend to be rendered less well than with 
4277 \begin_inset Flex Code
4278 status collapsed
4279
4280 \begin_layout Plain Layout
4281 htlatex
4282 \end_layout
4283
4284 \end_inset
4285
4286 , since there is no reasonable way of scaling parentheses in HTML, for example.
4287  More importantly (as of version 0.39, at least), 
4288 \begin_inset Flex Code
4289 status collapsed
4290
4291 \begin_layout Plain Layout
4292 eLyXer
4293 \end_layout
4294
4295 \end_inset
4296
4297  has no support for math macros, for user-defined paragraph or character
4298  styles, or for tables of contents and figures, and its treatment of cross-refer
4299 ences is minimal.
4300  These limitations make 
4301 \begin_inset Flex Code
4302 status collapsed
4303
4304 \begin_layout Plain Layout
4305 eLyXer
4306 \end_layout
4307
4308 \end_inset
4309
4310  unsuitable for many of the documents more advanced LyX users would produce.
4311  In principle, of course, all of these problems could be solved, but the
4312  LyX developers have decided to follow a different path and have made LyX
4313  itself capable of writing XHTML, just as it is capable of writing LaTeX,
4314  DocBook, and plaintext.
4315 \end_layout
4316
4317 \begin_layout Standard
4318 As of this writing, XHTML output remains under development and should probably
4319  be regarded as 
4320 \begin_inset Quotes eld
4321 \end_inset
4322
4323 experimental
4324 \begin_inset Quotes erd
4325 \end_inset
4326
4327 .
4328 \begin_inset Foot
4329 status collapsed
4330
4331 \begin_layout Plain Layout
4332 The file 
4333 \begin_inset Flex Code
4334 status collapsed
4335
4336 \begin_layout Plain Layout
4337 development/HTML.notes
4338 \end_layout
4339
4340 \end_inset
4341
4342 , which can be found in the LyX source tree or 
4343 \begin_inset CommandInset href
4344 LatexCommand href
4345 name "accessed online"
4346 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4347
4348 \end_inset
4349
4350 , usually contains up-to-date information about the state of XHTML output.
4351 \end_layout
4352
4353 \end_inset
4354
4355  Still, the developers have chosen this approach because it has several
4356  potential advantages over the other two.
4357 \end_layout
4358
4359 \begin_layout Standard
4360 These advantages are primarily due to the fact that the XHTML output routines,
4361  since they are part of LyX, know everything LyX knows about the document
4362  being exported.
4363 \begin_inset Foot
4364 status collapsed
4365
4366 \begin_layout Plain Layout
4367 Another advantege is that, since these routines are internal to LyX, they
4368  are immune to changes in LyX's file format, or to changes in the semantics
4369  of existing insets.
4370 \end_layout
4371
4372 \end_inset
4373
4374  So they know about the table of contents (as displayed in the outline),
4375  about the counters associated with different paragraph styles, and about
4376  user-defined styles.
4377  The XHTML output routines know what LyX knows about internationalization,
4378  too, so they will output 
4379 \begin_inset Quotes eld
4380 \end_inset
4381
4382 Chapter 1
4383 \begin_inset Quotes erd
4384 \end_inset
4385
4386  or 
4387 \begin_inset Quotes eld
4388 \end_inset
4389
4390
4391 \lang ngerman
4392 Kapitel
4393 \lang english
4394  1
4395 \begin_inset Quotes erd
4396 \end_inset
4397
4398 , depending upon the language in effect at the time.
4399  
4400 \end_layout
4401
4402 \begin_layout Standard
4403 Quite generally, the output routines know everything LyX knows about document
4404  layout, that is, about how the document is to be rendered on screen.
4405  We use this information when we output the document as XHTML.
4406  In particular, LyX 
4407 \emph on
4408 automatically
4409 \emph default
4410  generates CSS style information corresponding to the layout information
4411  it uses to render the document on screen: if section headings are supposed
4412  to be sans-serif and bold as seen in LyX, then (by default) they will be
4413  sans-serif and bold when viewed in a web browser, too.
4414  And this is true not just for pre-defined styles, like Section, but for
4415  any style, including user-defined styles.
4416  Indeed, the XHTML output routines make no distinction between user-defined
4417  paragraph and character styles and LyX's own pre-defined styles: in each
4418  case, everything LyX knows about the styles is contained in the layout
4419  files.
4420  And much the same is true as regards pre-defined textual insets, such as
4421  footnotes, and various custom insets.
4422  
4423 \end_layout
4424
4425 \begin_layout Standard
4426 The result is that XHTML output can be customized and extended in 
4427 \emph on
4428 exactly
4429 \emph default
4430  the same way LaTeX output can be customized and extended: through layout
4431  files and modules.
4432  See chapter five of the 
4433 \emph on
4434 Customization 
4435 \emph default
4436 manual for the details.
4437 \end_layout
4438
4439 \begin_layout Standard
4440 The remainder of this chapter contains more detailed information on XHTML
4441  output, its limitations, and ways to work around those limitations.
4442 \end_layout
4443
4444 \begin_layout Section
4445 Math Output in XHTML
4446 \end_layout
4447
4448 \begin_layout Standard
4449 LyX offers four choices for how math is rendered.
4450  These have various advantages and disadvantages:
4451 \end_layout
4452
4453 \begin_layout Itemize
4454 MathML
4455 \begin_inset Newline newline
4456 \end_inset
4457
4458 MathML is a dialect of XML designed specifically for mathematics on the
4459  web, and it typically renders very well in browsers that support it.
4460  The disadvantage is that not all browsers support MathML, and support is
4461  not complete even in the Gecko-based browsers, such as Firefox.
4462 \begin_inset Newline newline
4463 \end_inset
4464
4465 If Lyx is unable to render a formula as MathML---for example, if the formula
4466  uses the 
4467 \begin_inset Flex Code
4468 status collapsed
4469
4470 \begin_layout Plain Layout
4471 xymatrix
4472 \end_layout
4473
4474 \end_inset
4475
4476  package or ERT---then it will instead output the formula as an image.
4477  
4478 \end_layout
4479
4480 \begin_layout Itemize
4481 HTML
4482 \begin_inset Newline newline
4483 \end_inset
4484
4485 As mentioned above, 
4486 \begin_inset Flex Code
4487 status collapsed
4488
4489 \begin_layout Plain Layout
4490 elyxer
4491 \end_layout
4492
4493 \end_inset
4494
4495  outputs math as HTML, styled by CSS.
4496 \begin_inset Foot
4497 status collapsed
4498
4499 \begin_layout Plain Layout
4500 LyX has borrowed some of the CSS for its HTML output from 
4501 \begin_inset Flex Code
4502 status collapsed
4503
4504 \begin_layout Plain Layout
4505 elyxer
4506 \end_layout
4507
4508 \end_inset
4509
4510 .
4511 \end_layout
4512
4513 \end_inset
4514
4515  For simple formulae, this can work quite well, though with more complicated
4516  formulae it tends to break down.
4517  Still, this method has the advantage that it is very widely supported and
4518  so it may be appropriate for documents that contain only a little, fairly
4519  simple math.
4520 \begin_inset Newline newline
4521 \end_inset
4522
4523 If Lyx is unable to render a formula as MathML---for example, if the formula
4524  uses the 
4525 \begin_inset Flex Code
4526 status collapsed
4527
4528 \begin_layout Plain Layout
4529 xymatrix
4530 \end_layout
4531
4532 \end_inset
4533
4534  package or ERT---then it will instead output the formula as an image.
4535  
4536 \end_layout
4537
4538 \begin_layout Itemize
4539 Images
4540 \begin_inset Newline newline
4541 \end_inset
4542
4543 Like 
4544 \begin_inset Flex Code
4545 status collapsed
4546
4547 \begin_layout Plain Layout
4548 htlatex
4549 \end_layout
4550
4551 \end_inset
4552
4553 , LyX will output formulae as images, the very same images, in fact, that
4554  are used for instant preview.
4555 \begin_inset Foot
4556 status collapsed
4557
4558 \begin_layout Plain Layout
4559 Instant preview does 
4560 \emph on
4561 not 
4562 \emph default
4563 have to be on for images to be output, however.
4564 \end_layout
4565
4566 \end_inset
4567
4568  The advantage to this method is that the images are simply generated by
4569  LaTeX, so they are very accurate.
4570  The disadvantage, as mentioned earlier, is that these are bitmapped images,
4571  so they do not scale terribly well, and one cannot copy them, etc.
4572 \begin_inset Newline newline
4573 \end_inset
4574
4575 The size of the images can be controlled by setting the 
4576 \begin_inset Quotes eld
4577 \end_inset
4578
4579 Math Images Scaling
4580 \begin_inset Quotes erd
4581 \end_inset
4582
4583  parameter under 
4584 \begin_inset Flex MenuItem
4585 status collapsed
4586
4587 \begin_layout Plain Layout
4588 Document\SpecialChar \menuseparator
4589 Settings\SpecialChar \menuseparator
4590 Output
4591 \end_layout
4592
4593 \end_inset
4594
4595 .
4596 \begin_inset Foot
4597 status collapsed
4598
4599 \begin_layout Plain Layout
4600 For those who want to know, this controls the resolution of the image in
4601  dots per inch and is based upon a default of 75 dpi.
4602 \end_layout
4603
4604 \end_inset
4605
4606
4607 \begin_inset Newline newline
4608 \end_inset
4609
4610 If LyX for some reason fails to create an image for a formula (e.g., if a
4611  required LaTeX package is not installed), then it will fall back to outputing
4612  the raw LaTeX.
4613 \end_layout
4614
4615 \begin_layout Itemize
4616 LaTeX
4617 \begin_inset Newline newline
4618 \end_inset
4619
4620 Finally, LyX will happily output math as LaTeX.
4621  As well as being the output of last resort, this method can be used with
4622  such tools as 
4623 \begin_inset CommandInset href
4624 LatexCommand href
4625 name "jsMath"
4626 target "http://www.math.union.edu/~dpvc/jsMath/"
4627
4628 \end_inset
4629
4630 , which uses JavaScript to render LaTeX embedded in HTML documents.
4631  LyX wraps the LaTeX in either a 
4632 \begin_inset Flex Code
4633 status collapsed
4634
4635 \begin_layout Plain Layout
4636 span
4637 \end_layout
4638
4639 \end_inset
4640
4641  (for inline formulas) or 
4642 \begin_inset Flex Code
4643 status collapsed
4644
4645 \begin_layout Plain Layout
4646 div
4647 \end_layout
4648
4649 \end_inset
4650
4651  (for displayed formulas) with 
4652 \begin_inset Flex Code
4653 status collapsed
4654
4655 \begin_layout Plain Layout
4656 class='math'
4657 \end_layout
4658
4659 \end_inset
4660
4661 , as is required for jsMath.
4662 \end_layout
4663
4664 \begin_layout Standard
4665 One of these output methods must be selected under 
4666 \begin_inset Flex MenuItem
4667 status collapsed
4668
4669 \begin_layout Plain Layout
4670 Document\SpecialChar \menuseparator
4671 Settings\SpecialChar \menuseparator
4672 Output
4673 \end_layout
4674
4675 \end_inset
4676
4677 .
4678  By default, LyX outputs MathML.
4679  This is a document-wide setting, therefore.
4680 \end_layout
4681
4682 \begin_layout Standard
4683 Eventually, LyX will offer the user the option to select an alternate output
4684  method for a particular inset, say, one that isn't being rendered very
4685  well by MathML.
4686 \begin_inset Foot
4687 status collapsed
4688
4689 \begin_layout Plain Layout
4690 That said, since LyX falls back to images if the inset contains ERT, then
4691  one can force output as an image by putting some harmless ERT into the
4692  math, for example: 
4693 \begin_inset Formula $a=b\relax$
4694 \end_inset
4695
4696 .
4697 \end_layout
4698
4699 \end_inset
4700
4701
4702 \end_layout
4703
4704 \begin_layout Section
4705 Bibliography and Citations
4706 \end_layout
4707
4708 \begin_layout Standard
4709 XHTML output fully supports bibliographies and citations.
4710  
4711 \end_layout
4712
4713 \begin_layout Standard
4714 Citation labels are generated by the same machinery that generates LyX's
4715  on-screen labels, so the labels will look in the output much as they do
4716  in LyX, though better.
4717  If you are using numerical citations, then LyX will output numerical labels,
4718  such as [1] or [17], rather than simply showing the citation key in square
4719  brackets, as it does on-screen.
4720  If you are using author-year citations, then LyX will add lowercase letters
4721  to the years, just as BibTeX does, if it finds more than one citation for
4722  a given author-year combination.
4723  The labels will be printed with the bibliography entries.
4724  Note that there is, at present, no way to customize the appearance of the
4725  labels, for example, to choose between square brackets and parentheses.
4726 \end_layout
4727
4728 \begin_layout Standard
4729 Bibliography output is handled by the same machinery that handles the presentati
4730 on of reference information in the citation dialog, so you will see in the
4731  XHTML output pretty much what you would see if you were to look at a given
4732  entry in the citation dialog.
4733  The formatting can be customized in your layout file or, preferably, in
4734  a module.
4735  See the 
4736 \emph on
4737 Customization
4738 \emph default
4739  manual for the details.
4740 \end_layout
4741
4742 \begin_layout Standard
4743 The main defect at present is that cross-referenced information is printed
4744  with every entry with which it is associated.
4745  So you can see things like this:
4746 \end_layout
4747
4748 \begin_layout Quote
4749 Jason Stanley, 
4750 \begin_inset Quotes eld
4751 \end_inset
4752
4753 Context and Logical Form
4754 \begin_inset Quotes erd
4755 \end_inset
4756
4757 , in 
4758 \emph on
4759 Language in Context: Selected Essays
4760 \emph default
4761  (Oxford: Oxford University Press, 2007), pp.
4762  30--68.
4763 \end_layout
4764
4765 \begin_layout Quote
4766 Jason Stanley, 
4767 \begin_inset Quotes eld
4768 \end_inset
4769
4770 Semantics in Context
4771 \begin_inset Quotes erd
4772 \end_inset
4773
4774 , in 
4775 \emph on
4776 Language in Context: Selected Essays
4777 \emph default
4778  (Oxford: Oxford University Press, 2007), pp.
4779  201--30.
4780 \end_layout
4781
4782 \begin_layout Standard
4783 This should be fixed before long.
4784 \end_layout
4785
4786 \begin_layout Standard
4787 There is no support at present for sectioned bibliographies.
4788  If you have multiple bibliographies, then LyX will print the same bibliography
4789  over and over.
4790 \end_layout
4791
4792 \begin_layout Section
4793 Indexes
4794 \end_layout
4795
4796 \begin_layout Standard
4797 LyX will happily export indexes as XHTML, but with certain limitations at
4798  the moment.
4799 \end_layout
4800
4801 \begin_layout Standard
4802 Index export will be most reliable when you do not attempt to use the fancy
4803  constructs that are described in the section on indexes in the 
4804 \emph on
4805 User's Guide
4806 \emph default
4807 .
4808 \begin_inset Foot
4809 status collapsed
4810
4811 \begin_layout Plain Layout
4812 The main issue here is that LyX itself does not really handle these.
4813  It just lets you enter what you would have to enter in raw LaTeX.
4814 \end_layout
4815
4816 \end_inset
4817
4818  We'll describe how they are handled using the subsection headings from
4819  that section.
4820 \end_layout
4821
4822 \begin_layout Itemize
4823 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4824  these, but the entries must be separated by 
4825 \begin_inset Quotes eld
4826 \end_inset
4827
4828  ! 
4829 \begin_inset Quotes erd
4830 \end_inset
4831
4832 , that is, there must be spaces around the exclamation point.
4833  This is because it is otherwise too difficult to check for escaped exclamation
4834  points, ones in math, and so forth.
4835 \end_layout
4836
4837 \begin_layout Itemize
4838 Page Ranges: There is no support at all for page ranges, since these make
4839  no sense with XHMTL.
4840  Instead, you will just get two index entries, one at either end.
4841 \end_layout
4842
4843 \begin_layout Itemize
4844 Cross-referencing: There is no support for cross-referencing.
4845  If LyX finds an entry containing the 
4846 \begin_inset Quotes eld
4847 \end_inset
4848
4849 |see\SpecialChar \ldots{}
4850
4851 \begin_inset Quotes erd
4852 \end_inset
4853
4854  construct, it is just dropped, and the rest is treated as an ordinary index
4855  entry.
4856 \end_layout
4857
4858 \begin_layout Itemize
4859 Index Entry Order: LyX does support attempts to fix the sorting order.
4860  It will take what is before the first `@' it finds and use that for sorting,
4861  taking what follows the first `@' to be the actual entry.
4862  At present, LyX does not check for escaped `@', so do not try to index
4863  email addresses.
4864 \end_layout
4865
4866 \begin_layout Itemize
4867 Index Entry Layout: You can format entries by using the text style dialog,
4868  or by using any other method available within LyX itself.
4869  There is no support for constructs like: 
4870 \begin_inset Quotes eld
4871 \end_inset
4872
4873 entry|textbf
4874 \begin_inset Quotes erd
4875 \end_inset
4876
4877 .
4878  Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4879  and everything that follows it.
4880 \end_layout
4881
4882 \begin_layout Itemize
4883 Multiple Indexes: There is no support for multiple indexes.
4884  Rather, all index entries will be printed as one large index.
4885  To avoid our printing several versions of the index, we print only the
4886  main index, so make sure you have one.
4887 \end_layout
4888
4889 \begin_layout Section
4890 Nomenclature and Glossary
4891 \end_layout
4892
4893 \begin_layout Standard
4894 There is at present no support for glossaries.
4895 \end_layout
4896
4897 \begin_layout Chapter
4898 The LyX Server
4899 \end_layout
4900
4901 \begin_layout Section
4902 Introduction
4903 \end_layout
4904
4905 \begin_layout Standard
4906 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4907  and retrieve information about the LyX internal state.
4908  This is only intended for advanced users, but they should find it useful.
4909  It is by writing to the LyX server, for example, that bibliography managers,
4910  such as JabRef, are able to 
4911 \begin_inset Quotes eld
4912 \end_inset
4913
4914 push
4915 \begin_inset Quotes erd
4916 \end_inset
4917
4918  citations to LyX.
4919 \end_layout
4920
4921 \begin_layout Section
4922 Starting the LyX Server
4923 \end_layout
4924
4925 \begin_layout Standard
4926 The LyX server works through the use of a pair of named pipes.
4927  These are usually located in 
4928 \begin_inset Flex Code
4929 status collapsed
4930
4931 \begin_layout Plain Layout
4932 UserDir
4933 \end_layout
4934
4935 \end_inset
4936
4937 , (except on Windows, where 
4938 \emph on
4939 local
4940 \emph default
4941  named pipes are special objects located in 
4942 \begin_inset Flex Code
4943 status collapsed
4944
4945 \begin_layout Plain Layout
4946
4947 \backslash
4948
4949 \backslash
4950 .
4951 \backslash
4952 pipe
4953 \end_layout
4954
4955 \end_inset
4956
4957 ) and have the names 
4958 \begin_inset Quotes eld
4959 \end_inset
4960
4961
4962 \begin_inset Flex Code
4963 status collapsed
4964
4965 \begin_layout Plain Layout
4966 lyxpipe.in
4967 \end_layout
4968
4969 \end_inset
4970
4971
4972 \begin_inset Quotes erd
4973 \end_inset
4974
4975  and 
4976 \begin_inset Quotes eld
4977 \end_inset
4978
4979
4980 \begin_inset Flex Code
4981 status collapsed
4982
4983 \begin_layout Plain Layout
4984 lyxpipe.out
4985 \end_layout
4986
4987 \end_inset
4988
4989
4990 \begin_inset Quotes erd
4991 \end_inset
4992
4993 .
4994  External programs write into 
4995 \begin_inset Flex Code
4996 status collapsed
4997
4998 \begin_layout Plain Layout
4999 lyxpipe.in
5000 \end_layout
5001
5002 \end_inset
5003
5004  and read back data from 
5005 \begin_inset Flex Code
5006 status collapsed
5007
5008 \begin_layout Plain Layout
5009 lyxpipe.out
5010 \end_layout
5011
5012 \end_inset
5013
5014 .
5015  The stem of the pipe names can be defined in the 
5016 \begin_inset Flex MenuItem
5017 status collapsed
5018
5019 \begin_layout Plain Layout
5020 Tools\SpecialChar \menuseparator
5021 Preferences
5022 \end_layout
5023
5024 \end_inset
5025
5026  dialog, for example 
5027 \begin_inset Flex Code
5028 status collapsed
5029
5030 \begin_layout Plain Layout
5031 "/home/myhome/lyxpipe"
5032 \end_layout
5033
5034 \end_inset
5035
5036 , or 
5037 \begin_inset Flex Code
5038 status collapsed
5039
5040 \begin_layout Plain Layout
5041 "
5042 \backslash
5043
5044 \backslash
5045 .
5046 \backslash
5047 pipe
5048 \backslash
5049 lyxpipe"
5050 \end_layout
5051
5052 \end_inset
5053
5054  on Windows.
5055  You 
5056 \emph on
5057 must
5058 \emph default
5059  configure this manually in order for the server to start.
5060 \end_layout
5061
5062 \begin_layout Standard
5063 LyX will add the '
5064 \begin_inset Flex Code
5065 status collapsed
5066
5067 \begin_layout Plain Layout
5068 .in
5069 \end_layout
5070
5071 \end_inset
5072
5073 ' and '
5074 \begin_inset Flex Code
5075 status collapsed
5076
5077 \begin_layout Plain Layout
5078 .out
5079 \end_layout
5080
5081 \end_inset
5082
5083 ' to create the pipes.
5084  If one of the pipes already exists, LyX will assume that another LyX process
5085  is already running and will not start the server.
5086  On POSIX (Unix like) systems, if for some other reason, an unused 
5087 \begin_inset Quotes eld
5088 \end_inset
5089
5090 stale
5091 \begin_inset Quotes erd
5092 \end_inset
5093
5094  pipe is left in existence when LyX closes, then LyX will try to delete
5095  it.
5096  If this fails for some reason, you will need to delete the pipes manually
5097  and then restart LyX.
5098  On Windows, pipes are deleted by the OS on program termination or crash,
5099  so 
5100 \begin_inset Quotes eld
5101 \end_inset
5102
5103 stale
5104 \begin_inset Quotes erd
5105 \end_inset
5106
5107  pipes should not be possible.
5108 \end_layout
5109
5110 \begin_layout Standard
5111 To have several LyX processes with servers at the same time, you have to
5112  use different configurations, perhaps by using separate user directories,
5113  each with its own 
5114 \begin_inset Flex Code
5115 status collapsed
5116
5117 \begin_layout Plain Layout
5118 preferences
5119 \end_layout
5120
5121 \end_inset
5122
5123  file, for each process.
5124 \end_layout
5125
5126 \begin_layout Standard
5127 If you are developing a client program, you might find it useful to enable
5128  debugging information from the LyX server.
5129  Do this by starting LyX as 
5130 \begin_inset Flex Code
5131 status collapsed
5132
5133 \begin_layout Plain Layout
5134 lyx -dbg lyxserver
5135 \end_layout
5136
5137 \end_inset
5138
5139 .
5140 \end_layout
5141
5142 \begin_layout Standard
5143 You can find a complete example client written in C in the source distribution
5144  as 
5145 \begin_inset Flex Code
5146 status collapsed
5147
5148 \begin_layout Plain Layout
5149 development/lyxserver/server_monitor.c
5150 \end_layout
5151
5152 \end_inset
5153
5154 .
5155 \end_layout
5156
5157 \begin_layout Standard
5158 Another useful tool is command-line based client you will find in 
5159 \begin_inset Flex Code
5160 status collapsed
5161
5162 \begin_layout Plain Layout
5163 src/client/lyxclient
5164 \end_layout
5165
5166 \end_inset
5167
5168 .
5169 \end_layout
5170
5171 \begin_layout Section
5172 Normal communication
5173 \end_layout
5174
5175 \begin_layout Standard
5176 To issue a LyX call, the client writes a line of ASCII text into the input
5177  pipe.
5178  This line has the following format:
5179 \end_layout
5180
5181 \begin_layout Quote
5182 LYXCMD:
5183 \emph on
5184 clientname
5185 \emph default
5186 :
5187 \emph on
5188 function
5189 \emph default
5190 :
5191 \emph on
5192 argument
5193 \end_layout
5194
5195 \begin_layout Description
5196 clientname is a name that the client can choose arbitrarily.
5197  Its only use is that LyX will echo it if it sends an answer—so a client
5198  can dispatch results from different requesters.
5199 \end_layout
5200
5201 \begin_layout Description
5202 function is the function you want LyX to perform.
5203  It is the same as the commands you'd use in the minibuffer.
5204 \end_layout
5205
5206 \begin_layout Description
5207 argument is an optional argument which is meaningful only to some functions
5208  (for instance, the 
5209 \begin_inset Quotes eld
5210 \end_inset
5211
5212 self-insert
5213 \begin_inset Quotes erd
5214 \end_inset
5215
5216  LFUN will insert the argument as text at the cursor position).
5217 \end_layout
5218
5219 \begin_layout Standard
5220 The answer from LyX will arrive in the output pipe and be of the form
5221 \end_layout
5222
5223 \begin_layout Quote
5224 INFO:
5225 \emph on
5226 clientname
5227 \emph default
5228 :
5229 \emph on
5230 function
5231 \emph default
5232 :
5233 \emph on
5234 data
5235 \end_layout
5236
5237 \begin_layout Standard
5238 where 
5239 \emph on
5240 clientname
5241 \emph default
5242  and 
5243 \emph on
5244 function
5245 \emph default
5246  are just echoed from the command request, while 
5247 \emph on
5248 data
5249 \emph default
5250  is more or less useful information filled according to how the command
5251  execution worked out.
5252  Some commands, such as 
5253 \begin_inset Quotes eld
5254 \end_inset
5255
5256 font-state
5257 \begin_inset Quotes erd
5258 \end_inset
5259
5260 , will return information about the internal state of LyX, while other will
5261  return an empty data-response.
5262  This means that the command execution went fine.
5263 \end_layout
5264
5265 \begin_layout Standard
5266 In case of errors, the response from LyX will have this form
5267 \end_layout
5268
5269 \begin_layout Quote
5270 ERROR:
5271 \emph on
5272 clientname
5273 \emph default
5274 :
5275 \emph on
5276 function
5277 \emph default
5278 :
5279 \emph on
5280 error message
5281 \end_layout
5282
5283 \begin_layout Standard
5284 where the 
5285 \emph on
5286 error message
5287 \emph default
5288  should contain an explanation of why the command failed.
5289 \end_layout
5290
5291 \begin_layout Standard
5292 Examples:
5293 \end_layout
5294
5295 \begin_layout LyX-Code
5296 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5297 \begin_inset Newline newline
5298 \end_inset
5299
5300 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5301 \begin_inset Newline newline
5302 \end_inset
5303
5304 read a <~/.lyxpipe.out
5305 \begin_inset Newline newline
5306 \end_inset
5307
5308 echo $a
5309 \end_layout
5310
5311 \begin_layout Section
5312 Notification
5313 \end_layout
5314
5315 \begin_layout Standard
5316 LyX can notify clients of events going on asynchronously.
5317  Currently it will only do this if the user binds a key sequence with the
5318  function 
5319 \begin_inset Quotes eld
5320 \end_inset
5321
5322 notify
5323 \begin_inset Quotes erd
5324 \end_inset
5325
5326 .
5327  The format of the string LyX sends is as follows:
5328 \end_layout
5329
5330 \begin_layout Quote
5331 \begin_inset Flex Code
5332 status collapsed
5333
5334 \begin_layout Plain Layout
5335 NOTIFY:
5336 \end_layout
5337
5338 \end_inset
5339
5340
5341 \emph on
5342 key-sequence
5343 \end_layout
5344
5345 \begin_layout Standard
5346 where 
5347 \emph on
5348 key-sequence
5349 \emph default
5350  is the printed representation of the key sequence that was actually typed
5351  by the user.
5352 \end_layout
5353
5354 \begin_layout Standard
5355 This mechanism can be used to extend LyX's command set and implement macros.
5356  Bind some key sequence to 
5357 \begin_inset Quotes eld
5358 \end_inset
5359
5360 notify
5361 \begin_inset Quotes erd
5362 \end_inset
5363
5364 .
5365  Then start a client that listens on the output pipe, dispatches the command
5366  according to the sequence, and starts a function that may use LyX calls
5367  and LyX requests to issue a command or a series of commands to LyX.
5368 \end_layout
5369
5370 \begin_layout Section
5371 The simple LyX Server Protocol
5372 \end_layout
5373
5374 \begin_layout Standard
5375 LyX implements a simple protocol that can be used for session management.
5376  All messages are of the form
5377 \end_layout
5378
5379 \begin_layout Quote
5380 LYXSRV:
5381 \emph on
5382 clientname
5383 \emph default
5384 :
5385 \emph on
5386 protocol message
5387 \end_layout
5388
5389 \begin_layout Standard
5390 where 
5391 \emph on
5392 protocol message
5393 \emph default
5394  can be 
5395 \begin_inset Quotes eld
5396 \end_inset
5397
5398 hello
5399 \begin_inset Quotes erd
5400 \end_inset
5401
5402  or 
5403 \begin_inset Quotes eld
5404 \end_inset
5405
5406 bye
5407 \begin_inset Quotes erd
5408 \end_inset
5409
5410 .
5411  If 
5412 \begin_inset Quotes eld
5413 \end_inset
5414
5415 hello
5416 \begin_inset Quotes erd
5417 \end_inset
5418
5419  is received from a client, LyX will report back to inform the client that
5420  it's listening to it's messages, while 
5421 \begin_inset Quotes eld
5422 \end_inset
5423
5424 bye
5425 \begin_inset Quotes erd
5426 \end_inset
5427
5428  sent from LyX will inform clients that LyX is closing.
5429 \end_layout
5430
5431 \begin_layout Section
5432 Reverse DVI/PDF search
5433 \end_layout
5434
5435 \begin_layout Standard
5436 Some DVI/PDF viewers
5437 \begin_inset Foot
5438 status collapsed
5439
5440 \begin_layout Plain Layout
5441 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5442  Skim on Mac OSX and SumatraPDF on Windows.
5443 \end_layout
5444
5445 \end_inset
5446
5447  provide 
5448 \emph on
5449 reverse search
5450 \emph default
5451  facility (also called 
5452 \emph on
5453 inverse search
5454 \emph default
5455 ).
5456  This means that you can tell LyX to put the cursor to a specific line in
5457  the document by clicking at the respective position in the DVI/PDF output.
5458  To achieve this, the viewer must be able to communicate with LyX.
5459  This is done via the LyX server either by using the named pipe (
5460 \emph on
5461 lyxpipe
5462 \emph default
5463 ), or the UNIX domain socket (
5464 \emph on
5465 lyxsocket
5466 \emph default
5467 ) that LyX creates in its temporary directory (this is the way the 
5468 \begin_inset Flex Code
5469 status collapsed
5470
5471 \begin_layout Plain Layout
5472 lyxclient
5473 \end_layout
5474
5475 \end_inset
5476
5477  program communicates with LyX).
5478  In some cases, you need a helper script that mediates between the viewer
5479  and LyX, in others, the viewer can communicate with LyX directly.
5480  This depends on the selected viewer and on your operating system.
5481  The same applies to the way viewers need to be configured and the way the
5482  reverse search is actually performed.
5483  In what follows, we will thus describe how to setup reverse search for
5484  specific viewers.
5485  Before we turn to this, though, we will explain what needs to be done generally
5486  to enable reverse search in the DVI/PDF output.
5487 \end_layout
5488
5489 \begin_layout Subsection
5490
5491 \change_inserted 2 1274788899
5492 \begin_inset CommandInset label
5493 LatexCommand label
5494 name "sub:rev-search"
5495
5496 \end_inset
5497
5498 Automatical enabling
5499 \end_layout
5500
5501 \begin_layout Standard
5502
5503 \change_inserted 2 1274789582
5504 In most cases LyX will do the work for you by enabling 
5505 \begin_inset Flex MenuItem
5506 status collapsed
5507
5508 \begin_layout Plain Layout
5509
5510 \change_inserted 2 1274789026
5511 Document\SpecialChar \menuseparator
5512 Output\SpecialChar \menuseparator
5513 Output Sync
5514 \end_layout
5515
5516 \end_inset
5517
5518 .
5519  In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5520  srcltx package (for DVI) respectively.
5521  This option can be easily reached also on 
5522 \begin_inset Flex Code
5523 status collapsed
5524
5525 \begin_layout Plain Layout
5526
5527 \change_inserted 2 1274789582
5528 View/update
5529 \change_unchanged
5530
5531 \end_layout
5532
5533 \end_inset
5534
5535  Toolbar.
5536 \end_layout
5537
5538 \begin_layout Standard
5539
5540 \change_inserted 2 1274789534
5541 Plase note that including 
5542 \begin_inset Flex Code
5543 status collapsed
5544
5545 \begin_layout Plain Layout
5546
5547 \change_inserted 2 1274789498
5548 srcltx
5549 \change_unchanged
5550
5551 \end_layout
5552
5553 \end_inset
5554
5555  package or 
5556 \begin_inset Flex Code
5557 status collapsed
5558
5559 \begin_layout Plain Layout
5560
5561 \change_inserted 2 1274789484
5562 src-specials
5563 \change_unchanged
5564
5565 \end_layout
5566
5567 \end_inset
5568
5569  sometimes have an impact on the typeset and you should switch them off
5570  for the final typesets.
5571 \change_unchanged
5572
5573 \end_layout
5574
5575 \begin_layout Standard
5576
5577 \change_inserted 2 1274789340
5578 You can also define custom macro in preferences and in case you need some
5579  special tweaks read the next section about manual enabling.
5580  
5581 \change_unchanged
5582
5583 \end_layout
5584
5585 \begin_layout Subsection
5586
5587 \change_inserted 2 1274788680
5588 Manual enabling
5589 \change_unchanged
5590
5591 \end_layout
5592
5593 \begin_layout Standard
5594 LaTeX provides several different methods for reverse search.
5595  Some are built-in in the 
5596 \begin_inset Flex Code
5597 status collapsed
5598
5599 \begin_layout Plain Layout
5600 latex/pdflatex
5601 \end_layout
5602
5603 \end_inset
5604
5605  program, some are provided by external packages.
5606  Your choice depends on whether your LaTeX distribution already provides
5607  a given method (the built-in methods are rather new) and whether your viewer
5608  can cope with it.
5609  The available methods are described in the following.
5610 \change_inserted 2 1274788557
5611
5612 \end_layout
5613
5614 \begin_layout Subsubsection*
5615 Built-in DVI-search via src-specials (DVI only) 
5616 \end_layout
5617
5618 \begin_layout Standard
5619 This method provides the DVI file with the necessary information for reverse
5620  search.
5621  It is available in LaTeX since quite some time (any somewhat recent LaTeX
5622  distribution should include it), and it works reliably.
5623  To enable it, change the 
5624 \begin_inset Flex MenuItem
5625 status collapsed
5626
5627 \begin_layout Plain Layout
5628 LaT
5629 \begin_inset ERT
5630 status collapsed
5631
5632 \begin_layout Plain Layout
5633
5634 {}
5635 \end_layout
5636
5637 \end_inset
5638
5639 eX (plain)->DVI
5640 \end_layout
5641
5642 \end_inset
5643
5644  or 
5645 \begin_inset Flex MenuItem
5646 status collapsed
5647
5648 \begin_layout Plain Layout
5649 LaT
5650 \begin_inset ERT
5651 status collapsed
5652
5653 \begin_layout Plain Layout
5654
5655 {}
5656 \end_layout
5657
5658 \end_inset
5659
5660 eX (plain)->DraftDVI
5661 \end_layout
5662
5663 \end_inset
5664
5665  converter in 
5666 \begin_inset Flex MenuItem
5667 status collapsed
5668
5669 \begin_layout Plain Layout
5670 Preferences\SpecialChar \menuseparator
5671 File Handling\SpecialChar \menuseparator
5672 Converters
5673 \end_layout
5674
5675 \end_inset
5676
5677  to 
5678 \begin_inset Flex Code
5679 status collapsed
5680
5681 \begin_layout Plain Layout
5682 latex -src-specials $$i
5683 \end_layout
5684
5685 \end_inset
5686
5687 .
5688  If this doesn't work, check if your TeX engine needs different options
5689  (the syntax might differ in some distributions).
5690 \end_layout
5691
5692 \begin_layout Subsubsection*
5693 External Packages (PDFSync and scrltx) 
5694 \end_layout
5695
5696 \begin_layout Standard
5697 The packages 
5698 \emph on
5699 pdfsync
5700 \emph default
5701  and 
5702 \emph on
5703 scrltx
5704 \emph default
5705  provide reverse search facility for PDF output (via pdflatex) and DVI output,
5706  respectively.
5707  In order to enable it, load the packages in the LyX preamble: 
5708 \end_layout
5709
5710 \begin_layout Itemize
5711 \begin_inset Flex Code
5712 status collapsed
5713
5714 \begin_layout Plain Layout
5715
5716 \backslash
5717 usepackage{pdfsync}
5718 \end_layout
5719
5720 \end_inset
5721
5722  for reverse PDF search,
5723 \end_layout
5724
5725 \begin_layout Itemize
5726  
5727 \begin_inset Flex Code
5728 status collapsed
5729
5730 \begin_layout Plain Layout
5731
5732 \backslash
5733 usepackage[active]{srcltx}
5734 \end_layout
5735
5736 \end_inset
5737
5738  for reverse DVI search.
5739 \end_layout
5740
5741 \begin_layout Standard
5742 If you want to be able to perform both DVI and PDF reverse searches, you
5743  can also insert in the preamble the following lines
5744 \end_layout
5745
5746 \begin_layout LyX-Code
5747
5748 \backslash
5749 usepackage{ifpdf}
5750 \begin_inset Newline newline
5751 \end_inset
5752
5753
5754 \backslash
5755 ifpdf
5756 \begin_inset Newline newline
5757 \end_inset
5758
5759   
5760 \backslash
5761 usepackage{pdfsync}
5762 \begin_inset Newline newline
5763 \end_inset
5764
5765
5766 \backslash
5767 else
5768 \begin_inset Newline newline
5769 \end_inset
5770
5771   
5772 \backslash
5773 usepackage[active]{srcltx}
5774 \begin_inset Newline newline
5775 \end_inset
5776
5777
5778 \backslash
5779 fi
5780 \end_layout
5781
5782 \begin_layout Standard
5783 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5784  right package will be used.
5785 \end_layout
5786
5787 \begin_layout Standard
5788 Note that PDFSync might affect the output layout of your document.
5789  It is therefore advised to disable PDFsync for final documents.
5790 \end_layout
5791
5792 \begin_layout Subsubsection*
5793 Built-in reverse search via SyncTeX (DVI and PDF) 
5794 \end_layout
5795
5796 \begin_layout Standard
5797 Recent versions of 
5798 \begin_inset Flex Code
5799 status collapsed
5800
5801 \begin_layout Plain Layout
5802 (pdf)latex
5803 \end_layout
5804
5805 \end_inset
5806
5807  have built-in support for both PDF and DVI reverse search.
5808  This so-called 
5809 \emph on
5810 SyncTeX
5811 \emph default
5812  facility is basically the result of the integration of the PDFSync package
5813  to the pdftex program and its merge with the 
5814 \emph on
5815 scr-specials
5816 \emph default
5817  approach.
5818  You need at least TeXLive 2008 or a recent MikTeX distribution in order
5819  to use it.
5820  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5821  already provide SyncTeX support.
5822 \end_layout
5823
5824 \begin_layout Standard
5825 To enable SyncTeX for DVI output, change the 
5826 \begin_inset Flex MenuItem
5827 status collapsed
5828
5829 \begin_layout Plain Layout
5830 LaT
5831 \begin_inset ERT
5832 status collapsed
5833
5834 \begin_layout Plain Layout
5835
5836 {}
5837 \end_layout
5838
5839 \end_inset
5840
5841 eX (plain) -> DVI
5842 \end_layout
5843
5844 \end_inset
5845
5846  or 
5847 \begin_inset Flex MenuItem
5848 status collapsed
5849
5850 \begin_layout Plain Layout
5851 LaT
5852 \begin_inset ERT
5853 status collapsed
5854
5855 \begin_layout Plain Layout
5856
5857 {}
5858 \end_layout
5859
5860 \end_inset
5861
5862 eX (plain) -> DraftDVI
5863 \end_layout
5864
5865 \end_inset
5866
5867  converter in 
5868 \begin_inset Flex MenuItem
5869 status collapsed
5870
5871 \begin_layout Plain Layout
5872 Preferences\SpecialChar \menuseparator
5873 File Handling\SpecialChar \menuseparator
5874 Converters
5875 \end_layout
5876
5877 \end_inset
5878
5879  to 
5880 \begin_inset Flex Code
5881 status collapsed
5882
5883 \begin_layout Plain Layout
5884 latex -synctex=1 $$i
5885 \end_layout
5886
5887 \end_inset
5888
5889 , and for PDF output, change the 
5890 \begin_inset Flex MenuItem
5891 status collapsed
5892
5893 \begin_layout Plain Layout
5894 LaT
5895 \begin_inset ERT
5896 status collapsed
5897
5898 \begin_layout Plain Layout
5899
5900 {}
5901 \end_layout
5902
5903 \end_inset
5904
5905 eX (pdflatex) -> PDF (pdflatex)
5906 \end_layout
5907
5908 \end_inset
5909
5910  or converter to 
5911 \begin_inset Flex Code
5912 status collapsed
5913
5914 \begin_layout Plain Layout
5915 pdflatex -synctex=1 $$i
5916 \end_layout
5917
5918 \end_inset
5919
5920 .
5921  Check the documentation of your viewer whether the viewer needs to be configure
5922 d for the use with SyncTeX.
5923 \begin_inset Foot
5924 status collapsed
5925
5926 \begin_layout Plain Layout
5927 The 
5928 \begin_inset Flex Code
5929 status collapsed
5930
5931 \begin_layout Plain Layout
5932 -synctex=1
5933 \end_layout
5934
5935 \end_inset
5936
5937  option enables gzip compression.
5938  If your viewer does not support it, you should instead use 
5939 \begin_inset Flex Code
5940 status collapsed
5941
5942 \begin_layout Plain Layout
5943 -synctex=-1
5944 \end_layout
5945
5946 \end_inset
5947
5948 .
5949 \end_layout
5950
5951 \end_inset
5952
5953
5954 \end_layout
5955
5956 \begin_layout Subsection
5957 Configuring and using specific viewers
5958 \end_layout
5959
5960 \begin_layout Subsubsection*
5961 Xdvi (all platforms)
5962 \end_layout
5963
5964 \begin_layout Standard
5965 If you use 
5966 \begin_inset Flex Code
5967 status collapsed
5968
5969 \begin_layout Plain Layout
5970 xdvi
5971 \end_layout
5972
5973 \end_inset
5974
5975 , you don't need to do anything else for performing a reverse DVI search,
5976  as LyX already provides the necessary hooks for automatically using the
5977  
5978 \begin_inset Flex Code
5979 status collapsed
5980
5981 \begin_layout Plain Layout
5982 lyxclient
5983 \end_layout
5984
5985 \end_inset
5986
5987  program.
5988  Just setup your document as described above (reverse search is triggered
5989  by Ctrl-click or Alt-click on Mac OSX, respectively).
5990 \end_layout
5991
5992 \begin_layout Standard
5993 However, if for whatever reason you want to use the named pipe instead of
5994  the socket for communicating with LyX, simply change the DVI viewer in
5995  
5996 \begin_inset Flex MenuItem
5997 status collapsed
5998
5999 \begin_layout Plain Layout
6000 Preferences\SpecialChar \menuseparator
6001 File Handling\SpecialChar \menuseparator
6002 File formats
6003 \end_layout
6004
6005 \end_inset
6006
6007  to
6008 \begin_inset Foot
6009 status collapsed
6010
6011 \begin_layout Plain Layout
6012 On Mac OSX you have to use 
6013 \begin_inset Flex Code
6014 status collapsed
6015
6016 \begin_layout Plain Layout
6017 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6018 \end_layout
6019
6020 \end_inset
6021
6022
6023 \end_layout
6024
6025 \end_inset
6026
6027  
6028 \begin_inset Flex Code
6029 status collapsed
6030
6031 \begin_layout Plain Layout
6032 xdvi -editor 'lyxeditor.sh %f %l'
6033 \end_layout
6034
6035 \end_inset
6036
6037 , where 
6038 \begin_inset Flex Code
6039 status collapsed
6040
6041 \begin_layout Plain Layout
6042 lyxeditor.sh
6043 \end_layout
6044
6045 \end_inset
6046
6047  is a suitable script.
6048  For example, a minimal shell script is the following one:
6049 \end_layout
6050
6051 \begin_layout LyX-Code
6052 #!/bin/sh
6053 \begin_inset Newline newline
6054 \end_inset
6055
6056 LYXPIPE="/path/to/lyxpipe"
6057 \begin_inset Newline newline
6058 \end_inset
6059
6060 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6061 \begin_inset Newline newline
6062 \end_inset
6063
6064 echo "$COMMAND" > "${LYXPIPE}".in || exit
6065 \begin_inset Newline newline
6066 \end_inset
6067
6068 read < "${LYXPIPE}".out || exit
6069 \end_layout
6070
6071 \begin_layout Standard
6072 where 
6073 \begin_inset Flex Code
6074 status collapsed
6075
6076 \begin_layout Plain Layout
6077 /path/to/lyxpipe
6078 \end_layout
6079
6080 \end_inset
6081
6082  is the Ly
6083 \begin_inset ERT
6084 status collapsed
6085
6086 \begin_layout Plain Layout
6087
6088 {}
6089 \end_layout
6090
6091 \end_inset
6092
6093 XServer pipe path specified in 
6094 \begin_inset Flex MenuItem
6095 status collapsed
6096
6097 \begin_layout Plain Layout
6098 Preferences\SpecialChar \menuseparator
6099 Paths
6100 \end_layout
6101
6102 \end_inset
6103
6104 .
6105 \begin_inset Foot
6106 status collapsed
6107
6108 \begin_layout Plain Layout
6109 In the 
6110 \begin_inset Flex Code
6111 status collapsed
6112
6113 \begin_layout Plain Layout
6114 development/tools
6115 \end_layout
6116
6117 \end_inset
6118
6119  folder of a source distribution you can find a 
6120 \begin_inset Flex Code
6121 status collapsed
6122
6123 \begin_layout Plain Layout
6124 lyxeditor
6125 \end_layout
6126
6127 \end_inset
6128
6129  script which is able to locate the 
6130 \emph on
6131 lyxpipe
6132 \emph default
6133  based on your preferences.
6134 \end_layout
6135
6136 \end_inset
6137
6138
6139 \end_layout
6140
6141 \begin_layout Subsubsection*
6142 MacDviX (Mac OSX)
6143 \end_layout
6144
6145 \begin_layout Standard
6146 At the end of 
6147 \begin_inset Flex Code
6148 status collapsed
6149
6150 \begin_layout Plain Layout
6151 /Applications/MacDviX_Folder/calleditor.script
6152 \end_layout
6153
6154 \end_inset
6155
6156 , add the following lines:
6157 \end_layout
6158
6159 \begin_layout LyX-Code
6160 /Applications/Ly
6161 \begin_inset ERT
6162 status collapsed
6163
6164 \begin_layout Plain Layout
6165
6166 {}
6167 \end_layout
6168
6169 \end_inset
6170
6171 X.app/Contents/MacOS/lyxeditor "$2" $1
6172 \begin_inset Newline newline
6173 \end_inset
6174
6175 exit 1
6176 \end_layout
6177
6178 \begin_layout Standard
6179 Modify the lines accordingly if you install LyX somewhere else than in the
6180  Applications folder.
6181 \end_layout
6182
6183 \begin_layout Standard
6184 Reverse search is triggered by Alt-click (OPTION-click).
6185 \end_layout
6186
6187 \begin_layout Subsubsection*
6188 Skim (Mac OSX)
6189 \end_layout
6190
6191 \begin_layout Standard
6192 Enter 
6193 \begin_inset Flex Code
6194 status collapsed
6195
6196 \begin_layout Plain Layout
6197 open -a Skim.app $$i
6198 \end_layout
6199
6200 \end_inset
6201
6202  to the viewer setting in 
6203 \begin_inset Flex MenuItem
6204 status collapsed
6205
6206 \begin_layout Plain Layout
6207 Preferences\SpecialChar \menuseparator
6208 File Handling\SpecialChar \menuseparator
6209 File formats\SpecialChar \menuseparator
6210 PDF (pdflatex)
6211 \end_layout
6212
6213 \end_inset
6214
6215 , and then in 
6216 \begin_inset Flex MenuItem
6217 status collapsed
6218
6219 \begin_layout Plain Layout
6220 Skim\SpecialChar \menuseparator
6221 Preferences\SpecialChar \menuseparator
6222 Sync
6223 \end_layout
6224
6225 \end_inset
6226
6227  select Ly
6228 \begin_inset ERT
6229 status collapsed
6230
6231 \begin_layout Plain Layout
6232
6233 {}
6234 \end_layout
6235
6236 \end_inset
6237
6238 X.
6239 \end_layout
6240
6241 \begin_layout Standard
6242 Reverse search is triggered by COMMAND-SHIFT-click
6243 \end_layout
6244
6245 \begin_layout Subsubsection*
6246 Okular (KDE)
6247 \end_layout
6248
6249 \begin_layout Standard
6250 Go to 
6251 \begin_inset Flex MenuItem
6252 status collapsed
6253
6254 \begin_layout Plain Layout
6255 Settings\SpecialChar \menuseparator
6256 Configure Okular\SpecialChar \ldots{}
6257 \SpecialChar \menuseparator
6258 Editor
6259 \end_layout
6260
6261 \end_inset
6262
6263 , select 
6264 \begin_inset Quotes eld
6265 \end_inset
6266
6267 Custom Text Editor
6268 \begin_inset Quotes erd
6269 \end_inset
6270
6271  and add the command 
6272 \begin_inset Flex Code
6273 status collapsed
6274
6275 \begin_layout Plain Layout
6276 lyxclient -g %f %l
6277 \end_layout
6278
6279 \end_inset
6280
6281 .
6282 \end_layout
6283
6284 \begin_layout Standard
6285 Reverse search is triggered by SHIFT-click.
6286 \end_layout
6287
6288 \begin_layout Subsubsection*
6289 YAP (Windows)
6290 \end_layout
6291
6292 \begin_layout Standard
6293 Launch yap, choose its 
6294 \begin_inset Flex MenuItem
6295 status collapsed
6296
6297 \begin_layout Plain Layout
6298 View\SpecialChar \menuseparator
6299 Options
6300 \end_layout
6301
6302 \end_inset
6303
6304  menu and select the 
6305 \begin_inset Quotes eld
6306 \end_inset
6307
6308 Inverse DVI Search
6309 \begin_inset Quotes erd
6310 \end_inset
6311
6312  tab.
6313  Click on the 
6314 \begin_inset Quotes eld
6315 \end_inset
6316
6317 New\SpecialChar \ldots{}
6318
6319 \begin_inset Quotes erd
6320 \end_inset
6321
6322  button and, in the window that opens, enter 
6323 \begin_inset Quotes eld
6324 \end_inset
6325
6326 LyX Editor
6327 \begin_inset Quotes erd
6328 \end_inset
6329
6330  (or any other name you like) in the 
6331 \begin_inset Quotes eld
6332 \end_inset
6333
6334 Name:
6335 \begin_inset Quotes erd
6336 \end_inset
6337
6338  field.
6339  Now click on the button labeled 
6340 \begin_inset Quotes eld
6341 \end_inset
6342
6343 \SpecialChar \ldots{}
6344
6345 \begin_inset Quotes erd
6346 \end_inset
6347
6348  to open a file dialog and navigate to the directory containing the batch
6349  file 
6350 \begin_inset Flex Code
6351 status collapsed
6352
6353 \begin_layout Plain Layout
6354 lyxeditor.bat
6355 \end_layout
6356
6357 \end_inset
6358
6359  (see below).
6360  Select 
6361 \begin_inset Flex Code
6362 status collapsed
6363
6364 \begin_layout Plain Layout
6365 lyxeditor.bat
6366 \end_layout
6367
6368 \end_inset
6369
6370  and then specify the program arguments as 
6371 \begin_inset Flex Code
6372 status collapsed
6373
6374 \begin_layout Plain Layout
6375 %f %l
6376 \end_layout
6377
6378 \end_inset
6379
6380 .
6381  The 
6382 \begin_inset Flex Code
6383 status collapsed
6384
6385 \begin_layout Plain Layout
6386 lyxeditor.bat
6387 \end_layout
6388
6389 \end_inset
6390
6391  wrapper is used for communicating with LyX through the 
6392 \emph on
6393 lyxpipe
6394 \emph default
6395  and is as follows:
6396 \end_layout
6397
6398 \begin_layout LyX-Code
6399 @echo off
6400 \begin_inset Newline newline
6401 \end_inset
6402
6403 echo LYXCMD:revdvi:server-goto-file-row:%1 %2> 
6404 \backslash
6405
6406 \backslash
6407 .
6408 \backslash
6409 pipe
6410 \backslash
6411 lyxpipe.in
6412 \begin_inset Newline newline
6413 \end_inset
6414
6415 type 
6416 \backslash
6417
6418 \backslash
6419 .
6420 \backslash
6421 pipe
6422 \backslash
6423 lyxpipe.out
6424 \end_layout
6425
6426 \begin_layout Standard
6427 Make sure that the LyXServer pipe path you specified in LyX is 
6428 \begin_inset Flex Code
6429 status collapsed
6430
6431 \begin_layout Plain Layout
6432
6433 \backslash
6434
6435 \backslash
6436 .
6437 \backslash
6438 pipe
6439 \backslash
6440 lyxpipe
6441 \end_layout
6442
6443 \end_inset
6444
6445 , otherwise change the 
6446 \begin_inset Flex Code
6447 status collapsed
6448
6449 \begin_layout Plain Layout
6450 lyxeditor.bat
6451 \end_layout
6452
6453 \end_inset
6454
6455  wrapper accordingly.
6456 \end_layout
6457
6458 \begin_layout Standard
6459 In yap, reverse search is triggered by double-click.
6460 \end_layout
6461
6462 \begin_layout Subsubsection*
6463 SumatraPDF (Windows)
6464 \end_layout
6465
6466 \begin_layout Standard
6467 In order to use SumatraPDF for inverse search, enter 
6468 \begin_inset Flex Code
6469 status collapsed
6470
6471 \begin_layout Plain Layout
6472 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6473 \end_layout
6474
6475 \end_inset
6476
6477  in the viewer setting in 
6478 \begin_inset Flex MenuItem
6479 status collapsed
6480
6481 \begin_layout Plain Layout
6482 Preferences\SpecialChar \menuseparator
6483 File Handling\SpecialChar \menuseparator
6484 File formats\SpecialChar \menuseparator
6485 PDF (pdflatex)
6486 \end_layout
6487
6488 \end_inset
6489
6490 , where 
6491 \begin_inset Flex Code
6492 status collapsed
6493
6494 \begin_layout Plain Layout
6495 lyxeditor.bat
6496 \end_layout
6497
6498 \end_inset
6499
6500  is the previous wrapper.
6501  If SumatraPDF.exe is not in your command PATH, use its full file name.
6502 \end_layout
6503
6504 \begin_layout Standard
6505 Reverse search is triggered by double-click.
6506 \end_layout
6507
6508 \begin_layout Subsubsection*
6509 YAP (Cygwin)
6510 \end_layout
6511
6512 \begin_layout Standard
6513 First of all, make sure that yap is your default DVI viewer in the Windows
6514  environment, then launch it, choose its 
6515 \begin_inset Flex MenuItem
6516 status collapsed
6517
6518 \begin_layout Plain Layout
6519 View\SpecialChar \menuseparator
6520 Options
6521 \end_layout
6522
6523 \end_inset
6524
6525  menu and select the 
6526 \begin_inset Quotes eld
6527 \end_inset
6528
6529 Inverse DVI Search
6530 \begin_inset Quotes erd
6531 \end_inset
6532
6533  tab.
6534  Click on the 
6535 \begin_inset Quotes eld
6536 \end_inset
6537
6538 New\SpecialChar \ldots{}
6539
6540 \begin_inset Quotes erd
6541 \end_inset
6542
6543  button and, in the window that opens, enter 
6544 \begin_inset Quotes eld
6545 \end_inset
6546
6547 LyX Editor
6548 \begin_inset Quotes erd
6549 \end_inset
6550
6551  (or any other name you like) in the 
6552 \begin_inset Quotes eld
6553 \end_inset
6554
6555 Name:
6556 \begin_inset Quotes erd
6557 \end_inset
6558
6559  field.
6560  Now click on the button labeled 
6561 \begin_inset Quotes eld
6562 \end_inset
6563
6564 \SpecialChar \ldots{}
6565
6566 \begin_inset Quotes erd
6567 \end_inset
6568
6569  to open a file dialog and navigate to the directory containing the 
6570 \begin_inset Flex Code
6571 status collapsed
6572
6573 \begin_layout Plain Layout
6574 lyxeditor.exe
6575 \end_layout
6576
6577 \end_inset
6578
6579  program (which is installed by default on Cygwin along with the LyX executable).
6580  Select 
6581 \begin_inset Flex Code
6582 status collapsed
6583
6584 \begin_layout Plain Layout
6585 lyxeditor.exe
6586 \end_layout
6587
6588 \end_inset
6589
6590  and then specify the program arguments as 
6591 \begin_inset Flex Code
6592 status collapsed
6593
6594 \begin_layout Plain Layout
6595 -g %f %l
6596 \end_layout
6597
6598 \end_inset
6599
6600 .
6601  In this way, you will be using the 
6602 \emph on
6603 lyxsocket
6604 \emph default
6605  for communicating with LyX.
6606  If, for whatever reason, you want to use the 
6607 \emph on
6608 lyxpipe
6609 \emph default
6610 , omit the 
6611 \begin_inset Flex Code
6612 status collapsed
6613
6614 \begin_layout Plain Layout
6615 -g
6616 \end_layout
6617
6618 \end_inset
6619
6620  option and be sure to specify the LyXServer pipe path in the LyX preferences.
6621 \end_layout
6622
6623 \begin_layout Standard
6624 In yap, reverse search is triggered by double-click.
6625 \end_layout
6626
6627 \begin_layout Subsubsection*
6628 SumatraPDF (Cygwin)
6629 \end_layout
6630
6631 \begin_layout Standard
6632 In order to use SumatraPDF for inverse search, enter 
6633 \begin_inset Flex Code
6634 status collapsed
6635
6636 \begin_layout Plain Layout
6637 SumatraPDF.sh
6638 \end_layout
6639
6640 \end_inset
6641
6642  in the viewer setting in 
6643 \begin_inset Flex MenuItem
6644 status collapsed
6645
6646 \begin_layout Plain Layout
6647 Preferences\SpecialChar \menuseparator
6648 File Handling\SpecialChar \menuseparator
6649 File formats\SpecialChar \menuseparator
6650 PDF (pdflatex)
6651 \end_layout
6652
6653 \end_inset
6654
6655 , where 
6656 \begin_inset Flex Code
6657 status collapsed
6658
6659 \begin_layout Plain Layout
6660 SumatraPDF.sh
6661 \end_layout
6662
6663 \end_inset
6664
6665  is the following script (to be placed in your command PATH, 
6666 \begin_inset Flex Code
6667 status collapsed
6668
6669 \begin_layout Plain Layout
6670 /usr/local/bin
6671 \end_layout
6672
6673 \end_inset
6674
6675  being the best choice):
6676 \end_layout
6677
6678 \begin_layout LyX-Code
6679 #!/bin/bash
6680 \begin_inset Newline newline
6681 \end_inset
6682
6683 cd $(dirname $1)
6684 \begin_inset Newline newline
6685 \end_inset
6686
6687 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6688 \end_layout
6689
6690 \begin_layout Standard
6691 This wrapper script is needed because SumatraPDF is a native Windows application
6692  and does not understand the posix paths used by the Cygwin version of LyX.
6693  If SumatraPDF.exe is not in your command PATH, use its full posix path in
6694  the script above.
6695  The 
6696 \begin_inset Flex Code
6697 status collapsed
6698
6699 \begin_layout Plain Layout
6700 -g
6701 \end_layout
6702
6703 \end_inset
6704
6705  enables communication via the 
6706 \emph on
6707 lyxsocket
6708 \emph default
6709 .
6710  Again, omit the 
6711 \begin_inset Flex Code
6712 status collapsed
6713
6714 \begin_layout Plain Layout
6715 -g
6716 \end_layout
6717
6718 \end_inset
6719
6720  option if you want to use the 
6721 \emph on
6722 lyxpipe
6723 \emph default
6724 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6725 \end_layout
6726
6727 \begin_layout Standard
6728 Reverse search is triggered by double-click.
6729 \change_inserted 1 1271453423
6730
6731 \end_layout
6732
6733 \begin_layout Section
6734
6735 \change_inserted 1 1271453442
6736 Forward search
6737 \end_layout
6738
6739 \begin_layout Standard
6740
6741 \change_inserted 1 1271454338
6742 To make forward search possible you need to provide generated output PDF/DVI
6743  file with additional information about TeX sources.
6744  This can be done via the methods described in the section 
6745 \begin_inset CommandInset ref
6746 LatexCommand ref
6747 reference "sub:rev-search"
6748
6749 \end_inset
6750
6751 .
6752 \end_layout
6753
6754 \begin_layout Standard
6755
6756 \change_inserted 1 1271454479
6757 Secondly you need to configure LyX for using your viewers in 
6758 \begin_inset Flex MenuItem
6759 status collapsed
6760
6761 \begin_layout Plain Layout
6762
6763 \change_inserted 1 1271453866
6764 Preferences\SpecialChar \menuseparator
6765 Output\SpecialChar \menuseparator
6766 General
6767 \end_layout
6768
6769 \end_inset
6770
6771 .
6772  Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6773  PDF
6774 \begin_inset Foot
6775 status collapsed
6776
6777 \begin_layout Plain Layout
6778
6779 \change_inserted 1 1271454273
6780 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6781 ip
6782 \change_unchanged
6783
6784 \end_layout
6785
6786 \end_inset
6787
6788 .
6789  Some other viewers allow at least reloading and positioning to particular
6790  page of the file --- Evince or xpdf --- for these cases you can use external
6791  call of synctex.
6792  Please study the prepared examples in the Preferences dialog.
6793 \change_unchanged
6794
6795 \end_layout
6796
6797 \begin_layout Chapter
6798 Special Document Classes
6799 \end_layout
6800
6801 \begin_layout Section
6802 A&A Paper
6803 \end_layout
6804
6805 \begin_layout Standard
6806 by 
6807 \noun on
6808 Peter Sütterlin
6809 \end_layout
6810
6811 \begin_layout Subsection
6812 Introduction
6813 \end_layout
6814
6815 \begin_layout Standard
6816 This section describes how LyX can be used to write articles for submission
6817  to the scientific journal 
6818 \emph on
6819 Astronomy and Astrophysics
6820 \emph default
6821  (www.edpsciences.fr/aa/ 
6822 \begin_inset Flex URL
6823 status collapsed
6824
6825 \begin_layout Plain Layout
6826
6827 http://www.edpsciences.fr/aa/
6828 \end_layout
6829
6830 \end_inset
6831
6832 ) using Version 5.01 of the document class 
6833 \family typewriter
6834 aa.cls
6835 \family default
6836 .
6837  This package can be downloaded from the ftp site
6838 \end_layout
6839
6840 \begin_layout Standard
6841 \begin_inset VSpace medskip
6842 \end_inset
6843
6844
6845 \end_layout
6846
6847 \begin_layout Standard
6848 \align center
6849 \begin_inset Flex URL
6850 status collapsed
6851
6852 \begin_layout Plain Layout
6853
6854 ftp://ftp.edpsciences.org/pub/aa/readme.html
6855 \end_layout
6856
6857 \end_inset
6858
6859
6860 \end_layout
6861
6862 \begin_layout Standard
6863 \begin_inset VSpace medskip
6864 \end_inset
6865
6866
6867 \end_layout
6868
6869 \begin_layout Standard
6870 A manual comes together with that package, and this text is not meant to
6871  replace the original manual but is merely a short guide in how to realize
6872  the correct form of your paper.
6873  
6874 \end_layout
6875
6876 \begin_layout Standard
6877 Please note that the publisher of the journal was changed from Springer
6878  to EDP Sciences starting January 1, 2001.
6879  That change involved also some slight changes to the style files, namely
6880  the removal of the thesaurus command.
6881  The LyX class aa supports the newest version of these style files, V 5.01.
6882  If you have an older version installed, please upgrade.
6883  For compatibility, the old (version 4) layout has been kept as 
6884 \family sans
6885 article (A&A V4)
6886 \family default
6887 .
6888  Please refer to the comments in 
6889 \family typewriter
6890 LyXDir/layouts/aapaper.layout
6891 \family default
6892 .
6893 \end_layout
6894
6895 \begin_layout Subsection
6896 Getting started
6897 \end_layout
6898
6899 \begin_layout Standard
6900 It is recommended you start from the example template distributed with LyX.
6901  If you are not using a template, note the following settings:
6902 \end_layout
6903
6904 \begin_layout Itemize
6905 Select 
6906 \family sans
6907 article (A&A)
6908 \family default
6909  in the 
6910 \family sans
6911 Document\SpecialChar \menuseparator
6912 Settings
6913 \family default
6914  dialog (OK, that one was obvious).
6915 \end_layout
6916
6917 \begin_layout Itemize
6918 Don't change the option 
6919 \family sans
6920 Page
6921 \begin_inset space ~
6922 \end_inset
6923
6924 style
6925 \family default
6926 : Leave it set to 
6927 \family sans
6928 default
6929 \family default
6930 .
6931  The whole layout is done by the macros, you shouldn't change anything.
6932 \end_layout
6933
6934 \begin_layout Subsection
6935 The header block
6936 \end_layout
6937
6938 \begin_layout Standard
6939 First thing to enter is the header information.
6940  It consists of seven entries, of which some are optional.
6941  They are
6942 \end_layout
6943
6944 \begin_layout Itemize
6945
6946 \family sans
6947 Title
6948 \family default
6949 : [required] 
6950 \end_layout
6951
6952 \begin_layout Itemize
6953
6954 \family sans
6955 Subtitle
6956 \family default
6957 : [optional] 
6958 \end_layout
6959
6960 \begin_layout Itemize
6961
6962 \family sans
6963 Author
6964 \family default
6965 : [required]
6966 \end_layout
6967
6968 \begin_layout Itemize
6969
6970 \family sans
6971 Address
6972 \family default
6973 : [required]
6974 \end_layout
6975
6976 \begin_layout Itemize
6977
6978 \family sans
6979 Offprints
6980 \family default
6981 : [optional] if more than one author: whom to contact for offprint requests.
6982 \end_layout
6983
6984 \begin_layout Itemize
6985
6986 \family sans
6987 Mail
6988 \family default
6989 : [optional] mail address for contacts.
6990 \end_layout
6991
6992 \begin_layout Itemize
6993
6994 \family sans
6995 Date
6996 \family default
6997 : [required].
6998  Suggested format is 
6999 \family typewriter
7000 Received: <date>; Accepted <date> 
7001 \end_layout
7002
7003 \begin_layout Standard
7004 There is no need to issue the 
7005 \family typewriter
7006
7007 \backslash
7008 maketitle
7009 \family default
7010  command, this is done automatically by LyX when the header is finished.
7011  Although the order of the single header entries doesn't matter it is advised
7012  to keep the above sequence, just to get the best optics and meets the layout
7013  of the real document.
7014 \end_layout
7015
7016 \begin_layout Standard
7017 If you want to place footnotes in the header block, e.
7018 \begin_inset space \thinspace{}
7019 \end_inset
7020
7021 g.
7022 \begin_inset space \space{}
7023 \end_inset
7024
7025 to state your present address, just use the standard footnote via the menu
7026  
7027 \family sans
7028 Insert\SpecialChar \menuseparator
7029 Footnote.
7030
7031 \family default
7032  LyX will automagically use the term 
7033 \family typewriter
7034
7035 \backslash
7036 thanks{}
7037 \family default
7038  in that case.
7039 \end_layout
7040
7041 \begin_layout Standard
7042 In addition to these topics, the macros use three additional LaTeX commands
7043  that have no counterpart in LyX:
7044 \end_layout
7045
7046 \begin_layout Itemize
7047
7048 \family typewriter
7049
7050 \backslash
7051 and
7052 \family default
7053  to separate different names for more than one author and institute, respectivel
7054 y.
7055 \end_layout
7056
7057 \begin_layout Itemize
7058
7059 \family typewriter
7060
7061 \backslash
7062 inst{<nr>}
7063 \family default
7064 to mark corresponding author/institute pairs.
7065  The institutes are numbered sequentially as they appear in the 
7066 \family sans
7067 Address
7068 \family default
7069  field, so you have to put a marker to each author.
7070 \end_layout
7071
7072 \begin_layout Itemize
7073
7074 \family typewriter
7075
7076 \backslash
7077 email{address}
7078 \family default
7079  to supply an email address for fast contact.
7080 \end_layout
7081
7082 \begin_layout Standard
7083 In all cases, the appropriate command has to be entered in LyX and marked
7084  as LaTeX code.
7085  See the examples.
7086  
7087 \end_layout
7088
7089 \begin_layout Subsection
7090 The abstract
7091 \end_layout
7092
7093 \begin_layout Standard
7094 The abstract should immediately follow the header block.
7095  With version 5 the abstract environment was changed to a command, and there
7096  is now a resctriction to only one paragraph.
7097  In addition, it should contain an entry with the keywords.
7098  This is not yet implemented for LyX, therefore you have to enter the LaTeX
7099  command 
7100 \family typewriter
7101
7102 \backslash
7103 keywords{}
7104 \family default
7105  by hand and mark it as LaTeX code.
7106  Refer to the example paper.
7107 \end_layout
7108
7109 \begin_layout Subsection
7110 Supported environments
7111 \end_layout
7112
7113 \begin_layout Standard
7114 The A&A paper layout supports the following environments for structuring
7115  your text:
7116 \end_layout
7117
7118 \begin_layout Itemize
7119
7120 \family sans
7121 Standard
7122 \end_layout
7123
7124 \begin_layout Itemize
7125
7126 \family sans
7127 Section
7128 \end_layout
7129
7130 \begin_layout Itemize
7131
7132 \family sans
7133 Subsection
7134 \end_layout
7135
7136 \begin_layout Itemize
7137
7138 \family sans
7139 Subsubsection
7140 \end_layout
7141
7142 \begin_layout Itemize
7143
7144 \family sans
7145 Itemize
7146 \end_layout
7147
7148 \begin_layout Itemize
7149
7150 \family sans
7151 Enumerate
7152 \end_layout
7153
7154 \begin_layout Itemize
7155
7156 \family sans
7157 Description
7158 \end_layout
7159
7160 \begin_layout Itemize
7161
7162 \family sans
7163 Caption
7164 \end_layout
7165
7166 \begin_layout Itemize
7167
7168 \family sans
7169 Abstract
7170 \end_layout
7171
7172 \begin_layout Itemize
7173
7174 \family sans
7175 Acknowledgment
7176 \end_layout
7177
7178 \begin_layout Itemize
7179
7180 \family sans
7181 Bibliography
7182 \end_layout
7183
7184 \begin_layout Itemize
7185
7186 \family sans
7187 LaTeX
7188 \end_layout
7189
7190 \begin_layout Subsection
7191 Commands not supported by LyX
7192 \end_layout
7193
7194 \begin_layout Standard
7195 Some commands are not yet supported by the 
7196 \family sans
7197 paper (A&A)
7198 \family default
7199  layout for LyX.
7200  Some have already been mentioned.
7201  For the sake of completeness, they are listed all together here:
7202 \end_layout
7203
7204 \begin_layout Itemize
7205
7206 \family typewriter
7207
7208 \backslash
7209 and
7210 \end_layout
7211
7212 \begin_layout Itemize
7213
7214 \family typewriter
7215
7216 \backslash
7217 email
7218 \end_layout
7219
7220 \begin_layout Itemize
7221
7222 \family typewriter
7223
7224 \backslash
7225 appendix
7226 \end_layout
7227
7228 \begin_layout Itemize
7229
7230 \family typewriter
7231
7232 \backslash
7233 authorrunning
7234 \end_layout
7235
7236 \begin_layout Itemize
7237
7238 \family typewriter
7239
7240 \backslash
7241 inst{}
7242 \end_layout
7243
7244 \begin_layout Itemize
7245
7246 \family typewriter
7247
7248 \backslash
7249 keywords{}
7250 \end_layout
7251
7252 \begin_layout Itemize
7253
7254 \family typewriter
7255
7256 \backslash
7257 object{}
7258 \end_layout
7259
7260 \begin_layout Itemize
7261
7262 \family typewriter
7263
7264 \backslash
7265 titlerunning{}
7266 \end_layout
7267
7268 \begin_layout Standard
7269 If you want to use any of these commands, you have to enter them yourself.
7270  
7271 \series bold
7272 Do not forget to mark them as LaTeX code!
7273 \end_layout
7274
7275 \begin_layout Subsection
7276 Figure and Table Floats
7277 \end_layout
7278
7279 \begin_layout Standard
7280 LyX provides support for the necessary float environments 
7281 \family sans
7282 figure, figure*, table
7283 \family default
7284  and 
7285 \family sans
7286 table*
7287 \family default
7288 , therefore we won't tell much about it here.
7289  Refer to the 
7290 \emph on
7291 User's
7292 \begin_inset space ~
7293 \end_inset
7294
7295 Guide
7296 \emph default
7297 .
7298  Just remember that tables should be left-aligned.
7299  For that, select the table and change the alignment in 
7300 \family sans
7301 Edit\SpecialChar \menuseparator
7302 Paragraph
7303 \begin_inset space ~
7304 \end_inset
7305
7306 Settings.
7307 \end_layout
7308
7309 \begin_layout Standard
7310 There is only one special thing: the figures with caption besides the figure.
7311  To create such a figure, you have to do the following:
7312 \end_layout
7313
7314 \begin_layout Enumerate
7315 Create a wide figure float: 
7316 \family sans
7317 Insert\SpecialChar \menuseparator
7318 Float\SpecialChar \menuseparator
7319 Figure
7320 \family default
7321 , then right click in the figure and select 
7322 \family sans
7323 \bar under
7324 S
7325 \bar default
7326 pan
7327 \begin_inset space ~
7328 \end_inset
7329
7330 columns
7331 \family default
7332 .
7333 \end_layout
7334
7335 \begin_layout Enumerate
7336 Enter your caption text.
7337 \end_layout
7338
7339 \begin_layout Enumerate
7340 Press 
7341 \family sans
7342 Return
7343 \family default
7344  to move the cursor above the caption.
7345 \end_layout
7346
7347 \begin_layout Enumerate
7348 Insert your figure
7349 \end_layout
7350
7351 \begin_layout Enumerate
7352 Position the cursor behind the figure and insert a horizontal fill: 
7353 \family sans
7354 Insert\SpecialChar \menuseparator
7355 Special
7356 \begin_inset space ~
7357 \end_inset
7358
7359 Character\SpecialChar \menuseparator
7360 Horizontal
7361 \begin_inset space ~
7362 \end_inset
7363
7364 Fill
7365 \family default
7366 .
7367 \end_layout
7368
7369 \begin_layout Enumerate
7370 Switch to LaTeX mode: 
7371 \family sans
7372 M-c
7373 \begin_inset space ~
7374 \end_inset
7375
7376 t
7377 \family default
7378 .
7379 \end_layout
7380
7381 \begin_layout Enumerate
7382 Enter 
7383 \family typewriter
7384
7385 \backslash
7386 parbox[b]{55mm}{
7387 \family default
7388 .
7389  
7390 \series bold
7391 Do not close the brace!
7392 \end_layout
7393
7394 \begin_layout Enumerate
7395 Position the cursor behind the caption text, switch to LaTeX mode and insert
7396  the closing brace: 
7397 \family sans
7398 M-c
7399 \begin_inset space ~
7400 \end_inset
7401
7402 t
7403 \family default
7404  
7405 \family typewriter
7406 }
7407 \family default
7408 .
7409 \end_layout
7410
7411 \begin_layout Standard
7412 Also, refer to the figures in the example paper.
7413 \end_layout
7414
7415 \begin_layout Subsection
7416 Referee layout
7417 \end_layout
7418
7419 \begin_layout Standard
7420 For submission, the paper has to be formated in a special double-spacing
7421  layout.
7422  For this purpose, you have to give the option 
7423 \family typewriter
7424 referee
7425 \family default
7426  to the documentclass.
7427  This must be done using the extra class options field in the 
7428 \family sans
7429 Document\SpecialChar \menuseparator
7430 Settings
7431 \family default
7432  dialog.
7433  Just enter the string 
7434 \family typewriter
7435 referee
7436 \family default
7437  there.
7438 \end_layout
7439
7440 \begin_layout Subsection
7441 The example paper
7442 \end_layout
7443
7444 \begin_layout Standard
7445 The 
7446 \family sans
7447 Examples
7448 \family default
7449  directory contains an example paper written with LyX.
7450  It is the example paper from the original macro package, translated to
7451  LyX.
7452  Use it for inspiration, and compare the original LaTeX code with LyX way
7453  of writing.
7454 \end_layout
7455
7456 \begin_layout Section
7457 AASTeX
7458 \end_layout
7459
7460 \begin_layout Standard
7461 by 
7462 \noun on
7463 Mike Ressler
7464 \end_layout
7465
7466 \begin_layout Subsection
7467 Introduction
7468 \end_layout
7469
7470 \begin_layout Standard
7471 AASTeX is a set of macros produced by the American Astronomical Society
7472  to facilitate electronic manuscript submission to the three journals they
7473  publish: the Astrophysical Journal (including the Letters and Supplement),
7474  the Astronomical Journal, and the Publications of the Astronomical Society
7475  of the Pacific.
7476  LyX has proven to be an excellent tool for generating these documents,
7477  especially given its equation, citation, and figure handling capabilities.
7478  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7479  is the version described here, or higher.
7480  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7481  incompatible with LyX.
7482  The AASTeX package may be downloaded from the AASTeX Web site
7483 \end_layout
7484
7485 \begin_layout Standard
7486 \begin_inset VSpace medskip
7487 \end_inset
7488
7489
7490 \end_layout
7491
7492 \begin_layout Standard
7493 \align center
7494 \begin_inset Flex URL
7495 status collapsed
7496
7497 \begin_layout Plain Layout
7498
7499 http://www.journals.uchicago.edu/AAS/AASTeX
7500 \end_layout
7501
7502 \end_inset
7503
7504
7505 \end_layout
7506
7507 \begin_layout Standard
7508 \begin_inset VSpace medskip
7509 \end_inset
7510
7511
7512 \end_layout
7513
7514 \begin_layout Standard
7515 A complete user guide is contained in that package and you should familiarize
7516  yourself with it thoroughly before embarking on writing a paper in LyX.
7517  LyX will not reduce the need to figure out all the AASTeX commands, it
7518  will only reduce the drudgery of typing everything in.
7519  It is your responsibility to ensure that the final exported LaTeX document
7520  conforms completely to the requirements of the journal to which you are
7521  submitting your paper.
7522 \end_layout
7523
7524 \begin_layout Subsection
7525 Starting a New Paper
7526 \end_layout
7527
7528 \begin_layout Standard
7529 I strongly suggest that you start with the AASTeX template file.
7530  Click on 
7531 \family sans
7532 File\SpecialChar \menuseparator
7533 New from
7534 \family default
7535  
7536 \family sans
7537 Template
7538 \family default
7539 , enter the new file name, then choose the 
7540 \family typewriter
7541 aastex.lyx
7542 \family default
7543  template.
7544  This will show the most common fields found in a manuscript.
7545  Simply overwrite the existing text (including the brackets, 
7546 \family typewriter
7547 <>
7548 \family default
7549 ) with the correct information.
7550  Many of the AASTeX commands and environments can be implemented directly
7551  in LyX, but some cannot: most noticeably 
7552 \family typewriter
7553
7554 \backslash
7555 altaffilmark
7556 \family default
7557  and 
7558 \family typewriter
7559
7560 \backslash
7561 altaffiltext
7562 \family default
7563 , which should stick out like a sore thumb if you actually just opened the
7564  template file.
7565  For commands such as these, the LaTeX code must be entered directly and
7566  marked as such.
7567  Such commands are referred to as TeX code, or Evil Red Text.
7568  I tried to minimize the amount of TeX code needed in an AASTeX document,
7569  but there is still a bit more required than any of us would like.
7570 \end_layout
7571
7572 \begin_layout Subsection
7573 Finishing Your Paper
7574 \end_layout
7575
7576 \begin_layout Standard
7577 When the paper is finished to your satisfaction and previews/prints correctly,
7578  there are a few 
7579 \begin_inset Quotes eld
7580 \end_inset
7581
7582 postprocessing
7583 \begin_inset Quotes erd
7584 \end_inset
7585
7586  actions which need to be done before you submit it to the journals.
7587  
7588 \end_layout
7589
7590 \begin_layout Enumerate
7591 Export your paper as a LaTeX file (
7592 \family sans
7593 File\SpecialChar \menuseparator
7594 Export\SpecialChar \menuseparator
7595 LaTeX
7596 \family default
7597 ).
7598  
7599 \end_layout
7600
7601 \begin_layout Enumerate
7602 Edit the resulting 
7603 \family typewriter
7604 .tex
7605 \family default
7606  file with your favorite text editor
7607 \end_layout
7608
7609 \begin_deeper
7610 \begin_layout Enumerate
7611 remove the comment lines before the 
7612 \family typewriter
7613
7614 \backslash
7615 documentclass
7616 \family default
7617  command
7618 \end_layout
7619
7620 \begin_layout Enumerate
7621 remove the 
7622 \family typewriter
7623
7624 \backslash
7625 usepackage...{fontenc}
7626 \family default
7627  line if it appears (usually just after 
7628 \family typewriter
7629
7630 \backslash
7631 documentclass
7632 \family default
7633 }; also remove the 
7634 \family typewriter
7635
7636 \backslash
7637 secnumdepth
7638 \family default
7639  line if it appears.
7640 \end_layout
7641
7642 \begin_layout Enumerate
7643 remove everything between (and including) the 
7644 \family typewriter
7645
7646 \backslash
7647 makeatletter
7648 \family default
7649  and 
7650 \family typewriter
7651
7652 \backslash
7653 makeatother
7654 \family default
7655  commands, except for any commands you specifically put into the LaTeX preamble
7656  (which should appear immediately after the 
7657 \begin_inset Quotes eld
7658 \end_inset
7659
7660 User specified LaTeX commands
7661 \begin_inset Quotes erd
7662 \end_inset
7663
7664  comment in the 
7665 \family typewriter
7666 .tex
7667 \family default
7668  file).
7669 \end_layout
7670
7671 \end_deeper
7672 \begin_layout Enumerate
7673 Run the resulting file through LaTeX to make sure it still processes correctly.
7674 \end_layout
7675
7676 \begin_layout Enumerate
7677 Reread the journal requirements to make sure your filenames and formats
7678  are correct.
7679 \end_layout
7680
7681 \begin_layout Enumerate
7682 Submit it.
7683 \end_layout
7684
7685 \begin_layout Subsection
7686 Comments On Specific Commands
7687 \end_layout
7688
7689 \begin_layout Standard
7690 I will not describe the detailed usage of the individual AASTeX commands:
7691  the AASTeX User Guide (
7692 \family typewriter
7693 aasguide.tex
7694 \family default
7695 ) gives a good description of each.
7696  Thus it's probably easiest for me to go down the list as found in the guide
7697  and offer comments where necessary.
7698  So let's begin \SpecialChar \ldots{}
7699
7700 \end_layout
7701
7702 \begin_layout Subsubsection
7703 Things that work as expected
7704 \end_layout
7705
7706 \begin_layout Standard
7707 \begin_inset ERT
7708 status open
7709
7710 \begin_layout Plain Layout
7711
7712
7713 \backslash
7714 begin{sloppypar}
7715 \end_layout
7716
7717 \end_inset
7718
7719
7720 \end_layout
7721
7722 \begin_layout Standard
7723 Because they work as you might expect, I simply list them and the section
7724  they are found in: 
7725 \family typewriter
7726
7727 \backslash
7728 documentclass
7729 \family default
7730  (2.1.1), 
7731 \family typewriter
7732
7733 \backslash
7734 begin{document}
7735 \family default
7736  (2.2), 
7737 \family typewriter
7738
7739 \backslash
7740 title
7741 \family default
7742  (2.3), 
7743 \family typewriter
7744
7745 \backslash
7746 author
7747 \family default
7748  (2.3), 
7749 \family typewriter
7750
7751 \backslash
7752 affil
7753 \family default
7754  (2.3), 
7755 \family typewriter
7756
7757 \backslash
7758 abstract
7759 \family default
7760  (2.4), 
7761 \family typewriter
7762
7763 \backslash
7764 keywords
7765 \family default
7766  (2.5), 
7767 \family typewriter
7768
7769 \backslash
7770 section
7771 \family default
7772  (2.7), 
7773 \family typewriter
7774
7775 \backslash
7776 subsection
7777 \family default
7778  (2.7), 
7779 \family typewriter
7780
7781 \backslash
7782 subsubsection
7783 \family default
7784  (2.7), 
7785 \family typewriter
7786
7787 \backslash
7788 paragraph
7789 \family default
7790  (2.7), 
7791 \family typewriter
7792
7793 \backslash
7794 facility
7795 \family default
7796  (2.10), 
7797 \family typewriter
7798
7799 \backslash
7800 begin{displaymath}
7801 \family default
7802  (2.12), 
7803 \family typewriter
7804
7805 \backslash
7806 begin{equation}
7807 \family default
7808  (2.12), 
7809 \family typewriter
7810
7811 \backslash
7812 begin{eqnarray}
7813 \family default
7814  (2.12), 
7815 \family typewriter
7816
7817 \backslash
7818 begin{mathletters}
7819 \family default
7820  (2.12), 
7821 \family typewriter
7822
7823 \backslash
7824 begin{thebibliography}
7825 \family default
7826  (2.13.1), 
7827 \family typewriter
7828
7829 \backslash
7830 bibitem
7831 \family default
7832  (2.13.2), all the cite commands and their variations (2.13.2), the generic
7833  graphicx figure commands (2.14.1), 
7834 \family typewriter
7835
7836 \backslash
7837 begin{table}
7838 \family default
7839  (2.15.4), 
7840 \family typewriter
7841
7842 \backslash
7843 begin{tabular}
7844 \family default
7845  (2.15.4), 
7846 \family typewriter
7847
7848 \backslash
7849 caption
7850 \family default
7851  (2.15.4), 
7852 \family typewriter
7853
7854 \backslash
7855 label
7856 \family default
7857  (2.15.4, amongst other places), 
7858 \family typewriter
7859
7860 \backslash
7861 tablerefs
7862 \family default
7863  (2.15.5), 
7864 \family typewriter
7865
7866 \backslash
7867 tablecomments
7868 \family default
7869  (2.15.5), 
7870 \family typewriter
7871
7872 \backslash
7873 url
7874 \family default
7875  (2.17.4), 
7876 \family typewriter
7877
7878 \backslash
7879 end{document}
7880 \family default
7881  (2.18).
7882 \end_layout
7883
7884 \begin_layout Standard
7885 The following style options also work correctly: 
7886 \family typewriter
7887 longabstract
7888 \family default
7889  (2.4), 
7890 \family typewriter
7891 preprint
7892 \family default
7893  (3.2.1), 
7894 \family typewriter
7895 preprint2
7896 \family default
7897  (3.2.2), 
7898 \family typewriter
7899 eqsecnum
7900 \family default
7901  (3.3), 
7902 \family typewriter
7903 flushrt
7904 \family default
7905  (3.4).
7906  Simply put them in the 
7907 \family sans
7908 Options
7909 \family default
7910  box in 
7911 \family sans
7912 Layout\SpecialChar \menuseparator
7913 Document
7914 \family default
7915 .
7916 \end_layout
7917
7918 \begin_layout Standard
7919 \begin_inset ERT
7920 status open
7921
7922 \begin_layout Plain Layout
7923
7924
7925 \backslash
7926 end{sloppypar}
7927 \end_layout
7928
7929 \end_inset
7930
7931
7932 \end_layout
7933
7934 \begin_layout Subsubsection
7935 Things that work, but require more comment
7936 \end_layout
7937
7938 \begin_layout Standard
7939 The following items work, but require a little more discussion:
7940 \end_layout
7941
7942 \begin_layout Itemize
7943 These items are reserved for use by the journal editors, but you can put
7944  them into the LaTeX preamble if you feel compelled to do so: 
7945 \family typewriter
7946
7947 \backslash
7948 received
7949 \family default
7950
7951 \family typewriter
7952
7953 \backslash
7954 revised
7955 \family default
7956
7957 \family typewriter
7958
7959 \backslash
7960 accepted
7961 \family default
7962
7963 \family typewriter
7964
7965 \backslash
7966 ccc
7967 \family default
7968
7969 \family typewriter
7970
7971 \backslash
7972 cpright
7973 \family default
7974  (all from 2.1.3)
7975 \end_layout
7976
7977 \begin_layout Itemize
7978 These items may be placed in the LaTeX preamble, and are included as blanks
7979  in the template file: 
7980 \family typewriter
7981
7982 \backslash
7983 slugcomment
7984 \family default
7985  (2.1.4), 
7986 \family typewriter
7987
7988 \backslash
7989 shorttitle
7990 \family default
7991  (2.1.5), 
7992 \family typewriter
7993
7994 \backslash
7995 shortauthors
7996 \family default
7997  (2.1.5)
7998 \end_layout
7999
8000 \begin_layout Itemize
8001
8002 \family typewriter
8003
8004 \backslash
8005 email
8006 \family default
8007  (2.3) – can only be used 
8008 \begin_inset Quotes eld
8009 \end_inset
8010
8011 standalone
8012 \begin_inset Quotes erd
8013 \end_inset
8014
8015 , not in the middle of a paragraph.
8016  Use TeX code if you need to embed it.
8017 \end_layout
8018
8019 \begin_layout Itemize
8020
8021 \family typewriter
8022
8023 \backslash
8024 and
8025 \family default
8026  (2.3) – will have extra {} after it.
8027  This should not cause an error.
8028 \end_layout
8029
8030 \begin_layout Itemize
8031
8032 \family typewriter
8033
8034 \backslash
8035 notetoeditor
8036 \family default
8037  (2.6) – can only be used 
8038 \begin_inset Quotes eld
8039 \end_inset
8040
8041 standalone
8042 \begin_inset Quotes erd
8043 \end_inset
8044
8045 , not in the middle of a paragraph.
8046  Use TeX code if you need to embed it.
8047 \end_layout
8048
8049 \begin_layout Itemize
8050
8051 \family typewriter
8052
8053 \backslash
8054 placetable
8055 \family default
8056  (2.8) – can't insert a cross-reference tag, you must type the tag name by
8057  hand
8058 \end_layout
8059
8060 \begin_layout Itemize
8061
8062 \family typewriter
8063
8064 \backslash
8065 placefigure
8066 \family default
8067  (2.8) – same as for 
8068 \family typewriter
8069
8070 \backslash
8071 placetable
8072 \end_layout
8073
8074 \begin_layout Itemize
8075
8076 \family typewriter
8077
8078 \backslash
8079 acknowledgements
8080 \family default
8081  (2.9) – will have extra {} after it.
8082  This should not cause an error.
8083 \end_layout
8084
8085 \begin_layout Itemize
8086
8087 \family typewriter
8088
8089 \backslash
8090 appendix
8091 \family default
8092  (2.11) – will have extra {} after it.
8093  This should not cause an error.
8094 \end_layout
8095
8096 \begin_layout Itemize
8097
8098 \family typewriter
8099
8100 \backslash
8101 figcaption
8102 \family default
8103  (2.14.2) – you can insert an optional filename argument by placing the cursor
8104  at the beginning of the text and selecting 
8105 \family sans
8106 Insert\SpecialChar \menuseparator
8107 Short Title
8108 \family default
8109 .
8110  
8111 \begin_inset Quotes eld
8112 \end_inset
8113
8114 Short Title
8115 \begin_inset Quotes erd
8116 \end_inset
8117
8118  inserts an optional argument of the type needed by 
8119 \family typewriter
8120
8121 \backslash
8122 figcaption
8123 \family default
8124 .
8125  Hopefully it will be renamed someday.
8126 \end_layout
8127
8128 \begin_layout Itemize
8129
8130 \family typewriter
8131
8132 \backslash
8133 objectname
8134 \family default
8135  (2.17.1) – same as 
8136 \family typewriter
8137
8138 \backslash
8139 figcaption
8140 \family default
8141  for the catalog ID optional parameter
8142 \end_layout
8143
8144 \begin_layout Itemize
8145
8146 \family typewriter
8147
8148 \backslash
8149 dataset
8150 \family default
8151  (2.17.1) – same as 
8152 \family typewriter
8153
8154 \backslash
8155 figcaption
8156 \family default
8157  for the catalog ID optional parameter
8158 \end_layout
8159
8160 \begin_layout Subsubsection
8161 Things not implemented, use TeX code
8162 \end_layout
8163
8164 \begin_layout Standard
8165 \begin_inset ERT
8166 status open
8167
8168 \begin_layout Plain Layout
8169
8170
8171 \backslash
8172 begin{sloppypar}
8173 \end_layout
8174
8175 \end_inset
8176
8177
8178 \end_layout
8179
8180 \begin_layout Standard
8181
8182 \family typewriter
8183
8184 \backslash
8185 altaffilmark
8186 \family default
8187  (2.3), 
8188 \family typewriter
8189
8190 \backslash
8191 altaffiltext
8192 \family default
8193  (2.3), 
8194 \family typewriter
8195
8196 \backslash
8197 eqnum
8198 \family default
8199  (2.12), 
8200 \family typewriter
8201
8202 \backslash
8203 setcounter{equation}
8204 \family default
8205  (2.12), Journal name abbreviations (2.13.4), 
8206 \family typewriter
8207
8208 \backslash
8209 figurenum
8210 \family default
8211  (2.14.1), 
8212 \family typewriter
8213
8214 \backslash
8215 epsscale
8216 \family default
8217  (2.14.1), 
8218 \family typewriter
8219
8220 \backslash
8221 plotone
8222 \family default
8223  (2.14.1), 
8224 \family typewriter
8225
8226 \backslash
8227 plottwo
8228 \family default
8229  (2.14.1), 
8230 \family typewriter
8231
8232 \backslash
8233 tablenum
8234 \family default
8235  (2.15.4), 
8236 \family typewriter
8237
8238 \backslash
8239 tableline
8240 \family default
8241  (2.15.4, insert it as the first element in the lefthand cell after where
8242  you want it.
8243  Don't use any of LyX's rules in the table), 
8244 \family typewriter
8245
8246 \backslash
8247 tablenotemark
8248 \family default
8249  (2.15.5), 
8250 \family typewriter
8251
8252 \backslash
8253 tablenotetext
8254 \family default
8255  (2.15.5), much of Misc (2.17, except 
8256 \family typewriter
8257
8258 \backslash
8259 objectname
8260 \family default
8261
8262 \family typewriter
8263
8264 \backslash
8265 dataset
8266 \family default
8267
8268 \family typewriter
8269
8270 \backslash
8271 url
8272 \family default
8273 , and 
8274 \family typewriter
8275
8276 \backslash
8277 email
8278 \family default
8279 ; see above), 
8280 \family typewriter
8281
8282 \backslash
8283 singlespace
8284 \family default
8285  (3.1), 
8286 \family typewriter
8287
8288 \backslash
8289 doublespace
8290 \family default
8291  (3.1), 
8292 \family typewriter
8293
8294 \backslash
8295 onecolumn
8296 \family default
8297  (3.2), 
8298 \family typewriter
8299
8300 \backslash
8301 twocolumn
8302 \family default
8303  (3.2)
8304 \end_layout
8305
8306 \begin_layout Standard
8307 \begin_inset ERT
8308 status open
8309
8310 \begin_layout Plain Layout
8311
8312
8313 \backslash
8314 end{sloppypar}
8315 \end_layout
8316
8317 \end_inset
8318
8319
8320 \end_layout
8321
8322 \begin_layout Subsubsection
8323 Things that cannot be implemented
8324 \end_layout
8325
8326 \begin_layout Standard
8327 \SpecialChar \ldots{}
8328  at least in any meaningful sort of way, so I suggest ignoring them.
8329  They are the references environment (2.13.3), and the deluxetable environment
8330  (2.15).
8331  If you really, really need to use deluxetable, I suggest editing it in
8332  a separate file with a text editor, then using 
8333 \family sans
8334 Insert\SpecialChar \menuseparator
8335 Child
8336 \begin_inset space ~
8337 \end_inset
8338
8339 Document
8340 \family default
8341  to include it in your LyX document.
8342  See the 
8343 \family typewriter
8344 aas_sample.lyx
8345 \family default
8346  file to see an example of this.
8347 \end_layout
8348
8349 \begin_layout Subsection
8350 FAQs, Tips, Tricks, and Other Ruminations
8351 \end_layout
8352
8353 \begin_layout Subsubsection
8354 Getting LyX and AASTeX to cooperate
8355 \end_layout
8356
8357 \begin_layout Standard
8358 It can be a bit tricky to get LyX to recognize a new layout and document
8359  class.
8360  When all else fails, do this:
8361 \end_layout
8362
8363 \begin_layout Enumerate
8364 Make certain that LaTeX can find AASTeX.
8365  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8366  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
8367 \family typewriter
8368 sample.tex
8369 \family default
8370 .
8371 \end_layout
8372
8373 \begin_layout Enumerate
8374 Make certain that 
8375 \family typewriter
8376 aastex.layout
8377 \family default
8378  appears in LyX's 
8379 \family typewriter
8380 layouts
8381 \family default
8382  folder
8383 \end_layout
8384
8385 \begin_layout Enumerate
8386 Rerun 
8387 \family sans
8388 Tools\SpecialChar \menuseparator
8389 Reconfigure
8390 \family default
8391  in LyX, then restart LyX.
8392 \end_layout
8393
8394 \begin_layout Enumerate
8395 Open a regular new file, not from a template.
8396  Does AASTeX appear in the class list in 
8397 \family sans
8398 Document\SpecialChar \menuseparator
8399 Settings
8400 \family default
8401 ?
8402 \end_layout
8403
8404 \begin_layout Standard
8405 If you get a warning from an existing AASTeX document about not being able
8406  to find the AASTeX layout or a message about 
8407 \begin_inset Quotes eld
8408 \end_inset
8409
8410 You should not mix title layouts with normal ones
8411 \begin_inset Quotes erd
8412 \end_inset
8413
8414 , things haven't been installed correctly.
8415 \end_layout
8416
8417 \begin_layout Subsubsection
8418 LaTeX error processing a table 
8419 \end_layout
8420
8421 \begin_layout Standard
8422 LyX, by default, attempts to center the table caption/title.
8423  This seems to produce a bad interaction in AASTeX so you should click somewhere
8424  in the caption/title, then select 
8425 \family sans
8426 Edit\SpecialChar \menuseparator
8427 Paragraph
8428 \begin_inset space ~
8429 \end_inset
8430
8431 Settings
8432 \family default
8433 , then set the 
8434 \family sans
8435 Alignment
8436 \family default
8437  to 
8438 \family sans
8439 Block
8440 \family default
8441 .
8442  This took care of it for me.
8443 \end_layout
8444
8445 \begin_layout Subsubsection
8446 References
8447 \end_layout
8448
8449 \begin_layout Standard
8450 A couple of things: 1) I have noticed some funny spacing in the reference
8451  entries in the text.
8452  When you enter the bibliography item data, make sure their is 
8453 \emph on
8454 no
8455 \emph default
8456  space between the last author and the parenthesis setting off the year;
8457  
8458 \emph on
8459 e.
8460 \begin_inset space \thinspace{}
8461 \end_inset
8462
8463 g.
8464 \begin_inset space \space{}
8465 \end_inset
8466
8467
8468 \emph default
8469 type 
8470 \family typewriter
8471 Ressler(1992)
8472 \family default
8473 , not 
8474 \family typewriter
8475 Ressler (1992)
8476 \family default
8477 .
8478  2) Entering the references at all is not obvious.
8479  The easiest thing is to start typing your first reference at the end of
8480  the document, then mark it as type 
8481 \family sans
8482 References
8483 \family default
8484 .
8485  That will put a small gray box in front of what you just typed.
8486  Click on the box to fill in the rest of the information.
8487  For new references, go to the end of an existing reference and press return.
8488  That will create a new line with its own box, etc.
8489 \end_layout
8490
8491 \begin_layout Subsubsection
8492 Including EPS files
8493 \end_layout
8494
8495 \begin_layout Standard
8496 Even though AASTeX provides its own figure commands (
8497 \family typewriter
8498
8499 \backslash
8500 plotone
8501 \family default
8502 , for example), I much prefer LaTeX's standard figure commands (with the
8503  default graphicx).
8504  You can insert the 
8505 \family typewriter
8506
8507 \backslash
8508 plotone
8509 \family default
8510 , etc.
8511 \begin_inset space ~
8512 \end_inset
8513
8514 commands as TeX code into a Figure Float box if you desire, but I never
8515  have much luck getting the layout right.
8516  With the standard graphics, LyX will insert a 
8517 \family typewriter
8518
8519 \backslash
8520 usepackage{graphicx}
8521 \family default
8522  command into the LaTeX preamble and handle the figures in the standard
8523  LaTeX2e way, interspersing the figures in the text.
8524  I believe ApJ accepts figures exactly this way now; AJ might still use
8525  the 
8526 \begin_inset Quotes eld
8527 \end_inset
8528
8529 stack everything at the end
8530 \begin_inset Quotes erd
8531 \end_inset
8532
8533  technique.
8534 \end_layout
8535
8536 \begin_layout Subsubsection
8537 Things I could have done, but didn't
8538 \end_layout
8539
8540 \begin_layout Standard
8541 There are a few 
8542 \begin_inset Quotes eld
8543 \end_inset
8544
8545 pretty
8546 \begin_inset Quotes erd
8547 \end_inset
8548
8549  things I could have implemented, but chose not to.
8550  For instance, I saw no point in double-spacing the text in the LyX window,
8551  even though it is double-spaced in the paper manuscript.
8552  Also, I chose not to make separate layouts for the preprint and preprint2
8553  styles.
8554  Since I assume you will spend most of your time in the plain manuscript
8555  mode anyway, I decided not to chew up more disk space with this.
8556  
8557 \end_layout
8558
8559 \begin_layout Subsection
8560 Final Caveat
8561 \end_layout
8562
8563 \begin_layout Standard
8564 Your mileage may vary.
8565  I've now had papers published by both ApJ and AJ that have had 98% of the
8566  effort done in LyX; the last 2% was the LaTeX post-processing and a few
8567  cleanups.
8568  I have had no trouble with the submission process, and I'm sure the journals
8569  were never aware that there might be a difference.
8570  So, go forth and publish!
8571 \end_layout
8572
8573 \begin_layout Section
8574 AMS LaTeX
8575 \end_layout
8576
8577 \begin_layout Standard
8578 by 
8579 \noun on
8580 David Johnson; updated by Richard Heck
8581 \end_layout
8582
8583 \begin_layout Standard
8584 \begin_inset VSpace bigskip
8585 \end_inset
8586
8587
8588 \end_layout
8589
8590 \begin_layout Standard
8591 \noindent
8592 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8593  papers to be submitted to American Mathematical Society publications.
8594  The layouts are not tailored to a specific journal, but easily can be.
8595  You should refer to the AMS documentation for specific instructions for
8596  each journal (usually it will entail only changing a single line in the
8597  TeX output).
8598  That documentation is available on the Web at 
8599 \begin_inset Flex URL
8600 status open
8601
8602 \begin_layout Plain Layout
8603
8604 http://www.ams.org
8605 \end_layout
8606
8607 \end_inset
8608
8609  or by ftp at 
8610 \begin_inset Flex URL
8611 status open
8612
8613 \begin_layout Plain Layout
8614
8615 ftp://ftp.ams.org/pub/tex/amslatex/
8616 \end_layout
8617
8618 \end_inset
8619
8620 .
8621  These layouts are appropriate, and useful, for any mathematical writing.
8622  
8623 \end_layout
8624
8625 \begin_layout Standard
8626 There are two basic AMS LaTeX layouts: 
8627 \end_layout
8628
8629 \begin_layout Itemize
8630 amsart: The standard AMS article format.
8631 \end_layout
8632
8633 \begin_layout Itemize
8634 amsbook: the standard AMS book (really, monograph) format.
8635  
8636 \end_layout
8637
8638 \begin_layout Standard
8639 The layouts themselves contain only the minimum necessary to use the AMS
8640  classes.
8641  They do not, in particular, contain any of the `theorem' environments used
8642  for setting theorems, lemmas, and the like.
8643  These are contained, instead, in the 
8644 \begin_inset Flex Code
8645 status collapsed
8646
8647 \begin_layout Plain Layout
8648 Theorems (AMS)
8649 \end_layout
8650
8651 \end_inset
8652
8653  module, which is loaded by default when when you select one of the AMS
8654  classes.
8655  (It can also be used with other classes and can be removed, if you would
8656  rather use something else.) Less commonly used environments are in the 
8657 \begin_inset Flex Code
8658 status collapsed
8659
8660 \begin_layout Plain Layout
8661 Theorems (AMS-Extended)
8662 \end_layout
8663
8664 \end_inset
8665
8666  module, which must be loaded manually.
8667 \end_layout
8668
8669 \begin_layout Standard
8670 By default, theorems and the like are numbered consecutively throughout
8671  the document, but this may be modified by loading the module 
8672 \begin_inset Flex Code
8673 status collapsed
8674
8675 \begin_layout Plain Layout
8676 Theorems (Order by Section)
8677 \end_layout
8678
8679 \end_inset
8680
8681  or, if you are using 
8682 \begin_inset Flex Code
8683 status collapsed
8684
8685 \begin_layout Plain Layout
8686 book (AMS)
8687 \end_layout
8688
8689 \end_inset
8690
8691 , the module 
8692 \begin_inset Flex Code
8693 status collapsed
8694
8695 \begin_layout Plain Layout
8696 Theorems (Order by Chapter)
8697 \end_layout
8698
8699 \end_inset
8700
8701 .
8702  These will number the results as 
8703 \begin_inset Formula $n.m$
8704 \end_inset
8705
8706 , where the first number refers to the section (or chapter) and the second
8707  refers to the total number of results so far in that section (or chapter).
8708  Many environments are also available unnumbered.
8709  These are indicated by an asterisk at the end.
8710  If you happen to want 
8711 \emph on
8712 only
8713 \emph default
8714  unnumbered results, the module 
8715 \begin_inset Flex Code
8716 status collapsed
8717
8718 \begin_layout Plain Layout
8719 Theorems (Starred)
8720 \end_layout
8721
8722 \end_inset
8723
8724  provides that option.
8725 \end_layout
8726
8727 \begin_layout Standard
8728 Note that these modules do not 
8729 \emph on
8730 have
8731 \emph default
8732  to be used with the AMS classes.
8733  It is perfectly possible to use the 
8734 \begin_inset Flex Code
8735 status collapsed
8736
8737 \begin_layout Plain Layout
8738 Theorems (AMS)
8739 \end_layout
8740
8741 \end_inset
8742
8743  module, and the others mentioned, with other classes, such as 
8744 \begin_inset Flex Code
8745 status collapsed
8746
8747 \begin_layout Plain Layout
8748 article
8749 \end_layout
8750
8751 \end_inset
8752
8753
8754 \begin_inset Flex Code
8755 status collapsed
8756
8757 \begin_layout Plain Layout
8758 report
8759 \end_layout
8760
8761 \end_inset
8762
8763
8764 \begin_inset Flex Code
8765 status collapsed
8766
8767 \begin_layout Plain Layout
8768 book (KOMA-script)
8769 \end_layout
8770
8771 \end_inset
8772
8773 , and so forth.
8774 \end_layout
8775
8776 \begin_layout Subsection
8777 What these layouts provide
8778 \end_layout
8779
8780 \begin_layout Standard
8781 There is a long list of included environments provided by these layouts.
8782  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8783  variety of `theorem' environments.
8784  However, the AMS recommends the environments that are available in LyX.
8785  
8786 \end_layout
8787
8788 \begin_layout Standard
8789 The following environments—as well as the standard environments, such as
8790  
8791 \begin_inset Flex Noun
8792 status collapsed
8793
8794 \begin_layout Plain Layout
8795 section
8796 \end_layout
8797
8798 \end_inset
8799
8800
8801 \begin_inset Flex Noun
8802 status collapsed
8803
8804 \begin_layout Plain Layout
8805 bibliography
8806 \end_layout
8807
8808 \end_inset
8809
8810
8811 \begin_inset Flex Noun
8812 status collapsed
8813
8814 \begin_layout Plain Layout
8815 title
8816 \end_layout
8817
8818 \end_inset
8819
8820
8821 \begin_inset Flex Noun
8822 status collapsed
8823
8824 \begin_layout Plain Layout
8825 author
8826 \end_layout
8827
8828 \end_inset
8829
8830 , and 
8831 \begin_inset Flex Noun
8832 status collapsed
8833
8834 \begin_layout Plain Layout
8835 date
8836 \end_layout
8837
8838 \end_inset
8839
8840 —are provided by 
8841 \begin_inset Flex Code
8842 status collapsed
8843
8844 \begin_layout Plain Layout
8845 article (AMS)
8846 \end_layout
8847
8848 \end_inset
8849
8850  and 
8851 \begin_inset Flex Code
8852 status collapsed
8853
8854 \begin_layout Plain Layout
8855 book (AMS)
8856 \end_layout
8857
8858 \end_inset
8859
8860 :
8861 \end_layout
8862
8863 \begin_layout Description
8864 Address This should be the author's permanent address.
8865 \end_layout
8866
8867 \begin_layout Description
8868 Current
8869 \begin_inset space ~
8870 \end_inset
8871
8872 Address This should be the author's temporary address at the time of submission,
8873  if different from the Address.
8874 \end_layout
8875
8876 \begin_layout Description
8877 Email Author's e-mail address
8878 \end_layout
8879
8880 \begin_layout Description
8881 URL Author's Web address, if desired.
8882 \end_layout
8883
8884 \begin_layout Description
8885 Keywords Key words or phrases used to identify specific topics discussed
8886  in the paper.
8887 \end_layout
8888
8889 \begin_layout Description
8890 Subjectclass These refer to the AMS Subject Classifications, published and
8891  described in 
8892 \emph on
8893 Mathematical Reviews
8894 \emph default
8895 .
8896  These are also available online at the AMS cites listed above.
8897 \end_layout
8898
8899 \begin_layout Description
8900 Thanks
8901 \end_layout
8902
8903 \begin_layout Description
8904 Dedicatory
8905 \end_layout
8906
8907 \begin_layout Description
8908 Translator
8909 \end_layout
8910
8911 \begin_layout Standard
8912 The following environments are provided by both the 
8913 \begin_inset Flex Code
8914 status collapsed
8915
8916 \begin_layout Plain Layout
8917 Theorems
8918 \end_layout
8919
8920 \end_inset
8921
8922  and 
8923 \begin_inset Flex Code
8924 status collapsed
8925
8926 \begin_layout Plain Layout
8927 Theorems (AMS)
8928 \end_layout
8929
8930 \end_inset
8931
8932  modules, in the latter case in both starred (unnumbered) and unstarred
8933  (numbered) versions.
8934  These same environments are provided only in the starred versions by the
8935  
8936 \begin_inset Flex Code
8937 status collapsed
8938
8939 \begin_layout Plain Layout
8940 Theorems (Starred)
8941 \end_layout
8942
8943 \end_inset
8944
8945  module:
8946 \end_layout
8947
8948 \begin_layout Theorem
8949 This is typically used for the statements of major results.
8950  
8951 \end_layout
8952
8953 \begin_layout Corollary*
8954 This is used for statements which follow fairly directly from previous statement
8955 s.
8956  Again, these can be major results.
8957  
8958 \end_layout
8959
8960 \begin_layout Lemma
8961 These are smaller results needed to prove other statements.
8962 \end_layout
8963
8964 \begin_layout Proposition
8965 These are less major results which (hopefully) add to the general theory
8966  being discussed.
8967 \end_layout
8968
8969 \begin_layout Conjecture
8970 These are statements provided without justification, which the author does
8971  not know how to prove, but which seem to be true (to the author, at least).
8972 \end_layout
8973
8974 \begin_layout Definition*
8975 Guess what this is for.
8976  The font is different for this environment than for the previous ones.
8977  
8978 \end_layout
8979
8980 \begin_layout Example*
8981 Used for examples illustrating proven results.
8982 \end_layout
8983
8984 \begin_layout Problem
8985 It's not really known what this is for.
8986  You should figure it out.
8987 \end_layout
8988
8989 \begin_layout Exercise*
8990 Write a description for this one.
8991 \end_layout
8992
8993 \begin_layout Remark
8994 This environment is also a type of theorem, usually a lesser sort of observation.
8995 \end_layout
8996
8997 \begin_layout Claim*
8998 Often used in the course of giving a proof of a larger result.
8999 \end_layout
9000
9001 \begin_layout Case
9002 Generally, these are used to break up long arguments, using specific instances
9003  of some condition.
9004  
9005 \end_layout
9006
9007 \begin_layout Case
9008 The numbering scheme for cases is on its own, not together with other numbered
9009  statements.
9010  
9011 \end_layout
9012
9013 \begin_layout Proof
9014 At the end of this environment, a QED symbol (usually a square, but it can
9015  vary with different styles) is placed.
9016  If you want to have other environments within this one—for example, Case
9017  environments—and have the QED symbol appear only after them, then the other
9018  environments need to be nested within the proof environment.
9019  See the section 
9020 \emph on
9021 Nesting Environments
9022 \emph default
9023  of the 
9024 \emph on
9025 User's Guide
9026 \emph default
9027  for information on nesting.
9028 \end_layout
9029
9030 \begin_layout Standard
9031 And these environments are provided by 
9032 \begin_inset Flex Code
9033 status collapsed
9034
9035 \begin_layout Plain Layout
9036 Theorems (AMS-Extended)
9037 \end_layout
9038
9039 \end_inset
9040
9041 :
9042 \end_layout
9043
9044 \begin_layout Criterion*
9045 A required condition.
9046 \end_layout
9047
9048 \begin_layout Algorithm*
9049 A general procedure to be used.
9050 \end_layout
9051
9052 \begin_layout Axiom*
9053 This is a property or statement taken as true within the system being discussed.
9054 \end_layout
9055
9056 \begin_layout Condition*
9057 Sometimes used to state a condition assumed within the present context of
9058  discussion.
9059 \end_layout
9060
9061 \begin_layout Note*
9062 Similar to a Remark.
9063 \end_layout
9064
9065 \begin_layout Notation*
9066 Used for the explanation of, yes, notation.
9067 \end_layout
9068
9069 \begin_layout Summary
9070 Do we really need to tell you? 
9071 \end_layout
9072
9073 \begin_layout Acknowledgement*
9074 Acknowledgement.
9075 \end_layout
9076
9077 \begin_layout Conclusion*
9078 Sometimes used at the end of a long train of argument.
9079 \end_layout
9080
9081 \begin_layout Fact
9082 Used in a way similar to Proposition, though perhaps lower on the scale.
9083 \end_layout
9084
9085 \begin_layout Standard
9086 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9087  fonts packages.
9088  They need to be available on your system in order to use these environments.
9089 \end_layout
9090
9091 \begin_layout Section
9092 AGU journals (
9093 \family sans
9094 aguplus
9095 \family default
9096 )
9097 \end_layout
9098
9099 \begin_layout Standard
9100 by 
9101 \shape smallcaps
9102 Martin Vermeer
9103 \end_layout
9104
9105 \begin_layout Subsection
9106 Description
9107 \end_layout
9108
9109 \begin_layout Standard
9110 These are the layout files for some of the journals of the American Geophysical
9111  Society.
9112  It is assumed that you have both the AGU's own class files and AGUplus
9113  installed (everything to be found at
9114 \begin_inset Flex URL
9115 status collapsed
9116
9117 \begin_layout Plain Layout
9118
9119 ftp://ftp.agu.org/journals/latex/journals
9120 \end_layout
9121
9122 \end_inset
9123
9124 ).
9125 \end_layout
9126
9127 \begin_layout Subsection
9128 New styles
9129 \end_layout
9130
9131 \begin_layout Standard
9132 Redefined are 
9133 \family sans
9134 Paragraph
9135 \family default
9136
9137 \family sans
9138 Paragraph*
9139 \family default
9140 .
9141  They are still called this in the LyX GUI, though their LaTeX equivalents
9142  in the AGU classes are 
9143 \family sans
9144 Subsubsubsection
9145 \family default
9146  and 
9147 \family sans
9148 Subsubsubsection*
9149 \family default
9150 .
9151 \end_layout
9152
9153 \begin_layout Standard
9154 Newly defined styles are 
9155 \family sans
9156 Left_Header
9157 \family default
9158
9159 \family sans
9160 Right_Header
9161 \family default
9162
9163 \family sans
9164 Received
9165 \family default
9166
9167 \family sans
9168 Revised
9169 \family default
9170
9171 \family sans
9172 Accepted
9173 \family default
9174
9175 \family sans
9176 CCC
9177 \family default
9178
9179 \family sans
9180 PaperId
9181 \family default
9182
9183 \family sans
9184 AuthorAddr
9185 \family default
9186
9187 \family sans
9188 SlugComment
9189 \family default
9190 .
9191  These are mostly manuscript attributes and defined in the AGU class documentati
9192 on.
9193 \end_layout
9194
9195 \begin_layout Standard
9196 I suspect this is still badly incomplete.
9197 \end_layout
9198
9199 \begin_layout Subsection
9200 New floats
9201 \end_layout
9202
9203 \begin_layout Standard
9204
9205 \family sans
9206 Planotable
9207 \family default
9208  and 
9209 \family sans
9210 Plate
9211 \family default
9212 .
9213  We also have a new 
9214 \family sans
9215 Table_Caption
9216 \family default
9217 .
9218 \end_layout
9219
9220 \begin_layout Subsection
9221 Supported journals
9222 \end_layout
9223
9224 \begin_layout Itemize
9225
9226 \emph on
9227 Journal of Geophysical Research
9228 \emph default
9229
9230 \family typewriter
9231 jgrga.layout
9232 \family default
9233  — Martin Vermeer
9234 \end_layout
9235
9236 \begin_layout Standard
9237 Add your own, it isn't so hard! Look at the 
9238 \family typewriter
9239 jgrga.layout
9240 \family default
9241  example and 
9242 \family typewriter
9243 aguplus.inc
9244 \family default
9245 .
9246 \end_layout
9247
9248 \begin_layout Subsection
9249 Bugs and things to remember
9250 \end_layout
9251
9252 \begin_layout Standard
9253 In order to use the new layouts, you must remember to do the following for
9254  a new document:
9255 \end_layout
9256
9257 \begin_layout Enumerate
9258
9259 \emph on
9260 Turn off babel
9261 \emph default
9262 .
9263  This can be done in the 
9264 \family sans
9265 Layout\SpecialChar \menuseparator
9266 Document
9267 \family default
9268  or 
9269 \family sans
9270 Document\SpecialChar \menuseparator
9271 Settings
9272 \family default
9273  menu item.
9274  (AGU articles are always in English, right? So 
9275 \emph on
9276 don't
9277 \emph default
9278  choose a language.)
9279 \end_layout
9280
9281 \begin_layout Enumerate
9282 Enter 
9283 \family typewriter
9284 jgrga
9285 \family default
9286  into the document's 
9287 \family sans
9288 Extra Options
9289 \family default
9290  field.
9291  (Yes, this is a bug.)
9292 \end_layout
9293
9294 \begin_layout Enumerate
9295 Make sure you use the 
9296 \family typewriter
9297 agu.bst
9298 \family default
9299  bibliography style, by entering 
9300 \family sans
9301 agu
9302 \family default
9303  into the second field of the BibTeX inset.
9304  None of the standard styles will do.
9305 \end_layout
9306
9307 \begin_layout Section
9308 Broadway
9309 \end_layout
9310
9311 \begin_layout Standard
9312 by 
9313 \shape smallcaps
9314 Garst Reese
9315 \end_layout
9316
9317 \begin_layout Subsection
9318 Introduction
9319 \end_layout
9320
9321 \begin_layout Standard
9322 Broadway is for writing plays.
9323  The format is more decorative than Hollywood, and much less standardized.
9324  This format should be suitable for workshops.
9325 \end_layout
9326
9327 \begin_layout Subsection
9328 Special problems
9329 \end_layout
9330
9331 \begin_layout Standard
9332 The same as in Hollywood.
9333 \end_layout
9334
9335 \begin_layout Subsection
9336 Special features
9337 \end_layout
9338
9339 \begin_layout Standard
9340 Insert the 
9341 \family sans
9342 Speaker
9343 \family default
9344  names as labels then cross-reference the label to insert the name.
9345  The cross-reference dialog will show the current cast of characters.
9346 \end_layout
9347
9348 \begin_layout Subsection
9349 Paper size and Margins
9350 \end_layout
9351
9352 \begin_layout Standard
9353 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9354 \end_layout
9355
9356 \begin_layout Subsection
9357 Environments
9358 \end_layout
9359
9360 \begin_layout Standard
9361 The following environments are available.
9362  You can use broadway.bind to get the bind keys shown at the right.
9363 \end_layout
9364
9365 \begin_layout Itemize
9366
9367 \family sans
9368 Standard
9369 \begin_inset Newline newline
9370 \end_inset
9371
9372
9373 \family default
9374 You should not have to use this, but it is here for anything that does not
9375  fit otherwise.
9376 \end_layout
9377
9378 \begin_layout Itemize
9379
9380 \family sans
9381 Narrative
9382 \begin_inset space \hfill{}
9383 \end_inset
9384
9385 M-z n
9386 \begin_inset Newline newline
9387 \end_inset
9388
9389
9390 \family default
9391 Used to describe stage setting and the action.
9392  First use of speaker names in all CAPs.
9393 \end_layout
9394
9395 \begin_layout Itemize
9396
9397 \family sans
9398 ACT
9399 \begin_inset space \hfill{}
9400 \end_inset
9401
9402 M-z a
9403 \begin_inset Newline newline
9404 \end_inset
9405
9406
9407 \family default
9408 Automatically numbered.
9409  On screen it will be arabic, but will print as Roman.
9410 \end_layout
9411
9412 \begin_layout Itemize
9413
9414 \family sans
9415 ACT*
9416 \begin_inset space \hfill{}
9417 \end_inset
9418
9419 M-z S at
9420 \begin_inset Newline newline
9421 \end_inset
9422
9423
9424 \family default
9425 Subtitle for 
9426 \family sans
9427 ACT.
9428
9429 \family default
9430  It is just centered text.
9431 \end_layout
9432
9433 \begin_layout Itemize
9434
9435 \family sans
9436 SCENE
9437 \begin_inset space \hfill{}
9438 \end_inset
9439
9440 M-z S-S
9441 \begin_inset Newline newline
9442 \end_inset
9443
9444
9445 \family default
9446 Not automatically numbered.
9447  You supply the number.
9448  This is because I couldn't figure out how.
9449 \end_layout
9450
9451 \begin_layout Itemize
9452
9453 \family sans
9454 AT_RISE:
9455 \begin_inset space \hfill{}
9456 \end_inset
9457
9458 M-z S-R
9459 \begin_inset Newline newline
9460 \end_inset
9461
9462
9463 \family default
9464 A special case of Narrative to describe the setting and action as the curtain
9465  rises.
9466 \end_layout
9467
9468 \begin_layout Itemize
9469
9470 \family sans
9471 Speaker
9472 \begin_inset space \hfill{}
9473 \end_inset
9474
9475 M-z s
9476 \begin_inset Newline newline
9477 \end_inset
9478
9479
9480 \family default
9481 The speaker's (actor's) title, centered in all CAPS.
9482 \end_layout
9483
9484 \begin_layout Itemize
9485
9486 \family sans
9487 Parenthetical
9488 \begin_inset space \hfill{}
9489 \end_inset
9490
9491 M-z p
9492 \begin_inset Newline newline
9493 \end_inset
9494
9495
9496 \family default
9497 Instructions to the speaker.
9498  The parentheses are automatically inserted.
9499  The ( will appear on screen, but both will be in the printed play.
9500  This environment is only used within 
9501 \family sans
9502 Dialogue
9503 \family default
9504 .
9505 \end_layout
9506
9507 \begin_layout Itemize
9508
9509 \family sans
9510 Dialogue
9511 \begin_inset space \hfill{}
9512 \end_inset
9513
9514 M-z d
9515 \begin_inset Newline newline
9516 \end_inset
9517
9518
9519 \family default
9520 What the Speaker says.
9521 \end_layout
9522
9523 \begin_layout Itemize
9524
9525 \family sans
9526 CURTAIN
9527 \begin_inset space \hfill{}
9528 \end_inset
9529
9530 M-z S-C
9531 \begin_inset Newline newline
9532 \end_inset
9533
9534
9535 \family default
9536 The curtain comes down.
9537 \end_layout
9538
9539 \begin_layout Itemize
9540
9541 \family sans
9542 Title
9543 \begin_inset space \hfill{}
9544 \end_inset
9545
9546 M-z S-T
9547 \end_layout
9548
9549 \begin_layout Itemize
9550
9551 \family sans
9552 Author
9553 \begin_inset space \hfill{}
9554 \end_inset
9555
9556 M-z S-A
9557 \end_layout
9558
9559 \begin_layout Itemize
9560
9561 \family sans
9562 Right_Address
9563 \begin_inset space \hfill{}
9564 \end_inset
9565
9566 M-z r
9567 \end_layout
9568
9569 \begin_layout Standard
9570 Hello there.
9571 \end_layout
9572
9573 \begin_layout Section
9574 Dinbrief
9575 \end_layout
9576
9577 \begin_layout Standard
9578 The document class 
9579 \family sans
9580 dinbrief
9581 \family default
9582  can be used to type letters according to German conventions.
9583  A template file is included in 
9584 \family typewriter
9585 .../lyx/share/templates
9586 \family default
9587  for you to use as a starting point.
9588 \end_layout
9589
9590 \begin_layout Section
9591 EGS journals (
9592 \family sans
9593 egs
9594 \family default
9595 )
9596 \end_layout
9597
9598 \begin_layout Standard
9599 by 
9600 \shape smallcaps
9601 Martin Vermeer
9602 \end_layout
9603
9604 \begin_layout Subsection
9605 Description
9606 \end_layout
9607
9608 \begin_layout Standard
9609 This is the layout file for the European Geophysical Society journals.
9610  The needed 
9611 \family typewriter
9612 egs.cls
9613 \family default
9614  can be downloaded from the web site of the EGS under 
9615 \begin_inset Flex URL
9616 status collapsed
9617
9618 \begin_layout Plain Layout
9619
9620 www.copernicus.org
9621 \end_layout
9622
9623 \end_inset
9624
9625 .
9626 \end_layout
9627
9628 \begin_layout Subsection
9629 New styles
9630 \end_layout
9631
9632 \begin_layout Standard
9633
9634 \family sans
9635 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9636  Accepted
9637 \family default
9638
9639 \family sans
9640 Offsets
9641 \family default
9642 .
9643  The current layout file is unfortunately very unmodular and would benefit
9644  from using the various 
9645 \family typewriter
9646 std*.inc
9647 \family default
9648  file inclusions.
9649 \end_layout
9650
9651 \begin_layout Section
9652 Elsevier Journals
9653 \end_layout
9654
9655 \begin_layout Standard
9656 By 
9657 \noun on
9658 Rod Pinna
9659 \end_layout
9660
9661 \begin_layout Standard
9662 Elsevier Science Publishers B.V.
9663  provides a standard LaTeX document class (
9664 \family typewriter
9665 elsart.cls
9666 \family default
9667 ) for submitting articles to their various journals.
9668  The style file can be downloaded directly from their web site: 
9669 \begin_inset Flex URL
9670 status collapsed
9671
9672 \begin_layout Plain Layout
9673
9674 http://www.elsevier.com/wps/find/authorsview.authors/latex
9675 \end_layout
9676
9677 \end_inset
9678
9679 .
9680  Instructions are supplied along with the class file, which details the
9681  requirements of the publishers.
9682  LyX includes a package that allows for the use of this class, by a layout
9683  and a template file.
9684  Installation of the class file is the same as for any other LaTeX package;
9685  instructions are provided in the Elsevier documentation.
9686 \end_layout
9687
9688 \begin_layout Standard
9689 To make use of 
9690 \family typewriter
9691 elsart.cls
9692 \family default
9693 , a file 
9694 \family typewriter
9695 elsart.layout
9696 \family default
9697  is supplied.
9698  As the Elsevier class file is based mainly on the standard article class,
9699  most of the normal functionality is provided.
9700  The Elsevier class defines a number of mathematical environments, which
9701  are similar to the AMS environments.
9702  These commands are all described in the Elsevier documentation, and are
9703  available in LyX.
9704 \end_layout
9705
9706 \begin_layout Standard
9707 The easiest way to use the Elsevier style is to base documents on the included
9708  template file.
9709  It is best not to use options such as fancy headings or the geometry package,
9710  as elements such as these are defined by Elsevier in their style file.
9711  Ideally, no extra packages except those mentioned in the Elsevier documentation
9712  should be used.
9713  Essentially, Elsevier require as 
9714 \begin_inset Quotes eld
9715 \end_inset
9716
9717 clean
9718 \begin_inset Quotes erd
9719 \end_inset
9720
9721  a LaTeX file as possible, as their intention is to take the supplied file
9722  and replace the class file with one for the particular journal to which
9723  the paper has been submitted.
9724  This also means that not too much time should be spent on the formating
9725  of the document.
9726  When it comes to be published, this will change anyway.
9727  The rest of the usage for this layout is substantially the same as for
9728  the normal article class.
9729  For details of what Elsevier do and don't allow, refer to their documentation.
9730 \end_layout
9731
9732 \begin_layout Section
9733 Foils [aka 
9734 \family sans
9735 FoilTeX
9736 \family default
9737 ]
9738 \begin_inset CommandInset label
9739 LatexCommand label
9740 name "sec:foiltex"
9741
9742 \end_inset
9743
9744
9745 \end_layout
9746
9747 \begin_layout Standard
9748 by 
9749 \noun on
9750 Allan Rae
9751 \end_layout
9752
9753 \begin_layout Subsection
9754 Introduction
9755 \end_layout
9756
9757 \begin_layout Standard
9758 This section describes how to use LyX to make slides for overhead projectors.
9759  There are two document classes that can do this: the default slides class
9760  and the 
9761 \family sans
9762 FoilTeX
9763 \family default
9764  slides class.
9765  This section documents the latter.
9766 \end_layout
9767
9768 \begin_layout Standard
9769 I'm going to say this again, nice and clear, so that there's no misunderstanding
9770 :
9771 \end_layout
9772
9773 \begin_layout Standard
9774 \begin_inset VSpace bigskip
9775 \end_inset
9776
9777
9778 \end_layout
9779
9780 \begin_layout Standard
9781 \align center
9782
9783 \size large
9784 This section documents the class 
9785 \begin_inset Quotes eld
9786 \end_inset
9787
9788
9789 \family sans
9790 slides (FoilTeX)
9791 \family default
9792
9793 \begin_inset Quotes erd
9794 \end_inset
9795
9796  
9797 \emph on
9798 only.
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 If you're looking for the documentation for 
9810 \begin_inset Quotes eld
9811 \end_inset
9812
9813
9814 \family sans
9815 slides (default)
9816 \family default
9817
9818 \begin_inset Quotes erd
9819 \end_inset
9820
9821 , check out section
9822 \begin_inset space ~
9823 \end_inset
9824
9825
9826 \begin_inset CommandInset ref
9827 LatexCommand ref
9828 reference "sec:slitex"
9829
9830 \end_inset
9831
9832 .
9833  If your machine doesn't have the 
9834 \family sans
9835 foils
9836 \family default
9837  class [
9838 \begin_inset Quotes eld
9839 \end_inset
9840
9841
9842 \family sans
9843 slides (FoilTeX)
9844 \family default
9845
9846 \begin_inset Quotes erd
9847 \end_inset
9848
9849 ] installed, you'll probably have to use the default 
9850 \family sans
9851 slides
9852 \family default
9853  class, which isn't quite as good as 
9854 \family sans
9855 foils.
9856 \end_layout
9857
9858 \begin_layout Standard
9859 The 
9860 \family sans
9861 foils
9862 \family default
9863  class is designed for use with version 2.1 of the 
9864 \family sans
9865 foils.cls
9866 \family default
9867  LaTeX class file which is now an integral part of LaTeX2e.
9868 \end_layout
9869
9870 \begin_layout Subsection
9871 Getting Started
9872 \end_layout
9873
9874 \begin_layout Standard
9875 Obviously, to use this document class, you need to select 
9876 \begin_inset Quotes eld
9877 \end_inset
9878
9879
9880 \family sans
9881 slides (FoilTeX)
9882 \family default
9883
9884 \begin_inset Quotes erd
9885 \end_inset
9886
9887  from the 
9888 \family sans
9889 Class
9890 \family default
9891  entry in the 
9892 \family sans
9893 Document
9894 \begin_inset space ~
9895 \end_inset
9896
9897 Layout
9898 \family default
9899  dialog.
9900  There are some settings in the 
9901 \family sans
9902 Document
9903 \begin_inset space ~
9904 \end_inset
9905
9906 Layout
9907 \family default
9908  dialog that you should know about that are specific to this class:
9909 \end_layout
9910
9911 \begin_layout Itemize
9912 Don't change the options 
9913 \family sans
9914 Sides
9915 \family default
9916  and 
9917 \family sans
9918 Columns
9919 \family default
9920  on the 
9921 \family sans
9922 Document
9923 \begin_inset space ~
9924 \end_inset
9925
9926 Layout
9927 \family default
9928  dialog.
9929  They're ignored by the 
9930 \family sans
9931 foils
9932 \family default
9933  class.
9934 \end_layout
9935
9936 \begin_layout Itemize
9937 The default font size is 20
9938 \begin_inset space \thinspace{}
9939 \end_inset
9940
9941 pt with the other options being 17
9942 \begin_inset space \thinspace{}
9943 \end_inset
9944
9945 pt, 25
9946 \begin_inset space \thinspace{}
9947 \end_inset
9948
9949 pt and 30
9950 \begin_inset space \thinspace{}
9951 \end_inset
9952
9953 pt.
9954 \end_layout
9955
9956 \begin_layout Itemize
9957 The default font is 
9958 \family sans
9959 sans
9960 \family default
9961  
9962 \family sans
9963 serif
9964 \family default
9965  but all math equations are still typeset in the usual roman font.
9966 \end_layout
9967
9968 \begin_layout Itemize
9969
9970 \family sans
9971 FoilTeX
9972 \family default
9973  supports A4 and Letter paper sizes as well as a special size for working
9974  with 35
9975 \begin_inset space \thinspace{}
9976 \end_inset
9977
9978 mm slides.
9979  It doesn't support A5, B5, legal or executive paper sizes.
9980 \end_layout
9981
9982 \begin_layout Itemize
9983 Don't bother changing the 
9984 \family sans
9985 Float Placement
9986 \family default
9987  settings because they are ignored anyway.
9988  All floats appear where they are defined in the text.
9989 \end_layout
9990
9991 \begin_layout Itemize
9992 The 
9993 \family sans
9994 Pagestyle
9995 \family default
9996  setting behaves a bit differently for this class.
9997  
9998 \family sans
9999 FoilTeX
10000 \family default
10001  provides extensive footer and header capabilities including a user-defined
10002  logo.
10003  See section
10004 \begin_inset space ~
10005 \end_inset
10006
10007
10008 \begin_inset CommandInset ref
10009 LatexCommand ref
10010 reference "sec:foilfoot"
10011
10012 \end_inset
10013
10014  for more details.
10015  The title page is treated differently to all other pages in the document
10016  and is 
10017 \emph on
10018 always
10019 \emph default
10020  unnumbered and 
10021 \emph on
10022 always
10023 \emph default
10024  has the logo centered at the bottom of the page (if one is defined).
10025  The possible page style choices and what they do are as follows:
10026 \end_layout
10027
10028 \begin_deeper
10029 \begin_layout Labeling
10030 \labelwidthstring MMMMMMM
10031
10032 \family sans
10033 \series bold
10034 empty
10035 \family default
10036 \series default
10037  The final output contains no page numbers, or other headers or footers
10038  (except footnotes of course).
10039  
10040 \end_layout
10041
10042 \begin_layout Labeling
10043 \labelwidthstring MMMMMMM
10044
10045 \family sans
10046 \series bold
10047 plain
10048 \family default
10049 \series default
10050  The final output contains page numbers centered at the bottom of the page.
10051  No other headings or footers (other than footnotes).
10052 \end_layout
10053
10054 \begin_layout Labeling
10055 \labelwidthstring MMMMMMM
10056
10057 \series bold
10058 foilheadings
10059 \series default
10060  Page numbers in lower right corner.
10061  Additional headers and footers are also shown.
10062  This is also the default.
10063 \end_layout
10064
10065 \begin_layout Labeling
10066 \labelwidthstring MMMMMMM
10067
10068 \series bold
10069 fancy
10070 \series default
10071  Gives you access to the 
10072 \family sans
10073 fancyheadings
10074 \family default
10075  package although its use with 
10076 \family sans
10077 FoilTeX
10078 \family default
10079  is discouraged by the writer of the 
10080 \family sans
10081 FoilTeX
10082 \family default
10083  package because of some potential page layout clashes.
10084 \end_layout
10085
10086 \end_deeper
10087 \begin_layout Subsubsection
10088 Extra Options
10089 \end_layout
10090
10091 \begin_layout Standard
10092 The following options may be used in the extra class options in the 
10093 \family sans
10094 Document\SpecialChar \menuseparator
10095 Settings
10096 \family default
10097  dialog.
10098 \end_layout
10099
10100 \begin_layout Labeling
10101 \labelwidthstring MMMMMMx
10102
10103 \series bold
10104 35mmSlide
10105 \series default
10106  This sets up the page layout for 7.33
10107 \begin_inset space \thinspace{}
10108 \end_inset
10109
10110 in by 11
10111 \begin_inset space \thinspace{}
10112 \end_inset
10113
10114 in paper, which is about the same aspect ratio as a 35
10115 \begin_inset space \thinspace{}
10116 \end_inset
10117
10118 mm slide, making it a bit easier to work with this medium.
10119 \end_layout
10120
10121 \begin_layout Labeling
10122 \labelwidthstring MMMMMMx
10123
10124 \series bold
10125 headrule
10126 \series default
10127  Places a rule across the page below the header on every page except the
10128  title page.
10129 \end_layout
10130
10131 \begin_layout Labeling
10132 \labelwidthstring MMMMMMx
10133
10134 \series bold
10135 footrule
10136 \series default
10137  Places a rule across the page above the footer on every page except the
10138  title page.
10139 \end_layout
10140
10141 \begin_layout Labeling
10142 \labelwidthstring MMMMMMx
10143
10144 \series bold
10145 dvips
10146 \series default
10147  This is automatically set each time you create a new 
10148 \family sans
10149 foils
10150 \family default
10151  document.
10152  This option tells 
10153 \family sans
10154 FoilTeX
10155 \family default
10156  to use the dvips driver to rotate those pages that are set as landscape
10157  foils.
10158 \end_layout
10159
10160 \begin_layout Labeling
10161 \labelwidthstring MMMMMMx
10162
10163 \series bold
10164 landscape
10165 \series default
10166  Simply changes the page dimensions to those of a landscape page but doesn't
10167  do any rotation.
10168  Thus if you use this option you need to use an external program to rotate
10169  each page or feed your paper through your printer as landscape.
10170  Note that this option effectively reverses the roles of the 
10171 \family sans
10172 Foilhead
10173 \family default
10174  and 
10175 \family sans
10176 Rotatefoilhead
10177 \family default
10178  environments (don't worry these are described in the next section).
10179 \end_layout
10180
10181 \begin_layout Labeling
10182 \labelwidthstring MMMMMMx
10183
10184 \series bold
10185 leqno
10186 \series default
10187  Equation numbers on the left.
10188 \end_layout
10189
10190 \begin_layout Labeling
10191 \labelwidthstring MMMMMMx
10192
10193 \series bold
10194 fleqn
10195 \series default
10196  Flush-left equations.
10197 \end_layout
10198
10199 \begin_layout Subsection
10200 Supported Environments
10201 \end_layout
10202
10203 \begin_layout Standard
10204 Most of the environments commonly supported in other classes are also supported
10205  by the 
10206 \family sans
10207 foils
10208 \family default
10209  class.
10210  There are several additional environments provided by 
10211 \family sans
10212 FoilTeX
10213 \family default
10214  as well as a couple added by LyX.
10215  The following environments are shared with other classes:
10216 \end_layout
10217
10218 \begin_layout Standard
10219 \begin_inset ERT
10220 status open
10221
10222 \begin_layout Plain Layout
10223
10224
10225 \backslash
10226 begin{multicols}{2}
10227 \end_layout
10228
10229 \end_inset
10230
10231
10232 \end_layout
10233
10234 \begin_layout Itemize
10235
10236 \family sans
10237 Standard
10238 \end_layout
10239
10240 \begin_layout Itemize
10241
10242 \family sans
10243 Itemize
10244 \end_layout
10245
10246 \begin_layout Itemize
10247
10248 \family sans
10249 Enumerate
10250 \end_layout
10251
10252 \begin_layout Itemize
10253
10254 \family sans
10255 Description
10256 \end_layout
10257
10258 \begin_layout Itemize
10259
10260 \family sans
10261 List
10262 \end_layout
10263
10264 \begin_layout Itemize
10265
10266 \family sans
10267 LyX-Code
10268 \end_layout
10269
10270 \begin_layout Itemize
10271
10272 \family sans
10273 Verse
10274 \end_layout
10275
10276 \begin_layout Itemize
10277
10278 \family sans
10279 Quote
10280 \end_layout
10281
10282 \begin_layout Itemize
10283
10284 \family sans
10285 Quotation
10286 \end_layout
10287
10288 \begin_layout Itemize
10289
10290 \family sans
10291 Title
10292 \end_layout
10293
10294 \begin_layout Itemize
10295
10296 \family sans
10297 Author
10298 \end_layout
10299
10300 \begin_layout Itemize
10301
10302 \family sans
10303 Date
10304 \end_layout
10305
10306 \begin_layout Itemize
10307
10308 \family sans
10309 Abstract
10310 \end_layout
10311
10312 \begin_layout Itemize
10313
10314 \family sans
10315 Bibliography
10316 \end_layout
10317
10318 \begin_layout Itemize
10319
10320 \family sans
10321 Address
10322 \end_layout
10323
10324 \begin_layout Itemize
10325
10326 \family sans
10327 RightAddress
10328 \end_layout
10329
10330 \begin_layout Itemize
10331
10332 \family sans
10333 Caption
10334 \end_layout
10335
10336 \begin_layout Itemize
10337
10338 \family sans
10339 Comment
10340 \end_layout
10341
10342 \begin_layout Standard
10343 \begin_inset ERT
10344 status open
10345
10346 \begin_layout Plain Layout
10347
10348
10349 \backslash
10350 end{multicols}
10351 \end_layout
10352
10353 \end_inset
10354
10355
10356 \end_layout
10357
10358 \begin_layout Standard
10359 That is, all the major environments apart from the sectioning environments.
10360  Since foils are essentially self-contained sections, with a title and body,
10361  
10362 \family sans
10363 FoilTeX
10364 \family default
10365  provides specific commands for starting new foils and these are:
10366 \end_layout
10367
10368 \begin_layout Itemize
10369
10370 \family sans
10371 Foilhead
10372 \end_layout
10373
10374 \begin_layout Itemize
10375
10376 \family sans
10377 Rotatefoilhead
10378 \end_layout
10379
10380 \begin_layout Standard
10381 LyX also provides slightly modified versions of these two environments called:
10382 \end_layout
10383
10384 \begin_layout Itemize
10385
10386 \family sans
10387 ShortFoilhead
10388 \end_layout
10389
10390 \begin_layout Itemize
10391
10392 \family sans
10393 ShortRotatefoilhead
10394 \end_layout
10395
10396 \begin_layout Standard
10397 and the differences will be explained in the next section.
10398 \end_layout
10399
10400 \begin_layout Standard
10401 Since foils are often used in presenting ideas or new theorems and such
10402  
10403 \family sans
10404 FoilTeX
10405 \family default
10406  also provides a comprehensive box of goodies for presenting them:
10407 \end_layout
10408
10409 \begin_layout Standard
10410 \begin_inset ERT
10411 status open
10412
10413 \begin_layout Plain Layout
10414
10415
10416 \backslash
10417 begin{multicols}{2}
10418 \end_layout
10419
10420 \end_inset
10421
10422
10423 \end_layout
10424
10425 \begin_layout Itemize
10426
10427 \family sans
10428 Theorem
10429 \end_layout
10430
10431 \begin_layout Itemize
10432
10433 \family sans
10434 Lemma
10435 \end_layout
10436
10437 \begin_layout Itemize
10438
10439 \family sans
10440 Corollary
10441 \end_layout
10442
10443 \begin_layout Itemize
10444
10445 \family sans
10446 Proposition
10447 \end_layout
10448
10449 \begin_layout Itemize
10450
10451 \family sans
10452 Definition
10453 \end_layout
10454
10455 \begin_layout Itemize
10456
10457 \family sans
10458 Proof
10459 \end_layout
10460
10461 \begin_layout Itemize
10462
10463 \family sans
10464 Theorem*
10465 \end_layout
10466
10467 \begin_layout Itemize
10468
10469 \family sans
10470 Lemma*
10471 \end_layout
10472
10473 \begin_layout Itemize
10474
10475 \family sans
10476 Corollary*
10477 \end_layout
10478
10479 \begin_layout Itemize
10480
10481 \family sans
10482 Proposition*
10483 \end_layout
10484
10485 \begin_layout Itemize
10486
10487 \family sans
10488 Definition*
10489 \end_layout
10490
10491 \begin_layout Standard
10492 \begin_inset ERT
10493 status open
10494
10495 \begin_layout Plain Layout
10496
10497
10498 \backslash
10499 end{multicols}
10500 \end_layout
10501
10502 \end_inset
10503
10504
10505 \end_layout
10506
10507 \begin_layout Standard
10508 The starred versions are unnumbered while the unstarred versions are numbered.
10509  There are also two list environments added by LyX and these are:
10510 \end_layout
10511
10512 \begin_layout Itemize
10513
10514 \family sans
10515 TickList
10516 \end_layout
10517
10518 \begin_layout Itemize
10519
10520 \family sans
10521 CrossList
10522 \end_layout
10523
10524 \begin_layout Standard
10525
10526 \family sans
10527 FoilTeX
10528 \family default
10529  provides some powerful header and footer capabilities that are best set
10530  in the preamble although they may be set at any point in a document.
10531  If you want to change these settings in your document the best place to
10532  do so is at the very top of a foil, i.
10533 \begin_inset space \thinspace{}
10534 \end_inset
10535
10536 g.
10537 \emph on
10538
10539 \begin_inset space \space{}
10540 \end_inset
10541
10542
10543 \emph default
10544 straight after the foilhead.
10545 \end_layout
10546
10547 \begin_layout Standard
10548 For this purpose, the following command styles are provided [
10549 \shape smallcaps
10550 Martin Vermeer
10551 \shape default
10552 ]:
10553 \end_layout
10554
10555 \begin_layout Standard
10556 \begin_inset ERT
10557 status open
10558
10559 \begin_layout Plain Layout
10560
10561
10562 \backslash
10563 begin{multicols}{2}
10564 \end_layout
10565
10566 \end_inset
10567
10568
10569 \end_layout
10570
10571 \begin_layout Itemize
10572
10573 \family sans
10574 My
10575 \begin_inset space ~
10576 \end_inset
10577
10578 Logo
10579 \end_layout
10580
10581 \begin_layout Itemize
10582
10583 \family sans
10584 Restriction
10585 \end_layout
10586
10587 \begin_layout Itemize
10588
10589 \family sans
10590 Right
10591 \begin_inset space ~
10592 \end_inset
10593
10594 Footer
10595 \end_layout
10596
10597 \begin_layout Itemize
10598
10599 \family sans
10600 Right
10601 \begin_inset space ~
10602 \end_inset
10603
10604 Header
10605 \end_layout
10606
10607 \begin_layout Itemize
10608
10609 \family sans
10610 Left
10611 \begin_inset space ~
10612 \end_inset
10613
10614 Header
10615 \end_layout
10616
10617 \begin_deeper
10618 \begin_layout Standard
10619 \begin_inset space ~
10620 \end_inset
10621
10622
10623 \end_layout
10624
10625 \end_deeper
10626 \begin_layout Standard
10627 \begin_inset ERT
10628 status open
10629
10630 \begin_layout Plain Layout
10631
10632
10633 \backslash
10634 end{multicols}
10635 \end_layout
10636
10637 \end_inset
10638
10639
10640 \end_layout
10641
10642 \begin_layout Standard
10643 There are also a few commands provided by 
10644 \family sans
10645 FoilTeX
10646 \family default
10647  that aren't directly supported by LyX but I'll tell you what they do and
10648  how to use them in section
10649 \begin_inset space ~
10650 \end_inset
10651
10652
10653 \begin_inset CommandInset ref
10654 LatexCommand ref
10655 reference "sec:unsuppfoils"
10656
10657 \end_inset
10658
10659 .
10660 \end_layout
10661
10662 \begin_layout Subsection
10663 Building a Set of Foils
10664 \end_layout
10665
10666 \begin_layout Standard
10667 This section will give a simple introduction to using the different environments
10668  to build a set of foils.
10669  If you want to see an example set of foils, take a look at the 
10670 \family typewriter
10671 Foils.lyx
10672 \family default
10673  file you find in LyX's 
10674 \family typewriter
10675 examples
10676 \family default
10677  folder.
10678 \end_layout
10679
10680 \begin_layout Subsubsection
10681 Give It a Title Page
10682 \end_layout
10683
10684 \begin_layout Standard
10685 Unlike other classes that provide 
10686 \family sans
10687 Title
10688 \family default
10689
10690 \family sans
10691 Author
10692 \family default
10693
10694 \family sans
10695 Date
10696 \family default
10697  and 
10698 \family sans
10699 Abstract
10700 \family default
10701  environments, 
10702 \family sans
10703 foils
10704 \family default
10705  creates the title on a page of its own.
10706  If you leave out the 
10707 \family sans
10708 Date
10709 \family default
10710  environment LaTeX will substitute the current date (every time you regenerate
10711  the output).
10712 \end_layout
10713
10714 \begin_layout Subsubsection
10715 Start a New Foil
10716 \end_layout
10717
10718 \begin_layout Standard
10719 As I mentioned earlier, there are four ways of starting a new foil.
10720  For portrait foils you should use 
10721 \family sans
10722 Foilhead
10723 \family default
10724  or 
10725 \family sans
10726 ShortFoilhead.
10727
10728 \family default
10729  The difference between these two environments is the amount of space between
10730  the title of the foil (the foilhead) and the body of the foil.
10731 \end_layout
10732
10733 \begin_layout Standard
10734 Landscape foils are generated using the 
10735 \family sans
10736 Rotatefoilhead
10737 \family default
10738  and 
10739 \family sans
10740 ShortRotatefoilhead
10741 \family default
10742  environments.
10743  Again the only difference is the spacing between foilhead and body.
10744  Both of the short versions have 0.5 inches less separation between the foilhead
10745  and the body.
10746  
10747 \end_layout
10748
10749 \begin_layout Standard
10750 One problem with the support for landscape foils is the requirement that
10751  you have to use the 
10752 \family typewriter
10753 dvips
10754 \family default
10755  driver to generate the PostScript output otherwise the foils won't be rotated.
10756  It is possible to get landscape foils even if you haven't got the 
10757 \family typewriter
10758 dvips
10759 \family default
10760  driver provided you can feed your foils sideways through your printer ;-)
10761 \end_layout
10762
10763 \begin_layout Subsubsection
10764 Theorems, Lemmas, Proofs and more
10765 \end_layout
10766
10767 \begin_layout Standard
10768 Due to a small bug in LyX you can't have two of the same type of these environme
10769 nts directly following each other.
10770  They must be separated by something.
10771  If you try, you will just be extending the previous environment as if you
10772  had merged the two environments together.
10773  So, how do you get around this problem? The simplest option is to insert
10774  some text between the two environments or add a 
10775 \family sans
10776 LaTeX
10777 \family default
10778  environment between the two with just a 
10779 \begin_inset Quotes eld
10780 \end_inset
10781
10782
10783 \family typewriter
10784 %
10785 \family default
10786
10787 \begin_inset Quotes erd
10788 \end_inset
10789
10790  in it.
10791  This will force LyX to produce two separate environments and hence the
10792  correct LaTeX output.
10793  An example is provided in the example file included with the LyX distribution.
10794  Remember, this problem only occurs if you are trying to place two of the
10795  same type of theorem-like environments one directly after the other.
10796 \end_layout
10797
10798 \begin_layout Subsubsection
10799 Lists
10800 \end_layout
10801
10802 \begin_layout Standard
10803 You get all the commonly supported list styles found in other classes as
10804  well as two new ones.
10805  I'll only describe the new ones here.
10806  If you want to find out more about the other list environments check out
10807  the 
10808 \emph on
10809 User's Guide.
10810
10811 \emph default
10812  If you intend to use itemized lists you might also want to read about the
10813  
10814 \family sans
10815 Itemize
10816 \begin_inset space ~
10817 \end_inset
10818
10819 Bullet
10820 \begin_inset space ~
10821 \end_inset
10822
10823 Selection
10824 \family default
10825  dialog described above in section
10826 \begin_inset space ~
10827 \end_inset
10828
10829
10830 \begin_inset CommandInset ref
10831 LatexCommand ref
10832 reference "sec:bullet"
10833
10834 \end_inset
10835
10836 .
10837 \end_layout
10838
10839 \begin_layout Standard
10840 The two new list styles, 
10841 \family sans
10842 TickList
10843 \family default
10844  and 
10845 \family sans
10846 CrossList
10847 \family default
10848 , are designed to make it easier for you to create lists of do's and don'ts
10849  or right and wrong by providing dedicated environments that use a tick
10850  or a cross as the label of the list.
10851  These lists are in fact dedicated variants of the 
10852 \family sans
10853 Itemize
10854 \family default
10855  environment.
10856  They do however require that you have the 
10857 \family typewriter
10858 psnfss
10859 \family default
10860  packages installed.
10861 \end_layout
10862
10863 \begin_layout Subsubsection
10864 Figures and Tables
10865 \end_layout
10866
10867 \begin_layout Standard
10868
10869 \family sans
10870 FoilTeX
10871 \family default
10872  redefines the floating tables and figures so that they appear exactly where
10873  they are in the text rather than pushing them to the top of the page or
10874  to some user specified location.
10875  In fact if you change the float placement settings they are simply ignored.
10876 \end_layout
10877
10878 \begin_layout Subsubsection
10879 Page Headers and Footers
10880 \begin_inset CommandInset label
10881 LatexCommand label
10882 name "sec:foilfoot"
10883
10884 \end_inset
10885
10886
10887 \end_layout
10888
10889 \begin_layout Standard
10890
10891 \family sans
10892 My
10893 \begin_inset space ~
10894 \end_inset
10895
10896 Logo
10897 \family default
10898  and 
10899 \family sans
10900 Restriction
10901 \family default
10902  are two commands used to control the left-footer text string.
10903  The first is meant to allow you to include a graphic logo on your foils
10904  and defaults to 
10905 \begin_inset Quotes eld
10906 \end_inset
10907
10908 -Typeset by 
10909 \family sans
10910 FoilTeX
10911 \family default
10912 -
10913 \begin_inset Quotes erd
10914 \end_inset
10915
10916 .
10917  While the second is meant to provide a classification for the audience,
10918  
10919 \emph on
10920 e.
10921 \begin_inset space \thinspace{}
10922 \end_inset
10923
10924 g.
10925 \emph default
10926
10927 \begin_inset space \space{}
10928 \end_inset
10929
10930 Confidential.
10931  It is empty by default.
10932 \end_layout
10933
10934 \begin_layout Standard
10935 The remaining page corners can be filled by 
10936 \family sans
10937 Right
10938 \begin_inset space ~
10939 \end_inset
10940
10941 Footer
10942 \family default
10943  (which defaults to page numbers), 
10944 \family sans
10945 Right
10946 \begin_inset space ~
10947 \end_inset
10948
10949 Header
10950 \family default
10951  (top right) and 
10952 \family sans
10953 Left
10954 \begin_inset space ~
10955 \end_inset
10956
10957 Header
10958 \family default
10959  (top left).
10960 \end_layout
10961
10962 \begin_layout Subsection
10963 Unsupported 
10964 \family sans
10965 FoilTeX
10966 \family default
10967  Goodies
10968 \begin_inset CommandInset label
10969 LatexCommand label
10970 name "sec:unsuppfoils"
10971
10972 \end_inset
10973
10974
10975 \end_layout
10976
10977 \begin_layout Standard
10978 All the commands mentioned below need to be set in a 
10979 \family sans
10980 LaTeX
10981 \family default
10982  environment or as 
10983 \family sans
10984 TeX
10985 \family default
10986  within another environment.
10987 \end_layout
10988
10989 \begin_layout Subsubsection
10990 Lengths
10991 \end_layout
10992
10993 \begin_layout Standard
10994 All lengths are adjusted using the 
10995 \family typewriter
10996
10997 \backslash
10998 setlength{
10999 \family default
11000 \emph on
11001 lengthname
11002 \family typewriter
11003 \emph default
11004 }{
11005 \family default
11006 \emph on
11007 newlength
11008 \family typewriter
11009 \emph default
11010 }
11011 \family default
11012  command.
11013  Where 
11014 \emph on
11015 lengthname
11016 \emph default
11017  should be replaced by the name given to the length you want to change and
11018  
11019 \emph on
11020 newlength
11021 \emph default
11022  is the length value.
11023  All lengths should be specified in units of length such as inches (
11024 \family typewriter
11025 in
11026 \family default
11027 ), millimeters (
11028 \family typewriter
11029 mm
11030 \family default
11031 ) or points (
11032 \family typewriter
11033 pt
11034 \family default
11035 ) or relative to some document or font-based length such as 
11036 \family typewriter
11037
11038 \backslash
11039 textwidth
11040 \family default
11041 .
11042  
11043 \end_layout
11044
11045 \begin_layout Standard
11046 It's possible to change the spacing between a foilhead and the body of the
11047  foil by adjusting the length specified by 
11048 \family typewriter
11049
11050 \backslash
11051 foilheadskip
11052 \family default
11053 .
11054  For example, to make 
11055 \emph on
11056 all
11057 \emph default
11058  foilheads 0.5
11059 \begin_inset space \space{}
11060 \end_inset
11061
11062 in closer to their bodies put the following in the preamble: 
11063 \family typewriter
11064
11065 \backslash
11066 setlength{
11067 \backslash
11068 foilheadskip}{-0.5in}
11069 \end_layout
11070
11071 \begin_layout Standard
11072 The spacings around floats can be adjusted by setting these lengths:
11073 \end_layout
11074
11075 \begin_layout Labeling
11076 \labelwidthstring MMMMMMMMMMM
11077
11078 \family typewriter
11079
11080 \backslash
11081 abovefloatskip
11082 \family default
11083  Separation between the text and the top of the float
11084 \end_layout
11085
11086 \begin_layout Labeling
11087 \labelwidthstring MMMMMMMMMMM
11088
11089 \family typewriter
11090
11091 \backslash
11092 abovecaptionskip
11093 \family default
11094  Separation between the float and the caption
11095 \end_layout
11096
11097 \begin_layout Labeling
11098 \labelwidthstring MMMMMMMMMMM
11099
11100 \family typewriter
11101
11102 \backslash
11103 belowcaptionskip
11104 \family default
11105  Separation between the caption and the following text
11106 \end_layout
11107
11108 \begin_layout Labeling
11109 \labelwidthstring MMMMMMMMMMM
11110
11111 \family typewriter
11112
11113 \backslash
11114 captionwidth
11115 \family default
11116  You can make the captions narrower than the surrounding text by adjusting
11117  this length.
11118  Best done relative to 
11119 \family typewriter
11120
11121 \backslash
11122 textwidth
11123 \family default
11124 .
11125 \end_layout
11126
11127 \begin_layout Standard
11128 There are also several title page related lengths that you may find useful
11129  if you have a long title or several authors:
11130 \end_layout
11131
11132 \begin_layout Labeling
11133 \labelwidthstring MMMMMMMMMMM
11134
11135 \family typewriter
11136
11137 \backslash
11138 abovetitleskip
11139 \family default
11140  Separation from headers to 
11141 \family sans
11142 Title
11143 \end_layout
11144
11145 \begin_layout Labeling
11146 \labelwidthstring MMMMMMMMMMM
11147
11148 \family typewriter
11149
11150 \backslash
11151 titleauthorskip
11152 \family default
11153  between 
11154 \family sans
11155 Title
11156 \family default
11157  and 
11158 \family sans
11159 Author
11160 \family default
11161  environments
11162 \end_layout
11163
11164 \begin_layout Labeling
11165 \labelwidthstring MMMMMMMMMMM
11166
11167 \family typewriter
11168
11169 \backslash
11170 authorauthorskip
11171 \family default
11172  between multiple 
11173 \family sans
11174 Author
11175 \family default
11176  lines
11177 \end_layout
11178
11179 \begin_layout Labeling
11180 \labelwidthstring MMMMMMMMMMM
11181
11182 \family typewriter
11183
11184 \backslash
11185 authordateskip
11186 \family default
11187  between the 
11188 \family sans
11189 Author
11190 \family default
11191  and the 
11192 \family sans
11193 Date
11194 \end_layout
11195
11196 \begin_layout Labeling
11197 \labelwidthstring MMMMMMMMMMM
11198
11199 \family typewriter
11200
11201 \backslash
11202 dateabstractskip
11203 \family default
11204  between the 
11205 \family sans
11206 Date
11207 \family default
11208  and the 
11209 \family sans
11210 Abstract
11211 \end_layout
11212
11213 \begin_layout Standard
11214 The last length related command affects all the list environments.
11215  If you place 
11216 \family typewriter
11217
11218 \backslash
11219 zerolistvertdimens
11220 \family default
11221  
11222 \emph on
11223 inside
11224 \emph default
11225  a list environment then all the vertical spacing between the list items
11226  is removed.
11227  Note that this is a command not a length so it doesn't require 
11228 \family typewriter
11229
11230 \backslash
11231 setlength
11232 \family default
11233  like the stuff mentioned above.
11234 \end_layout
11235
11236 \begin_layout Subsubsection
11237 Headers and Footers
11238 \end_layout
11239
11240 \begin_layout Standard
11241 The 
11242 \family typewriter
11243
11244 \backslash
11245 LogoOn
11246 \family default
11247  and 
11248 \family typewriter
11249
11250 \backslash
11251 LogoOff
11252 \family default
11253  commands control whether the logo in the 
11254 \family sans
11255 MyLogo
11256 \family default
11257  definition appear on a given page.
11258  If you put 
11259 \family typewriter
11260
11261 \backslash
11262 LogoOff
11263 \family default
11264  in the preamble then none of the foils will have the logo on them.
11265  If you don't want the logo on a particular page place the 
11266 \family typewriter
11267
11268 \backslash
11269 LogoOff
11270 \family default
11271  directly after the foilhead of that page and the 
11272 \family typewriter
11273
11274 \backslash
11275 LogoOn
11276 \family default
11277  directly after the next foilhead.
11278 \end_layout
11279
11280 \begin_layout Standard
11281 If you decide to use the 
11282 \family sans
11283 fancy
11284 \family default
11285  page style setting in the 
11286 \family sans
11287 Document
11288 \begin_inset space ~
11289 \end_inset
11290
11291 Layout
11292 \family default
11293  dialog you should probably add 
11294 \family typewriter
11295
11296 \backslash
11297 let
11298 \backslash
11299 headwidth
11300 \backslash
11301 textwidth
11302 \family default
11303  to your preamble so headers and footers on landscape pages are correctly
11304  placed when rotated.
11305  This is due to some clashes between the page layouts provided by the 
11306 \family sans
11307 fancyheadings
11308 \family default
11309  package and the 
11310 \family sans
11311 foils
11312 \family default
11313  class.
11314 \end_layout
11315
11316 \begin_layout Section
11317 Hollywood (Hollywood spec scripts)
11318 \end_layout
11319
11320 \begin_layout Standard
11321 by 
11322 \shape smallcaps
11323 Garst Reese
11324 \end_layout
11325
11326 \begin_layout Subsection
11327 Introduction
11328 \end_layout
11329
11330 \begin_layout Standard
11331 Getting the format of a Hollywood script right is a 
11332 \begin_inset Quotes eld
11333 \end_inset
11334
11335 rite of passage.
11336 \begin_inset Quotes erd
11337 \end_inset
11338
11339  It is designed to make the readers focus on content and to be easy and
11340  familiar for the actors to read.
11341  Each page of a script should be one minute of film.
11342  Nothing goes in a script that you cannot see or hear on screen.
11343  The courier 12 pt font should be used throughout.
11344  No italics.
11345 \end_layout
11346
11347 \begin_layout Subsection
11348 Special problems
11349 \end_layout
11350
11351 \begin_layout Standard
11352 Speakers' lines should NEVER break in mid-sentence.
11353  If a speaker's lines continue over a page break, repeat the 
11354 \family sans
11355 Speaker
11356 \family default
11357  title followed by (Cont'd).
11358 \end_layout
11359
11360 \begin_layout Subsection
11361 Special features
11362 \end_layout
11363
11364 \begin_layout Standard
11365 Insert the 
11366 \family sans
11367 Speaker
11368 \family default
11369  names as labels then cross-reference the label to insert the name.
11370  The cross-reference dialog will show the current cast of characters.
11371  You can use this to insert the speaker name in narratives also.
11372 \end_layout
11373
11374 \begin_layout Subsection
11375 Paper size and Margins
11376 \end_layout
11377
11378 \begin_layout Standard
11379 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11380 \end_layout
11381
11382 \begin_layout Subsection
11383 Environments
11384 \end_layout
11385
11386 \begin_layout Standard
11387 The following environments are available.
11388  You can use hollywood.bind to get the bind keys shown at the right.
11389 \end_layout
11390
11391 \begin_layout Itemize
11392
11393 \family sans
11394 Standard
11395 \begin_inset Newline newline
11396 \end_inset
11397
11398
11399 \family default
11400 Used where nothing else works.
11401  Try to avoid it.
11402 \end_layout
11403
11404 \begin_layout Itemize
11405
11406 \family sans
11407 FADE_IN
11408 \family default
11409 :
11410 \begin_inset space \hfill{}
11411 \end_inset
11412
11413
11414 \family sans
11415 M-z S-I
11416 \family default
11417
11418 \begin_inset Newline newline
11419 \end_inset
11420
11421 Usually followed by something like 
11422 \begin_inset Quotes eld
11423 \end_inset
11424
11425 on Sally waking up.
11426 \begin_inset Quotes erd
11427 \end_inset
11428
11429
11430 \end_layout
11431
11432 \begin_layout Itemize
11433
11434 \family sans
11435 INT:
11436 \begin_inset space \hfill{}
11437 \end_inset
11438
11439 M-z i
11440 \begin_inset Newline newline
11441 \end_inset
11442
11443
11444 \family default
11445 Introduces a new INTERIOR camera set-up.
11446  Always followed by DAY or NIGHT, or something similar to define the lighting
11447  required.
11448  Everthing on this line in CAPS.
11449 \end_layout
11450
11451 \begin_layout Itemize
11452
11453 \family sans
11454 EXT:
11455 \begin_inset space \hfill{}
11456 \end_inset
11457
11458 M-z e
11459 \begin_inset Newline newline
11460 \end_inset
11461
11462
11463 \family default
11464 Introduces a new EXTERIOR camera set-up.
11465  Everthing on this line in CAPS.
11466 \end_layout
11467
11468 \begin_layout Itemize
11469
11470 \family sans
11471 Speaker
11472 \begin_inset space \hfill{}
11473 \end_inset
11474
11475 M-z s
11476 \begin_inset Newline newline
11477 \end_inset
11478
11479
11480 \family default
11481 The character speaking.
11482 \end_layout
11483
11484 \begin_layout Itemize
11485
11486 \family sans
11487 Parenthetical
11488 \begin_inset space \hfill{}
11489 \end_inset
11490
11491 M-z p
11492 \begin_inset Newline newline
11493 \end_inset
11494
11495
11496 \family default
11497 Instructions to the speaker.
11498  The () are automatically inserted, but only the ( will show in LyX.
11499  Both will be printed.
11500 \end_layout
11501
11502 \begin_layout Itemize
11503
11504 \family sans
11505 Dialogue
11506 \begin_inset space \hfill{}
11507 \end_inset
11508
11509 M-z d
11510 \begin_inset Newline newline
11511 \end_inset
11512
11513
11514 \family default
11515 What the 
11516 \family sans
11517 Speaker
11518 \family default
11519  says.
11520 \end_layout
11521
11522 \begin_layout Itemize
11523
11524 \family sans
11525 Transition
11526 \begin_inset space \hfill{}
11527 \end_inset
11528
11529 M-z t
11530 \begin_inset Newline newline
11531 \end_inset
11532
11533
11534 \family default
11535 Camera movement instruction.
11536  e.
11537 \begin_inset space \thinspace{}
11538 \end_inset
11539
11540 g.
11541 \begin_inset space \space{}
11542 \end_inset
11543
11544 CUT TO:
11545 \end_layout
11546
11547 \begin_layout Itemize
11548
11549 \family sans
11550 FADE OUT:
11551 \begin_inset space \hfill{}
11552 \end_inset
11553
11554 M-z S-I
11555 \end_layout
11556
11557 \begin_layout Itemize
11558
11559 \family sans
11560 Author
11561 \begin_inset space \hfill{}
11562 \end_inset
11563
11564 M-z S-A
11565 \end_layout
11566
11567 \begin_layout Itemize
11568
11569 \family sans
11570 Title
11571 \begin_inset space \hfill{}
11572 \end_inset
11573
11574 M-z S-T
11575 \end_layout
11576
11577 \begin_layout Itemize
11578
11579 \family sans
11580 Right_Address
11581 \begin_inset space \hfill{}
11582 \end_inset
11583
11584 M-z r
11585 \end_layout
11586
11587 \begin_layout Subsection
11588 Script jargon
11589 \end_layout
11590
11591 \begin_layout Itemize
11592 (O.S) — off screen
11593 \end_layout
11594
11595 \begin_layout Itemize
11596 (V.0) — voice over
11597 \end_layout
11598
11599 \begin_layout Itemize
11600 b.
11601 \begin_inset space \thinspace{}
11602 \end_inset
11603
11604 g.
11605  — background
11606 \end_layout
11607
11608 \begin_layout Itemize
11609 C.U.
11610  — close-up
11611 \end_layout
11612
11613 \begin_layout Itemize
11614 PAN — camera movement
11615 \end_layout
11616
11617 \begin_layout Itemize
11618 INSERT — cut to close-up of
11619 \end_layout
11620
11621 \begin_layout Section
11622 ijmpc and ijmpd
11623 \end_layout
11624
11625 \begin_layout Standard
11626 by 
11627 \noun on
11628 Panayotis Papasotiriou
11629 \end_layout
11630
11631 \begin_layout Subsection
11632 Overview
11633 \end_layout
11634
11635 \begin_layout Standard
11636 The ijmpc package is a set of macros that facilitates electronic manuscript
11637  submission to the 
11638 \emph on
11639 International Journal of Modern Physics C
11640 \emph default
11641 .
11642  Similarly, the ijmpd package is for creating manuscripts to be submitted
11643  to the 
11644 \emph on
11645 International Journal of Modern Physics D
11646 \emph default
11647 .
11648  Both journals are published by World Scientific.
11649  The corresponding document classes are named 
11650 \family typewriter
11651 ws-ijmpc.cls
11652 \family default
11653  and 
11654 \family typewriter
11655 ws-ijmpd.cls
11656 \family default
11657 , respectively.
11658  These files, together with instructions for the authors, can be downloaded
11659  from the sites 
11660 \begin_inset Flex URL
11661 status collapsed
11662
11663 \begin_layout Plain Layout
11664
11665 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11666 \end_layout
11667
11668 \end_inset
11669
11670  and 
11671 \begin_inset Flex URL
11672 status collapsed
11673
11674 \begin_layout Plain Layout
11675
11676 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11677 \end_layout
11678
11679 \end_inset
11680
11681 .
11682  Both packages are modified versions of the standard 
11683 \begin_inset Quotes eld
11684 \end_inset
11685
11686 article
11687 \begin_inset Quotes erd
11688 \end_inset
11689
11690  package, and they are almost (but not exactly) identical.
11691  Most of their features are supported by LyX.
11692  I have used LyX successfully to write articles submitted to both journals
11693  without any problem.
11694 \end_layout
11695
11696 \begin_layout Subsection
11697 Writing a paper
11698 \end_layout
11699
11700 \begin_layout Standard
11701 As usual, the easiest way to write a paper is to start with a template.
11702  Click on 
11703 \family sans
11704 File\SpecialChar \menuseparator
11705 New from
11706 \family default
11707  
11708 \family sans
11709 \bar under
11710 T
11711 \bar default
11712 emplate
11713 \family default
11714 , then choose the 
11715 \family typewriter
11716 ijmpc.lyx
11717 \family default
11718  or 
11719 \family typewriter
11720 ijmpd.lyx
11721 \family default
11722  template.
11723  This will give an (almost) empty document that includes the most common
11724  fields found in a manuscript.
11725  Simply overwrite the existing text (including the brackets, 
11726 \family typewriter
11727 <>
11728 \family default
11729 ) with your text.
11730  You should keep in mind the following remarks.
11731 \end_layout
11732
11733 \begin_layout Enumerate
11734 LyX won't let you change the font size and the page style of the document,
11735  because such modifications are not allowed by both packages.
11736 \end_layout
11737
11738 \begin_layout Enumerate
11739 The language of the document should not be changed.
11740  Before previewing your paper, be sure that the babel package is not used.
11741  To do this, click on 
11742 \family sans
11743 Tools\SpecialChar \menuseparator
11744 Preferences
11745 \family default
11746 , select the 
11747 \family sans
11748 Lang Opts
11749 \family default
11750  tab, deselect the 
11751 \family sans
11752 Use babel
11753 \family default
11754  checkbox in the language settings, and click on 
11755 \family sans
11756 Apply
11757 \family default
11758  (or 
11759 \family sans
11760 Save
11761 \family default
11762 , if you wish to make this change permanent).
11763 \end_layout
11764
11765 \begin_layout Enumerate
11766 The 
11767 \begin_inset Quotes eld
11768 \end_inset
11769
11770 Keywords
11771 \begin_inset Quotes erd
11772 \end_inset
11773
11774  style must be used to define keywords.
11775 \end_layout
11776
11777 \begin_layout Enumerate
11778 The ijmpc package provides a style named 
11779 \begin_inset Quotes eld
11780 \end_inset
11781
11782 Classification Codes
11783 \begin_inset Quotes erd
11784 \end_inset
11785
11786 , which can be used to define classification codes, such as PACS numbers.
11787  Note that this facility is not supported by the ijmpd package.
11788 \end_layout
11789
11790 \begin_layout Enumerate
11791 Several new environments are available: 
11792 \begin_inset Quotes eld
11793 \end_inset
11794
11795 Definition
11796 \begin_inset Quotes erd
11797 \end_inset
11798
11799
11800 \begin_inset Quotes eld
11801 \end_inset
11802
11803 Step
11804 \begin_inset Quotes erd
11805 \end_inset
11806
11807
11808 \begin_inset Quotes eld
11809 \end_inset
11810
11811 Example
11812 \begin_inset Quotes erd
11813 \end_inset
11814
11815
11816 \begin_inset Quotes eld
11817 \end_inset
11818
11819 Remark
11820 \begin_inset Quotes erd
11821 \end_inset
11822
11823
11824 \begin_inset Quotes eld
11825 \end_inset
11826
11827 Notation
11828 \begin_inset Quotes erd
11829 \end_inset
11830
11831
11832 \begin_inset Quotes eld
11833 \end_inset
11834
11835 Theorem
11836 \begin_inset Quotes erd
11837 \end_inset
11838
11839
11840 \begin_inset Quotes eld
11841 \end_inset
11842
11843 Proof
11844 \begin_inset Quotes erd
11845 \end_inset
11846
11847
11848 \begin_inset Quotes eld
11849 \end_inset
11850
11851 Corollary
11852 \begin_inset Quotes erd
11853 \end_inset
11854
11855
11856 \begin_inset Quotes eld
11857 \end_inset
11858
11859 Lemma
11860 \begin_inset Quotes erd
11861 \end_inset
11862
11863
11864 \begin_inset Quotes eld
11865 \end_inset
11866
11867 Proposition
11868 \begin_inset Quotes erd
11869 \end_inset
11870
11871
11872 \begin_inset Quotes eld
11873 \end_inset
11874
11875 Prop
11876 \begin_inset Quotes erd
11877 \end_inset
11878
11879
11880 \begin_inset Quotes eld
11881 \end_inset
11882
11883 Question
11884 \begin_inset Quotes erd
11885 \end_inset
11886
11887
11888 \begin_inset Quotes eld
11889 \end_inset
11890
11891 Claim
11892 \begin_inset Quotes erd
11893 \end_inset
11894
11895 , and 
11896 \begin_inset Quotes eld
11897 \end_inset
11898
11899 Conjecture
11900 \begin_inset Quotes erd
11901 \end_inset
11902
11903 .
11904  Their use is more or less obvious.
11905  LyX supports all these environments; it will use the proper label, text
11906  style, and numbering scheme for each of them.
11907 \end_layout
11908
11909 \begin_layout Enumerate
11910 Both packages use basic citations; the natbib package should not be used.
11911  In LyX, citation references are shown as usual; in the output, citations
11912  are shown as superscripts.
11913  If you want to use a citation as normal text, you should use the 
11914 \family typewriter
11915 refcite
11916 \family default
11917  command, e.
11918 \begin_inset space \thinspace{}
11919 \end_inset
11920
11921 g.
11922 \begin_inset space \space{}
11923 \end_inset
11924
11925
11926 \begin_inset Quotes eld
11927 \end_inset
11928
11929 See Ref.
11930 \begin_inset space \space{}
11931 \end_inset
11932
11933
11934 \family typewriter
11935
11936 \backslash
11937 refcite{key}
11938 \family default
11939
11940 \begin_inset Quotes erd
11941 \end_inset
11942
11943 .
11944 \end_layout
11945
11946 \begin_layout Enumerate
11947 There is no 
11948 \begin_inset Quotes eld
11949 \end_inset
11950
11951 Acknowledgments
11952 \begin_inset Quotes erd
11953 \end_inset
11954
11955  section in both packages.
11956  To put acknowledgments, just use the 
11957 \begin_inset Quotes eld
11958 \end_inset
11959
11960 Section*
11961 \begin_inset Quotes erd
11962 \end_inset
11963
11964  environment.
11965 \end_layout
11966
11967 \begin_layout Enumerate
11968 Appendices may be added to the paper, 
11969 \emph on
11970 after
11971 \emph default
11972  the Acknowledgments and 
11973 \shape italic
11974 before
11975 \shape default
11976  the References.
11977  LyX provides a special environment, called 
11978 \begin_inset Quotes eld
11979 \end_inset
11980
11981 Appendices Section
11982 \begin_inset Quotes erd
11983 \end_inset
11984
11985  which marks the beginning of the appendices.
11986  This environment should be left blank; it just sends a LaTeX command, but
11987  nothing is really printed.
11988  In LyX, the word 
11989 \begin_inset Quotes eld
11990 \end_inset
11991
11992 Appendix
11993 \begin_inset Quotes erd
11994 \end_inset
11995
11996  is printed with blue letters, as a signal that all sections after that
11997  point are appendices.
11998  To write an appendix, use the 
11999 \begin_inset Quotes eld
12000 \end_inset
12001
12002 Appendix
12003 \begin_inset Quotes erd
12004 \end_inset
12005
12006  environment.
12007  LyX will number each appendix with capital letters, as required by both
12008  journals.
12009  Note that 
12010 \begin_inset Quotes eld
12011 \end_inset
12012
12013 Appendices Section
12014 \begin_inset Quotes erd
12015 \end_inset
12016
12017  
12018 \emph on
12019 must
12020 \emph default
12021  be present before the first appendix; if not, all appendices will be numbered
12022  as normal sections in the output.
12023 \end_layout
12024
12025 \begin_layout Enumerate
12026 The ijmpc and the ijmpd packages use the 
12027 \family typewriter
12028 tbl
12029 \family default
12030  command to implement table captions.
12031  As a result, a table created by LyX is printed correctly, but its caption
12032  is ignored.
12033  However, you can use some TeX code to overcome this problem, so that captions
12034  are printed as expected.
12035  To do so, create a float table as usual, remove the caption, and replace
12036  it with the TeX code 
12037 \family typewriter
12038
12039 \backslash
12040 tbl{
12041 \emph on
12042 your table caption
12043 \emph default
12044 }{
12045 \family default
12046  (sic); you must also the TeX code 
12047 \family typewriter
12048 }
12049 \family default
12050  immediately after the tabular material.
12051  Study the example table included in the template files to see how this
12052  trick is implemented.
12053  Alternatively, If you need table captions, you should implement the whole
12054  table float in a 
12055 \family typewriter
12056 .tex
12057 \family default
12058  file, then include this file to the LyX document (
12059 \family sans
12060 Insert\SpecialChar \menuseparator
12061 File\SpecialChar \menuseparator
12062 Child
12063 \begin_inset space ~
12064 \end_inset
12065
12066 Document
12067 \family default
12068 ).
12069  Details on how to create a table float can be found in the files 
12070 \family typewriter
12071 ws-ijmpc.tex
12072 \family default
12073  and 
12074 \family typewriter
12075 ws-ijmpd.tex
12076 \family default
12077 , included in the corresponding packages.
12078 \end_layout
12079
12080 \begin_layout Subsection
12081 Preparing a paper for submission
12082 \end_layout
12083
12084 \begin_layout Standard
12085 Before you submit your paper you must export the LyX document as a LaTeX
12086  file (
12087 \family sans
12088 File\SpecialChar \menuseparator
12089 Export\SpecialChar \menuseparator
12090 LaTeX
12091 \family default
12092 )
12093 \begin_inset Foot
12094 status open
12095
12096 \begin_layout Plain Layout
12097 Actually you have the choice between LaTeX (plain) and pdflatex.
12098  If you intend to use pdflatex to prepare the paper, you should use the
12099  pdflatex option so that included graphics are converted to PDF format,
12100  ready for use by pdflatex.
12101 \end_layout
12102
12103 \end_inset
12104
12105 , then make the following changes to the resulting 
12106 \family typewriter
12107 .tex
12108 \family default
12109  file.
12110 \end_layout
12111
12112 \begin_layout Enumerate
12113 Remove the comment lines before the 
12114 \family typewriter
12115
12116 \backslash
12117 documentclass
12118 \family default
12119  command.
12120 \end_layout
12121
12122 \begin_layout Enumerate
12123 Remove everything between (and including) the 
12124 \family typewriter
12125
12126 \backslash
12127 makeatletter
12128 \family default
12129  and 
12130 \family typewriter
12131
12132 \backslash
12133 makeatother
12134 \family default
12135  commands, except for any commands you specifically put into the LaTeX preamble.
12136 \end_layout
12137
12138 \begin_layout Standard
12139 The modified 
12140 \family typewriter
12141 .tex
12142 \family default
12143  file should be saved and processed through LaTeX as many times as necessary.
12144  You may also want to check the resulting 
12145 \family typewriter
12146 .dvi
12147 \family default
12148  document.
12149 \end_layout
12150
12151 \begin_layout Subsection
12152 Use of TeX code
12153 \end_layout
12154
12155 \begin_layout Standard
12156 The use of TeX code is reduced to two commands, which must be placed at
12157  the top of the document.
12158  If you started writing your paper by using the 
12159 \family typewriter
12160 ijmpc.lyx
12161 \family default
12162  or the 
12163 \family typewriter
12164 ijmpd.lyx
12165 \family default
12166  template, the TeX code needed is already in its place; you usually don't
12167  need to delete it.
12168  You may only modify the first TeX code to specify the information printed
12169  to the top of odd and even pages (authors' names and short paper's title,
12170  respectively).
12171  This TeX code must have the form 
12172 \family typewriter
12173
12174 \backslash
12175 markboth{Authors' Names}{Short Paper's Title}
12176 \family default
12177 .
12178 \end_layout
12179
12180 \begin_layout Section
12181 iopart
12182 \end_layout
12183
12184 \begin_layout Standard
12185 by 
12186 \noun on
12187 Uwe Stöhr
12188 \end_layout
12189
12190 \begin_layout Subsection
12191 Overview
12192 \end_layout
12193
12194 \begin_layout Standard
12195 The iopart package provides a document class to create electronic manuscript
12196  submission to the journals published by the Institute of Physics.
12197  Instructions for the authors how to create a paper using the iopart class
12198  can be downloaded together with the iopart package from the site 
12199 \begin_inset Flex URL
12200 status collapsed
12201
12202 \begin_layout Plain Layout
12203
12204 ftp://ftp.iop.org/pub/journals/latex2e
12205 \end_layout
12206
12207 \end_inset
12208
12209 .
12210 \end_layout
12211
12212 \begin_layout Subsection
12213 Writing a paper
12214 \end_layout
12215
12216 \begin_layout Standard
12217 The easiest way to write a paper is to start with the file 
12218 \emph on
12219 IOP-article.lyx
12220 \emph default
12221  that is available in LyX's examples files folder.
12222  Open this file, save it under a new name, and start writing.
12223  The example file explains how to use the special text environments.
12224  Here are the most important advices:
12225 \end_layout
12226
12227 \begin_layout Itemize
12228 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12229  two options 
12230 \family sans
12231 Use AMS math package
12232 \family default
12233  in the document settings under 
12234 \family sans
12235 Math Options
12236 \family default
12237  are not used!
12238 \end_layout
12239
12240 \begin_layout Itemize
12241
12242 \size normal
12243 The title environment defines the kind of your paper.
12244  So use one of the following environments for the title:
12245 \end_layout
12246
12247 \begin_deeper
12248 \begin_layout Itemize
12249
12250 \family sans
12251 \size normal
12252 Title
12253 \family default
12254  for a Paper
12255 \end_layout
12256
12257 \begin_layout Itemize
12258
12259 \family sans
12260 \size normal
12261 Review
12262 \family default
12263  for a Review
12264 \end_layout
12265
12266 \begin_layout Itemize
12267
12268 \family sans
12269 \size normal
12270 Topical
12271 \family default
12272  for a Topical review
12273 \end_layout
12274
12275 \begin_layout Itemize
12276
12277 \family sans
12278 \size normal
12279 Comment
12280 \family default
12281  for a Comment
12282 \end_layout
12283
12284 \begin_layout Itemize
12285
12286 \family sans
12287 \size normal
12288 Note
12289 \family default
12290  for a Note
12291 \end_layout
12292
12293 \begin_layout Itemize
12294
12295 \family sans
12296 \size normal
12297 Paper
12298 \family default
12299  for a Paper (same as Title)
12300 \end_layout
12301
12302 \begin_layout Itemize
12303
12304 \family sans
12305 \size normal
12306 Prelim
12307 \family default
12308  for a Preliminary communication
12309 \end_layout
12310
12311 \begin_layout Itemize
12312
12313 \family sans
12314 \size normal
12315 Rapid
12316 \family default
12317  for a Rapid communication
12318 \end_layout
12319
12320 \begin_layout Itemize
12321
12322 \family sans
12323 \size normal
12324 Letter
12325 \family default
12326  for a Letter to the editor
12327 \end_layout
12328
12329 \end_deeper
12330 \begin_layout Itemize
12331
12332 \size normal
12333 All title environments except of 
12334 \family sans
12335 Letter
12336 \family default
12337  can have an optional short title.
12338 \end_layout
12339
12340 \begin_layout Itemize
12341 There is a general title environment 
12342 \family sans
12343 Article
12344 \family default
12345  which is not directly supported by the LyX.
12346  This can be used as TeX code when your document doesn't fit into one of
12347  the other title types.
12348 \end_layout
12349
12350 \begin_layout Standard
12351 For more informations like hints for special table and formula formatting,
12352  look at the IOP author guidelines.
12353 \end_layout
12354
12355 \begin_layout Section
12356 Kluwer
12357 \end_layout
12358
12359 \begin_layout Standard
12360 by 
12361 \noun on
12362 Panayotis Papasotiriou
12363 \end_layout
12364
12365 \begin_layout Subsection
12366 Overview
12367 \end_layout
12368
12369 \begin_layout Standard
12370 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12371  that facilitates electronic manuscript submission to the journals they
12372  publish.
12373  Most known of them (at least in my domain of interest) are 
12374 \emph on
12375 Astrophysics and Space Science
12376 \emph default
12377  and 
12378 \emph on
12379 Solar Physics
12380 \emph default
12381 , but there are many others (see a complete list at 
12382 \begin_inset Flex URL
12383 status open
12384
12385 \begin_layout Plain Layout
12386
12387 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12388 \end_layout
12389
12390 \end_inset
12391
12392 ).
12393  The Kluwer package may be downloaded from the site 
12394 \begin_inset Flex URL
12395 status collapsed
12396
12397 \begin_layout Plain Layout
12398
12399 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12400 \end_layout
12401
12402 \end_inset
12403
12404 .
12405  A complete user guide is contained in that package (but it can also be
12406  downloaded separately).
12407 \end_layout
12408
12409 \begin_layout Standard
12410 LyX supports many features of the package but not everything.
12411  However, the TeX code needed is reduced to some 
12412 \begin_inset Quotes eld
12413 \end_inset
12414
12415 peculiar
12416 \begin_inset Quotes erd
12417 \end_inset
12418
12419  commands of the package (see
12420 \begin_inset space ~
12421 \end_inset
12422
12423
12424 \begin_inset CommandInset ref
12425 LatexCommand ref
12426 reference "subsec:kluwer_peculiarities"
12427
12428 \end_inset
12429
12430 ).
12431  I have recently used LyX to write an article submitted to the 
12432 \emph on
12433 Astrophysics and Space Science
12434 \emph default
12435  without any problem.
12436 \end_layout
12437
12438 \begin_layout Subsection
12439 Writing a paper
12440 \end_layout
12441
12442 \begin_layout Standard
12443 The easiest way to write a paper is to start with the Kluwer template file.
12444  Click on 
12445 \family sans
12446 File\SpecialChar \menuseparator
12447 New from
12448 \family default
12449  
12450 \family sans
12451 Template
12452 \family default
12453 , then choose the 
12454 \family typewriter
12455 kluwer.lyx
12456 \family default
12457  template.
12458  This will give an (almost) empty document that includes the most common
12459  fields found in a manuscript and a short description of their use.
12460  As in most templates, simply overwrite the existing text (including the
12461  brackets, 
12462 \family typewriter
12463 <>
12464 \family default
12465 ) with the correct information.
12466 \end_layout
12467
12468 \begin_layout Subsection
12469 Preparing a paper for submission
12470 \end_layout
12471
12472 \begin_layout Standard
12473 As in the AASTeX package, before you submit your paper to a journal you
12474  must 
12475 \begin_inset Quotes eld
12476 \end_inset
12477
12478 postprocess
12479 \begin_inset Quotes erd
12480 \end_inset
12481
12482  it as follows.
12483 \end_layout
12484
12485 \begin_layout Enumerate
12486 Export your paper as a LaTeX file.
12487  To do this, click on 
12488 \family sans
12489 File\SpecialChar \menuseparator
12490 Export\SpecialChar \menuseparator
12491 LaTeX
12492 \family default
12493 .
12494  
12495 \end_layout
12496
12497 \begin_layout Enumerate
12498 Edit the resulting 
12499 \family typewriter
12500 .tex
12501 \family default
12502  file with a text editor and make the following changes
12503 \end_layout
12504
12505 \begin_deeper
12506 \begin_layout Enumerate
12507 remove the comment lines before the 
12508 \family typewriter
12509
12510 \backslash
12511 documentclass
12512 \family default
12513  command,
12514 \end_layout
12515
12516 \begin_layout Enumerate
12517 remove everything between (and including) the 
12518 \family typewriter
12519
12520 \backslash
12521 makeatletter
12522 \family default
12523  and 
12524 \family typewriter
12525
12526 \backslash
12527 makeatother
12528 \family default
12529  commands, except for any commands you specifically put into the LaTeX preamble.
12530 \end_layout
12531
12532 \begin_layout Standard
12533 Save the resulting 
12534 \family typewriter
12535 .tex
12536 \family default
12537  file.
12538 \end_layout
12539
12540 \end_deeper
12541 \begin_layout Enumerate
12542 Run the 
12543 \family typewriter
12544 .tex
12545 \family default
12546  file through LaTeX as many times as necessary (usually up to three).
12547 \end_layout
12548
12549 \begin_layout Enumerate
12550 View the resulting 
12551 \family typewriter
12552 .dvi
12553 \family default
12554  document using, e.
12555 \begin_inset space \thinspace{}
12556 \end_inset
12557
12558 g.
12559 \begin_inset space \space{}
12560 \end_inset
12561
12562
12563 \family sans
12564 xdvi
12565 \family default
12566 , and check if everything is OK (it should, if you didn't make any mistake).
12567 \end_layout
12568
12569 \begin_layout Subsection
12570 \begin_inset Quotes eld
12571 \end_inset
12572
12573 Peculiarities
12574 \begin_inset Quotes erd
12575 \end_inset
12576
12577  of the Kluwer package
12578 \begin_inset CommandInset label
12579 LatexCommand label
12580 name "subsec:kluwer_peculiarities"
12581
12582 \end_inset
12583
12584
12585 \end_layout
12586
12587 \begin_layout Standard
12588 The Kluwer package has the following 
12589 \begin_inset Quotes eld
12590 \end_inset
12591
12592 peculiarities
12593 \begin_inset Quotes erd
12594 \end_inset
12595
12596 .
12597 \end_layout
12598
12599 \begin_layout Enumerate
12600 It is possible to write multiple articles in the same LaTeX file
12601 \begin_inset Foot
12602 status collapsed
12603
12604 \begin_layout Plain Layout
12605 I can't imagine any good reason to do this.
12606 \end_layout
12607
12608 \end_inset
12609
12610 .
12611  Each article must be included in the environment 
12612 \begin_inset Quotes eld
12613 \end_inset
12614
12615 article
12616 \begin_inset Quotes erd
12617 \end_inset
12618
12619 .
12620  Unfortunately, this environment cannot be omitted, even if you write just
12621  one article.
12622  Therefore, each article starts with the command 
12623 \family typewriter
12624
12625 \backslash
12626 begin{article}
12627 \family default
12628  and, obviously, ends with the command 
12629 \family typewriter
12630
12631 \backslash
12632 end{article}
12633 \family default
12634 .
12635  Although this can be implemented in LyX, I didn't included it, since it
12636  looks ugly and can confuse the novice user.
12637  Therefore, you need to enter them directly and mark them as LaTeX code
12638  (the well-known 
12639 \begin_inset Quotes eld
12640 \end_inset
12641
12642 TeX code
12643 \begin_inset Quotes erd
12644 \end_inset
12645
12646 ).
12647 \end_layout
12648
12649 \begin_layout Enumerate
12650 Information given at the beginning of the article (i.
12651 \begin_inset space \thinspace{}
12652 \end_inset
12653
12654 g.
12655 \begin_inset space \space{}
12656 \end_inset
12657
12658 title, subtitle, author, institution, running title, running author, abstract
12659  and keywords) must be included in an environment called 
12660 \begin_inset Quotes eld
12661 \end_inset
12662
12663 opening
12664 \begin_inset Quotes erd
12665 \end_inset
12666
12667 .
12668  This is not implemented in LyX, so you must enter title, subtitle etc.
12669 \begin_inset space ~
12670 \end_inset
12671
12672 between two TeX code lines (
12673 \family typewriter
12674
12675 \backslash
12676 begin{opening}
12677 \family default
12678  and 
12679 \family typewriter
12680
12681 \backslash
12682 end{opening}
12683 \family default
12684 ).
12685 \end_layout
12686
12687 \begin_layout Enumerate
12688 According to the user manual, the label of each bibliography item must be
12689  written as 
12690 \family typewriter
12691
12692 \backslash
12693 protect
12694 \backslash
12695 citeauthoryear{
12696 \family default
12697 \emph on
12698 author(s)
12699 \family typewriter
12700 \emph default
12701 }{
12702 \family default
12703 \emph on
12704 year
12705 \family typewriter
12706 \emph default
12707 }
12708 \family default
12709 .
12710 \end_layout
12711
12712 \begin_layout Standard
12713 The 
12714 \family typewriter
12715 kluwer.lyx
12716 \family default
12717  template takes care of all these 
12718 \begin_inset Quotes eld
12719 \end_inset
12720
12721 peculiarities
12722 \begin_inset Quotes erd
12723 \end_inset
12724
12725 .
12726  If you start a new paper using this template you don't need to do anything
12727  special.
12728  Just 
12729 \end_layout
12730
12731 \begin_layout Enumerate
12732 don't delete the TeX code included in the template, and
12733 \end_layout
12734
12735 \begin_layout Enumerate
12736 copy the example bibliography item included in the template and modify it
12737  as necessary to enter new bibliography items.
12738 \end_layout
12739
12740 \begin_layout Section
12741 Koma-Script
12742 \end_layout
12743
12744 \begin_layout Standard
12745 by 
12746 \noun on
12747 Bernd Rellermeyer
12748 \end_layout
12749
12750 \begin_layout Subsection
12751 Overview
12752 \end_layout
12753
12754 \begin_layout Standard
12755 The LyX document classes 
12756 \emph on
12757 article (koma-script)
12758 \emph default
12759
12760 \emph on
12761 report (koma-script)
12762 \emph default
12763
12764 \emph on
12765 book
12766 \emph default
12767  
12768 \emph on
12769 (koma-script)
12770 \emph default
12771 , and 
12772 \emph on
12773 letter
12774 \emph default
12775  
12776 \emph on
12777 (koma-script)
12778 \emph default
12779  correspond to the LaTeX document classes 
12780 \family typewriter
12781 scrartcl.cls
12782 \family default
12783
12784 \family typewriter
12785 scrreprt.cls
12786 \family default
12787
12788 \family typewriter
12789 scrbook.cls
12790 \family default
12791 , and 
12792 \family typewriter
12793 scrlettr.cls
12794 \family default
12795 , resp.
12796 \begin_inset space ~
12797 \end_inset
12798
12799 of the Koma-Script family.
12800  They are replacements for the standard document classes 
12801 \family typewriter
12802 article.cls
12803 \family default
12804
12805 \family typewriter
12806 report.cls
12807 \family default
12808
12809 \family typewriter
12810 book.cls
12811 \family default
12812  and 
12813 \family typewriter
12814 letter.cls
12815 \family default
12816 , resp., and fit better to European typography conventions in a number of
12817  points.
12818 \end_layout
12819
12820 \begin_layout Itemize
12821 Standard character size is 11pt in 
12822 \emph on
12823 article (koma-script)
12824 \emph default
12825
12826 \emph on
12827 report (koma-script)
12828 \emph default
12829 , and 
12830 \emph on
12831 book (koma-script)
12832 \emph default
12833 , and 12pt in 
12834 \emph on
12835 letter (koma-script)
12836 \emph default
12837 .
12838 \end_layout
12839
12840 \begin_layout Itemize
12841 Headings, labels of the description environment, and a number of elements
12842  of the 
12843 \emph on
12844 letter (koma-script)
12845 \emph default
12846  document class are set in a bold sans serif font.
12847 \begin_inset Foot
12848 status collapsed
12849
12850 \begin_layout Plain Layout
12851 There is a big difference between the bold sans serif old cm fonts and new
12852  ec fonts, especially in the appearance of headings.
12853  In comparison, the ec bold sans serif fonts look a bit thin.
12854  Here the LaTeX package 
12855 \family typewriter
12856 cmsd.sty by
12857 \family default
12858  
12859 \shape smallcaps
12860 Walter Schmidt
12861 \shape default
12862  helps to produce the 
12863 \begin_inset Quotes eld
12864 \end_inset
12865
12866 usual
12867 \begin_inset Quotes erd
12868 \end_inset
12869
12870  appearance when using the ec fonts.
12871 \end_layout
12872
12873 \end_inset
12874
12875  The numbering of chapter headings is made in the same way as the numbering
12876  of section headings, that is without the extra line 
12877 \begin_inset Quotes eld
12878 \end_inset
12879
12880 Chapter\SpecialChar \ldots{}
12881
12882 \begin_inset Quotes erd
12883 \end_inset
12884
12885 .
12886  In addition, the appearance of the headings can be modified by using a
12887  number of options (in LyX to be entered in the field 
12888 \family sans
12889 Extra
12890 \begin_inset space ~
12891 \end_inset
12892
12893 Options
12894 \family default
12895  of the dialog 
12896 \family sans
12897 Layout\SpecialChar \menuseparator
12898 Document
12899 \family default
12900 ).
12901  
12902 \end_layout
12903
12904 \begin_layout Itemize
12905 The main means in the Koma-Script document classes to design the type area
12906  are the options 
12907 \family sans
12908 BCOR
12909 \family default
12910  and 
12911 \family sans
12912 DIV
12913 \family default
12914  (in LyX to be entered in the extra class options field in the dialog 
12915 \family sans
12916 Document\SpecialChar \menuseparator
12917 Settings
12918 \family default
12919 ).
12920  They make a clearer modification of page margins possible as do the options
12921  of the dialog 
12922 \family sans
12923 Document\SpecialChar \menuseparator
12924 Settings
12925 \family default
12926 .
12927  
12928 \end_layout
12929
12930 \begin_layout Itemize
12931 The LaTeX document classes of the Koma-Script family define a number of
12932  additional commands.
12933  Those part of it which makes sense in LyX is implemented in corresponding
12934  paragraph types.
12935 \end_layout
12936
12937 \begin_layout Standard
12938 Detailed descriptions of the LaTeX document classes of the Koma-Script family
12939  can be found in the Koma-Script documentation 
12940 \emph on
12941 scrguide
12942 \emph default
12943  (German) and 
12944 \emph on
12945 scrguien
12946 \emph default
12947  (English).
12948 \end_layout
12949
12950 \begin_layout Subsection
12951 article (koma-script), report (koma-script), and book (koma-script)
12952 \end_layout
12953
12954 \begin_layout Standard
12955 The document classes 
12956 \emph on
12957 article (koma-script)
12958 \emph default
12959
12960 \emph on
12961 report (koma-script)
12962 \emph default
12963 , and 
12964 \emph on
12965 book
12966 \emph default
12967  
12968 \emph on
12969 (koma-script)
12970 \emph default
12971  are implemented in the layout files 
12972 \family typewriter
12973 scrartcl.layout
12974 \family default
12975
12976 \family typewriter
12977 scrreprt.layout
12978 \family default
12979 , and 
12980 \family typewriter
12981 scrbook.layout
12982 \family default
12983 , resp.
12984  They contain all the paragraph types of the corresponding standard document
12985  classes 
12986 \emph on
12987 article
12988 \emph default
12989
12990 \emph on
12991 report
12992 \emph default
12993 , and 
12994 \emph on
12995 book
12996 \emph default
12997 , resp., partly modified, with the exception of the LyX specific 
12998 \family sans
12999 List
13000 \family default
13001 -type, which is replaced by the new 
13002 \family sans
13003 Labeling
13004 \family default
13005 -type having the same functionality.
13006  Beside the 
13007 \family sans
13008 Labeling
13009 \family default
13010 -Type there is a number of new paragraph types added.
13011  They are 
13012 \emph on
13013 not
13014 \emph default
13015  part of 
13016 \emph on
13017 letter (koma-script)
13018 \emph default
13019 .
13020 \end_layout
13021
13022 \begin_layout Itemize
13023
13024 \family sans
13025 Addpart, Addchap
13026 \family default
13027
13028 \family sans
13029 Addsec
13030 \family default
13031 : are equivalents to 
13032 \family sans
13033 Part*, Chapter*
13034 \family default
13035  and 
13036 \family sans
13037 Section*
13038 \family default
13039 , resp., additionally inserting an entry in the table of contents.
13040  
13041 \family sans
13042 Addpart
13043 \family default
13044  and 
13045 \family sans
13046 Addchap
13047 \family default
13048  are not contained in 
13049 \emph on
13050 article (koma-script)
13051 \emph default
13052 .
13053 \end_layout
13054
13055 \begin_layout Itemize
13056
13057 \family sans
13058 Addchap*
13059 \family default
13060
13061 \family sans
13062 Addsec*
13063 \family default
13064 : behave exactly as 
13065 \family sans
13066 Addchap
13067 \family default
13068  and 
13069 \family sans
13070 Addsec
13071 \family default
13072 , resp., additionally clearing running heads.
13073  
13074 \family sans
13075 Addchap*
13076 \family default
13077  is not contained in 
13078 \emph on
13079 article (koma-script)
13080 \emph default
13081 .
13082 \begin_inset Foot
13083 status collapsed
13084
13085 \begin_layout Plain Layout
13086 There is also an 
13087 \family typewriter
13088
13089 \backslash
13090 addpart*
13091 \family default
13092  command in 
13093 \emph on
13094 book (koma-script)
13095 \emph default
13096  and in 
13097 \emph on
13098 report (koma-script)
13099 \emph default
13100 , but since this is identical to 
13101 \family sans
13102 Part*
13103 \family default
13104 , is has not been implemented in LyX.
13105 \end_layout
13106
13107 \end_inset
13108
13109
13110 \end_layout
13111
13112 \begin_layout Itemize
13113
13114 \family sans
13115 Minisec
13116 \family default
13117 : generates a heading directly above the following paragraph in the standard
13118  character size without affecting the structure of the document.
13119 \end_layout
13120
13121 \begin_layout Itemize
13122
13123 \family sans
13124 Captionabove
13125 \family default
13126  and 
13127 \family sans
13128 Captionbelow
13129 \family default
13130  are special captions which respect the different space settings needed
13131  for captions placed above or below an element (if you follow strict typographic
13132  rules, you might want to place table captions always above the table).
13133  You can also use the class option 
13134 \family typewriter
13135 tablecaptionsabove
13136 \family default
13137 , which will switch 
13138 \family sans
13139 caption
13140 \family default
13141  to 
13142 \family sans
13143 captionabove
13144 \family default
13145  for tables and 
13146 \family sans
13147 captionbelow
13148 \family default
13149  for figures.
13150  You need at least Koma-Script version 2.8q to use this.
13151 \end_layout
13152
13153 \begin_layout Itemize
13154
13155 \family sans
13156 Dictum
13157 \family default
13158 : can be used to set a bonmot, e.
13159 \begin_inset space \thinspace{}
13160 \end_inset
13161
13162 g.
13163 \begin_inset space \space{}
13164 \end_inset
13165
13166 at the beginning of a chapter.
13167  If you use the optional argument (
13168 \family sans
13169 Insert\SpecialChar \menuseparator
13170 Short
13171 \begin_inset space ~
13172 \end_inset
13173
13174 Title
13175 \family default
13176 ), you can insert the dictum's author there.
13177  Dictum and author are separated by a line.
13178  You need at least Koma-Script version 2.8q to use this.
13179  
13180 \family sans
13181 Dictum
13182 \family default
13183  is not contained in 
13184 \emph on
13185 article (koma-script)
13186 \emph default
13187 .
13188 \end_layout
13189
13190 \begin_layout Standard
13191 The following types, together with the standard types 
13192 \family sans
13193 Title
13194 \family default
13195
13196 \family sans
13197 Author
13198 \family default
13199 , and 
13200 \family sans
13201 Date
13202 \family default
13203 , form the title area of the document.
13204  They must be entered ahead of the first 
13205 \begin_inset Quotes eld
13206 \end_inset
13207
13208 ordinary
13209 \begin_inset Quotes erd
13210 \end_inset
13211
13212  paragraph.
13213 \begin_inset Foot
13214 status collapsed
13215
13216 \begin_layout Plain Layout
13217 The corresponding LaTeX commands must appear before the 
13218 \family typewriter
13219
13220 \backslash
13221 maketitle
13222 \family default
13223  command.
13224 \end_layout
13225
13226 \end_inset
13227
13228  When such a type is used more than once, the latter usage overwrites the
13229  former one, that means, for every type only the latest usage is valid.
13230  The order of the different types however has, like 
13231 \family sans
13232 Title
13233 \family default
13234
13235 \family sans
13236 Author
13237 \family default
13238 , and 
13239 \family sans
13240 Date
13241 \family default
13242 , no effect on the appearance of the produced document.
13243 \end_layout
13244
13245 \begin_layout Itemize
13246
13247 \family sans
13248 Subject
13249 \family default
13250 : produces a centered paragraph above the ordinary title (
13251 \family sans
13252 Title
13253 \family default
13254
13255 \family sans
13256 Author
13257 \family default
13258
13259 \family sans
13260 Date
13261 \family default
13262 ) for the subject of the document.
13263 \end_layout
13264
13265 \begin_layout Itemize
13266
13267 \family sans
13268 Publishers
13269 \family default
13270 : produces a centered paragraph below the ordinary title (
13271 \family sans
13272 Title
13273 \family default
13274
13275 \family sans
13276 Author
13277 \family default
13278
13279 \family sans
13280 Date
13281 \family default
13282 ) for the publishers' name.
13283 \end_layout
13284
13285 \begin_layout Itemize
13286
13287 \family sans
13288 Dedication
13289 \family default
13290 : in 
13291 \emph on
13292 report (koma-script)
13293 \emph default
13294  and 
13295 \emph on
13296 book (koma-script)
13297 \emph default
13298  produces a centered paragraph on its own page behind the title page, or
13299  in 
13300 \emph on
13301 article (koma-script)
13302 \emph default
13303  produces a centered paragraph below the ordinary title (
13304 \family sans
13305 Title
13306 \family default
13307
13308 \family sans
13309 Author
13310 \family default
13311
13312 \family sans
13313 Date
13314 \family default
13315
13316 \family sans
13317 Publishers
13318 \family default
13319 ) for a dedication.
13320 \end_layout
13321
13322 \begin_layout Itemize
13323
13324 \family sans
13325 Titlehead
13326 \family default
13327 : produces a left aligned paragraph above the ordinary title (
13328 \family sans
13329 Title
13330 \family default
13331
13332 \family sans
13333 Author
13334 \family default
13335
13336 \family sans
13337 Date
13338 \family default
13339
13340 \family sans
13341 Subject
13342 \family default
13343 ) for a document`s head.
13344 \end_layout
13345
13346 \begin_layout Itemize
13347
13348 \family sans
13349 Uppertitleback
13350 \family default
13351 : produces in a double-sided print in 
13352 \emph on
13353 report (koma-script)
13354 \emph default
13355  and 
13356 \emph on
13357 book (koma-script)
13358 \emph default
13359  a left-aligned paragraph at the top of the title page`s back or has no
13360  effect in a single-sided print or in 
13361 \emph on
13362 article (koma-script)
13363 \emph default
13364 .
13365 \end_layout
13366
13367 \begin_layout Itemize
13368
13369 \family sans
13370 Lowertitleback
13371 \family default
13372 : produces in a double-sided print in 
13373 \emph on
13374 report (koma-script)
13375 \emph default
13376  and 
13377 \emph on
13378 book (koma-script)
13379 \emph default
13380  a left-aligned paragraph at the bottom of the title page`s back or has
13381  no effect in a single-sided print or in 
13382 \emph on
13383 article (koma-script)
13384 \emph default
13385 .
13386 \end_layout
13387
13388 \begin_layout Itemize
13389
13390 \family sans
13391 Extratitle
13392 \family default
13393 : produces a special 
13394 \begin_inset Quotes eld
13395 \end_inset
13396
13397 dirty
13398 \begin_inset Quotes erd
13399 \end_inset
13400
13401  page ahead of the actual document containing a paragraph without special
13402  formatting.
13403 \end_layout
13404
13405 \begin_layout Standard
13406 The layout files for the document classes 
13407 \emph on
13408 article (koma-script)
13409 \emph default
13410
13411 \emph on
13412 report (koma-script)
13413 \emph default
13414 , and 
13415 \emph on
13416 book (koma-script)
13417 \emph default
13418  do include the file 
13419 \family typewriter
13420 scrmacros.inc
13421 \family default
13422 .
13423  This is thought of as a place to define your own types.
13424  Copy scrmacros
13425 \family typewriter
13426 .inc
13427 \family default
13428  in your personal layout directory and edit the file!
13429 \end_layout
13430
13431 \begin_layout Subsection
13432 letter (koma-script)
13433 \end_layout
13434
13435 \begin_layout Standard
13436 \begin_inset ERT
13437 status open
13438
13439 \begin_layout Plain Layout
13440
13441
13442 \backslash
13443 begin{sloppypar}
13444 \end_layout
13445
13446 \end_inset
13447
13448
13449 \end_layout
13450
13451 \begin_layout Standard
13452 \noindent
13453 The document class 
13454 \emph on
13455 letter (koma-script)
13456 \emph default
13457  is implemented in the layout file 
13458 \family typewriter
13459 scrlettr.layout
13460 \family default
13461 .
13462  It contains all the paragraph types of the corresponding standard document
13463  class 
13464 \emph on
13465 letter
13466 \emph default
13467 , partly modified, with the exception of the LyX specific types 
13468 \family sans
13469 LyX-Code
13470 \family default
13471  and 
13472 \family sans
13473 Comment
13474 \family default
13475  and the 
13476 \family sans
13477 List
13478 \family default
13479  type, which is replaced by the new 
13480 \family sans
13481 Labeling
13482 \family default
13483  type.
13484  In addition, it contains, in contrast to the standard document class, the
13485  standard types 
13486 \family sans
13487 LaTeX
13488 \family default
13489
13490 \family sans
13491 Quotation
13492 \family default
13493
13494 \family sans
13495 Quote
13496 \family default
13497 , and 
13498 \family sans
13499 Verse
13500 \family default
13501 .
13502  Furthermore, there are a number of new letter specific types.
13503 \end_layout
13504
13505 \begin_layout Standard
13506 \begin_inset ERT
13507 status open
13508
13509 \begin_layout Plain Layout
13510
13511
13512 \backslash
13513 end{sloppypar}
13514 \end_layout
13515
13516 \end_inset
13517
13518
13519 \end_layout
13520
13521 \begin_layout Standard
13522 The appearance of the letter produced by this document class can be controlled
13523  by a number of LaTeX commands, which you can put in the LaTeX preamble.
13524 \begin_inset Foot
13525 status collapsed
13526
13527 \begin_layout Plain Layout
13528 For example, the standard appearance of the letter`s heading, consisting
13529  of name and address, is quite self-willed.
13530  An 
13531 \begin_inset Quotes eld
13532 \end_inset
13533
13534 ordinary
13535 \begin_inset Quotes erd
13536 \end_inset
13537
13538  heading is produced by the following LaTeX commands in the preamble:
13539 \end_layout
13540
13541 \begin_layout LyX-Code
13542
13543 \backslash
13544 firsthead{
13545 \backslash
13546 parbox[b]{
13547 \backslash
13548 textwidth}
13549 \end_layout
13550
13551 \begin_layout LyX-Code
13552   {
13553 \backslash
13554 ignorespaces 
13555 \backslash
13556 fromname
13557 \backslash
13558
13559 \backslash
13560  
13561 \backslash
13562 ignorespaces 
13563 \backslash
13564 fromaddress}} 
13565 \end_layout
13566
13567 \begin_layout LyX-Code
13568
13569 \backslash
13570 nexthead{
13571 \backslash
13572 parbox[b]{
13573 \backslash
13574 textwidth}
13575 \end_layout
13576
13577 \begin_layout LyX-Code
13578   {
13579 \backslash
13580 ignorespaces 
13581 \backslash
13582 fromname 
13583 \backslash
13584 hfill 
13585 \backslash
13586 ignorespaces 
13587 \backslash
13588 pagename
13589 \backslash
13590  
13591 \backslash
13592 thepage}}
13593 \end_layout
13594
13595 \end_inset
13596
13597  A detailed German description of such LaTeX commands can be found in the
13598  Koma-Script documentation 
13599 \emph on
13600 scrguide
13601 \emph default
13602 .
13603  With it, the letter's author can produce his personal letter layout.
13604 \end_layout
13605
13606 \begin_layout Standard
13607 The types 
13608 \family sans
13609 Letter
13610 \family default
13611  and 
13612 \family sans
13613 Opening
13614 \family default
13615  define the beginning of the letter and must be used in every letter.
13616  To emphasize them in the LyX document class, they are marked with the letter
13617  
13618 \shape italic
13619 L
13620 \shape default
13621  or 
13622 \shape italic
13623 O
13624 \shape default
13625 , resp.
13626 \begin_inset space ~
13627 \end_inset
13628
13629 in the left margin.
13630  It is possible to write any number of letters in one file.
13631  An 
13632 \family sans
13633 Opening
13634 \family default
13635  type produces a new letter using the same addressee and a 
13636 \family sans
13637 Letter
13638 \family default
13639  type produces a new addressee.
13640  The types 
13641 \family sans
13642 Closing
13643 \family default
13644
13645 \family sans
13646 PS
13647 \family default
13648
13649 \family sans
13650 CC
13651 \family default
13652 , and 
13653 \family sans
13654 Encl
13655 \family default
13656  are ordinary paragraph types and can also be used several times in one
13657  and the same letter.
13658 \end_layout
13659
13660 \begin_layout Itemize
13661
13662 \family sans
13663 Letter
13664 \family default
13665 : produces a paragraph for the addressee and implicitly defines the beginning
13666  of the letter.
13667 \end_layout
13668
13669 \begin_layout Itemize
13670
13671 \family sans
13672 Opening
13673 \family default
13674 : produces a paragraph for the form of address and implicitly produces a
13675  new letter.
13676 \end_layout
13677
13678 \begin_layout Itemize
13679
13680 \family sans
13681 Closing
13682 \family default
13683 : produces a paragraph for a close.
13684 \end_layout
13685
13686 \begin_layout Itemize
13687
13688 \family sans
13689 PS
13690 \family default
13691 : produces a paragraph for a postscript.
13692 \end_layout
13693
13694 \begin_layout Itemize
13695
13696 \family sans
13697 CC
13698 \family default
13699 : produces a paragraph for a distribution list.
13700 \end_layout
13701
13702 \begin_layout Itemize
13703
13704 \family sans
13705 Encl
13706 \family default
13707 : produces a paragraph for enclosures.
13708 \end_layout
13709
13710 \begin_layout Standard
13711 The types 
13712 \family sans
13713 Name
13714 \family default
13715
13716 \family sans
13717 Signature
13718 \family default
13719
13720 \family sans
13721 Address
13722 \family default
13723
13724 \family sans
13725 Telephone
13726 \family default
13727
13728 \family sans
13729 Place
13730 \family default
13731
13732 \family sans
13733 Backaddress
13734 \family default
13735
13736 \family sans
13737 Specialmail
13738 \family default
13739
13740 \family sans
13741 Location
13742 \family default
13743
13744 \family sans
13745 Title
13746 \family default
13747 , and 
13748 \family sans
13749 Subject
13750 \family default
13751  are input types provided with a label to enter information, which will
13752  be processed by the document class.
13753 \begin_inset Foot
13754 status open
13755
13756 \begin_layout Plain Layout
13757 It could be seen as a matter of inconsequence, that the types 
13758 \family sans
13759 Letter
13760 \family default
13761  and 
13762 \family sans
13763 Opening
13764 \family default
13765  described above are not such input types as well.
13766  Because of the special meaning of those types, however, I have implemented
13767  them as ordinary paragraph types with a one letter mark in the left margin.
13768  Moreover, it would affect my feeling of symmetry, if the 
13769 \family sans
13770 Opening
13771 \family default
13772  type and the 
13773 \family sans
13774 Closing
13775 \family default
13776  type had such a serious different appearance.
13777 \end_layout
13778
13779 \end_inset
13780
13781  The types must be used ahead of the corresponding 
13782 \family sans
13783 Opening
13784 \family default
13785  type.
13786 \end_layout
13787
13788 \begin_layout Standard
13789 An implementation of these types in a WYSIWYG fashion does not seem to make
13790  sense, because the real appearance of the produced letter does not only
13791  depend on the usage of the particular type, but also on other factors.
13792  For example, a signature entered in the 
13793 \family sans
13794 Signature
13795 \family default
13796  type will in the standard behavior appear in the produced letter only,
13797  when in the same letter also a 
13798 \family sans
13799 Closing
13800 \family default
13801  type is used.
13802  The entered value of the 
13803 \family sans
13804 Telephone
13805 \family default
13806  type will in the standard behavior not appear in the produced letter at
13807  all.
13808  The possibility to design the letter`s heading freely is already indicated
13809  in a footnote above.
13810 \end_layout
13811
13812 \begin_layout Standard
13813 The input types can also be used as empty paragraphs.
13814  This makes sense e.
13815 \begin_inset space \thinspace{}
13816 \end_inset
13817
13818 g.
13819 \begin_inset space \space{}
13820 \end_inset
13821
13822 for the 
13823 \family sans
13824 Signature
13825 \family default
13826  type.
13827  If the 
13828 \family sans
13829 Signature
13830 \family default
13831  type is not used at all, in the standard behavior the value of the 
13832 \family sans
13833 Name
13834 \family default
13835  type is used as signature, whereas if an empty 
13836 \family sans
13837 Signature
13838 \family default
13839  type is used, no signature value is defined.
13840 \end_layout
13841
13842 \begin_layout Standard
13843 By using the input types it is possible to write a letter template, containing
13844  filled input types with your personal dates (name, address, etc.) and empty
13845  input types for other dates you want to enter.
13846 \end_layout
13847
13848 \begin_layout Itemize
13849
13850 \family sans
13851 Name
13852 \family default
13853 : sender's name, in the standard behavior appears as a centered paragraph
13854  in small caps in the letter`s heading.
13855 \end_layout
13856
13857 \begin_layout Itemize
13858
13859 \family sans
13860 Signature
13861 \family default
13862 : sender's signature, in the standard behavior appears below the 
13863 \family sans
13864 Closing
13865 \family default
13866  type.
13867  If no 
13868 \family sans
13869 Signature
13870 \family default
13871  type is used, the value of the 
13872 \family sans
13873 Name
13874 \family default
13875  type appears instead.
13876 \end_layout
13877
13878 \begin_layout Itemize
13879
13880 \family sans
13881 Address
13882 \family default
13883 : sender's address, in the standard behavior appears in a centered paragraph
13884  in the letter`s heading below the sender's name.
13885 \end_layout
13886
13887 \begin_layout Itemize
13888
13889 \family sans
13890 Telephone
13891 \family default
13892 : sender's telephone number, in the standard behavior only sets the LaTeX
13893  variable 
13894 \family typewriter
13895
13896 \backslash
13897 telephonenum
13898 \family default
13899 .
13900 \end_layout
13901
13902 \begin_layout Itemize
13903
13904 \family sans
13905 Place
13906 \family default
13907 : place of the letter`s making.
13908 \end_layout
13909
13910 \begin_layout Itemize
13911
13912 \family sans
13913 Date
13914 \family default
13915 : date of the letter`s making.
13916  
13917 \family sans
13918 Place
13919 \family default
13920  and 
13921 \family sans
13922 Date
13923 \family default
13924 , in the standard behavior, produce the place and the date in a right-aligned
13925  line below the addressee's field.
13926  If an empty 
13927 \family sans
13928 Date
13929 \family default
13930  type is used, neither place nor date appear, independent of the value of
13931  the 
13932 \family sans
13933 Place
13934 \family default
13935  type.
13936  If no 
13937 \family sans
13938 Date
13939 \family default
13940  type is used, the date of the letter `s production is used.
13941 \end_layout
13942
13943 \begin_layout Itemize
13944
13945 \family sans
13946 Backaddress
13947 \family default
13948 : sender`s back address, in the standard behavior appears above the addressee's
13949  field in a small sans serif font.
13950 \end_layout
13951
13952 \begin_layout Itemize
13953
13954 \family sans
13955 Specialmail
13956 \family default
13957 : special mail information, in the standard behavior appears underlined
13958  above the addressee's field below the back address.
13959 \end_layout
13960
13961 \begin_layout Itemize
13962
13963 \family sans
13964 Location
13965 \family default
13966 : additional information, in the standard behavior appears on right side
13967  below the addressee`s field.
13968 \end_layout
13969
13970 \begin_layout Itemize
13971
13972 \family sans
13973 Title
13974 \family default
13975 : the letter's title, in the standard behavior appears in a big, bold, sans
13976  serif font above the subject.
13977 \end_layout
13978
13979 \begin_layout Itemize
13980
13981 \family sans
13982 Subject
13983 \family default
13984 : the letter's subject, in the standard behavior appears in a bold font
13985  above the 
13986 \family sans
13987 Opening
13988 \family default
13989  paragraph.
13990 \end_layout
13991
13992 \begin_layout Standard
13993 The types 
13994 \family sans
13995 Yourref
13996 \family default
13997
13998 \family sans
13999 Yourmail
14000 \family default
14001
14002 \family sans
14003 Myref
14004 \family default
14005
14006 \family sans
14007 Customer
14008 \family default
14009 , and 
14010 \family sans
14011 Invoice
14012 \family default
14013  produce a business letter like line above the 
14014 \family sans
14015 Title
14016 \family default
14017  line containing the fields 
14018 \begin_inset Quotes eld
14019 \end_inset
14020
14021 Your ref.
14022 \begin_inset Quotes erd
14023 \end_inset
14024
14025
14026 \begin_inset Quotes eld
14027 \end_inset
14028
14029 Your letter of
14030 \begin_inset Quotes erd
14031 \end_inset
14032
14033
14034 \begin_inset Quotes eld
14035 \end_inset
14036
14037 Our ref.
14038 \begin_inset Quotes erd
14039 \end_inset
14040
14041
14042 \begin_inset Quotes eld
14043 \end_inset
14044
14045 Customer no.
14046 \begin_inset Quotes erd
14047 \end_inset
14048
14049
14050 \begin_inset Quotes eld
14051 \end_inset
14052
14053 Invoice no.
14054 \begin_inset Quotes erd
14055 \end_inset
14056
14057 , and 
14058 \begin_inset Quotes eld
14059 \end_inset
14060
14061 Date
14062 \begin_inset Quotes erd
14063 \end_inset
14064
14065 .
14066  For the date field, the value of the 
14067 \family sans
14068 Date
14069 \family default
14070  type is used.
14071  If one of these 
14072 \begin_inset Quotes eld
14073 \end_inset
14074
14075 business letter types
14076 \begin_inset Quotes erd
14077 \end_inset
14078
14079  is used, the value of the 
14080 \family sans
14081 Place
14082 \family default
14083  type however does not appear, but only the LaTeX variable 
14084 \family typewriter
14085
14086 \backslash
14087 fromplace
14088 \family default
14089  is set.
14090  The ordinary output of place and date in a right-aligned line below the
14091  addressee`s field is suppressed.
14092  The types are implemented as input types provided with a label and must
14093  be used ahead of the corresponding 
14094 \family sans
14095 Opening
14096 \family default
14097  type.
14098 \end_layout
14099
14100 \begin_layout Itemize
14101
14102 \family sans
14103 Yourref
14104 \family default
14105 : Your ref.
14106 \end_layout
14107
14108 \begin_layout Itemize
14109
14110 \family sans
14111 Yourmail
14112 \family default
14113 : Your letter of.
14114 \end_layout
14115
14116 \begin_layout Itemize
14117
14118 \family sans
14119 Myref
14120 \family default
14121 : Our ref.
14122 \end_layout
14123
14124 \begin_layout Itemize
14125
14126 \family sans
14127 Customer
14128 \family default
14129 : Customer no.
14130 \end_layout
14131
14132 \begin_layout Itemize
14133
14134 \family sans
14135 Invoice
14136 \family default
14137 : Invoice no.
14138 \end_layout
14139
14140 \begin_layout Subsection
14141 The new letter class: letter (koma-script v.2)
14142 \end_layout
14143
14144 \begin_layout Standard
14145 by 
14146 \noun on
14147 Jürgen Spitzmüller
14148 \end_layout
14149
14150 \begin_layout Standard
14151 \begin_inset VSpace medskip
14152 \end_inset
14153
14154
14155 \end_layout
14156
14157 \begin_layout Standard
14158 \noindent
14159 Koma-Script version 2.8 has introduced a new letter class 
14160 \family typewriter
14161 scrlttr2
14162 \family default
14163  which supersedes the now unsupported 
14164 \family typewriter
14165 scrlettr
14166 \family default
14167 .
14168  It has — on the LaTeX side — a completely new interface and is not compatible
14169  with the old class.
14170  Therefore, LyX supports both, though it is recommended you use the new
14171  class.
14172 \end_layout
14173
14174 \begin_layout Standard
14175 This class covers the same functionality as 
14176 \emph on
14177 letter (koma-script),
14178 \emph default
14179  and a few more.
14180  The basic items are 
14181 \family sans
14182 Address
14183 \family default
14184  (receiver's address, same as 
14185 \family sans
14186 Letter
14187 \family default
14188  in the old layout), 
14189 \family sans
14190 Opening
14191 \family default
14192 , and 
14193 \family sans
14194 Closing
14195 \family default
14196 .
14197  
14198 \family sans
14199 NextAddress
14200 \family default
14201  will start a new letter (i.
14202 \begin_inset space \thinspace{}
14203 \end_inset
14204
14205 g.
14206 \begin_inset space \space{}
14207 \end_inset
14208
14209 you can write several letters per document).
14210  New elements are sender's 
14211 \family sans
14212 E-Mail
14213 \family default
14214
14215 \family sans
14216 URL
14217 \family default
14218
14219 \family sans
14220 Fax
14221 \family default
14222
14223 \family sans
14224 Bank
14225 \family default
14226  and the possibility to use a 
14227 \family sans
14228 Logo
14229 \family default
14230  (via 
14231 \family sans
14232 Insert\SpecialChar \menuseparator
14233 Graphics
14234 \family default
14235 ) in the header.
14236 \end_layout
14237
14238 \begin_layout Standard
14239 The biggest improvement is, though, that the letter's layout is configurable
14240  to meet almost any needs.
14241  This can be done via the preamble or with a special style file (Letter
14242  Class Option, extension 
14243 \family typewriter
14244 *.lco
14245 \family default
14246 ), that will be read in as a class option.
14247 \begin_inset Foot
14248 status collapsed
14249
14250 \begin_layout Plain Layout
14251 The KOMA package comes with some default 
14252 \family typewriter
14253 *.lco
14254 \family default
14255  files.
14256  There is, for instance, a 
14257 \family typewriter
14258 DIN.lco
14259 \family default
14260  file that follows german typesetting rules, or a 
14261 \family typewriter
14262 KOMAold.lco
14263 \family default
14264  that provides the default layout of the old 
14265 \family typewriter
14266 scrlettr
14267 \family default
14268  class.
14269  The latter can be loaded with the class option 
14270 \family typewriter
14271 KOMAold
14272 \family default
14273 , inserted via the 
14274 \family sans
14275 \bar under
14276 L
14277 \bar default
14278 ayout\SpecialChar \menuseparator
14279
14280 \bar under
14281 D
14282 \bar default
14283 ocument\SpecialChar \menuseparator
14284 Extra Options
14285 \family default
14286  field.
14287 \end_layout
14288
14289 \end_inset
14290
14291  Have a look at the 
14292 \emph on
14293 koma-letter2
14294 \emph default
14295  template that is included in LyX for examples.
14296  A detailed description is to be found in the Koma-Script documentation
14297  (
14298 \emph on
14299 scrguide
14300 \emph default
14301 ).
14302 \end_layout
14303
14304 \begin_layout Subsection
14305 Problems
14306 \end_layout
14307
14308 \begin_layout Standard
14309 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14310  some problems.
14311 \end_layout
14312
14313 \begin_layout Itemize
14314 The chapter number of a 
14315 \family sans
14316 Chapter
14317 \family default
14318  type appears on a line of its own above the chapter heading instead of
14319  appearing in the same line ahead of it.
14320  The cause for that is the LyX internal behavior for the labeltype 
14321 \family sans
14322 Counter_Chapter
14323 \family default
14324  in the layout file.
14325 \end_layout
14326
14327 \begin_layout Itemize
14328 The headings of the types 
14329 \family sans
14330 Addchap
14331 \family default
14332  and 
14333 \family sans
14334 Addsec
14335 \family default
14336  are only put in the 
14337 \begin_inset Quotes eld
14338 \end_inset
14339
14340 true
14341 \begin_inset Quotes erd
14342 \end_inset
14343
14344  LaTeX table of contents, but not in the LyX table of contents (
14345 \family sans
14346 Document\SpecialChar \menuseparator
14347 Table
14348 \begin_inset space ~
14349 \end_inset
14350
14351 of
14352 \begin_inset space ~
14353 \end_inset
14354
14355 Contents
14356 \family default
14357 ).
14358 \end_layout
14359
14360 \begin_layout Itemize
14361 The paragraphs in a 
14362 \emph on
14363 letter
14364 \emph default
14365  document class appear in a skip separation mode, not indented.
14366  This is the standard behavior, no special LaTeX commands are needed for
14367  that.
14368  But in the 
14369 \family sans
14370 Document\SpecialChar \menuseparator
14371 Settings
14372 \family default
14373  dialog the corresponding radio button indicates 
14374 \family sans
14375 Indent
14376 \family default
14377 .
14378  A 
14379 \family sans
14380 Skip
14381 \family default
14382  value always has the effect that extra LaTeX commands are inserted in the
14383  document to produce the gap, which is not what is wanted in this case.
14384 \end_layout
14385
14386 \begin_layout Section
14387 Latex8 (IEEE Conference Papers)
14388 \end_layout
14389
14390 \begin_layout Standard
14391 by 
14392 \noun on
14393 Allan Rae
14394 \end_layout
14395
14396 \begin_layout Subsection
14397 Introduction
14398 \end_layout
14399
14400 \begin_layout Standard
14401 Since this class is specifically for writing submissions to IEEE sponsored
14402  conferences I strongly recommend that you get a copy of their Authors Kit.
14403  The 
14404 \family sans
14405 latex.sty
14406 \family default
14407  package and associated bibliography style file is included in the kit.
14408  The Authors Kit is usually sent out by email once your initial submission
14409  has been accepted.
14410  There is a lot of useful information in the Authors Kit explaining formatting
14411  restrictions and so on and I will assume you have read this since that
14412  means I don't have to repeat it all here.
14413 \end_layout
14414
14415 \begin_layout Subsection
14416 Getting Started
14417 \end_layout
14418
14419 \begin_layout Standard
14420 [AR\SpecialChar \@.
14421  more to come]
14422 \end_layout
14423
14424 \begin_layout Subsection
14425 Supported Environments
14426 \end_layout
14427
14428 \begin_layout Itemize
14429
14430 \family sans
14431 Standard
14432 \end_layout
14433
14434 \begin_layout Itemize
14435
14436 \family sans
14437 Title
14438 \end_layout
14439
14440 \begin_layout Itemize
14441
14442 \family sans
14443 Author
14444 \end_layout
14445
14446 \begin_layout Itemize
14447
14448 \family sans
14449 E-mail
14450 \end_layout
14451
14452 \begin_layout Itemize
14453
14454 \family sans
14455 Affiliation
14456 \end_layout
14457
14458 \begin_layout Itemize
14459
14460 \family sans
14461 Abstract
14462 \end_layout
14463
14464 \begin_layout Itemize
14465
14466 \family sans
14467 Section
14468 \end_layout
14469
14470 \begin_layout Itemize
14471
14472 \family sans
14473 SubSection
14474 \end_layout
14475
14476 \begin_layout Itemize
14477
14478 \family sans
14479 Caption
14480 \end_layout
14481
14482 \begin_layout Subsection
14483 Differences Between Screen and Paper
14484 \end_layout
14485
14486 \begin_layout Standard
14487 There are slight differences in appearance mainly with the presentation
14488  of section counters.
14489  On screen the trailing period of the section counter is missing but it
14490  will appear in the output so don't let this worry you.
14491 \end_layout
14492
14493 \begin_layout Section
14494 Memoir
14495 \end_layout
14496
14497 \begin_layout Standard
14498 By 
14499 \noun on
14500 Jürgen Spitzmüller
14501 \end_layout
14502
14503 \begin_layout Subsection
14504 Overview
14505 \end_layout
14506
14507 \begin_layout Standard
14508 Memoir is a very powerful and constantly evolving class.
14509  It has been designed with regard to fictional and non-fictional literature.
14510  Its aim is to let the user have maximum control over the typesetting of
14511  his document.
14512  Memoir is based on the standard book class, but it can also emulate the
14513  article class (see below).
14514 \end_layout
14515
14516 \begin_layout Standard
14517 Peter Wilson, the developer of Memoir, is known as the author of lots of
14518  useful packages in the LaTeX world.
14519  Most of them have been merged with Memoir.
14520  Therefore, it is much easier to layout the table of contents, appendices,
14521  chapter designs and such.
14522  LyX, though, does not support all of these goodies natively.
14523  Some of them might be added to forthcoming releases
14524 \begin_inset Foot
14525 status collapsed
14526
14527 \begin_layout Plain Layout
14528 You are invited to send suggestions to 
14529 \begin_inset Flex URL
14530 status collapsed
14531
14532 \begin_layout Plain Layout
14533
14534 lyx-devel@lists.lyx.org
14535 \end_layout
14536
14537 \end_inset
14538
14539 .
14540 \end_layout
14541
14542 \end_inset
14543
14544 , lots will probably never, due to the limitations of LyX's framework.
14545  Of course you can still use all features with the help of some native LaTeX
14546  commands (TeX code
14547 \begin_inset Foot
14548 status collapsed
14549
14550 \begin_layout Plain Layout
14551 Cf.
14552 \begin_inset ERT
14553 status collapsed
14554
14555 \begin_layout Plain Layout
14556
14557
14558 \backslash
14559  
14560 \end_layout
14561
14562 \end_inset
14563
14564 section
14565 \begin_inset space ~
14566 \end_inset
14567
14568
14569 \begin_inset CommandInset ref
14570 LatexCommand ref
14571 reference "sec:Inserting-TeX-Code"
14572
14573 \end_inset
14574
14575  for details.
14576 \end_layout
14577
14578 \end_inset
14579
14580 ).
14581  In this section, we can only list those features which are natively supported
14582  by LyX.
14583  For detailed descriptions (and for the rest of features) we recommend you
14584  have a look at the detailed manual of the Memoir class
14585 \begin_inset Foot
14586 status collapsed
14587
14588 \begin_layout Plain Layout
14589 Cf.
14590 \begin_inset ERT
14591 status collapsed
14592
14593 \begin_layout Plain Layout
14594
14595
14596 \backslash
14597  
14598 \end_layout
14599
14600 \end_inset
14601
14602
14603 \begin_inset Flex URL
14604 status collapsed
14605
14606 \begin_layout Plain Layout
14607
14608 CTAN:/macros/latex/memoir/memman.pdf
14609 \end_layout
14610
14611 \end_inset
14612
14613 .
14614 \end_layout
14615
14616 \end_inset
14617
14618 , which is not only a user guide for the class, but also both a comprehensive
14619  description on good typesetting and a superb example for good typesetting
14620  itself.
14621 \end_layout
14622
14623 \begin_layout Subsection
14624 Basic features and restrictions
14625 \end_layout
14626
14627 \begin_layout Standard
14628 Memoir supports basically all features of the standard book classes.
14629  There are, however, some differences, as follows:
14630 \end_layout
14631
14632 \begin_layout Description
14633 Font
14634 \begin_inset space ~
14635 \end_inset
14636
14637 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14638 \end_layout
14639
14640 \begin_layout Description
14641 Page
14642 \begin_inset space ~
14643 \end_inset
14644
14645 style: The fancy page style is not supported, due to a command clash between
14646  Memoir and the fancyhdr package (they both define a command with the same
14647  name, which confuses LaTeX).
14648  Instead, Memoir comes with a number of its own page styles (see 
14649 \family sans
14650 Layout\SpecialChar \menuseparator
14651 Document\SpecialChar \menuseparator
14652 Page
14653 \begin_inset space ~
14654 \end_inset
14655
14656 Style
14657 \family default
14658 ).
14659  If you want to use these for the chapter pages, you have to use the command
14660  
14661 \family typewriter
14662
14663 \backslash
14664 chapterstyle
14665 \family default
14666  in the main text or in preamble (e.
14667 \begin_inset space \thinspace{}
14668 \end_inset
14669
14670 g.
14671 \begin_inset space \space{}
14672 \end_inset
14673
14674
14675 \family typewriter
14676
14677 \backslash
14678 chapterstyle{companion}
14679 \family default
14680 ).
14681 \end_layout
14682
14683 \begin_layout Description
14684 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14685  optional argument in the standard classes.
14686  With this, you can specify an alternative version of the title for the
14687  table of contents and the headers (for instance, if the title is too long).
14688  In LyX, you can do this via 
14689 \family sans
14690 Insert\SpecialChar \menuseparator
14691 Short
14692 \begin_inset space ~
14693 \end_inset
14694
14695 Title
14696 \family default
14697  at the beginning of a chapter/section.
14698  Memoir features a second optional argument and thus separates the table
14699  of contents from the header.
14700  You can define three variants of a title with this: one for the main text,
14701  one for the table of contents, and one for the headers.
14702  Simply insert two optional arguments if you need this feature, the first
14703  one containing the short title for the Table of Contents, the second one
14704  containing an alternative short title for the headers.
14705 \end_layout
14706
14707 \begin_layout Description
14708 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14709  of contents, the list of figures and the list of table start a new page
14710  automatically.
14711  Memoir does not follow this route.
14712  You have to insert a page break yourself, if you want to have one.
14713 \end_layout
14714
14715 \begin_layout Description
14716 Titlepage: For some unknown reason, Memoir uses pagination on the title
14717  page (in the standard classes, title pages are 
14718 \begin_inset Quotes eld
14719 \end_inset
14720
14721 empty
14722 \begin_inset Quotes erd
14723 \end_inset
14724
14725 , i.
14726 \begin_inset space \thinspace{}
14727 \end_inset
14728
14729 g.
14730 \begin_inset space \space{}
14731 \end_inset
14732
14733 without pagina).
14734  If you want an empty title page, type 
14735 \family typewriter
14736
14737 \backslash
14738 aliaspagestyle{title}{empty}
14739 \family default
14740  in the preamble.
14741 \end_layout
14742
14743 \begin_layout Description
14744 Article: With the class option 
14745 \emph on
14746 article
14747 \emph default
14748  (to be inserted in 
14749 \family sans
14750 Layout\SpecialChar \menuseparator
14751 Document\SpecialChar \menuseparator
14752 Extra
14753 \begin_inset space ~
14754 \end_inset
14755
14756 Options
14757 \family default
14758 ), you can emulate article style.
14759  That is, counters (footnotes, figures, tables etc.) will not be reset on
14760  new chapters, chapters don't start a new page (but are—in contrary to 
14761 \begin_inset Quotes eld
14762 \end_inset
14763
14764 real
14765 \begin_inset Quotes erd
14766 \end_inset
14767
14768  article classes—still allowed), parts, though, use their own page, as in
14769  book.
14770 \end_layout
14771
14772 \begin_layout Description
14773 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14774  font commands, which have been used in the old LaTeX version 2.09 (e.
14775 \begin_inset space \thinspace{}
14776 \end_inset
14777
14778 g.
14779 \begin_inset space \space{}
14780 \end_inset
14781
14782
14783 \family typewriter
14784
14785 \backslash
14786 rm
14787 \family default
14788
14789 \family typewriter
14790
14791 \backslash
14792 it
14793 \family default
14794 ).
14795  It produces an error and stops LaTeX whenever such a command appears.
14796  The class option 
14797 \emph on
14798 oldfontcommands
14799 \emph default
14800  reallows the commands and spits out warnings instead (which does at least
14801  not stop LaTeX).
14802  Since a lot of packages and particularly BibTeX style files are still using
14803  those commands, we have decided to use this option by default.
14804 \end_layout
14805
14806 \begin_layout Subsection
14807 Extra features
14808 \end_layout
14809
14810 \begin_layout Standard
14811 We will only describe the features supported by LyX (which is not much currently
14812 ).
14813  Please consult the Memoir manual
14814 \begin_inset Foot
14815 status collapsed
14816
14817 \begin_layout Plain Layout
14818 Cf.
14819 \begin_inset ERT
14820 status collapsed
14821
14822 \begin_layout Plain Layout
14823
14824
14825 \backslash
14826  
14827 \end_layout
14828
14829 \end_inset
14830
14831
14832 \begin_inset Flex URL
14833 status collapsed
14834
14835 \begin_layout Plain Layout
14836
14837 CTAN:/macros/latex/memoir/memman.pdf
14838 \end_layout
14839
14840 \end_inset
14841
14842 .
14843 \end_layout
14844
14845 \end_inset
14846
14847  for details.
14848 \end_layout
14849
14850 \begin_layout Description
14851 Abstract: You may wonder why an abstract is an extra feature.
14852  Well, it is in book class.
14853  Usually books don't have abstracts.
14854  Memoir, however, has.
14855  You can use it wherever and how often you like.
14856 \end_layout
14857
14858 \begin_layout Description
14859 Chapterprecis: You may know this older typesetting style: The contents of
14860  a chapter are summarized below the title and also in the table of contents
14861  (e.
14862 \begin_inset space \thinspace{}
14863 \end_inset
14864
14865 g.
14866 \begin_inset space \space{}
14867 \end_inset
14868
14869
14870 \emph on
14871 Our hero arrives in Troia; he loses some friends; he finds others
14872 \emph default
14873 ).
14874  Chapterprecis does exactly this.
14875  It is therefore only sensible below a chapter.
14876 \end_layout
14877
14878 \begin_layout Description
14879 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14880  The epigraph environment provides an elegant way of typesetting such a
14881  motto.
14882  The motto itself (text) and its author (source) are divided by a short
14883  line.
14884  Unfortunately, we have to fool LyX a bit here again, since the environment
14885  needs two arguments (text and source).
14886  In this case, we have to use curly brackets (in TeX mode) between the two
14887  arguments: 
14888 \emph on
14889 <smart slogan>
14890 \emph default
14891  
14892 \family typewriter
14893 }{
14894 \family default
14895  
14896 \emph on
14897 <author of the slogan>.
14898 \end_layout
14899
14900 \begin_layout Description
14901 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14902  complex figurative poems).
14903  LyX can only support a few of them.
14904  One is poemtitle, which is a centered title for poems, which will also
14905  be added to the table of contents (verse is the standard environment for
14906  poems.
14907  Memoir has some enhanced versions of verse, but you need to use TeX code,
14908  because they have to be nested inside regular verse environments, which
14909  is not possible with LyX).
14910 \end_layout
14911
14912 \begin_layout Description
14913 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14914 \end_layout
14915
14916 \begin_layout Section
14917 Article (mwart), book (mwbk) and report (mwrep)
14918 \begin_inset Argument
14919 status collapsed
14920
14921 \begin_layout Plain Layout
14922 The 
14923 \family typewriter
14924 mw
14925 \family default
14926  Classes
14927 \end_layout
14928
14929 \end_inset
14930
14931
14932 \end_layout
14933
14934 \begin_layout Standard
14935 by 
14936 \noun on
14937 Tomasz Luczak
14938 \end_layout
14939
14940 \begin_layout Standard
14941 The LyX document classes 
14942 \emph on
14943 article (mwart)
14944 \emph default
14945
14946 \emph on
14947 report (mwrep)
14948 \emph default
14949  and 
14950 \emph on
14951 book
14952 \emph default
14953  
14954 \emph on
14955 (mwbk)
14956 \emph default
14957  correspond to the LaTeX document classes 
14958 \family typewriter
14959 mwart.cls
14960 \family default
14961
14962 \family typewriter
14963 mwrep.cls
14964 \family default
14965  and 
14966 \family typewriter
14967 mwbk.cls
14968 \family default
14969 , resp.
14970  They are replacements for the standard document classes 
14971 \family typewriter
14972 article.cls
14973 \family default
14974
14975 \family typewriter
14976 report.cls
14977 \family default
14978  and 
14979 \family typewriter
14980 book.cls
14981 \family default
14982 , resp., and fit better to Polish typography conventions in a number of points.
14983  
14984 \end_layout
14985
14986 \begin_layout Standard
14987 Basic differences:
14988 \end_layout
14989
14990 \begin_layout Itemize
14991 Unnumbered titles (with star, e.
14992 \begin_inset space \thinspace{}
14993 \end_inset
14994
14995 g.
14996 \begin_inset space \space{}
14997 \end_inset
14998
14999
15000 \family sans
15001 Section*
15002 \family default
15003 ) are added into table of contents,
15004 \end_layout
15005
15006 \begin_layout Itemize
15007 Additional page styles:
15008 \end_layout
15009
15010 \begin_deeper
15011 \begin_layout Description
15012 uheadings header with separated lines,
15013 \end_layout
15014
15015 \begin_layout Description
15016 myheadings custom header, contents headers via commands: 
15017 \family typewriter
15018
15019 \backslash
15020 markright
15021 \family default
15022  and 
15023 \family typewriter
15024
15025 \backslash
15026 markboth
15027 \family default
15028 ,
15029 \end_layout
15030
15031 \begin_layout Description
15032 myuheadings custom header with separated lines,
15033 \end_layout
15034
15035 \begin_layout Description
15036 outer page number is placed on outer side of page
15037 \end_layout
15038
15039 \end_deeper
15040 \begin_layout Itemize
15041 Options 
15042 \end_layout
15043
15044 \begin_deeper
15045 \begin_layout Description
15046 rmheadings serif titles — default,
15047 \end_layout
15048
15049 \begin_layout Description
15050 sfheadings sansserif titles,
15051 \end_layout
15052
15053 \begin_layout Description
15054 authortitle on title page first placed is author next title — default,
15055 \end_layout
15056
15057 \begin_layout Description
15058 titleauthor on title page first placed is title next author,
15059 \end_layout
15060
15061 \begin_layout Description
15062 withmarginpar reserve place on page for margins.
15063 \end_layout
15064
15065 \end_deeper
15066 \begin_layout Section
15067 Paper
15068 \end_layout
15069
15070 \begin_layout Standard
15071 The document class 
15072 \family sans
15073 paper
15074 \family default
15075  provides an alternative to the standard 
15076 \family sans
15077 article
15078 \family default
15079  class.
15080  It provides similar functionality, but you might prefer this layout with
15081  sans serif sections, headings, and more.
15082 \end_layout
15083
15084 \begin_layout Section
15085 RevTeX4
15086 \end_layout
15087
15088 \begin_layout Standard
15089 by 
15090 \noun on
15091 Amir Karger
15092 \end_layout
15093
15094 \begin_layout Standard
15095 \begin_inset VSpace bigskip
15096 \end_inset
15097
15098
15099 \end_layout
15100
15101 \begin_layout Standard
15102 \noindent
15103 The 
15104 \family sans
15105 Revtex
15106 \begin_inset space ~
15107 \end_inset
15108
15109 4
15110 \family default
15111  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
15112 \begin_inset Formula $\beta$
15113 \end_inset
15114
15115  release of May, 1999) class.
15116 \end_layout
15117
15118 \begin_layout Standard
15119 LyX has a 
15120 \family sans
15121 Revtex
15122 \family default
15123  textclass, which works with RevTeX 3.1.
15124  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15125  That means that it doesn't interact very well with LyX, which requires
15126  LaTeX2e, although it has been kludged to work.
15127  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15128  LyX with the 
15129 \family sans
15130 RevTeX
15131 \begin_inset space ~
15132 \end_inset
15133
15134 4
15135 \family default
15136  textclass should also be pretty easy to use.
15137 \end_layout
15138
15139 \begin_layout Standard
15140 These documents are supposed to be used in 
15141 \emph on
15142 addition
15143 \emph default
15144  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15145  macros, and assume you'll know what to put in the preamble if necessary.
15146 \end_layout
15147
15148 \begin_layout Subsection
15149 Installation
15150 \end_layout
15151
15152 \begin_layout Standard
15153 All you need to do is install RevTeX 4, as described in the package's README
15154  file.
15155  The package can be found at The RevTeX 4 Web Site 
15156 \begin_inset Flex URL
15157 status collapsed
15158
15159 \begin_layout Plain Layout
15160
15161 http://publish.aps.org/revtex4/
15162 \end_layout
15163
15164 \end_inset
15165
15166 .
15167  Install it somewhere that LaTeX can see it.
15168  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15169  (i.
15170 \begin_inset space \thinspace{}
15171 \end_inset
15172
15173 g.
15174 \begin_inset space \space{}
15175 \end_inset
15176
15177 not the directory where you installed the class file.) Then, if you reconfigure
15178  LyX, it will find the class file and let you use the RevTeX4 textclass.
15179 \end_layout
15180
15181 \begin_layout Standard
15182 Probably the easiest way to get started is either to import a RevTeX 4 document
15183  using 
15184 \family typewriter
15185 tex2lyx
15186 \family default
15187 , or to use the 
15188 \family sans
15189 Revtex
15190 \begin_inset space ~
15191 \end_inset
15192
15193 4
15194 \family default
15195  template, found in the templates directory.
15196 \end_layout
15197
15198 \begin_layout Subsection
15199 Preamble Matter
15200 \end_layout
15201
15202 \begin_layout Standard
15203 Optional arguments to 
15204 \family typewriter
15205
15206 \backslash
15207 documentclass
15208 \family default
15209 , like 
15210 \begin_inset Quotes eld
15211 \end_inset
15212
15213 preprint
15214 \begin_inset Quotes erd
15215 \end_inset
15216
15217  and 
15218 \begin_inset Quotes eld
15219 \end_inset
15220
15221 aps
15222 \begin_inset Quotes erd
15223 \end_inset
15224
15225 , go in the 
15226 \family sans
15227 E
15228 \bar under
15229 x
15230 \bar default
15231 tra
15232 \begin_inset space ~
15233 \end_inset
15234
15235 Options
15236 \family default
15237  field in the 
15238 \family sans
15239 Document
15240 \begin_inset space ~
15241 \end_inset
15242
15243 Layout
15244 \family default
15245  dialog, as usual.
15246  Remember that in RevTeX, at least one optional argument is required! 
15247 \end_layout
15248
15249 \begin_layout Standard
15250 Other preamble matter, like 
15251 \family typewriter
15252
15253 \backslash
15254 draft
15255 \family default
15256  etc.
15257 \begin_inset space ~
15258 \end_inset
15259
15260 goes in the 
15261 \family sans
15262 LaTeX
15263 \begin_inset space ~
15264 \end_inset
15265
15266 Preamble
15267 \family default
15268  dialog, also as usual.
15269 \end_layout
15270
15271 \begin_layout Subsection
15272 Layouts
15273 \end_layout
15274
15275 \begin_layout Standard
15276 The layouts basically correspond to the commands in RevTeX4.0.
15277  For example, the Email layout corresponds to 
15278 \family typewriter
15279
15280 \backslash
15281 email{}
15282 \family default
15283 .
15284  Note that (at least as of RevTeX 4.0 Beta), the 
15285 \family sans
15286 Address
15287 \family default
15288  and 
15289 \family sans
15290 Affiliation
15291 \family default
15292  layouts are exactly equivalent, so you shouldn't need to use both.
15293 \begin_inset Foot
15294 status collapsed
15295
15296 \begin_layout Plain Layout
15297 In case you're curious, both were included so that 
15298 \family typewriter
15299 tex2lyx
15300 \family default
15301  would be able to translate both 
15302 \family typewriter
15303
15304 \backslash
15305 address
15306 \family default
15307  and 
15308 \family typewriter
15309
15310 \backslash
15311 affiliation
15312 \family default
15313 .
15314 \end_layout
15315
15316 \end_inset
15317
15318
15319 \end_layout
15320
15321 \begin_layout Subsection
15322 Important Notes
15323 \end_layout
15324
15325 \begin_layout Standard
15326 There are a couple of important unique aspects of RevTeX 4 which might cause
15327  bugs that will be even more confusing in LyX.
15328 \end_layout
15329
15330 \begin_layout Standard
15331 In RevTeX, the 
15332 \family typewriter
15333
15334 \backslash
15335 thanks
15336 \family default
15337  command goes 
15338 \emph on
15339 outside
15340 \emph default
15341  the 
15342 \family typewriter
15343
15344 \backslash
15345 author
15346 \family default
15347  command.
15348  The LyX equivalent is that there is a separate Thanks layout.
15349  Do 
15350 \emph on
15351 not
15352 \emph default
15353  write footnotes in the 
15354 \family sans
15355 Author
15356 \family default
15357  layout, or weird things may happen.
15358  See the RevTeX 4 documentation for more details.
15359 \end_layout
15360
15361 \begin_layout Standard
15362 Also, the 
15363 \family sans
15364 Author
15365 \begin_inset space ~
15366 \end_inset
15367
15368 Email
15369 \family default
15370
15371 \family sans
15372 Author
15373 \begin_inset space ~
15374 \end_inset
15375
15376 URL
15377 \family default
15378 , and 
15379 \family sans
15380 Thanks
15381 \family default
15382  layouts must be placed 
15383 \emph on
15384 in between
15385 \emph default
15386  the 
15387 \family sans
15388 Author
15389 \family default
15390  layout and the corresponding 
15391 \family sans
15392 Address
15393 \family default
15394  (or equivalent 
15395 \family sans
15396 Affiliation
15397 \family default
15398 ) layout.
15399  If you put the 
15400 \family sans
15401 Thanks
15402 \family default
15403  after the 
15404 \family sans
15405 Address
15406 \family default
15407 , the LaTeX won't compile.
15408 \end_layout
15409
15410 \begin_layout Subsection
15411 Drawbacks
15412 \end_layout
15413
15414 \begin_layout Standard
15415 The main problem with this layout is that you can't use the optional arguments
15416  to layouts like Email and Title.
15417  (The problem is not unique to this layout; you can't use optional arguments
15418  to the Section layouts either.) This means that after you export that file
15419  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15420  need to edit the LaTeX file with a text editor to add the optional arguments
15421  to set, e.
15422 \begin_inset space \thinspace{}
15423 \end_inset
15424
15425 g.
15426 \begin_inset space \space{}
15427 \end_inset
15428
15429 the running title for the page headers.
15430  Lacking these layouts makes the 
15431 \family typewriter
15432
15433 \backslash
15434 altaffiliation
15435 \family default
15436  (and the equivalent 
15437 \family typewriter
15438
15439 \backslash
15440 altaddress
15441 \family default
15442 ) useless, so the corresponding layouts don't exist, and will have to be
15443  added by hand.
15444 \begin_inset Foot
15445 status collapsed
15446
15447 \begin_layout Plain Layout
15448
15449 \emph on
15450 Note from JMarc:
15451 \emph default
15452  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15453  has not been updated yet to take advantage of it.
15454 \end_layout
15455
15456 \end_inset
15457
15458  
15459 \end_layout
15460
15461 \begin_layout Section
15462 Springer Journals (
15463 \family sans
15464 svjour
15465 \family default
15466 )
15467 \end_layout
15468
15469 \begin_layout Standard
15470 by 
15471 \noun on
15472 Martin Vermeer
15473 \end_layout
15474
15475 \begin_layout Subsection
15476 Description
15477 \end_layout
15478
15479 \begin_layout Standard
15480 These are the layout files for some of the journal formats used by Springer
15481  Verlag and listed on 
15482 \begin_inset Flex URL
15483 status collapsed
15484
15485 \begin_layout Plain Layout
15486
15487 http://www.springer.de/author/tex/help-journals.html
15488 \end_layout
15489
15490 \end_inset
15491
15492 , where you should also go to fetch the class files (yes, these are LaTeX2e
15493  now!).
15494  It is a modular system: the things common to all journals are implemented
15495  in 
15496 \family typewriter
15497 svjour.inc
15498 \family default
15499 , which journal-specific layout files (such as, e.
15500 \begin_inset space \thinspace{}
15501 \end_inset
15502
15503 g.
15504 \begin_inset space \space{}
15505 \end_inset
15506
15507
15508 \family typewriter
15509 svjog.layout
15510 \family default
15511  for Journal of Geodesy) can include.
15512 \end_layout
15513
15514 \begin_layout Standard
15515 This means that implementing support for any other Springer journal on this
15516  list is as simple as writing your own 
15517 \family typewriter
15518 sv
15519 \family default
15520 <myjournal>
15521 \family typewriter
15522 .layout
15523 \family default
15524  file following the outline given in 
15525 \family typewriter
15526 svjog.layout
15527 \family default
15528 .
15529  
15530 \end_layout
15531
15532 \begin_layout Standard
15533 It is reasonably well tested only for the Journal of Geodesy.
15534  
15535 \family typewriter
15536 svjour
15537 \family default
15538  and 
15539 \family typewriter
15540 svjog
15541 \family default
15542  come with the standard LyX distribution.
15543  Install the relevant class file (downloaded from Springer) in a proper
15544  directory, reconfigure LaTeX (in the teTeX case by running 
15545 \family typewriter
15546 texhash
15547 \family default
15548 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15549  and it should work.
15550 \end_layout
15551
15552 \begin_layout Subsection
15553 New styles
15554 \end_layout
15555
15556 \begin_layout Standard
15557 A large number of theorem-like styles — 
15558 \family sans
15559 Claim, Conjecture,
15560 \family default
15561  
15562 \family sans
15563 \SpecialChar \ldots{}
15564 Theorem
15565 \family default
15566 .
15567 \end_layout
15568
15569 \begin_layout Standard
15570
15571 \family sans
15572 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15573  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15574 \family default
15575 .
15576  See the Springer class file documentation for details.
15577 \end_layout
15578
15579 \begin_layout Subsection
15580 Supported journals
15581 \end_layout
15582
15583 \begin_layout Itemize
15584
15585 \emph on
15586 Journal of Geodesy
15587 \emph default
15588
15589 \family typewriter
15590 svjog.layout
15591 \family default
15592  — Martin Vermeer
15593 \end_layout
15594
15595 \begin_layout Itemize
15596
15597 \emph on
15598 Probability Theory and Related Fields
15599 \emph default
15600
15601 \family typewriter
15602 svprobth.layout
15603 \family default
15604  — Jean-Marc Lasgouttes
15605 \end_layout
15606
15607 \begin_layout Standard
15608 Add your own, it isn't so hard!
15609 \end_layout
15610
15611 \begin_layout Subsection
15612 Credits
15613 \end_layout
15614
15615 \begin_layout Standard
15616 These files are partly based on the older 
15617 \family typewriter
15618 ejour2.layout
15619 \family default
15620 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15621  file from Springer.
15622  All this, and the 
15623 \family typewriter
15624 ejour2
15625 \family default
15626  layout, are now defunct.
15627  Jean-Marc Lasgouttes helped out big in making me find my way around the
15628  LyX layout file mechanism.
15629 \end_layout
15630
15631 \begin_layout Subsection
15632 Bugs
15633 \end_layout
15634
15635 \begin_layout Standard
15636 Probably.
15637  But probably less than in the old hacked-LaTeX 
15638 \family typewriter
15639 ejour2
15640 \family default
15641 .
15642 \end_layout
15643
15644 \begin_layout Standard
15645 Limitations e.
15646 \begin_inset space \thinspace{}
15647 \end_inset
15648
15649 g.: does not display the number for theorem-like layouts, just #.
15650 \end_layout
15651
15652 \begin_layout Section
15653 Slides [aka 
15654 \noun on
15655 SliTeX
15656 \noun default
15657 ]
15658 \begin_inset CommandInset label
15659 LatexCommand label
15660 name "sec:slitex"
15661
15662 \end_inset
15663
15664
15665 \end_layout
15666
15667 \begin_layout Standard
15668 by 
15669 \noun on
15670 John Weiss
15671 \noun default
15672  
15673 \end_layout
15674
15675 \begin_layout Subsection
15676 Introduction
15677 \end_layout
15678
15679 \begin_layout Standard
15680 This section describes how to use LyX to make slides for overhead projectors.
15681  There are two document classes that can do this: the default slides class
15682  and the 
15683 \family sans
15684 FoilTeX
15685 \family default
15686  slides class.
15687  This section documents the former.
15688 \end_layout
15689
15690 \begin_layout Standard
15691 I'm going to say this again, nice and clear, so that there's no misunderstanding
15692 :
15693 \end_layout
15694
15695 \begin_layout Standard
15696 \begin_inset VSpace bigskip
15697 \end_inset
15698
15699
15700 \end_layout
15701
15702 \begin_layout Standard
15703 \align center
15704
15705 \size large
15706 This section documents the class 
15707 \begin_inset Quotes eld
15708 \end_inset
15709
15710
15711 \family sans
15712 slides (default)
15713 \family default
15714
15715 \begin_inset Quotes erd
15716 \end_inset
15717
15718  
15719 \emph on
15720 only.
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 If you're looking for the documentation for 
15732 \begin_inset Quotes eld
15733 \end_inset
15734
15735
15736 \family sans
15737 slides (FoilTeX)
15738 \family default
15739
15740 \begin_inset Quotes erd
15741 \end_inset
15742
15743 , check out section
15744 \begin_inset space ~
15745 \end_inset
15746
15747
15748 \begin_inset CommandInset ref
15749 LatexCommand ref
15750 reference "sec:foiltex"
15751
15752 \end_inset
15753
15754 .
15755  The 
15756 \family sans
15757 foils
15758 \family default
15759  class [
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 ] is actually somewhat better than the default 
15772 \family sans
15773 slides
15774 \family default
15775  class,
15776 \begin_inset Foot
15777 status collapsed
15778
15779 \begin_layout Plain Layout
15780 \SpecialChar \ldots{}
15781 or so I've been told repeatedly by its advocates.
15782  Having never used it, I have no idea if this claim is true or not.
15783 \end_layout
15784
15785 \end_inset
15786
15787  which this section documents.
15788 \end_layout
15789
15790 \begin_layout Standard
15791 This class is the LaTeX2e improvement of the old 
15792 \noun on
15793 SliTeX
15794 \noun default
15795  package.
15796  Every LaTeX2e distribution includes this class [which I'll just refer to
15797  as 
15798 \begin_inset Quotes eld
15799 \end_inset
15800
15801
15802 \family sans
15803 slides
15804 \family default
15805
15806 \begin_inset Quotes erd
15807 \end_inset
15808
15809  from now on], so you're bound to have it.
15810  As I noted earlier, there are other classes, such as 
15811 \family sans
15812 foils
15813 \family default
15814 , which also produce slides for overhead projectors and do a better job
15815  at it.
15816  However, there are some things which 
15817 \family sans
15818 slides
15819 \family default
15820  can do which the others can't, such as generate overlays.
15821  Read on to learn more!
15822 \end_layout
15823
15824 \begin_layout Subsection
15825 Getting Started
15826 \begin_inset CommandInset label
15827 LatexCommand label
15828 name "sec:slidesetup"
15829
15830 \end_inset
15831
15832
15833 \end_layout
15834
15835 \begin_layout Standard
15836 Obviously, to use this document class, you need to select 
15837 \begin_inset Quotes eld
15838 \end_inset
15839
15840
15841 \family sans
15842 slides (default)
15843 \family default
15844
15845 \begin_inset Quotes erd
15846 \end_inset
15847
15848  from the class list in the 
15849 \family sans
15850 Document\SpecialChar \menuseparator
15851 Settings
15852 \family default
15853  dialog.
15854  There are some other special things you should know about this class:
15855 \end_layout
15856
15857 \begin_layout Itemize
15858 Don't bother changing the options 
15859 \family sans
15860 Sides and Columns
15861 \family default
15862 .
15863  They're not supported by the 
15864 \family sans
15865 slides
15866 \family default
15867  class, anyways.
15868 \end_layout
15869
15870 \begin_layout Itemize
15871 The option 
15872 \family sans
15873 Page
15874 \begin_inset space ~
15875 \end_inset
15876
15877 style
15878 \family default
15879  behaves a bit differently for this class.
15880  The possible choices and what they do are as follows:
15881 \end_layout
15882
15883 \begin_deeper
15884 \begin_layout Description
15885
15886 \family sans
15887 plain
15888 \family default
15889  The final output contains page numbers in the lower right corner.
15890 \end_layout
15891
15892 \begin_layout Description
15893
15894 \family sans
15895 headings
15896 \family default
15897  Like 
15898 \family sans
15899 plain
15900 \family default
15901 , but also prints out any time markers you've put in.
15902  This is the default.
15903 \end_layout
15904
15905 \begin_layout Description
15906
15907 \family sans
15908 empty
15909 \family default
15910  The final output contains no page numbers, time markers, or alignment markers.
15911 \end_layout
15912
15913 \end_deeper
15914 \begin_layout Itemize
15915 The 
15916 \family sans
15917 slides
15918 \family default
15919  class has an extra option: 
15920 \family typewriter
15921 clock
15922 \family default
15923 .
15924  To use it, put 
15925 \begin_inset Quotes eld
15926 \end_inset
15927
15928
15929 \family typewriter
15930 clock
15931 \family default
15932
15933 \begin_inset Quotes erd
15934 \end_inset
15935
15936  in the extra class options.
15937 \end_layout
15938
15939 \begin_deeper
15940 \begin_layout Standard
15941 Using this options allows you to add time markers to 
15942 \family sans
15943 Note
15944 \family default
15945 s.
15946  See section
15947 \begin_inset space ~
15948 \end_inset
15949
15950
15951 \begin_inset CommandInset ref
15952 LatexCommand ref
15953 reference "sec:slideNote"
15954
15955 \end_inset
15956
15957  for more details.
15958 \end_layout
15959
15960 \end_deeper
15961 \begin_layout Standard
15962 You can also use the template file 
15963 \begin_inset Quotes eld
15964 \end_inset
15965
15966
15967 \family typewriter
15968 slides.lyx
15969 \family default
15970
15971 \begin_inset Quotes erd
15972 \end_inset
15973
15974  to automatically set up a document to use the 
15975 \family sans
15976 slides
15977 \family default
15978  class [using 
15979 \family sans
15980 File\SpecialChar \menuseparator
15981 New
15982 \begin_inset space ~
15983 \end_inset
15984
15985 from
15986 \begin_inset space ~
15987 \end_inset
15988
15989 Template
15990 \family default
15991  to open your new document].
15992  The template file also contains some examples of the special paragraph
15993  environments used by this class.
15994  I'll describe those next.
15995 \end_layout
15996
15997 \begin_layout Subsection
15998 Paragraph Environments
15999 \end_layout
16000
16001 \begin_layout Subsubsection
16002 Supported Environments
16003 \end_layout
16004
16005 \begin_layout Standard
16006 The first thing you'll notice when you start up a new 
16007 \family sans
16008 slides
16009 \family default
16010  document is the font size and type: it's the equivalent of the size 
16011 \begin_inset Quotes eld
16012 \end_inset
16013
16014
16015 \family sans
16016 Largest
16017 \family default
16018
16019 \begin_inset Quotes erd
16020 \end_inset
16021
16022  in the 
16023 \family sans
16024 Sans
16025 \begin_inset space ~
16026 \end_inset
16027
16028 Serif
16029 \family default
16030  font.
16031  This is also what's used in the output.
16032  Think of this as a 
16033 \begin_inset Quotes eld
16034 \end_inset
16035
16036 visual cue
16037 \begin_inset Quotes erd
16038 \end_inset
16039
16040  to remind you that this is a slide.
16041  Your final slides will use a larger font; ergo, you'll have less space.
16042  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16043 \end_layout
16044
16045 \begin_layout Standard
16046 The next thing that becomes obvious is the changes to the paragraph environment
16047  pull-down box [at the far-left end of the toolbar].
16048  Most of the paragraph environments you're used to seeing are missing.
16049  There are also five new ones.
16050  That's because the 
16051 \family sans
16052 slides
16053 \family default
16054  class itself only supports certain paragraph environments:
16055 \end_layout
16056
16057 \begin_layout Itemize
16058
16059 \family sans
16060 Standard
16061 \end_layout
16062
16063 \begin_layout Itemize
16064
16065 \family sans
16066 Itemize
16067 \end_layout
16068
16069 \begin_layout Itemize
16070
16071 \family sans
16072 Enumerate
16073 \end_layout
16074
16075 \begin_layout Itemize
16076
16077 \family sans
16078 Description
16079 \end_layout
16080
16081 \begin_layout Itemize
16082
16083 \family sans
16084 List
16085 \end_layout
16086
16087 \begin_layout Itemize
16088
16089 \family sans
16090 Quotation
16091 \end_layout
16092
16093 \begin_layout Itemize
16094
16095 \family sans
16096 Quote
16097 \end_layout
16098
16099 \begin_layout Itemize
16100
16101 \family sans
16102 Verse
16103 \end_layout
16104
16105 \begin_layout Itemize
16106
16107 \family sans
16108 Caption
16109 \end_layout
16110
16111 \begin_layout Itemize
16112
16113 \family sans
16114 LyX-Code
16115 \end_layout
16116
16117 \begin_layout Itemize
16118
16119 \family sans
16120 Comment
16121 \end_layout
16122
16123 \begin_layout Standard
16124 All of the other standard environments, including the section-heading environmen
16125 ts, aren't used in the 
16126 \family sans
16127 slides
16128 \family default
16129  class.
16130 \end_layout
16131
16132 \begin_layout Standard
16133 On the other hand, you'll notice the following new environments:
16134 \end_layout
16135
16136 \begin_layout Itemize
16137
16138 \family sans
16139 Slide
16140 \end_layout
16141
16142 \begin_layout Itemize
16143
16144 \family sans
16145 Overlay
16146 \end_layout
16147
16148 \begin_layout Itemize
16149
16150 \family sans
16151 Note
16152 \end_layout
16153
16154 \begin_layout Itemize
16155
16156 \family sans
16157 InvisibleText
16158 \end_layout
16159
16160 \begin_layout Itemize
16161
16162 \family sans
16163 VisibleText
16164 \end_layout
16165
16166 \begin_layout Standard
16167 These five are kind of quirky, due to a 
16168 \begin_inset Quotes eld
16169 \end_inset
16170
16171 feature
16172 \begin_inset Quotes erd
16173 \end_inset
16174
16175  in LyX.
16176  You see, LyX doesn't permit you to nest any other paragraph environment
16177  into an empty environment.
16178  Now, that's fine and dandy, but it means that you wouldn't be able to start
16179  a slide with anything except plain text.
16180  To deal with this, I've performed a little 
16181 \begin_inset Quotes eld
16182 \end_inset
16183
16184 LaTeX magic.
16185 \begin_inset Quotes erd
16186 \end_inset
16187
16188  
16189 \end_layout
16190
16191 \begin_layout Subsubsection
16192 Quirks of the New Environments
16193 \begin_inset CommandInset label
16194 LatexCommand label
16195 name "sec:slideQuirk"
16196
16197 \end_inset
16198
16199
16200 \end_layout
16201
16202 \begin_layout Standard
16203 All five of the new paragraph environments are somewhat quirky due to inherent
16204  limitiations in the current version of LyX.
16205  As I just mentioned, LyX forbids environments that begin with another environme
16206 nt.
16207  To get around this, the 
16208 \family sans
16209 Slide
16210 \family default
16211  environment isn't a paragraph environment as described in the 
16212 \emph on
16213 User's Guide
16214 \emph default
16215 .
16216  
16217 \end_layout
16218
16219 \begin_layout Standard
16220 You should consider 
16221 \family sans
16222 Slide
16223 \family default
16224
16225 \family sans
16226 Overlay
16227 \family default
16228 , and 
16229 \family sans
16230 Note
16231 \family default
16232  to be 
16233 \begin_inset Quotes eld
16234 \end_inset
16235
16236 pseudo-environments.
16237 \begin_inset Quotes erd
16238 \end_inset
16239
16240  They look like a section heading or a 
16241 \begin_inset Quotes eld
16242 \end_inset
16243
16244
16245 \family sans
16246 Caption
16247 \family default
16248 ,
16249 \begin_inset Quotes erd
16250 \end_inset
16251
16252  but really begin a [and, if necessary, end the previous] paragraph environment.
16253  Likewise, treat 
16254 \family sans
16255 InvisibleText
16256 \family default
16257  and 
16258 \family sans
16259 VisibleText
16260 \family default
16261  as 
16262 \begin_inset Quotes eld
16263 \end_inset
16264
16265 pseudo-commands.
16266 \begin_inset Quotes erd
16267 \end_inset
16268
16269  These two perform some action.
16270 \end_layout
16271
16272 \begin_layout Standard
16273 A common feature of all five environments, 
16274 \family sans
16275 Slide
16276 \family default
16277
16278 \family sans
16279 Overlay
16280 \family default
16281
16282 \family sans
16283 Note
16284 \family default
16285
16286 \family sans
16287 InvisibleText
16288 \family default
16289  and 
16290 \family sans
16291 VisibleText
16292 \family default
16293 , is a rather long-ish label.
16294  The text following this label — ordinarily the contents of the paragraph
16295  environment — is utterly irrelevant for 
16296 \family sans
16297 Slide
16298 \family default
16299
16300 \family sans
16301 Overlay
16302 \family default
16303
16304 \family sans
16305 Note
16306 \family default
16307
16308 \family sans
16309 InvisibleText
16310 \family default
16311  and 
16312 \family sans
16313 VisibleText
16314 \family default
16315 .
16316  LyX completely ignores it.
16317  In fact, you can leave these five environments completely empty.
16318  
16319 \end_layout
16320
16321 \begin_layout Standard
16322 While you don't 
16323 \emph on
16324 have
16325 \emph default
16326  to put any text after the rather long-ish label, you might want to.
16327  This could be a short description of the contents of the 
16328 \family sans
16329 Slide
16330 \family default
16331 , for example.
16332  In that case, enter your descriptive comment and hit 
16333 \family sans
16334 Return
16335 \family default
16336  as you normally would.
16337 \end_layout
16338
16339 \begin_layout Standard
16340 If, on the other hand, you don't want to enter any descriptive text, you'll
16341  hit another LyX quirk.
16342  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16343  environment until you put something in the old one.
16344  So, do this:
16345 \end_layout
16346
16347 \begin_layout Itemize
16348 Start entering the text that will 
16349 \emph on
16350 follow
16351 \emph default
16352  the new 
16353 \family sans
16354 Slide
16355 \family default
16356
16357 \family sans
16358 Overlay
16359 \family default
16360
16361 \family sans
16362 Note
16363 \family default
16364
16365 \family sans
16366 InvisibleText
16367 \family default
16368  or 
16369 \family sans
16370 VisibleText
16371 \family default
16372 .
16373  
16374 \end_layout
16375
16376 \begin_layout Itemize
16377 Now move to the beginning of that paragraph.
16378  
16379 \end_layout
16380
16381 \begin_layout Itemize
16382 Next, hit 
16383 \family sans
16384 Return
16385 \family default
16386 .
16387  
16388 \end_layout
16389
16390 \begin_layout Itemize
16391 Finally, change this new, empty paragraph to a 
16392 \family sans
16393 Slide
16394 \family default
16395
16396 \family sans
16397 Overlay
16398 \family default
16399
16400 \family sans
16401 Note
16402 \family default
16403
16404 \family sans
16405 InvisibleText
16406 \family default
16407  or 
16408 \family sans
16409 VisibleText
16410 \family default
16411 .
16412  
16413 \end_layout
16414
16415 \begin_layout Standard
16416 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16417
16418 \end_layout
16419
16420 \begin_layout Subsection
16421 Making a Presentation with 
16422 \family sans
16423 Slide
16424 \family default
16425
16426 \family sans
16427 Overlay
16428 \family default
16429  and 
16430 \family sans
16431 Note
16432 \end_layout
16433
16434 \begin_layout Subsubsection
16435 Using the 
16436 \family sans
16437 Slide
16438 \family default
16439  Environment
16440 \end_layout
16441
16442 \begin_layout Standard
16443 If you're expecting this section to teach you how to actually make a presentatio
16444 n, you'll be sorely disappointed.
16445  Naturally, I'll describe all of the ways the 
16446 \family sans
16447 slides
16448 \family default
16449  class can assist you in preparing the materials for a presentation.
16450  Filling in the contents, however, is up to you.
16451  [Then again, that 
16452 \emph on
16453 is
16454 \emph default
16455  the LyX philosophy.]
16456 \end_layout
16457
16458 \begin_layout Standard
16459 Choosing the 
16460 \family sans
16461 Slide
16462 \family default
16463  environment [in the manner described in section
16464 \begin_inset space ~
16465 \end_inset
16466
16467
16468 \begin_inset CommandInset ref
16469 LatexCommand ref
16470 reference "sec:slideQuirk"
16471
16472 \end_inset
16473
16474 ] tells LyX to begin a new slide [duh].
16475  The label for this environment/
16476 \begin_inset Quotes erd
16477 \end_inset
16478
16479 pseudo-command
16480 \begin_inset Quotes erd
16481 \end_inset
16482
16483  is an 
16484 \begin_inset Quotes eld
16485 \end_inset
16486
16487 ASCII line,
16488 \begin_inset Quotes erd
16489 \end_inset
16490
16491  in cool blue, followed by the label, 
16492 \begin_inset Quotes eld
16493 \end_inset
16494
16495 NewSlide:
16496 \begin_inset Quotes erd
16497 \end_inset
16498
16499 .
16500  Any text or paragraph environments that follow this one go on the new slide.
16501  It's that simple.
16502 \end_layout
16503
16504 \begin_layout Standard
16505 Slides are probably the only time you'll need to forcibly end pages in LyX
16506  (this can be specified in the 
16507 \family sans
16508 Paragraph Layout
16509 \family default
16510  dialog).
16511  In fact, you'll want to, once you finish entering the contents of one slide.
16512  If you've entered more text than can physically fit on a slide, the extra
16513  overflows onto a new slide.
16514  I don't recommend doing this, however, since the overflow slide won't have
16515  any page number on it.
16516  Furthermore, it may interfere with any 
16517 \family sans
16518 Overlay
16519 \family default
16520  you've made to accompany the oversized 
16521 \family sans
16522 Slide
16523 \family default
16524 .
16525 \end_layout
16526
16527 \begin_layout Standard
16528 The 
16529 \family sans
16530 Overlay
16531 \family default
16532  and 
16533 \family sans
16534 Note
16535 \family default
16536  environments work the same way as the 
16537 \family sans
16538 Slide
16539 \family default
16540  environment.
16541  They both create an 
16542 \begin_inset Quotes eld
16543 \end_inset
16544
16545 ASCII line
16546 \begin_inset Quotes erd
16547 \end_inset
16548
16549  followed by a label [
16550 \begin_inset Quotes eld
16551 \end_inset
16552
16553 NewOverlay:
16554 \begin_inset Quotes erd
16555 \end_inset
16556
16557  and 
16558 \begin_inset Quotes eld
16559 \end_inset
16560
16561 NewNote:
16562 \begin_inset Quotes erd
16563 \end_inset
16564
16565 , respectively].
16566  The color is a stunning magenta instead of blue, and the 
16567 \begin_inset Quotes eld
16568 \end_inset
16569
16570 ASCII line
16571 \begin_inset Quotes erd
16572 \end_inset
16573
16574  will look different, in style and in length.
16575  The label fonts of all three also differ from one another.
16576 \end_layout
16577
16578 \begin_layout Standard
16579 As with a 
16580 \family sans
16581 Slide
16582 \family default
16583 , if the contents of a 
16584 \family sans
16585 Note
16586 \family default
16587  or 
16588 \family sans
16589 Overlay
16590 \family default
16591  exceed the physical size of a slide or sheet of paper, the extra will overflow
16592  onto a new sheet.
16593  Again, you should avoid this.
16594  It defeats the whole purpose of 
16595 \family sans
16596 Note
16597 \family default
16598 s and 
16599 \family sans
16600 Overlay
16601 \family default
16602 s.
16603 \end_layout
16604
16605 \begin_layout Subsubsection
16606 Using 
16607 \family sans
16608 Overlay
16609 \family default
16610  with 
16611 \family sans
16612 Slide
16613 \end_layout
16614
16615 \begin_layout Standard
16616 The idea behind an 
16617 \family sans
16618 Overlay
16619 \family default
16620  is a slide that sits atop another slide.
16621  Perhaps you wish to discuss a figure on the main 
16622 \family sans
16623 Slide
16624 \family default
16625  before displaying the text associated with it.
16626  One way to accomplish this is tape a flap of dark paper over the part of
16627  the 
16628 \family sans
16629 Slide
16630 \family default
16631  you want to display later.
16632  This method fails, however, if you wish to overlap one graph with another,
16633  for example.
16634  You would then have to fumble while speaking to align the two separate,
16635  overlapping 
16636 \family sans
16637 Slide
16638 \family default
16639 s to align the two graphs.
16640  The use of an 
16641 \family sans
16642 Overlay
16643 \family default
16644  environment in both cases makes life much easier.
16645 \end_layout
16646
16647 \begin_layout Standard
16648 Each 
16649 \family sans
16650 Overlay
16651 \family default
16652  receives the page number of its 
16653 \begin_inset Quotes eld
16654 \end_inset
16655
16656 parent
16657 \begin_inset Quotes erd
16658 \end_inset
16659
16660  
16661 \family sans
16662 Slide
16663 \family default
16664 , appended by 
16665 \begin_inset Quotes eld
16666 \end_inset
16667
16668
16669 \family typewriter
16670 -a
16671 \family default
16672
16673 \begin_inset Quotes erd
16674 \end_inset
16675
16676 .
16677 \begin_inset Foot
16678 status collapsed
16679
16680 \begin_layout Plain Layout
16681 Presumably, mutliple 
16682 \family sans
16683 Overlay
16684 \family default
16685 s would have 
16686 \begin_inset Quotes eld
16687 \end_inset
16688
16689
16690 \family typewriter
16691 -a
16692 \family default
16693
16694 \begin_inset Quotes erd
16695 \end_inset
16696
16697
16698 \begin_inset Quotes eld
16699 \end_inset
16700
16701
16702 \family typewriter
16703 -b
16704 \family default
16705
16706 \begin_inset Quotes erd
16707 \end_inset
16708
16709
16710 \begin_inset Quotes eld
16711 \end_inset
16712
16713
16714 \family typewriter
16715 -c
16716 \family default
16717
16718 \begin_inset Quotes erd
16719 \end_inset
16720
16721 , etc.
16722 \begin_inset space ~
16723 \end_inset
16724
16725 appended to the page number of the parent 
16726 \family sans
16727 Slide
16728 \family default
16729 .
16730  
16731 \end_layout
16732
16733 \end_inset
16734
16735  Clearly, you want the contents of both the 
16736 \family sans
16737 Slide
16738 \family default
16739  and the 
16740 \family sans
16741 Overlay
16742 \family default
16743  to each fit on a single physical slide! You should probably consider an
16744  
16745 \family sans
16746 Overlay
16747 \family default
16748  as 
16749 \begin_inset Quotes eld
16750 \end_inset
16751
16752 part of
16753 \begin_inset Quotes erd
16754 \end_inset
16755
16756  a 
16757 \family sans
16758 Slide
16759 \family default
16760 .
16761  Indeed, the LyX 
16762 \family sans
16763 slides
16764 \family default
16765  class provides a visual cue for this: the label at the start of an 
16766 \family sans
16767 Overlay
16768 \family default
16769  is shorter than that at the start of a 
16770 \family sans
16771 Slide
16772 \family default
16773 .
16774  Lastly, when you generate printable output, you'll find alignment markers
16775  in all four corners of both the 
16776 \family sans
16777 Overlay
16778 \family default
16779  page and its parent 
16780 \family sans
16781 Slide
16782 \family default
16783 .
16784  These will assist you in lining up the two physical slides.
16785 \end_layout
16786
16787 \begin_layout Standard
16788 The major problem in overlaying two slides is aligning the contents of the
16789  two transparencies.
16790  How much space should you leave for that graph on the second slide? Worse
16791  still, what if you want a graph and a sentence on second slide, but there
16792  is text on the main transparency that goes in between them? You could try
16793  and insert vertical space of the right size.
16794  The better way is to use 
16795 \family sans
16796 InvisibleText
16797 \family default
16798  and 
16799 \family sans
16800 VisibleText
16801 \family default
16802 .
16803 \end_layout
16804
16805 \begin_layout Standard
16806 As their names imply, 
16807 \family sans
16808 InvisibleText
16809 \family default
16810  and 
16811 \family sans
16812 VisibleText
16813 \family default
16814  are two command-like paragraph environments that make all subsequent text
16815  invisible and visible, respectively.
16816  Note from section
16817 \begin_inset space ~
16818 \end_inset
16819
16820
16821 \begin_inset CommandInset ref
16822 LatexCommand ref
16823 reference "sec:slideQuirk"
16824
16825 \end_inset
16826
16827  that you don't place anything 
16828 \emph on
16829 into
16830 \emph default
16831  these two environments, however.
16832  When you create an 
16833 \family sans
16834 InvisibleText
16835 \family default
16836 , it inserts a centered, sky-blue label into the page reading 
16837 \begin_inset Quotes eld
16838 \end_inset
16839
16840 <Invisible Text Follows>
16841 \begin_inset Quotes erd
16842 \end_inset
16843
16844 .
16845  For paragraphs following this label, the parts of the 
16846 \family sans
16847 Slide
16848 \family default
16849  [or 
16850 \family sans
16851 Overlay
16852 \family default
16853 ; it doesn't matter which] where they would be contain instead blank space.
16854  
16855 \end_layout
16856
16857 \begin_layout Standard
16858 For 
16859 \family sans
16860 VisibleText
16861 \family default
16862 , the corresponding centered label is 
16863 \begin_inset Quotes eld
16864 \end_inset
16865
16866 <Visible Text Follows>
16867 \begin_inset Quotes erd
16868 \end_inset
16869
16870  in blazing green.
16871  Paragraphs following this label behave normally.
16872  Note that the beginning of a new 
16873 \family sans
16874 Slide
16875 \family default
16876
16877 \family sans
16878 Overlay
16879 \family default
16880 , or 
16881 \family sans
16882 Note
16883 \family default
16884  automatically shuts off an 
16885 \family sans
16886 InvisibleText
16887 \family default
16888 .
16889  It's therefore not necessary to use 
16890 \family sans
16891 VisibleText
16892 \family default
16893  at the end of a 
16894 \family sans
16895 Slide
16896 \family default
16897 .
16898 \end_layout
16899
16900 \begin_layout Standard
16901 By now, it should be obvious how to create overlay transparencies using
16902  the proper combination of 
16903 \family sans
16904 InvisibleText
16905 \family default
16906  and 
16907 \family sans
16908 VisibleText
16909 \family default
16910  on a 
16911 \family sans
16912 Slide
16913 \family default
16914  and 
16915 \family sans
16916 Overlay
16917 \family default
16918 :
16919 \end_layout
16920
16921 \begin_layout Enumerate
16922 Create a 
16923 \family sans
16924 Slide
16925 \family default
16926 , including everything that will appear on it, whether on the main slide
16927  or on the 
16928 \family sans
16929 Overlay
16930 \family default
16931 .
16932 \end_layout
16933
16934 \begin_layout Enumerate
16935 Before each figure or paragraph that will appear only on the 
16936 \family sans
16937 Overlay
16938 \family default
16939 , insert an 
16940 \family sans
16941 InvisibleText
16942 \family default
16943  environment.
16944  If necessary, insert a 
16945 \family sans
16946 VisibleText
16947 \family default
16948  environment after the 
16949 \family sans
16950 Overlay
16951 \family default
16952 -only text.
16953 \end_layout
16954
16955 \begin_layout Enumerate
16956 Start an 
16957 \family sans
16958 Overlay
16959 \family default
16960  immediately following the 
16961 \family sans
16962 Slide
16963 \family default
16964 .
16965 \end_layout
16966
16967 \begin_layout Enumerate
16968 Copy the contents of this 
16969 \family sans
16970 Slide
16971 \family default
16972  into the 
16973 \family sans
16974 Overlay
16975 \family default
16976 .
16977 \end_layout
16978
16979 \begin_layout Enumerate
16980 Within the 
16981 \family sans
16982 Overlay
16983 \family default
16984 , change all of the 
16985 \family sans
16986 InvisibleText
16987 \family default
16988  lines to 
16989 \family sans
16990 VisibleText
16991 \family default
16992  and vice-versa.
16993 \end_layout
16994
16995 \begin_layout Standard
16996 That's it.
16997  You've just made an 
16998 \family sans
16999 Overlay
17000 \family default
17001 .
17002 \end_layout
17003
17004 \begin_layout Standard
17005 There's one problem with the way I've designed the LyX 
17006 \family sans
17007 slides
17008 \family default
17009  class: you can't make text in the middle of a paragraph invisible, nor
17010  make text in the middle of an invisible paragraph visible again.
17011  To accomplish this feat, you'll need to use some inlined LaTeX codes.
17012 \begin_inset Foot
17013 status collapsed
17014
17015 \begin_layout Plain Layout
17016 The commands of interest are: 
17017 \end_layout
17018
17019 \begin_layout Itemize
17020
17021 \family typewriter
17022 {
17023 \backslash
17024 invisible \SpecialChar \ldots{}
17025  }
17026 \end_layout
17027
17028 \begin_layout Itemize
17029
17030 \family typewriter
17031 {
17032 \backslash
17033 visible \SpecialChar \ldots{}
17034  }
17035 \end_layout
17036
17037 \begin_layout Plain Layout
17038 \SpecialChar \ldots{}
17039 and need to be marked as TeX.
17040  The text whose 
17041 \begin_inset Quotes eld
17042 \end_inset
17043
17044 visibility
17045 \begin_inset Quotes erd
17046 \end_inset
17047
17048  you wish to change goes in between the brackets [and after the 
17049 \family typewriter
17050
17051 \backslash
17052 invisible
17053 \family default
17054  or 
17055 \family typewriter
17056
17057 \backslash
17058 visible
17059 \family default
17060  command].
17061  If you don't know how to mark text as TeX, see the appropriate section
17062  of the 
17063 \emph on
17064 User's Guide
17065 \emph default
17066 .
17067 \end_layout
17068
17069 \end_inset
17070
17071
17072 \end_layout
17073
17074 \begin_layout Subsubsection
17075 Using 
17076 \family sans
17077 Note
17078 \family default
17079  with 
17080 \family sans
17081 Slide
17082 \family default
17083
17084 \begin_inset CommandInset label
17085 LatexCommand label
17086 name "sec:slideNote"
17087
17088 \end_inset
17089
17090
17091 \end_layout
17092
17093 \begin_layout Standard
17094 Like an 
17095 \family sans
17096 Overlay
17097 \family default
17098 , a 
17099 \family sans
17100 Note
17101 \family default
17102  is associated with a 
17103 \begin_inset Quotes eld
17104 \end_inset
17105
17106 parent
17107 \begin_inset Quotes erd
17108 \end_inset
17109
17110  
17111 \family sans
17112 Slide
17113 \family default
17114 .
17115  Here, too, the LyX 
17116 \family sans
17117 slides
17118 \family default
17119  class provides visual cues.
17120  The label for a 
17121 \family sans
17122 Note
17123 \family default
17124  is shorter than that of a 
17125 \family sans
17126 Slide
17127 \family default
17128  [yet longer than that of an 
17129 \family sans
17130 Overlay
17131 \family default
17132 ] and, like the label of an 
17133 \family sans
17134 Overlay
17135 \family default
17136  is shockingly magenta.
17137  Additionally, the printed 
17138 \family sans
17139 Note
17140 \family default
17141  has the page number of its 
17142 \begin_inset Quotes eld
17143 \end_inset
17144
17145 parent
17146 \begin_inset Quotes erd
17147 \end_inset
17148
17149  
17150 \family sans
17151 Slide
17152 \family default
17153 , appended by 
17154 \begin_inset Quotes eld
17155 \end_inset
17156
17157
17158 \family typewriter
17159 -
17160 \family default
17161 1
17162 \begin_inset Quotes erd
17163 \end_inset
17164
17165
17166 \begin_inset Quotes eld
17167 \end_inset
17168
17169
17170 \family typewriter
17171 -
17172 \family default
17173 2
17174 \begin_inset Quotes erd
17175 \end_inset
17176
17177
17178 \begin_inset Quotes eld
17179 \end_inset
17180
17181
17182 \family typewriter
17183 -
17184 \family default
17185 3
17186 \begin_inset Quotes erd
17187 \end_inset
17188
17189 , etc.
17190  You can have multiple 
17191 \family sans
17192 Note
17193 \family default
17194 s associated with a single 
17195 \family sans
17196 Slide
17197 \family default
17198 , and, as with 
17199 \family sans
17200 Slide
17201 \family default
17202  and 
17203 \family sans
17204 Overlay
17205 \family default
17206 , you'll probably want to break up long 
17207 \family sans
17208 Note
17209 \family default
17210 s so that they fit on a single sheet of paper.
17211 \end_layout
17212
17213 \begin_layout Standard
17214 The purpose of a 
17215 \family sans
17216 Note
17217 \family default
17218  is obvious: it contains anything additional you might want to say about
17219  a 
17220 \family sans
17221 Slide
17222 \family default
17223 .
17224  It could also be used as a sheet of reminders for a particular 
17225 \family sans
17226 Slide
17227 \family default
17228 .
17229  In the case of the latter, you might want to make use of time markers.
17230  Currently, the LyX 
17231 \family sans
17232 slides
17233 \family default
17234  class has no 
17235 \begin_inset Quotes eld
17236 \end_inset
17237
17238 native
17239 \begin_inset Quotes erd
17240 \end_inset
17241
17242  support for time markers, a 
17243 \noun on
17244 SliTeX
17245 \noun default
17246  feature.
17247  So, you'll have to resort to using the LaTeX codes.
17248 \end_layout
17249
17250 \begin_layout Standard
17251 To use time markers, you'll need to specify the extra class option 
17252 \begin_inset Quotes eld
17253 \end_inset
17254
17255
17256 \family typewriter
17257 clock
17258 \family default
17259
17260 \begin_inset Quotes erd
17261 \end_inset
17262
17263  [see section
17264 \begin_inset space ~
17265 \end_inset
17266
17267
17268 \begin_inset CommandInset ref
17269 LatexCommand ref
17270 reference "sec:slidesetup"
17271
17272 \end_inset
17273
17274 ].
17275  This option turns on timing marks, which will appear in the lower-left-hand
17276  corner of every 
17277 \family sans
17278 Note
17279 \family default
17280  you generate.
17281  To set what appears in the time marker, you use the LaTeX commands 
17282 \begin_inset Quotes eld
17283 \end_inset
17284
17285
17286 \family typewriter
17287
17288 \backslash
17289 settime{}
17290 \family default
17291
17292 \begin_inset Quotes erd
17293 \end_inset
17294
17295  and 
17296 \begin_inset Quotes eld
17297 \end_inset
17298
17299
17300 \family typewriter
17301
17302 \backslash
17303 addtime{}
17304 \family default
17305
17306 \begin_inset Quotes erd
17307 \end_inset
17308
17309 .
17310  The arguments of both commands are time measured in seconds.
17311  
17312 \begin_inset Quotes eld
17313 \end_inset
17314
17315
17316 \family typewriter
17317
17318 \backslash
17319 settime{}
17320 \family default
17321
17322 \begin_inset Quotes erd
17323 \end_inset
17324
17325  sets the time marker to a given time.
17326  
17327 \begin_inset Quotes eld
17328 \end_inset
17329
17330
17331 \family typewriter
17332
17333 \backslash
17334 addtime{}
17335 \family default
17336
17337 \begin_inset Quotes erd
17338 \end_inset
17339
17340  increments the time marker by the specified amount.
17341  Using time markers and 
17342 \family sans
17343 Note
17344 \family default
17345 s in this fashion, you can remind yourself how much time to spend on a particula
17346
17347 \family sans
17348 Slide
17349 \family default
17350 .
17351 \end_layout
17352
17353 \begin_layout Standard
17354 There's one last feature to describe.
17355  Clearly, you'd like to print out all of your 
17356 \family sans
17357 Slide
17358 \family default
17359 s and 
17360 \family sans
17361 Overlay
17362 \family default
17363 s on transparencies while printing all of your 
17364 \family sans
17365 Note
17366 \family default
17367 s on plain paper.
17368  However, a 
17369 \family sans
17370 Note
17371 \family default
17372  
17373 \emph on
17374 must
17375 \emph default
17376  follow the 
17377 \family sans
17378 Slide
17379 \family default
17380  with which it is associated.
17381  What's a person to do?
17382 \end_layout
17383
17384 \begin_layout Standard
17385 Luckily, there are two LaTeX commands that allow you to select what to print
17386  out.
17387  Both must be placed into the preamble of your document.
17388  The command 
17389 \begin_inset Quotes eld
17390 \end_inset
17391
17392
17393 \family typewriter
17394
17395 \backslash
17396 onlyslides{
17397 \backslash
17398 slides}
17399 \family default
17400
17401 \begin_inset Quotes erd
17402 \end_inset
17403
17404  will cause the output to contain only the 
17405 \family sans
17406 Slide
17407 \family default
17408 s and 
17409 \family sans
17410 Overlay
17411 \family default
17412 s.
17413  Correspondingly, the command 
17414 \begin_inset Quotes eld
17415 \end_inset
17416
17417
17418 \family typewriter
17419
17420 \backslash
17421 onlynotes{
17422 \backslash
17423 notes}
17424 \family default
17425
17426 \begin_inset Quotes erd
17427 \end_inset
17428
17429  prevents the output of anything but 
17430 \family sans
17431 Note
17432 \family default
17433 s.
17434  I'd advise placing both commands in the preamble and initially comment
17435  both out.
17436  You can then preview your entire presentation as you write.
17437  When you're done writing, you can then uncomment one of the two to select
17438  what you want to print.
17439  I like to uncomment 
17440 \begin_inset Quotes eld
17441 \end_inset
17442
17443
17444 \family typewriter
17445
17446 \backslash
17447 onlyslides{
17448 \backslash
17449 slides}
17450 \family default
17451
17452 \begin_inset Quotes erd
17453 \end_inset
17454
17455  , print to a file with 
17456 \begin_inset Quotes eld
17457 \end_inset
17458
17459
17460 \family typewriter
17461 -slides
17462 \family default
17463
17464 \begin_inset Quotes erd
17465 \end_inset
17466
17467  in its name, comment it back out, then uncomment 
17468 \begin_inset Quotes eld
17469 \end_inset
17470
17471
17472 \family typewriter
17473
17474 \backslash
17475 onlynotes{
17476 \backslash
17477 notes}
17478 \family default
17479
17480 \begin_inset Quotes erd
17481 \end_inset
17482
17483  and print to a 
17484 \begin_inset Quotes eld
17485 \end_inset
17486
17487
17488 \family typewriter
17489 *-notes.ps
17490 \family default
17491
17492 \begin_inset Quotes erd
17493 \end_inset
17494
17495  file.
17496  I can then send either file to a printer, loading transparencies or plain
17497  paper as appropriate.
17498 \end_layout
17499
17500 \begin_layout Standard
17501 You can also provide other arguments to the 
17502 \begin_inset Quotes eld
17503 \end_inset
17504
17505
17506 \family typewriter
17507
17508 \backslash
17509 onlyslides{}
17510 \family default
17511
17512 \begin_inset Quotes erd
17513 \end_inset
17514
17515  and 
17516 \begin_inset Quotes eld
17517 \end_inset
17518
17519
17520 \family typewriter
17521
17522 \backslash
17523 onlynotes{}
17524 \family default
17525
17526 \begin_inset Quotes erd
17527 \end_inset
17528
17529  commands.
17530  See a good LaTeX book for details.
17531 \end_layout
17532
17533 \begin_layout Subsection
17534 The 
17535 \family sans
17536 slides
17537 \family default
17538  Class Template File
17539 \end_layout
17540
17541 \begin_layout Standard
17542 I have also provided a template file, 
17543 \begin_inset Quotes eld
17544 \end_inset
17545
17546
17547 \family typewriter
17548 slides.lyx
17549 \family default
17550
17551 \begin_inset Quotes erd
17552 \end_inset
17553
17554 , with the 
17555 \family sans
17556 slides
17557 \family default
17558  class.
17559  To use it, begin your new presentation with 
17560 \family sans
17561 \bar under
17562 F
17563 \bar default
17564 ile\SpecialChar \menuseparator
17565 New
17566 \begin_inset space ~
17567 \end_inset
17568
17569 from
17570 \begin_inset space ~
17571 \end_inset
17572
17573
17574 \bar under
17575 T
17576 \bar default
17577 emplate
17578 \family default
17579 .
17580  Your new LyX presentation file will contain an example 
17581 \family sans
17582 Slide
17583 \family default
17584  – 
17585 \family sans
17586 Overlay
17587 \family default
17588  – 
17589 \family sans
17590 Note
17591 \family default
17592  triplet.
17593  The 
17594 \family sans
17595 Slide
17596 \family default
17597  and 
17598 \family sans
17599 Overlay
17600 \family default
17601  additionally contain an example of the use of 
17602 \family sans
17603 InvisibleText
17604 \family default
17605  and 
17606 \family sans
17607 VisibleText
17608 \family default
17609 .
17610  Lastly, the preamble will contain:
17611 \end_layout
17612
17613 \begin_layout LyX-Code
17614 % Uncomment to print out only slides and overlays
17615 \end_layout
17616
17617 \begin_layout LyX-Code
17618 %
17619 \end_layout
17620
17621 \begin_layout LyX-Code
17622 %
17623 \backslash
17624 onlyslides{
17625 \backslash
17626 slides}
17627 \begin_inset Newline newline
17628 \end_inset
17629
17630  
17631 \end_layout
17632
17633 \begin_layout LyX-Code
17634 % Uncomment to print out only notes
17635 \end_layout
17636
17637 \begin_layout LyX-Code
17638 %
17639 \end_layout
17640
17641 \begin_layout LyX-Code
17642 %
17643 \backslash
17644 onlynotes{
17645 \backslash
17646 notes}
17647 \end_layout
17648
17649 \begin_layout Standard
17650 One final thing: I created this class to support the LaTeX2e 
17651 \begin_inset Quotes eld
17652 \end_inset
17653
17654
17655 \noun on
17656 SliTeX
17657 \noun default
17658  emulation
17659 \begin_inset Quotes erd
17660 \end_inset
17661
17662  class, one of the built-in LaTeX2e classes.
17663  Neither I nor the rest of the LyX Team endorse or oppose the use of this
17664  built-in slide class.
17665  It's here if you want it or need it.
17666  There exist other LaTeX2e classes for creating presentations, such as the
17667  
17668 \family sans
17669 Foils
17670 \family default
17671  class [see section
17672 \begin_inset space ~
17673 \end_inset
17674
17675
17676 \begin_inset CommandInset ref
17677 LatexCommand ref
17678 reference "sec:foiltex"
17679
17680 \end_inset
17681
17682 ] or the 
17683 \begin_inset Quotes eld
17684 \end_inset
17685
17686
17687 \family typewriter
17688 seminar
17689 \family default
17690
17691 \begin_inset Quotes erd
17692 \end_inset
17693
17694  package [present on some TeX distributions].
17695  The latter is not yet supported under LyX.
17696 \begin_inset Foot
17697 status collapsed
17698
17699 \begin_layout Plain Layout
17700 Perhaps you can take on the task\SpecialChar \ldots{}
17701
17702 \end_layout
17703
17704 \end_inset
17705
17706  I know nothing about these other classes.
17707  Try them out to see what sort of alternative they provide.
17708 \end_layout
17709
17710 \begin_layout Chapter
17711 LyX Features needing Extra Software
17712 \end_layout
17713
17714 \begin_layout Section
17715 Checking TeX
17716 \end_layout
17717
17718 \begin_layout Standard
17719 by 
17720 \noun on
17721 Asger Alstrup
17722 \end_layout
17723
17724 \begin_layout Subsection
17725 Introduction
17726 \end_layout
17727
17728 \begin_layout Standard
17729 If you have the 
17730 \family typewriter
17731 chktex
17732 \family default
17733  program installed
17734 \begin_inset Foot
17735 status collapsed
17736
17737 \begin_layout Plain Layout
17738
17739 \family typewriter
17740 chktex
17741 \family default
17742  is not yet available when you are using the LaTeX distribution MiKTeX.
17743 \end_layout
17744
17745 \end_inset
17746
17747 , you'll find in the 
17748 \family sans
17749 Tools
17750 \family default
17751  menu the entry: 
17752 \family sans
17753 Check
17754 \begin_inset space ~
17755 \end_inset
17756
17757 TeX
17758 \family default
17759 .
17760  You can get 
17761 \family typewriter
17762 chktex
17763 \family default
17764  it from CTAN, 
17765 \begin_inset CommandInset href
17766 LatexCommand href
17767 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17768
17769 \end_inset
17770
17771 .
17772 \end_layout
17773
17774 \begin_layout Standard
17775 The 
17776 \family sans
17777 ChkTeX
17778 \family default
17779  package is a program that was written by 
17780 \begin_inset Flex Noun
17781 status collapsed
17782
17783 \begin_layout Plain Layout
17784 Jens T.
17785 \begin_inset space ~
17786 \end_inset
17787
17788 Berger Thielemann
17789 \end_layout
17790
17791 \end_inset
17792
17793  in frustration because some constructs in LaTeX are sometimes non-intuitive,
17794  and easy to forget.
17795  The program runs over your LaTeX file, checks the integrity of the file,
17796  and flags some common errors.
17797  In other technical words, it is 
17798 \family typewriter
17799 lint
17800 \family default
17801  for LaTeX.
17802 \end_layout
17803
17804 \begin_layout Standard
17805 Well, what is a syntax checker doing in LyX which is supposed to produce
17806  correct LaTeX anyways? The answer is simple: Just as 
17807 \family typewriter
17808 Lint
17809 \family default
17810  not only checks the 
17811 \emph on
17812 syntax
17813 \emph default
17814  of C programs, but also does 
17815 \emph on
17816 semantic
17817 \emph default
17818  checks for type-errors, 
17819 \family sans
17820 ChkTeX
17821 \family default
17822  catches some common 
17823 \emph on
17824 typographic
17825 \emph default
17826  errors, in addition to the syntactical ones.
17827  Specifically, 
17828 \family sans
17829 ChkTeX
17830 \family default
17831  is capable of detecting several common errors, such as
17832 \end_layout
17833
17834 \begin_layout Itemize
17835 Ellipsis detection:
17836 \begin_inset Newline newline
17837 \end_inset
17838
17839 Use \SpecialChar \ldots{}
17840  instead of ...
17841 \end_layout
17842
17843 \begin_layout Itemize
17844 No space in front of/after parenthesis:
17845 \begin_inset Newline newline
17846 \end_inset
17847
17848 ( wrong spacing )
17849 \end_layout
17850
17851 \begin_layout Itemize
17852 Enforcement of normal space after common abbreviations:
17853 \begin_inset Newline newline
17854 \end_inset
17855
17856 e.
17857 \begin_inset space \thinspace{}
17858 \end_inset
17859
17860 g.
17861 \begin_inset space \space{}
17862 \end_inset
17863
17864 is too wide spacing.
17865 \end_layout
17866
17867 \begin_layout Itemize
17868 Enforcement of end-of-sentence space when the last sentence ends with a
17869  capital letter:
17870 \begin_inset Newline newline
17871 \end_inset
17872
17873 This is a TEST.
17874  And this is wrong spacing.
17875 \end_layout
17876
17877 \begin_layout Itemize
17878 Space in front of labels and similar commands:
17879 \begin_inset Newline newline
17880 \end_inset
17881
17882 The label should stick right up to the text to avoid falling to a wrong
17883  page.
17884  
17885 \begin_inset CommandInset label
17886 LatexCommand label
17887 name "sec:chktex"
17888
17889 \end_inset
17890
17891  
17892 \begin_inset Foot
17893 status collapsed
17894
17895 \begin_layout Plain Layout
17896 This footnote is in danger of falling off to a wrong page
17897 \end_layout
17898
17899 \end_inset
17900
17901  The label is separated too much.
17902 \end_layout
17903
17904 \begin_layout Itemize
17905 Space in front of references, instead of hard spaces:
17906 \begin_inset Newline newline
17907 \end_inset
17908
17909 In you are in bad luck, the text will break right between the referenced
17910  text and reference number, and that's a pity.
17911  See section 
17912 \begin_inset CommandInset ref
17913 LatexCommand ref
17914 reference "sec:chktex"
17915
17916 \end_inset
17917
17918 .
17919 \end_layout
17920
17921 \begin_layout Itemize
17922 Use of 
17923 \begin_inset Quotes eld
17924 \end_inset
17925
17926 x
17927 \begin_inset Quotes erd
17928 \end_inset
17929
17930  instead of 
17931 \begin_inset Formula $\times$
17932 \end_inset
17933
17934  between numbers:
17935 \begin_inset Newline newline
17936 \end_inset
17937
17938 2x2 looks cheap compared to 
17939 \begin_inset Formula $2\times2$
17940 \end_inset
17941
17942 .
17943 \end_layout
17944
17945 \begin_layout Standard
17946 and more \SpecialChar \ldots{}
17947  It is an invaluable tool when you are 
17948 \begin_inset Quotes eld
17949 \end_inset
17950
17951 finishing up
17952 \begin_inset Quotes erd
17953 \end_inset
17954
17955  your document before printing, and you should run it right after the obligatory
17956  spelling check, and before you go fine tuning the typesetting.
17957 \end_layout
17958
17959 \begin_layout Subsection
17960 How to use it
17961 \end_layout
17962
17963 \begin_layout Standard
17964 If you have the program installed, usage is as simple as choosing 
17965 \family sans
17966 Tools\SpecialChar \menuseparator
17967 Check
17968 \begin_inset space ~
17969 \end_inset
17970
17971 TeX
17972 \family default
17973 .
17974  This will make LyX generate a LaTeX file of your document, start 
17975 \family sans
17976 ChkTeX
17977 \family default
17978  to check it, and then make LyX insert 
17979 \begin_inset Quotes eld
17980 \end_inset
17981
17982 error boxes
17983 \begin_inset Quotes erd
17984 \end_inset
17985
17986  with the warnings from 
17987 \family sans
17988 ChkTeX
17989 \family default
17990 , if there were any.
17991  The warnings will be placed close to the point of the mistake, and you
17992  can quickly find them by using the 
17993 \family sans
17994 Navigate\SpecialChar \menuseparator
17995 Error
17996 \family default
17997  menu item, or the shortcut key 
17998 \family sans
17999 C-g
18000 \family default
18001  from the default 
18002 \family typewriter
18003 cua
18004 \family default
18005  bind file.
18006  Open the error boxes by clicking on them with the mouse, or use the shortcut
18007  key 
18008 \family sans
18009 C-i
18010 \family default
18011  from 
18012 \family typewriter
18013 cua
18014 \family default
18015  bindings, or the corresponding 
18016 \family sans
18017 C-o
18018 \family default
18019  for the alternate 
18020 \family typewriter
18021 emacs
18022 \family default
18023  bind file.
18024  Read the warning and correct the mistake, if it is a mistake.
18025  If you have trouble understanding what the warning is about, you can safely
18026  ignore it.
18027  Remember that there is a hidden layer between the document on screen and
18028  the technical details in invoking 
18029 \family sans
18030 ChkTeX
18031 \family default
18032 , and this gap can make some warnings seem arcane or just right down plain
18033  silly.
18034 \end_layout
18035
18036 \begin_layout Standard
18037 This document is an excellent testing bed for the feature, and it should
18038  provide quite a few warnings for you to fiddle with.
18039  Since computers are only so smart, expect most of the warnings to be false
18040  alarms, though.
18041 \end_layout
18042
18043 \begin_layout Subsection
18044 How to fine tune it
18045 \end_layout
18046
18047 \begin_layout Standard
18048 Sometimes, you'll find that 
18049 \family sans
18050 ChkTeX
18051 \family default
18052  makes more noise than suits your mood.
18053  Then you can choose not to use it, wait until your mood changes, or try
18054  to customize 
18055 \family sans
18056 ChkTeX
18057 \family default
18058  to get better along with you.
18059  Another choice in the most desperate situations is to use 
18060 \family sans
18061 View\SpecialChar \menuseparator
18062 Remove
18063 \begin_inset space ~
18064 \end_inset
18065
18066 All
18067 \begin_inset space ~
18068 \end_inset
18069
18070 Error
18071 \begin_inset space ~
18072 \end_inset
18073
18074 Boxes
18075 \family default
18076 , which will get rid of all warnings instantly.
18077 \end_layout
18078
18079 \begin_layout Standard
18080 Although 
18081 \family sans
18082 ChkTeX
18083 \family default
18084  
18085 \emph on
18086 is
18087 \emph default
18088  very configurable and extensible, you shouldn't expect to solve all problems
18089  with 
18090 \family sans
18091 ChkTeX
18092 \family default
18093  in LyX this way.
18094  Since LyX has to generate a somewhat special LaTeX file to be able to match
18095  the line numbers from the 
18096 \family sans
18097 ChkTeX
18098 \family default
18099  output
18100 \begin_inset Foot
18101 status collapsed
18102
18103 \begin_layout Plain Layout
18104 You can inspect the specific output from 
18105 \family sans
18106 chktex
18107 \family default
18108  by using 
18109 \family sans
18110 Edit\SpecialChar \menuseparator
18111 View
18112 \begin_inset space ~
18113 \end_inset
18114
18115 LaTeX
18116 \begin_inset space ~
18117 \end_inset
18118
18119 Log
18120 \family default
18121  right after a 
18122 \family sans
18123 chktex
18124 \family default
18125  run.
18126 \end_layout
18127
18128 \end_inset
18129
18130  to the internal document structure, some of the warnings will not seen
18131  to appear correctly.
18132  There are two things you can do about this:
18133 \end_layout
18134
18135 \begin_layout Itemize
18136 Fine tune the 
18137 \family sans
18138 ChkTeX
18139 \family default
18140  invocation command line in 
18141 \family sans
18142 Preferences
18143 \family default
18144  (tabs 
18145 \family sans
18146 Outputs
18147 \family default
18148
18149 \family sans
18150 Misc
18151 \family default
18152 ), or the global 
18153 \family sans
18154 ChkTeX
18155 \family default
18156  installation configuration file (usually with the file 
18157 \family typewriter
18158 chktexrc
18159 \family default
18160 ).
18161  See below to learn what warnings can be enabled and disabled on the command
18162  line.
18163  
18164 \end_layout
18165
18166 \begin_layout Itemize
18167 Export your document as a raw LaTeX file using 
18168 \family sans
18169 File\SpecialChar \menuseparator
18170 Export\SpecialChar \menuseparator
18171 LaTeX
18172 \family default
18173  and run 
18174 \family typewriter
18175 chktex
18176 \family default
18177  manually on that.
18178  Invoked in this way, it can be a hassle to find the corresponding place
18179  in the document inside LyX, but with a little patience, you should be able
18180  to do it.
18181 \end_layout
18182
18183 \begin_layout Standard
18184 Here follows the warning messages that can be enabled and disabled in 
18185 \family sans
18186 Preferences
18187 \family default
18188 .
18189  Use 
18190 \family typewriter
18191 -n#
18192 \family default
18193  to disable a warning, and 
18194 \family typewriter
18195 -w#
18196 \family default
18197  to enable a warning.
18198  The emphasized entries are disabled by default, because the default is
18199  "
18200 \family typewriter
18201 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18202 \family default
18203 ".
18204 \end_layout
18205
18206 \begin_layout Standard
18207 Notice that you should only use the options that enable and disable warnings,
18208  because LyX relies on some of the other command line parameters to be set
18209  in a specific way to have a chance to communicate with 
18210 \family typewriter
18211 chktex
18212 \family default
18213 .
18214 \end_layout
18215
18216 \begin_layout Enumerate
18217
18218 \size small
18219 \emph on
18220 Command terminated with space.
18221 \end_layout
18222
18223 \begin_layout Enumerate
18224
18225 \size small
18226 Non-breaking space (
18227 \begin_inset Quotes eld
18228 \end_inset
18229
18230
18231 \family typewriter
18232 ~
18233 \family default
18234
18235 \begin_inset Quotes erd
18236 \end_inset
18237
18238 ) should have been used.
18239 \end_layout
18240
18241 \begin_layout Enumerate
18242
18243 \size small
18244 \emph on
18245 You should enclose the previous parenthesis with 
18246 \begin_inset Quotes eld
18247 \end_inset
18248
18249
18250 \family typewriter
18251 {}
18252 \family default
18253
18254 \begin_inset Quotes erd
18255 \end_inset
18256
18257 .
18258 \end_layout
18259
18260 \begin_layout Enumerate
18261
18262 \size small
18263 Italic correction (
18264 \begin_inset Quotes eld
18265 \end_inset
18266
18267
18268 \family typewriter
18269
18270 \backslash
18271 /
18272 \family default
18273
18274 \begin_inset Quotes erd
18275 \end_inset
18276
18277 ) found in non-italic buffer.
18278 \end_layout
18279
18280 \begin_layout Enumerate
18281
18282 \size small
18283 Italic correction (
18284 \begin_inset Quotes eld
18285 \end_inset
18286
18287
18288 \family typewriter
18289
18290 \backslash
18291 /
18292 \family default
18293
18294 \begin_inset Quotes erd
18295 \end_inset
18296
18297 ) found more than once.
18298 \end_layout
18299
18300 \begin_layout Enumerate
18301
18302 \size small
18303 \emph on
18304 No italic correction (
18305 \begin_inset Quotes eld
18306 \end_inset
18307
18308
18309 \family typewriter
18310
18311 \backslash
18312 /
18313 \family default
18314
18315 \begin_inset Quotes erd
18316 \end_inset
18317
18318 ) found.
18319 \end_layout
18320
18321 \begin_layout Enumerate
18322
18323 \size small
18324 Accent command 
18325 \begin_inset Quotes eld
18326 \end_inset
18327
18328
18329 \family typewriter
18330 cmd
18331 \family default
18332
18333 \begin_inset Quotes erd
18334 \end_inset
18335
18336  needs use of 
18337 \begin_inset Quotes eld
18338 \end_inset
18339
18340
18341 \family typewriter
18342 cmd
18343 \family default
18344
18345 \begin_inset Quotes erd
18346 \end_inset
18347
18348 .
18349 \end_layout
18350
18351 \begin_layout Enumerate
18352
18353 \size small
18354 Wrong length of dash may have been used.
18355 \end_layout
18356
18357 \begin_layout Enumerate
18358
18359 \size small
18360 \emph on
18361 \begin_inset Quotes eld
18362 \end_inset
18363
18364
18365 \family typewriter
18366 %s
18367 \family default
18368
18369 \begin_inset Quotes erd
18370 \end_inset
18371
18372  expected, found 
18373 \begin_inset Quotes eld
18374 \end_inset
18375
18376
18377 \family typewriter
18378 %s
18379 \family default
18380
18381 \begin_inset Quotes erd
18382 \end_inset
18383
18384 .
18385 \end_layout
18386
18387 \begin_layout Enumerate
18388
18389 \size small
18390 Solo 
18391 \begin_inset Quotes eld
18392 \end_inset
18393
18394
18395 \family typewriter
18396 %s
18397 \family default
18398
18399 \begin_inset Quotes erd
18400 \end_inset
18401
18402  found.
18403 \end_layout
18404
18405 \begin_layout Enumerate
18406
18407 \size small
18408 You should use 
18409 \begin_inset Quotes eld
18410 \end_inset
18411
18412
18413 \family typewriter
18414 %s
18415 \family default
18416
18417 \begin_inset Quotes erd
18418 \end_inset
18419
18420  to achieve an ellipsis.
18421 \end_layout
18422
18423 \begin_layout Enumerate
18424
18425 \size small
18426 Inter-word spacing (
18427 \begin_inset Quotes eld
18428 \end_inset
18429
18430
18431 \family typewriter
18432
18433 \backslash
18434
18435 \family default
18436  
18437 \begin_inset Quotes eld
18438 \end_inset
18439
18440 ) should perhaps be used.
18441 \end_layout
18442
18443 \begin_layout Enumerate
18444
18445 \size small
18446 Inter-sentence spacing (
18447 \begin_inset Quotes eld
18448 \end_inset
18449
18450
18451 \family typewriter
18452
18453 \backslash
18454 @
18455 \family default
18456
18457 \begin_inset Quotes erd
18458 \end_inset
18459
18460 ) should perhaps be used.
18461 \end_layout
18462
18463 \begin_layout Enumerate
18464
18465 \size small
18466 Could not find argument for command.
18467 \end_layout
18468
18469 \begin_layout Enumerate
18470
18471 \size small
18472 No match found for 
18473 \begin_inset Quotes eld
18474 \end_inset
18475
18476
18477 \family typewriter
18478 %s
18479 \family default
18480
18481 \begin_inset Quotes erd
18482 \end_inset
18483
18484 .
18485 \end_layout
18486
18487 \begin_layout Enumerate
18488
18489 \size small
18490 Math mode still on at end of LaTeX file.
18491 \end_layout
18492
18493 \begin_layout Enumerate
18494
18495 \size small
18496 Number of 
18497 \begin_inset Quotes eld
18498 \end_inset
18499
18500
18501 \family typewriter
18502 char
18503 \family default
18504
18505 \begin_inset Quotes erd
18506 \end_inset
18507
18508  doesn't match the number of 
18509 \begin_inset Quotes eld
18510 \end_inset
18511
18512
18513 \family typewriter
18514 char
18515 \family default
18516
18517 \begin_inset Quotes erd
18518 \end_inset
18519
18520 .
18521 \end_layout
18522
18523 \begin_layout Enumerate
18524
18525 \size small
18526 You should use either 
18527 \family typewriter
18528
18529 \begin_inset Quotes eld
18530 \end_inset
18531
18532
18533 \family default
18534  or 
18535 \family typewriter
18536
18537 \begin_inset Quotes erd
18538 \end_inset
18539
18540
18541 \family default
18542  as an alternative to 
18543 \begin_inset Quotes eld
18544 \end_inset
18545
18546
18547 \family typewriter
18548 "
18549 \family default
18550
18551 \begin_inset Quotes erd
18552 \end_inset
18553
18554 .
18555 \end_layout
18556
18557 \begin_layout Enumerate
18558
18559 \size small
18560 You should use "
18561 \family typewriter
18562 '
18563 \family default
18564 " (ASCII 39) instead of "
18565 \family typewriter
18566 ´
18567 \family default
18568 " (ASCII 180).
18569 \end_layout
18570
18571 \begin_layout Enumerate
18572
18573 \size small
18574 User-specified pattern found.
18575 \end_layout
18576
18577 \begin_layout Enumerate
18578
18579 \size small
18580 This command might not be intended.
18581 \end_layout
18582
18583 \begin_layout Enumerate
18584
18585 \size small
18586 \emph on
18587 Comment displayed.
18588 \end_layout
18589
18590 \begin_layout Enumerate
18591
18592 \size small
18593 Either 
18594 \family typewriter
18595 ''
18596 \backslash
18597 ,'
18598 \family default
18599  or 
18600 \family typewriter
18601 '
18602 \backslash
18603 ,''
18604 \family default
18605  will look better.
18606 \end_layout
18607
18608 \begin_layout Enumerate
18609
18610 \size small
18611 Delete this space to maintain correct page references.
18612 \end_layout
18613
18614 \begin_layout Enumerate
18615
18616 \size small
18617 \emph on
18618 You might wish to put this between a pair of 
18619 \begin_inset Quotes eld
18620 \end_inset
18621
18622
18623 \family typewriter
18624 {}
18625 \family default
18626
18627 \begin_inset Quotes erd
18628 \end_inset
18629
18630 .
18631 \end_layout
18632
18633 \begin_layout Enumerate
18634
18635 \size small
18636 You ought to remove spaces in front of punctuation.
18637 \end_layout
18638
18639 \begin_layout Enumerate
18640
18641 \size small
18642 Could not execute LaTeX command.
18643 \end_layout
18644
18645 \begin_layout Enumerate
18646
18647 \size small
18648 Don't use 
18649 \family typewriter
18650
18651 \backslash
18652 /
18653 \family default
18654  in front of small punctuation.
18655 \end_layout
18656
18657 \begin_layout Enumerate
18658
18659 \family typewriter
18660 \size small
18661 $
18662 \backslash
18663 times$
18664 \family default
18665  may look prettier here.
18666 \end_layout
18667
18668 \begin_layout Enumerate
18669
18670 \size small
18671 \emph on
18672 Multiple spaces detected in output.
18673 \end_layout
18674
18675 \begin_layout Enumerate
18676
18677 \size small
18678 This text may be ignored.
18679 \end_layout
18680
18681 \begin_layout Enumerate
18682
18683 \size small
18684 Use 
18685 \family typewriter
18686
18687 \begin_inset Quotes eld
18688 \end_inset
18689
18690
18691 \family default
18692  to begin quotation, not 
18693 \family typewriter
18694 '
18695 \family default
18696 .
18697 \end_layout
18698
18699 \begin_layout Enumerate
18700
18701 \size small
18702 Use 
18703 \family typewriter
18704 '
18705 \family default
18706  to end quotation, not 
18707 \family typewriter
18708
18709 \begin_inset Quotes eld
18710 \end_inset
18711
18712
18713 \family default
18714 .
18715 \end_layout
18716
18717 \begin_layout Enumerate
18718
18719 \size small
18720 Don't mix quotes.
18721 \end_layout
18722
18723 \begin_layout Enumerate
18724
18725 \size small
18726 You should perhaps use 
18727 \begin_inset Quotes eld
18728 \end_inset
18729
18730
18731 \family typewriter
18732 cmd
18733 \family default
18734
18735 \begin_inset Quotes erd
18736 \end_inset
18737
18738  instead.
18739 \end_layout
18740
18741 \begin_layout Enumerate
18742
18743 \size small
18744 You should put a space in front of/after parenthesis.
18745 \end_layout
18746
18747 \begin_layout Enumerate
18748
18749 \size small
18750 You should avoid spaces in front of/after parenthesis.
18751 \end_layout
18752
18753 \begin_layout Enumerate
18754
18755 \size small
18756 \emph on
18757 You should not use punctuation in front of/after quotes.
18758 \end_layout
18759
18760 \begin_layout Enumerate
18761
18762 \size small
18763 Double space found.
18764 \end_layout
18765
18766 \begin_layout Enumerate
18767
18768 \size small
18769 You should put punctuation outside inner/inside display math mode.
18770 \end_layout
18771
18772 \begin_layout Enumerate
18773
18774 \size small
18775 You ought to not use primitive TeX in LaTeX code.
18776 \end_layout
18777
18778 \begin_layout Enumerate
18779
18780 \size small
18781 You should remove spaces in front of 
18782 \begin_inset Quotes eld
18783 \end_inset
18784
18785
18786 \family typewriter
18787 %s
18788 \family default
18789
18790 \begin_inset Quotes erd
18791 \end_inset
18792
18793
18794 \end_layout
18795
18796 \begin_layout Enumerate
18797
18798 \size small
18799 \begin_inset Quotes eld
18800 \end_inset
18801
18802
18803 \family typewriter
18804 %s
18805 \family default
18806
18807 \begin_inset Quotes erd
18808 \end_inset
18809
18810  is normally not followed by 
18811 \begin_inset Quotes eld
18812 \end_inset
18813
18814
18815 \family typewriter
18816 %c
18817 \family default
18818
18819 \begin_inset Quotes erd
18820 \end_inset
18821
18822 .
18823 \end_layout
18824
18825 \begin_layout Standard
18826 In later versions of LyX, we hope to provide a more complete interface to
18827  this tool (and it's smaller cousin 
18828 \family typewriter
18829 lacheck
18830 \family default
18831 ) to exploit the full power of it.
18832  But it's not exactly useless as it is now: go try it on one of your existing
18833  documents of a certain length and be surprised.
18834 \end_layout
18835
18836 \begin_layout Section
18837 Version Control in LyX
18838 \end_layout
18839
18840 \begin_layout Standard
18841 by
18842 \noun on
18843  Lars Gullik Bjønnes 
18844 \noun default
18845 and 
18846 \noun on
18847 Pavel Sanda
18848 \end_layout
18849
18850 \begin_layout Subsection
18851 Introduction
18852 \end_layout
18853
18854 \begin_layout Standard
18855 A friend of mine wanted to try LyX for a group project.
18856  When he didn't find support for version control or file locking, he dropped
18857  it.
18858  This angered me a bit, so I thought that I should at least make support
18859  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18860  This has been done.
18861  LyX now supports some of the most basic RCS/CVS/SVN commands.
18862  If you need something a bit more sophisticated you will have to do that
18863  manually in a terminal.
18864 \end_layout
18865
18866 \begin_layout Standard
18867 Before you begin to use the version control features in LyX, you should
18868  be familiar with RCS/CVS/SVN usage before start using it under LyX.
18869  Also note that CVS support was obsoloted by introducing subversion support
18870  so we advice using SVN instead.
18871  Good place to start with Subversion is SVN Book
18872 \begin_inset Foot
18873 status open
18874
18875 \begin_layout Plain Layout
18876 \begin_inset CommandInset href
18877 LatexCommand href
18878 target "http://svnbook.red-bean.com/"
18879
18880 \end_inset
18881
18882
18883 \end_layout
18884
18885 \end_inset
18886
18887 .
18888  In case of RCS you should read 
18889 \begin_inset Quotes eld
18890 \end_inset
18891
18892 rcsintro
18893 \begin_inset Quotes erd
18894 \end_inset
18895
18896  (a man file, read it with 
18897 \family typewriter
18898 man rcsintro
18899 \family default
18900 ).
18901  This file describes all the basic features of RCS.
18902  You should especially notice the comment about a RCS directory, and the
18903  notion of a master RCS file (the file ending in 
18904 \family typewriter
18905 ,v
18906 \family default
18907 ).
18908 \end_layout
18909
18910 \begin_layout Standard
18911 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18912  package—no guarantees are made for older versions.
18913  Most of the log messages are not currently displayed after operations -
18914  you can check them in Messages pane if unsure.
18915 \end_layout
18916
18917 \begin_layout Standard
18918 For introducing your own external commands consult vc-command in the manual
18919  of LyX functions.
18920 \end_layout
18921
18922 \begin_layout Subsection
18923 RCS commands in LyX
18924 \end_layout
18925
18926 \begin_layout Standard
18927 The following sections describe the RCS commands supported by LyX.
18928  You can find them in the 
18929 \family sans
18930 File\SpecialChar \menuseparator
18931 Version
18932 \begin_inset space ~
18933 \end_inset
18934
18935 Control
18936 \family default
18937  submenu.
18938  LyX was tested against RCS 5.7.
18939 \end_layout
18940
18941 \begin_layout Subsubsection
18942
18943 \family sans
18944 Register
18945 \end_layout
18946
18947 \begin_layout Standard
18948 If your document is not under revision control, this is the only item shown
18949  in the menu.
18950  And if it is under revision control, the 
18951 \family sans
18952 Register
18953 \family default
18954  item is not visible.
18955  
18956 \end_layout
18957
18958 \begin_layout Standard
18959 This command registers your document with RCS (unless you are under the
18960  directory managed by CVS)\SpecialChar \@.
18961  You are asked interactively to supply an initial
18962  description of the document.
18963  The document is now set in Read-Only mode and you have to 
18964 \family sans
18965 Check
18966 \begin_inset space ~
18967 \end_inset
18968
18969 Out
18970 \begin_inset space ~
18971 \end_inset
18972
18973 For
18974 \begin_inset space ~
18975 \end_inset
18976
18977 Edit
18978 \family default
18979 , before making any changes to it.
18980  A document under revision control has a 
18981 \begin_inset Quotes eld
18982 \end_inset
18983
18984 [RCS:<version> <locker>]
18985 \begin_inset Quotes erd
18986 \end_inset
18987
18988  item tagged to the filename in the minibuffer.
18989 \end_layout
18990
18991 \begin_layout Standard
18992 RCS command that is run: 
18993 \family typewriter
18994 ci -q -u -i -t-"<initial description>" <file-name>
18995 \end_layout
18996
18997 \begin_layout Standard
18998 Read 
18999 \family typewriter
19000 man ci
19001 \family default
19002  to understand the switches.
19003  
19004 \end_layout
19005
19006 \begin_layout Subsubsection
19007
19008 \family sans
19009 Check In Changes
19010 \end_layout
19011
19012 \begin_layout Standard
19013 When you are finished editing a file, you check in your changes.
19014  When you do this, you are asked for a description of the changes.
19015  This is stored in the history log.
19016  The version number is bumped, your changes are applied to the master RCS
19017  file, the document is unlocked and set to Read-Only mode.
19018  
19019 \end_layout
19020
19021 \begin_layout Standard
19022 RCS command: 
19023 \family typewriter
19024 ci -q -u -m"<description>" <file-name>
19025 \end_layout
19026
19027 \begin_layout Subsubsection
19028
19029 \family sans
19030 Check Out For Edit
19031 \end_layout
19032
19033 \begin_layout Standard
19034 By doing this you lock the document so that only you can edit it.
19035  This will also make the document Read-Write only for you.
19036  You will usually continue editing for a while and when you are finished
19037  you check in your changes.
19038  The status line is changed to reflect that you have locked the file.
19039  
19040 \end_layout
19041
19042 \begin_layout Standard
19043 RCS command: 
19044 \family typewriter
19045 co -q -l <file-name>
19046 \end_layout
19047
19048 \begin_layout Subsubsection
19049
19050 \family sans
19051 Revert To Repository Version
19052 \end_layout
19053
19054 \begin_layout Standard
19055 This will discard all changes made to the document since the last check
19056  in.
19057  You get a warning before changes are discarded.
19058 \end_layout
19059
19060 \begin_layout Standard
19061 RCS command: 
19062 \family typewriter
19063 co -f -u<version> <file-name>
19064 \end_layout
19065
19066 \begin_layout Subsubsection
19067
19068 \family sans
19069 Undo Last Checkin
19070 \end_layout
19071
19072 \begin_layout Standard
19073 This makes as if the last check in never happened.
19074  No changes are made to the document loaded into LyX, but the last version
19075  is removed from the master RCS file.
19076  
19077 \end_layout
19078
19079 \begin_layout Standard
19080 RCS command: 
19081 \family typewriter
19082 rcs -o<version> <file-name>
19083 \end_layout
19084
19085 \begin_layout Subsubsection
19086
19087 \family sans
19088 Show History
19089 \end_layout
19090
19091 \begin_layout Standard
19092 This shows the complete history of the RCS document.
19093  The output of 
19094 \family typewriter
19095 rlog <file-name>
19096 \family default
19097  is shown in a browser.
19098  See 
19099 \family typewriter
19100 man rlog
19101 \family default
19102  for more info.
19103 \end_layout
19104
19105 \begin_layout Subsubsection
19106 Revision info
19107 \end_layout
19108
19109 \begin_layout Standard
19110 LyX supports RCS version number information (only), see 
19111 \begin_inset CommandInset ref
19112 LatexCommand ref
19113 reference "sub:VCS-Revision-Information"
19114
19115 \end_inset
19116
19117  for details.
19118 \end_layout
19119
19120 \begin_layout Subsection
19121 CVS commands in LyX
19122 \end_layout
19123
19124 \begin_layout Standard
19125 CVS is now partially supported by LyX.
19126  You can find the commands in the 
19127 \family sans
19128 File\SpecialChar \menuseparator
19129 Version
19130 \begin_inset space ~
19131 \end_inset
19132
19133 Control
19134 \family default
19135  submenu.
19136  Focus of the development moved to SVN support, so please use it instead
19137  of CVS if possible.
19138 \end_layout
19139
19140 \begin_layout Subsubsection
19141
19142 \family sans
19143 Register
19144 \end_layout
19145
19146 \begin_layout Standard
19147 If your document is not under revision control, this is the only item shown
19148  in the menu.
19149  And if it is under revision control, the 
19150 \family sans
19151 \bar under
19152 R
19153 \bar default
19154 egister
19155 \family default
19156  item is not visible.
19157  
19158 \end_layout
19159
19160 \begin_layout Standard
19161 This command registers in CVS your document ONLY in case you have already
19162  the documents directory under CVS control (in particular 
19163 \family typewriter
19164 CVS/Entries
19165 \family default
19166  file exists).
19167  This means you have to checkout the archive by yourself.
19168  
19169 \end_layout
19170
19171 \begin_layout Standard
19172 Then you are asked interactively to supply an initial description of the
19173  document.
19174  Don't forget that registered file is not yet commited.
19175 \end_layout
19176
19177 \begin_layout Standard
19178 CVS command that is run: 
19179 \family typewriter
19180 cvs -q add -m
19181 \begin_inset Quotes erd
19182 \end_inset
19183
19184 <entered message>" 
19185 \begin_inset Quotes eld
19186 \end_inset
19187
19188 <file-name>
19189 \begin_inset Quotes erd
19190 \end_inset
19191
19192
19193 \end_layout
19194
19195 \begin_layout Standard
19196 Read 
19197 \family typewriter
19198 man svn
19199 \family default
19200  to understand the switches.
19201  
19202 \end_layout
19203
19204 \begin_layout Subsubsection
19205
19206 \family sans
19207 Check In Changes
19208 \end_layout
19209
19210 \begin_layout Standard
19211 When you are finished editing a file, you commit your changes.
19212  When you do this, you are asked for a description of the changes.
19213  After that changes are commited.
19214 \end_layout
19215
19216 \begin_layout Standard
19217 CVS command: 
19218 \family typewriter
19219 cvs -q commit -m"<description>" "<file-name>"
19220 \end_layout
19221
19222 \begin_layout Subsubsection
19223
19224 \family sans
19225 Revert To Repository Version
19226 \end_layout
19227
19228 \begin_layout Standard
19229 This will discard all changes made to the document since the last check
19230  in.
19231  You get a warning before changes are discarded.
19232  Firstly the file is deleted, secondly CVS update command is run.
19233 \end_layout
19234
19235 \begin_layout Standard
19236 CVS command: 
19237 \family typewriter
19238 cvs update 
19239 \begin_inset Quotes eld
19240 \end_inset
19241
19242 <file-name>
19243 \begin_inset Quotes erd
19244 \end_inset
19245
19246
19247 \end_layout
19248
19249 \begin_layout Subsubsection
19250
19251 \family sans
19252 Show History
19253 \end_layout
19254
19255 \begin_layout Standard
19256 This shows the complete history of the CVS document.
19257  The output of 
19258 \family typewriter
19259 cvs log 
19260 \begin_inset Quotes eld
19261 \end_inset
19262
19263 <file-name>
19264 \begin_inset Quotes erd
19265 \end_inset
19266
19267
19268 \family default
19269  is shown in a browser.
19270 \end_layout
19271
19272 \begin_layout Subsection
19273 SVN commands in LyX
19274 \end_layout
19275
19276 \begin_layout Standard
19277 SVN is now partially supported by LyX.
19278  You can find the commands in the 
19279 \family sans
19280 File\SpecialChar \menuseparator
19281 Version
19282 \begin_inset space ~
19283 \end_inset
19284
19285 Control
19286 \family default
19287  submenu.
19288  Please note that if you use password protected access to repository via
19289  ssh, you will be asked in terminal window.
19290  LyX was tested against SVN 1.5 and 1.6
19291 \begin_inset Foot
19292 status open
19293
19294 \begin_layout Plain Layout
19295 Most of the commands will work with 1.4 too, see 
19296 \begin_inset CommandInset ref
19297 LatexCommand ref
19298 reference "sub:SVN-Repo-Update"
19299
19300 \end_inset
19301
19302 .
19303 \end_layout
19304
19305 \end_inset
19306
19307
19308 \end_layout
19309
19310 \begin_layout Subsubsection
19311
19312 \family sans
19313 Register
19314 \end_layout
19315
19316 \begin_layout Standard
19317 If your document is not under revision control, this is the only item shown
19318  in the menu.
19319  And if it is under revision control, the 
19320 \family sans
19321 \bar under
19322 R
19323 \bar default
19324 egister
19325 \family default
19326  item is not visible.
19327  
19328 \end_layout
19329
19330 \begin_layout Standard
19331 This command registers in SVN your document ONLY in case you have already
19332  the documents directory under SVN control (in particular 
19333 \family typewriter
19334 .svn/entries
19335 \family default
19336  file exists).
19337  This means you have to checkout the archive by yourself.
19338  
19339 \end_layout
19340
19341 \begin_layout Standard
19342 Then you are asked interactively to supply an initial description of the
19343  document.
19344  Don't forget that registered file is not yet commited.
19345 \end_layout
19346
19347 \begin_layout Standard
19348 SVN command that is run: 
19349 \family typewriter
19350 svn add -q 
19351 \begin_inset Quotes eld
19352 \end_inset
19353
19354 <file-name>
19355 \begin_inset Quotes erd
19356 \end_inset
19357
19358
19359 \end_layout
19360
19361 \begin_layout Standard
19362 Read 
19363 \family typewriter
19364 man svn
19365 \family default
19366  to understand the switches.
19367  
19368 \end_layout
19369
19370 \begin_layout Subsubsection
19371
19372 \family sans
19373 Check In Changes
19374 \end_layout
19375
19376 \begin_layout Standard
19377 When you are finished editing a file, you commit your changes.
19378  When you do this, you are asked for a description of the changes.
19379  After that changes are commited.
19380 \end_layout
19381
19382 \begin_layout Standard
19383 SVN command:
19384 \begin_inset Foot
19385 status collapsed
19386
19387 \begin_layout Plain Layout
19388 In case locking is not enabled.
19389  See Section 
19390 \begin_inset CommandInset ref
19391 LatexCommand ref
19392 reference "subsec:SVN-File-Locking"
19393
19394 \end_inset
19395
19396 .
19397 \end_layout
19398
19399 \end_inset
19400
19401  
19402 \family typewriter
19403 svn commit -q -m"<description>" <file-name>
19404 \end_layout
19405
19406 \begin_layout Subsubsection
19407
19408 \family sans
19409 Check Out For Edit
19410 \end_layout
19411
19412 \begin_layout Standard
19413 Updates the changes of this file from the repository.
19414  Be sure you understand SVN merging and conflicts resolving before using
19415  this function, because all conflicts has to be resolved manually by you!
19416 \end_layout
19417
19418 \begin_layout Standard
19419 SVN command:
19420 \begin_inset Foot
19421 status collapsed
19422
19423 \begin_layout Plain Layout
19424 Ditto.
19425 \end_layout
19426
19427 \end_inset
19428
19429  
19430 \family typewriter
19431 svn update --non-interactive 
19432 \begin_inset Quotes eld
19433 \end_inset
19434
19435 <file-name>
19436 \begin_inset Quotes erd
19437 \end_inset
19438
19439
19440 \end_layout
19441
19442 \begin_layout Subsubsection
19443
19444 \family sans
19445 Revert To Repository Version
19446 \end_layout
19447
19448 \begin_layout Standard
19449 This will discard all changes made to the document since the last check
19450  in.
19451  You get a warning before changes are discarded.
19452  
19453 \end_layout
19454
19455 \begin_layout Standard
19456 SVN command: 
19457 \family typewriter
19458 svn revert -q 
19459 \begin_inset Quotes eld
19460 \end_inset
19461
19462 <file-name>
19463 \begin_inset Quotes erd
19464 \end_inset
19465
19466
19467 \end_layout
19468
19469 \begin_layout Subsubsection
19470 \begin_inset CommandInset label
19471 LatexCommand label
19472 name "sub:SVN-Repo-Update"
19473
19474 \end_inset
19475
19476 Update of the local directory checkout from repository
19477 \begin_inset Foot
19478 status collapsed
19479
19480 \begin_layout Plain Layout
19481 Note that this command will work only with subversion 
19482 \begin_inset Formula $\geqq1.5$
19483 \end_inset
19484
19485
19486 \end_layout
19487
19488 \end_inset
19489
19490
19491 \end_layout
19492
19493 \begin_layout Standard
19494 All the commands above have one shortcomming - they deal with the current
19495  document only.
19496  Once your document contains pictures, includes external 
19497 \begin_inset Flex Code
19498 status collapsed
19499
19500 \begin_layout Plain Layout
19501 .tex
19502 \end_layout
19503
19504 \end_inset
19505
19506  files and so on administration becomes more complicated.
19507  LyX now supports updating the whole tree in which resides the document
19508 \begin_inset Foot
19509 status collapsed
19510
19511 \begin_layout Plain Layout
19512 One need to organize the files structure so that all external files are
19513  in the same directory or subdirectories of the document.
19514  
19515 \end_layout
19516
19517 \end_inset
19518
19519 .
19520  This become especially useful once you cooperate with people which neither
19521  know about subversion management nor they have ambition to commit additional
19522  material to the repository.
19523  
19524 \end_layout
19525
19526 \begin_layout Standard
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 and in case of merge conflicts local
19537  version of the files are left, so no unintended data loss occurs.
19538  If local changes are detected user is warned before update starts.
19539 \end_layout
19540
19541 \begin_layout Labeling
19542 \labelwidthstring 00.00.0000
19543 SVN
19544 \begin_inset space ~
19545 \end_inset
19546
19547 commands: 
19548 \begin_inset space ~
19549 \end_inset
19550
19551
19552 \begin_inset Newline newline
19553 \end_inset
19554
19555
19556 \begin_inset Flex Code
19557 status collapsed
19558
19559 \begin_layout Plain Layout
19560 svn diff $path
19561 \end_layout
19562
19563 \end_inset
19564
19565  (Ask if changes are detected.)
19566 \begin_inset Newline newline
19567 \end_inset
19568
19569
19570 \begin_inset Flex Code
19571 status collapsed
19572
19573 \begin_layout Plain Layout
19574 svn update --accept mine-full $path
19575 \end_layout
19576
19577 \end_inset
19578
19579
19580 \end_layout
19581
19582 \begin_layout Standard
19583 where 
19584 \begin_inset Flex Code
19585 status collapsed
19586
19587 \begin_layout Plain Layout
19588 $path
19589 \end_layout
19590
19591 \end_inset
19592
19593  stands for the path to the document.
19594 \end_layout
19595
19596 \begin_layout Subsubsection
19597
19598 \family sans
19599 Show History
19600 \end_layout
19601
19602 \begin_layout Standard
19603 This shows the complete history of the SVN document.
19604  The output of 
19605 \family typewriter
19606 svn log 
19607 \begin_inset Quotes eld
19608 \end_inset
19609
19610 <file-name>
19611 \begin_inset Quotes erd
19612 \end_inset
19613
19614
19615 \family default
19616  is shown in a browser.
19617 \end_layout
19618
19619 \begin_layout Subsubsection
19620 File Locking
19621 \begin_inset CommandInset label
19622 LatexCommand label
19623 name "subsec:SVN-File-Locking"
19624
19625 \end_inset
19626
19627
19628 \end_layout
19629
19630 \begin_layout Standard
19631 The file exchange through various revision control systems brings the problem
19632  of merge conflicts in case two different users try to edit the same (parts
19633  of) document.
19634  When such a conflict happens it needs manual resolving and one reasonable
19635  alternative is to provide some kind of locking mechanism, which guarantees
19636  that only one user is allowed to edit file at the given time.
19637 \end_layout
19638
19639 \begin_layout Standard
19640 SVN has two such mechanisms to provide mutual exclusivity for file access
19641  - locks and automatic setting of write permissions (see sec.
19642  
19643 \begin_inset CommandInset ref
19644 LatexCommand ref
19645 reference "subsec:Automatical-Locking-Property"
19646
19647 \end_inset
19648
19649 ) based on 
19650 \begin_inset Flex Code
19651 status collapsed
19652
19653 \begin_layout Plain Layout
19654 svn:needs-lock
19655 \end_layout
19656
19657 \end_inset
19658
19659  file svn property
19660 \begin_inset Foot
19661 status open
19662
19663 \begin_layout Plain Layout
19664 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19665 \end_layout
19666
19667 \end_inset
19668
19669 .
19670  If this property is detected for a given document LyX starts to use SVN
19671  locks for document editing automatically and the whole check-in/out mechanism
19672  switches to the same regimen as for RCS.
19673  This in particular means there are two different modes of file use in LyX:
19674 \end_layout
19675
19676 \begin_layout Itemize
19677 Unlocked state.
19678  The loaded file is in the read-only mode.
19679  For editing on needs to check-out.
19680  
19681 \emph on
19682 Check-out
19683 \emph default
19684  consists of updating from the repository and gaining write lock.
19685  If the lock is not possible to obtain, we remain in unlocked state.
19686 \end_layout
19687
19688 \begin_layout Itemize
19689 Locked state.
19690  The loaded file is in the 'normal' edit mode.
19691  No other user is allowed to edit the file.
19692  
19693 \emph on
19694 Check-in
19695 \emph default
19696  consists of commiting changes and releasing write-lock.
19697  If no changes have been made to the document, no commit will be produced
19698 \begin_inset Foot
19699 status collapsed
19700
19701 \begin_layout Plain Layout
19702 Don't be puzzled by the fact that you will be asked for commit message anyway.
19703 \end_layout
19704
19705 \end_inset
19706
19707  and only the write-lock will be released.
19708 \end_layout
19709
19710 \begin_layout Standard
19711 SVN commands:
19712 \end_layout
19713
19714 \begin_layout Labeling
19715 \labelwidthstring 00.00.0000
19716 Check-in:
19717 \family typewriter
19718  svn commit -q -m"<description>" "<file-name>"
19719 \begin_inset Newline newline
19720 \end_inset
19721
19722 svn unlock "<file-name>"
19723 \end_layout
19724
19725 \begin_layout Labeling
19726 \labelwidthstring 00.00.0000
19727 Check-out: 
19728 \family typewriter
19729 svn update "<file-name>"
19730 \begin_inset Newline newline
19731 \end_inset
19732
19733 svn lock "<file-name>"
19734 \end_layout
19735
19736 \begin_layout Subsubsection
19737
19738 \family typewriter
19739 \begin_inset CommandInset label
19740 LatexCommand label
19741 name "subsec:Automatical-Locking-Property"
19742
19743 \end_inset
19744
19745
19746 \family default
19747 Automatic Locking Property
19748 \end_layout
19749
19750 \begin_layout Standard
19751 The above mentioned automatic setting of write permissions of the .lyx file
19752  can be set through
19753 \family sans
19754 \bar under
19755  F
19756 \bar default
19757 ile\SpecialChar \menuseparator
19758
19759 \bar under
19760 V
19761 \bar default
19762 ersion
19763 \begin_inset space ~
19764 \end_inset
19765
19766 Control\SpecialChar \menuseparator
19767
19768 \bar under
19769 T
19770 \bar default
19771 oggle locking property
19772 \family default
19773 .
19774  This command is active only when the file is not locked on the svn server
19775  (i.e.
19776  you need to check-out before proceeding).
19777 \end_layout
19778
19779 \begin_layout Labeling
19780 \labelwidthstring 00.00.0000
19781 SVN
19782 \begin_inset space ~
19783 \end_inset
19784
19785 commands:
19786 \end_layout
19787
19788 \begin_layout Labeling
19789 \labelwidthstring 00.00.0000
19790 Set:
19791 \family typewriter
19792  svn propset svn:needs-lock ON "<file-name>"
19793 \end_layout
19794
19795 \begin_layout Labeling
19796 \labelwidthstring 00.00.0000
19797 Unset: 
19798 \family typewriter
19799 svn propdel svn:needs-lock "<file-name>"
19800 \end_layout
19801
19802 \begin_layout Subsubsection
19803 \begin_inset CommandInset label
19804 LatexCommand label
19805 name "sub:VCS-Revision-Information"
19806
19807 \end_inset
19808
19809 Revision Information in Documents
19810 \end_layout
19811
19812 \begin_layout Standard
19813 There are more possibilities how to activate revision information in our
19814  document.
19815 \end_layout
19816
19817 \begin_layout Itemize
19818 LyX supports directly:
19819 \end_layout
19820
19821 \begin_deeper
19822 \begin_layout Itemize
19823 tree revision information (
19824 \begin_inset Flex Code
19825 status collapsed
19826
19827 \begin_layout Plain Layout
19828 vcs-tree-revision
19829 \end_layout
19830
19831 \end_inset
19832
19833 ).
19834  The result is the output of the 
19835 \begin_inset Flex Code
19836 status collapsed
19837
19838 \begin_layout Plain Layout
19839 svnversion
19840 \end_layout
19841
19842 \end_inset
19843
19844  command, the following table gives you an idea, how to read the results.
19845 \end_layout
19846
19847 \begin_layout Standard
19848 \align center
19849 \begin_inset Tabular
19850 <lyxtabular version="3" rows="6" columns="2">
19851 <features tabularvalignment="middle">
19852 <column alignment="center" valignment="top" width="0">
19853 <column alignment="center" valignment="top" width="0">
19854 <row>
19855 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19856 \begin_inset Text
19857
19858 \begin_layout Plain Layout
19859 Output
19860 \end_layout
19861
19862 \end_inset
19863 </cell>
19864 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19865 \begin_inset Text
19866
19867 \begin_layout Plain Layout
19868 Meaning
19869 \end_layout
19870
19871 \end_inset
19872 </cell>
19873 </row>
19874 <row>
19875 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19876 \begin_inset Text
19877
19878 \begin_layout Plain Layout
19879 4123:4168
19880 \end_layout
19881
19882 \end_inset
19883 </cell>
19884 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19885 \begin_inset Text
19886
19887 \begin_layout Plain Layout
19888 mixed revision working copy
19889 \end_layout
19890
19891 \end_inset
19892 </cell>
19893 </row>
19894 <row>
19895 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19896 \begin_inset Text
19897
19898 \begin_layout Plain Layout
19899 4168M
19900 \end_layout
19901
19902 \end_inset
19903 </cell>
19904 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19905 \begin_inset Text
19906
19907 \begin_layout Plain Layout
19908 modified working copy
19909 \end_layout
19910
19911 \end_inset
19912 </cell>
19913 </row>
19914 <row>
19915 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19916 \begin_inset Text
19917
19918 \begin_layout Plain Layout
19919 4123S
19920 \end_layout
19921
19922 \end_inset
19923 </cell>
19924 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19925 \begin_inset Text
19926
19927 \begin_layout Plain Layout
19928 switched working copy
19929 \end_layout
19930
19931 \end_inset
19932 </cell>
19933 </row>
19934 <row>
19935 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19936 \begin_inset Text
19937
19938 \begin_layout Plain Layout
19939 4123P
19940 \end_layout
19941
19942 \end_inset
19943 </cell>
19944 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19945 \begin_inset Text
19946
19947 \begin_layout Plain Layout
19948 partial working copy, from a sparse checkout
19949 \end_layout
19950
19951 \end_inset
19952 </cell>
19953 </row>
19954 <row>
19955 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19956 \begin_inset Text
19957
19958 \begin_layout Plain Layout
19959 4123:4168MS
19960 \end_layout
19961
19962 \end_inset
19963 </cell>
19964 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19965 \begin_inset Text
19966
19967 \begin_layout Plain Layout
19968 mixed revision, modified, switched working copy
19969 \end_layout
19970
19971 \end_inset
19972 </cell>
19973 </row>
19974 </lyxtabular>
19975
19976 \end_inset
19977
19978
19979 \end_layout
19980
19981 \begin_layout Itemize
19982 file revision information.
19983  The result comes from parsing the output of 
19984 \begin_inset Flex Code
19985 status collapsed
19986
19987 \begin_layout Plain Layout
19988 svn
19989 \begin_inset space ~
19990 \end_inset
19991
19992 info
19993 \begin_inset space ~
19994 \end_inset
19995
19996 --xml
19997 \begin_inset space ~
19998 \end_inset
19999
20000 file.lyx
20001 \end_layout
20002
20003 \end_inset
20004
20005 .
20006  Supported flags are:
20007 \end_layout
20008
20009 \begin_deeper
20010 \begin_layout Itemize
20011 version number of the last commit (
20012 \begin_inset Flex Code
20013 status collapsed
20014
20015 \begin_layout Plain Layout
20016 vcs-revision
20017 \end_layout
20018
20019 \end_inset
20020
20021 )
20022 \end_layout
20023
20024 \begin_layout Itemize
20025 author of the last commit (
20026 \begin_inset Flex Code
20027 status collapsed
20028
20029 \begin_layout Plain Layout
20030 vcs-author
20031 \end_layout
20032
20033 \end_inset
20034
20035 )
20036 \end_layout
20037
20038 \begin_layout Itemize
20039 date of the last commit (
20040 \begin_inset Flex Code
20041 status collapsed
20042
20043 \begin_layout Plain Layout
20044 vcs-date
20045 \end_layout
20046
20047 \end_inset
20048
20049 )
20050 \end_layout
20051
20052 \begin_layout Itemize
20053 time of the last commit (
20054 \begin_inset Flex Code
20055 status collapsed
20056
20057 \begin_layout Plain Layout
20058 vcs-time
20059 \end_layout
20060
20061 \end_inset
20062
20063 )
20064 \end_layout
20065
20066 \end_deeper
20067 \begin_layout Standard
20068 You can obtain this info via InsetInfo (e.g.
20069  
20070 \begin_inset Flex Code
20071 status collapsed
20072
20073 \begin_layout Plain Layout
20074 info-insert buffer vcs-date
20075 \end_layout
20076
20077 \end_inset
20078
20079 ).
20080  The information will be available only when you have the file stored under
20081  svn managment (i.e.
20082  the 
20083 \begin_inset Flex Code
20084 status collapsed
20085
20086 \begin_layout Plain Layout
20087 .svn
20088 \end_layout
20089
20090 \end_inset
20091
20092  directory is available with your document).
20093 \end_layout
20094
20095 \end_deeper
20096 \begin_layout Itemize
20097 Another---a hacking one---possibility is to use svn keywords
20098 \begin_inset Foot
20099 status collapsed
20100
20101 \begin_layout Plain Layout
20102 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20103 \end_layout
20104
20105 \end_inset
20106
20107 .
20108  In short -- you set file keywords property (e.g.
20109  
20110 \family sans
20111 svn propset svn:keywords 'Rev' file.lyx
20112 \family default
20113 ) and then paste keyword ERT
20114 \begin_inset Foot
20115 status collapsed
20116
20117 \begin_layout Plain Layout
20118 This is an easy way how to ensure that LyX won't break the line in the middle
20119  of keyword tag.
20120 \end_layout
20121
20122 \end_inset
20123
20124  tag in your document (e.g.
20125  
20126 \begin_inset ERT
20127 status open
20128
20129 \begin_layout Plain Layout
20130
20131 $Rev$
20132 \end_layout
20133
20134 \end_inset
20135
20136 ).
20137  This way svn client will automatically substitute revision number (e.g.
20138  
20139 \begin_inset ERT
20140 status open
20141
20142 \begin_layout Plain Layout
20143
20144 $Rev: 59 $
20145 \end_layout
20146
20147 \end_inset
20148
20149 ) after each update and commit.
20150  There are more problems with this approach.
20151  Firstly, the '$' character is used in TeX world for math equations, so
20152  any occurence of math formula 
20153 \begin_inset Formula $Rev$
20154 \end_inset
20155
20156  become 
20157 \begin_inset Formula $Rev:59$
20158 \end_inset
20159
20160  in your LyX document.
20161  Similarly for other keywords like Id, Date, Author, etc.
20162  Secondly svn output is dependent on your locales, so its very easy that
20163  svn would produce some problematic strings once Date is used.
20164  Thirdly you get the whole 'Rev: 59' string in your document instead of
20165  the plain number.
20166  Until subversion implements user's custom keywords it will be hard to use
20167  this approach reliably or let LyX to support it directly.
20168 \end_layout
20169
20170 \begin_layout Subsection
20171 SVN and Windows Environment
20172 \end_layout
20173
20174 \begin_layout Quote
20175 My inclination is to say that if the user cannot figure out the command
20176  line operations on their own fairly quickly, they would be well advised
20177  to use TortoiseSVN.
20178  ---P.
20179  A.
20180  Rubin
20181 \end_layout
20182
20183 \begin_layout Subsubsection
20184 Preparation
20185 \end_layout
20186
20187 \begin_layout Standard
20188 In addition to installing LyX, and having access to a Subversion repository,
20189  the user will need to install the Subversion client program.
20190  A Windows installer for the client program is available from 
20191 \begin_inset CommandInset href
20192 LatexCommand href
20193 name "CollabNet"
20194 target "http://www.collab.net/nonav/downloads/subversion/"
20195
20196 \end_inset
20197
20198 .
20199  The user may also want to install 
20200 \begin_inset CommandInset href
20201 LatexCommand href
20202 name "TortoiseSVN"
20203 target "http://tortoisesvn.tigris.org/"
20204
20205 \end_inset
20206
20207 , which integrates Subversion operations into the context (rightclick) menu
20208  of Windows Explorer.
20209  Operations done outside LyX will typically be more convenient using the
20210  Explorer context menu.
20211  Note that TortoiseSVN is not a replacement for the client program, which
20212  is what LyX itself will use.
20213 \end_layout
20214
20215 \begin_layout Subsubsection
20216 Bringing a document under Subversion control
20217 \end_layout
20218
20219 \begin_layout Standard
20220 Before a LyX document can be brought under version control in Subversion,
20221  its parent directory needs to be under version control.
20222  If the document is being added to a project already in the repository,
20223  this is accomplished by checking the project out to the directory where
20224  the new document will be placed.
20225  If the project itself is not yet under version control (for instance, if
20226  this document starts a new project), the directory must be imported into
20227  the repository.
20228  This is done outside LyX.
20229  Both import and checkout are easily accomplished from the Explorer context
20230  menu using TortoiseSVN, or alternatively can be done using the command
20231  line client at a DOS prompt.
20232  The procedure for importing the project using TortoiseSVN is described
20233  below, assuming an existing repository and a new project being started
20234  in 
20235 \family typewriter
20236 C:
20237 \backslash
20238 new project
20239 \family default
20240 .
20241  For information on using the Subversion client program, run 
20242 \family typewriter
20243 svn --help 
20244 \family default
20245 in a DOS shell.
20246 \end_layout
20247
20248 \begin_layout Enumerate
20249 Locate 
20250 \family typewriter
20251 C:
20252 \backslash
20253 new project 
20254 \family default
20255 in Windows Explorer, right click it, and select 
20256 \family typewriter
20257 TortoiseSVN > Repo-browser
20258 \family default
20259 .
20260  If necessary, adjust the URL for the repository, then click OK.
20261 \end_layout
20262
20263 \begin_layout Enumerate
20264 Right click the level of the repository under which you want to place the
20265  new project folder (typically the top level) and click 
20266 \family typewriter
20267 Create folder\SpecialChar \ldots{}
20268
20269 \family default
20270  Supply a name for the project folder and click OK.
20271  Add a message for the log file if desired, then click OK again.
20272  The new project folder should appear in the repository.
20273  Finally, click OK again to exit the repository browser.
20274 \end_layout
20275
20276 \begin_layout Enumerate
20277 Once again right click 
20278 \family typewriter
20279 C:
20280 \backslash
20281 new project
20282 \family default
20283 , this time selecting SVN Checkout\SpecialChar \ldots{}
20284  Select the URL of the project folder
20285  you just created in the repository, and set the checkout directory to 
20286 \family typewriter
20287 C:
20288 \backslash
20289 new project.
20290
20291 \family default
20292  Click OK.
20293  You will be warned about a non-empty folder; click OK to proceed.
20294  You should now have a 
20295 \family typewriter
20296 .svn
20297 \family default
20298  directory under 
20299 \family typewriter
20300 C:
20301 \backslash
20302 new project.
20303 \end_layout
20304
20305 \begin_layout Enumerate
20306 Create or open your document in LyX and click 
20307 \family sans
20308 \bar under
20309 F
20310 \bar default
20311 ile\SpecialChar \menuseparator
20312
20313 \bar under
20314 V
20315 \bar default
20316 ersion
20317 \begin_inset space ~
20318 \end_inset
20319
20320 Control\SpecialChar \menuseparator
20321
20322 \bar under
20323 R
20324 \bar default
20325 egister.
20326  
20327 \family default
20328 Add a log message and click OK to commit the document to version control.
20329 \end_layout
20330
20331 \begin_layout Standard
20332 From this point onward, you should have full functionality in the 
20333 \family sans
20334 \bar under
20335 F
20336 \bar default
20337 ile\SpecialChar \menuseparator
20338
20339 \bar under
20340 V
20341 \bar default
20342 ersion
20343 \begin_inset space ~
20344 \end_inset
20345
20346 Control
20347 \family default
20348  menu.
20349  You also have the option of checking the document in and out, viewing its
20350  history, etc.
20351  using the TortoiseSVN context menu in Windows Explorer or the Subversion
20352  client program from a command prompt.
20353 \end_layout
20354
20355 \begin_layout Subsubsection
20356 SSH tunel used with SVN under Windows
20357 \end_layout
20358
20359 \begin_layout Standard
20360 Compared with Linux setting up svn client to communicate over ssh under
20361  Windows is a rather troublesome task.
20362  We will at least offer some hints how to setup the client side but prior
20363  knowledge about ssh and the Windows command line is needed, also be prepared
20364  for a great deal of frustration\SpecialChar \ldots{}
20365
20366 \end_layout
20367
20368 \begin_layout Enumerate
20369 Get a svn client for windows, as described in the previous sections.
20370  When it is a fresh install run some svn command (e.g.
20371  
20372 \begin_inset Flex Code
20373 status collapsed
20374
20375 \begin_layout Plain Layout
20376 svn --version
20377 \end_layout
20378
20379 \end_inset
20380
20381 ) to create config files, which you will need to change later on.
20382 \end_layout
20383
20384 \begin_layout Enumerate
20385 Choose a ssh client for Windows.
20386  There are several possibilities, we will use the one from Putty tools
20387 \begin_inset Foot
20388 status open
20389
20390 \begin_layout Plain Layout
20391 \begin_inset Flex URL
20392 status collapsed
20393
20394 \begin_layout Plain Layout
20395
20396 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20397 \end_layout
20398
20399 \end_inset
20400
20401
20402 \end_layout
20403
20404 \end_inset
20405
20406 .
20407  You will need to set the connection up so that the client doesn't ask for
20408  any password from you.
20409  To keep things easy we will use only keys without any additional password
20410  protection etc.
20411 \end_layout
20412
20413 \begin_deeper
20414 \begin_layout Enumerate
20415 Generate keys by 
20416 \begin_inset Flex Code
20417 status collapsed
20418
20419 \begin_layout Plain Layout
20420 puttygen
20421 \end_layout
20422
20423 \end_inset
20424
20425 .
20426  Save your private .ppk key file and put the public one on the server side.
20427  If the SVN server runs on Linux, note that the format of the public key
20428  is not compatible with Linux openssh and you will need to direcly copy-paste
20429  the key from the “
20430 \emph on
20431 Public key for pasting into OpenSSH authorized_keys file
20432 \emph default
20433 :” edit field into the server's 
20434 \begin_inset Flex Code
20435 status collapsed
20436
20437 \begin_layout Plain Layout
20438 ~/.ssh/authorized_keys
20439 \end_layout
20440
20441 \end_inset
20442
20443
20444 \begin_inset Flex Code
20445 status collapsed
20446
20447 \begin_layout Plain Layout
20448 authorized_keys2
20449 \end_layout
20450
20451 \end_inset
20452
20453  file.
20454 \end_layout
20455
20456 \begin_layout Enumerate
20457 Get the Putty's 
20458 \begin_inset Flex Code
20459 status collapsed
20460
20461 \begin_layout Plain Layout
20462 plink
20463 \end_layout
20464
20465 \end_inset
20466
20467 .
20468  In the SVN config file
20469 \begin_inset Foot
20470 status collapsed
20471
20472 \begin_layout Plain Layout
20473 Exact path depends on Windows version, usually somewhere around 
20474 \begin_inset Flex Code
20475 status collapsed
20476
20477 \begin_layout Plain Layout
20478 c:
20479 \backslash
20480 Documents and Settings
20481 \backslash
20482 user
20483 \backslash
20484 Application Data
20485 \backslash
20486 Subversion
20487 \backslash
20488 config
20489 \end_layout
20490
20491 \end_inset
20492
20493  / 
20494 \begin_inset Flex Code
20495 status collapsed
20496
20497 \begin_layout Plain Layout
20498 AppData
20499 \backslash
20500 Roaming
20501 \backslash
20502 Subversion
20503 \end_layout
20504
20505 \end_inset
20506
20507 .
20508 \end_layout
20509
20510 \end_inset
20511
20512 , section [tunnels], setup ssh command, e.g.
20513  
20514 \begin_inset Flex Code
20515 status collapsed
20516
20517 \begin_layout Plain Layout
20518 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20519 \end_layout
20520
20521 \end_inset
20522
20523 .
20524 \begin_inset Foot
20525 status collapsed
20526
20527 \begin_layout Plain Layout
20528 It will usually take a lot of time to get exact command right and it depends
20529  on many things.
20530  For example do not have some remote server saved as a default session in
20531  Putty etc.
20532  If things fail, try to connect via plink without SVN first.
20533 \end_layout
20534
20535 \end_inset
20536
20537
20538 \end_layout
20539
20540 \end_deeper
20541 \begin_layout Enumerate
20542 Checkout the SVN archive, e.g.
20543  
20544 \begin_inset Flex Code
20545 status collapsed
20546
20547 \begin_layout Plain Layout
20548 svn co svn+ssh://user@server/repository_path
20549 \end_layout
20550
20551 \end_inset
20552
20553 .
20554 \end_layout
20555
20556 \begin_layout Subsubsection
20557 End-of-Line Conversions
20558 \end_layout
20559
20560 \begin_layout Standard
20561 When the collsraborators are mixing Linux and Windows environments, LyX
20562  will use different line endings inside the .lyx files.
20563  This is not a problem as far as LyX functionality is concerned, but the
20564  commit diffs will be huge and merge-conflicts prone.
20565  Fortunately SVN itself knows
20566 \begin_inset Foot
20567 status collapsed
20568
20569 \begin_layout Plain Layout
20570 \begin_inset Flex URL
20571 status collapsed
20572
20573 \begin_layout Plain Layout
20574
20575 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20576 \end_layout
20577
20578 \end_inset
20579
20580
20581 \end_layout
20582
20583 \end_inset
20584
20585  how to deal with CR/LF problems when switching .lyx files to the 
20586 \begin_inset Flex Code
20587 status collapsed
20588
20589 \begin_layout Plain Layout
20590 native
20591 \end_layout
20592
20593 \end_inset
20594
20595  mode.
20596 \begin_inset Foot
20597 status collapsed
20598
20599 \begin_layout Plain Layout
20600 For the lazy guys: 
20601 \begin_inset Flex Code
20602 status collapsed
20603
20604 \begin_layout Plain Layout
20605 svn propset svn:eol-style native FILE_NAME
20606 \end_layout
20607
20608 \end_inset
20609
20610
20611 \end_layout
20612
20613 \end_inset
20614
20615
20616 \end_layout
20617
20618 \begin_layout Subsection
20619 Further tuning
20620 \end_layout
20621
20622 \begin_layout Standard
20623 With the recent addition of the vc-command function LyX power users are
20624  allowed to create their own commands for revision control.
20625 \end_layout
20626
20627 \begin_layout Standard
20628 As an example you can see how two TortoiseSVN commands could be integrated
20629  directly:
20630 \end_layout
20631
20632 \begin_layout Description
20633 Commit: 
20634 \begin_inset Flex Code
20635 status collapsed
20636
20637 \begin_layout Plain Layout
20638 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20639 \end_layout
20640
20641 \end_inset
20642
20643
20644 \end_layout
20645
20646 \begin_layout Description
20647 Revert: 
20648 \begin_inset Flex Code
20649 status collapsed
20650
20651 \begin_layout Plain Layout
20652 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20653 \end_layout
20654
20655 \end_inset
20656
20657
20658 \end_layout
20659
20660 \begin_layout Subsection
20661 Version control and Document comparison
20662 \end_layout
20663
20664 \begin_layout Standard
20665 One of the typical uses of version control is to inspect the changes between
20666  revisions, usually by creating 
20667 \begin_inset Flex Code
20668 status collapsed
20669
20670 \begin_layout Plain Layout
20671 diff
20672 \end_layout
20673
20674 \end_inset
20675
20676  dumps.
20677  While this is useful for plain text files, it is much less useful in the
20678  case of LyX files, which have more complicated structure.
20679  Hence we provide binding to the Document comparison feature.
20680  They are two ways of calling this feature - either by direct call of 
20681 \begin_inset Flex Code
20682 status collapsed
20683
20684 \begin_layout Plain Layout
20685 VC_COMPARE
20686 \end_layout
20687
20688 \end_inset
20689
20690  LyX function (for details see LyX functions manual) or by icon/menu item
20691  
20692 \begin_inset Flex MenuItem
20693 status collapsed
20694
20695 \begin_layout Plain Layout
20696 Compare with older revision...
20697 \end_layout
20698
20699 \end_inset
20700
20701 .
20702  One can either compare two chosen revisions of the document or he can simply
20703  compare the current version of edited text with older revisions (where
20704  '
20705 \begin_inset Flex MenuItem
20706 status collapsed
20707
20708 \begin_layout Plain Layout
20709 0
20710 \end_layout
20711
20712 \end_inset
20713
20714 ' revisions back means comparison of the edited file with last commited
20715  revision).
20716  
20717 \end_layout
20718
20719 \begin_layout Standard
20720 This feature is supported for SVN and RCS though due to the more complicated
20721  versioning scheme of RCS there is a constraint -- when addressing the revisions
20722  in dialog, numbers always point to the last number in RCS revision number,
20723  i.e.
20724  '35' in '1.2.35'.
20725 \end_layout
20726
20727 \begin_layout Section
20728 Literate Programming
20729 \end_layout
20730
20731 \begin_layout Standard
20732 Updated by 
20733 \noun on
20734 Kayvan Sylvan 
20735 \noun default
20736 (kayvan@sylvan.com)
20737 \noun on
20738
20739 \noun default
20740 original documentation written by 
20741 \noun on
20742 Edmar Wienskoski Jr.
20743
20744 \noun default
20745  (edmar-w-jr@technologist.com)
20746 \end_layout
20747
20748 \begin_layout Subsection
20749 Introduction
20750 \end_layout
20751
20752 \begin_layout Standard
20753 The main purpose of this documentation is to show you how to use LyX for
20754  literate programming, where it is assumed that you are familiar with this
20755  programming technique, and know what 
20756 \begin_inset Quotes eld
20757 \end_inset
20758
20759 tangling
20760 \begin_inset Quotes erd
20761 \end_inset
20762
20763  and 
20764 \begin_inset Quotes eld
20765 \end_inset
20766
20767 weaving
20768 \begin_inset Quotes erd
20769 \end_inset
20770
20771  means.
20772  If that is not the case, please follow the web links provided in the following
20773  sections.
20774  There is a lot of good documentation out there covering old development
20775  history to the latest tools tips.
20776 \end_layout
20777
20778 \begin_layout Standard
20779 It is also assumed that you are familiar with LyX itself to a point that
20780  you are comfortable changing your LyX preferences, and X resources file.
20781  If that is not the case please refer to other LyX documentation to cover
20782  your specific needs.
20783 \end_layout
20784
20785 \begin_layout Subsection
20786 Literate Programming
20787 \end_layout
20788
20789 \begin_layout Standard
20790 From the Literate Programming FAQ: 
20791 \end_layout
20792
20793 \begin_layout Quotation
20794 Literate programming is the combination of documentation and source together
20795  in a fashion suited for reading by human beings.
20796  In fact, literate programs should be enjoyable reading, even inviting!
20797  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20798  and documentation in a single file.
20799  Literate programming tools then parse the file to produce either readable
20800  documentation or compilable source.
20801  The WEB style of literate programming was created by D.
20802 \begin_inset space \thinspace{}
20803 \end_inset
20804
20805 E.
20806  Knuth during the development of his TeX typesetting software.
20807  
20808 \end_layout
20809
20810 \begin_layout Standard
20811 Another excerpt says:
20812 \end_layout
20813
20814 \begin_layout Quotation
20815
20816 \emph on
20817 How is literate programming different from verbose commenting?
20818 \end_layout
20819
20820 \begin_layout Quotation
20821 There are three distinguishing characteristics.
20822  In order of importance, they are: 
20823 \end_layout
20824
20825 \begin_deeper
20826 \begin_layout Itemize
20827 flexible order of elaboration 
20828 \end_layout
20829
20830 \begin_layout Itemize
20831 automatic support for browsing 
20832 \end_layout
20833
20834 \begin_layout Itemize
20835 typeset documentation, especially diagrams and mathematics 
20836 \end_layout
20837
20838 \end_deeper
20839 \begin_layout Standard
20840 Now that I sparked your curiosity, take a look in the references.
20841 \end_layout
20842
20843 \begin_layout Subsubsection
20844 References
20845 \end_layout
20846
20847 \begin_layout Standard
20848 The complete Literate Programming FAQ can be found at:
20849 \end_layout
20850
20851 \begin_layout Quote
20852 Literate Programming FAQ 
20853 \begin_inset Flex URL
20854 status collapsed
20855
20856 \begin_layout Plain Layout
20857
20858 http://www.literateprogramming.com/lpfaq.pdf
20859 \end_layout
20860
20861 \end_inset
20862
20863
20864 \end_layout
20865
20866 \begin_layout Standard
20867 The FAQ lists 23 (twenty three!) different literate programming tools.
20868  Where some are specialized or 
20869 \begin_inset Quotes eld
20870 \end_inset
20871
20872 tailored
20873 \begin_inset Quotes erd
20874 \end_inset
20875
20876  for particular programming languages, while other have general scope.
20877  I selected 
20878 \noun on
20879 Noweb
20880 \noun default
20881  for my own use for several reasons:
20882 \end_layout
20883
20884 \begin_layout Itemize
20885 It can generate the documentation either in LaTeX or HTML.
20886 \end_layout
20887
20888 \begin_layout Itemize
20889 It has a open architecture, i.
20890 \begin_inset space \thinspace{}
20891 \end_inset
20892
20893 g.
20894 \begin_inset space \space{}
20895 \end_inset
20896
20897 it is easy to plug in new filters and to perform special processing that
20898  you may need.
20899  
20900 \end_layout
20901
20902 \begin_layout Itemize
20903 There is a good selection of filters available already (the HTML is one
20904  of them).
20905 \end_layout
20906
20907 \begin_layout Itemize
20908 It is free.
20909 \end_layout
20910
20911 \begin_layout Standard
20912 The Noweb web page can be found at: 
20913 \end_layout
20914
20915 \begin_layout Quote
20916 Noweb home page 
20917 \begin_inset Flex URL
20918 status collapsed
20919
20920 \begin_layout Plain Layout
20921
20922 http://www.cs.virginia.edu/~nr/noweb/
20923 \end_layout
20924
20925 \end_inset
20926
20927
20928 \end_layout
20929
20930 \begin_layout Standard
20931 Starting from there you can reach many other interesting links and even
20932  some literate program examples.
20933 \end_layout
20934
20935 \begin_layout Subsection
20936 LyX and Literate Programming
20937 \end_layout
20938
20939 \begin_layout Standard
20940 The LyX support for Literate Programming is provided by using the generic
20941  LyX converters mechanism.
20942  This support is provided in a 
20943 \begin_inset Quotes eld
20944 \end_inset
20945
20946 Noweb independent
20947 \begin_inset Quotes erd
20948 \end_inset
20949
20950  way, i.
20951 \begin_inset space \thinspace{}
20952 \end_inset
20953
20954 g.
20955 \begin_inset space \space{}
20956 \end_inset
20957
20958 you will be able to use this new LyX feature with some other literate programmin
20959 g tool of your choice by just changing your LyX preferences.
20960 \end_layout
20961
20962 \begin_layout Subsubsection
20963 Generating documents and code (weaving and tangling)
20964 \end_layout
20965
20966 \begin_layout Paragraph
20967 Selecting the document class
20968 \end_layout
20969
20970 \begin_layout Standard
20971 If you have installed Noweb and LyX successfully, whenever you open a new
20972  document or try to change the document class of an existing one, you will
20973  find that there are three new document classes available:
20974 \end_layout
20975
20976 \begin_layout Itemize
20977 Article (Noweb)
20978 \end_layout
20979
20980 \begin_layout Itemize
20981 Book (Noweb)
20982 \end_layout
20983
20984 \begin_layout Itemize
20985 Report (Noweb)
20986 \end_layout
20987
20988 \begin_layout Standard
20989 You must select one of them to create your literate documents from.
20990  
20991 \end_layout
20992
20993 \begin_layout Standard
20994 Note that literate documents are not limited to these three classes.
20995  New classes can be generated from other styles like letter or in combination
20996  with other class variations like Article (AMS).
20997  If you have special needs that cannot be covered by one of the existing
20998  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20999  will arrange to insert a new entry, or teach you how to do it.
21000 \begin_inset Foot
21001 status collapsed
21002
21003 \begin_layout Plain Layout
21004 It is very simple, it involves the creation of a file with four lines, and
21005  re-running of the auto configuration.
21006 \end_layout
21007
21008 \end_inset
21009
21010  Moreover, if you use a literate tool other than Noweb you may need to create
21011  a new set of document classes for it.
21012 \end_layout
21013
21014 \begin_layout Paragraph
21015 Typing code in
21016 \end_layout
21017
21018 \begin_layout Standard
21019 LyX enables you to write code with a layout named 
21020 \noun on
21021 Scrap
21022 \noun default
21023 .
21024 \begin_inset Foot
21025 status collapsed
21026
21027 \begin_layout Plain Layout
21028 The equivalent Noweb term is 
21029 \begin_inset Quotes eld
21030 \end_inset
21031
21032 Chunk
21033 \begin_inset Quotes erd
21034 \end_inset
21035
21036 .
21037  For historical reasons, I got used to the term 
21038 \begin_inset Quotes eld
21039 \end_inset
21040
21041 scrap
21042 \begin_inset Quotes erd
21043 \end_inset
21044
21045  introduced by other literate tool named Nuweb, which I used for many years
21046  before rendering myself to Noweb.
21047 \end_layout
21048
21049 \end_inset
21050
21051  Noweb delimits scraps like this:
21052 \end_layout
21053
21054 \begin_layout LyX-Code
21055 <<My scrap>>=
21056 \end_layout
21057
21058 \begin_layout LyX-Code
21059   code
21060 \end_layout
21061
21062 \begin_layout LyX-Code
21063   more code
21064 \end_layout
21065
21066 \begin_layout LyX-Code
21067   even more code
21068 \end_layout
21069
21070 \begin_layout LyX-Code
21071   @
21072 \end_layout
21073
21074 \begin_layout Standard
21075 The problem is that whatever is written in between the << and the 
21076 \family typewriter
21077 @
21078 \family default
21079  must be taken literally, i.
21080 \begin_inset space \thinspace{}
21081 \end_inset
21082
21083 g.
21084 \begin_inset space \space{}
21085 \end_inset
21086
21087 LyX should be prevented from making any special interpretation of what has
21088  been written.
21089  This is handled by a special layout named Scrap, that works like a normal
21090  paragraph but has a free spacing capability.
21091 \end_layout
21092
21093 \begin_layout Standard
21094 The down side of the Scrap paragraph layout is that consecutive paragraphs
21095  of code will be spaced with one empty line in the source code and also
21096  in the printed documentation.
21097  The work around is to enter each line of code within a single Scrap, with
21098  a newline (ctrl-return).
21099  The example above will look like this:
21100 \begin_inset Foot
21101 status collapsed
21102
21103 \begin_layout Plain Layout
21104 If you have a printed version of this document you will not see any difference
21105  between the previous example and this one.
21106 \end_layout
21107
21108 \end_inset
21109
21110
21111 \end_layout
21112
21113 \begin_layout LyX-Code
21114 <<My scrap>>=
21115 \begin_inset Newline newline
21116 \end_inset
21117
21118   code
21119 \begin_inset Newline newline
21120 \end_inset
21121
21122   more code
21123 \begin_inset Newline newline
21124 \end_inset
21125
21126   even more code
21127 \begin_inset Newline newline
21128 \end_inset
21129
21130   @
21131 \end_layout
21132
21133 \begin_layout Standard
21134 This layout works fine.
21135  The only real inconvenience is that you have to type ctrl-return instead
21136  of a plain return.
21137 \begin_inset Foot
21138 status collapsed
21139
21140 \begin_layout Plain Layout
21141 It is in my list of 
21142 \begin_inset Quotes eld
21143 \end_inset
21144
21145 improvements
21146 \begin_inset Quotes erd
21147 \end_inset
21148
21149  to fix that.
21150 \end_layout
21151
21152 \end_inset
21153
21154
21155 \end_layout
21156
21157 \begin_layout Standard
21158 As a special note, you can also use the 
21159 \begin_inset Quotes eld
21160 \end_inset
21161
21162 %def
21163 \begin_inset Quotes erd
21164 \end_inset
21165
21166  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21167 rence:
21168 \end_layout
21169
21170 \begin_layout LyX-Code
21171 <<My scrap>>=
21172 \begin_inset Newline newline
21173 \end_inset
21174
21175   def some_function(args):
21176 \begin_inset Newline newline
21177 \end_inset
21178
21179     "This is the doc string for this function."
21180 \begin_inset Newline newline
21181 \end_inset
21182
21183     print "My args: ", args
21184 \end_layout
21185
21186 \begin_layout LyX-Code
21187 @ %def some_function
21188 \end_layout
21189
21190 \begin_layout Standard
21191 For an example of this usage and the resulting cross-reference output, look
21192  at the Literate python program in 
21193 \emph on
21194 LIBDIR/examples/listerrors.lyx
21195 \emph default
21196  which should make this all clear.
21197 \end_layout
21198
21199 \begin_layout Paragraph
21200 Generating the documentation
21201 \end_layout
21202
21203 \begin_layout Standard
21204 At this point you already have a new document file with a proper document
21205  class, and with some code and text on it.
21206  How do I print it? The answer is simple, you select 
21207 \family sans
21208 View\SpecialChar \menuseparator
21209 DVI,
21210 \family default
21211  etc.
21212  Just like you would do for a plain document.
21213  No special procedure is required.
21214 \end_layout
21215
21216 \begin_layout Standard
21217 To help orientate you, I will now explain what happens inside LyX:
21218 \end_layout
21219
21220 \begin_layout Enumerate
21221 When the 
21222 \family sans
21223 Update\SpecialChar \menuseparator
21224 DVI
21225 \family default
21226  menu option is chosen, a LaTeX file is generated.
21227  
21228 \end_layout
21229
21230 \begin_deeper
21231 \begin_layout Standard
21232 If the document is of any literate class the generated file will be named
21233  with an extension name defined by the 
21234 \begin_inset Quotes eld
21235 \end_inset
21236
21237 literate
21238 \begin_inset Quotes erd
21239 \end_inset
21240
21241  format (defined in the Preferences panel), otherwise the file will have
21242  the usual 
21243 \family typewriter
21244 .tex
21245 \family default
21246  extension.
21247 \end_layout
21248
21249 \end_deeper
21250 \begin_layout Enumerate
21251 Note that the only difference so far is in the name of the file, no special
21252  processing is required by LyX.
21253  Given that you formatted the code using the Scrap layout that, by itself,
21254  takes care of the business.
21255 \end_layout
21256
21257 \begin_layout Enumerate
21258 If the document is of any literate class LyX will then use the internal
21259  LyX to Noweb converter, followed by the Noweb to LaTeX converter
21260 \begin_inset Foot
21261 status collapsed
21262
21263 \begin_layout Plain Layout
21264 The converters are defined in the 
21265 \family sans
21266 Tools\SpecialChar \menuseparator
21267 Preferences
21268 \family default
21269  panel, under the 
21270 \begin_inset Quotes eld
21271 \end_inset
21272
21273 Conversion
21274 \begin_inset Quotes erd
21275 \end_inset
21276
21277  tab.
21278  See section 
21279 \emph on
21280 Converters
21281 \emph default
21282  of the 
21283 \emph on
21284 Customization
21285 \emph default
21286  manual for general information about converters.
21287 \end_layout
21288
21289 \end_inset
21290
21291  to generate the LaTeX file.
21292 \end_layout
21293
21294 \begin_deeper
21295 \begin_layout Standard
21296 Otherwise it will just skip this step.
21297 \end_layout
21298
21299 \end_deeper
21300 \begin_layout Enumerate
21301 Finally, LaTeX is invoked and the regular post processing continues as in
21302  a plain document.
21303 \end_layout
21304
21305 \begin_layout Standard
21306 Independence from a particular 
21307 \begin_inset Quotes eld
21308 \end_inset
21309
21310 literate tool
21311 \begin_inset Quotes erd
21312 \end_inset
21313
21314  is easily achieved by changing the commands that are run by the various
21315  converters.
21316 \end_layout
21317
21318 \begin_layout Paragraph
21319 Generating the code
21320 \end_layout
21321
21322 \begin_layout Standard
21323 When the build menu option is chosen or the corresponding button in the
21324  toolbar is pressed, a LaTeX file is generated just like step 1 above.
21325  Next, LyX invokes the 
21326 \family typewriter
21327 Noweb->Program
21328 \family default
21329  converter.
21330  This converter needs to be defined by the user and is not installed by
21331  default, though the Program format is.
21332  This converter (like any other converter) will have two parts:
21333 \end_layout
21334
21335 \begin_layout Enumerate
21336 The converter program itself.
21337  This program performs the conversion from the one format to the other (in
21338  this case, from the Noweb format to the Program pseudo-format).
21339 \end_layout
21340
21341 \begin_layout Enumerate
21342 The error log parser.
21343  This is a program whose sole purpose is to rewrite error messages in a
21344  format that LyX understands.
21345  This makes it possible for LyX to place error boxes in the right places
21346  in the file buffer.
21347 \end_layout
21348
21349 \begin_layout Standard
21350 The first part, the 
21351 \begin_inset Quotes eld
21352 \end_inset
21353
21354 Converter
21355 \begin_inset Quotes erd
21356 \end_inset
21357
21358  setting, should be set to 
21359 \begin_inset Quotes eld
21360 \end_inset
21361
21362
21363 \family typewriter
21364 build-script $$i
21365 \family default
21366
21367 \begin_inset Quotes erd
21368 \end_inset
21369
21370 .
21371  This basically means that LyX will call 
21372 \begin_inset Quotes eld
21373 \end_inset
21374
21375 build-script
21376 \begin_inset Quotes erd
21377 \end_inset
21378
21379  (a program or script) with the name of the Noweb file (normally a file
21380  in the LyX temp directory).
21381  
21382 \end_layout
21383
21384 \begin_layout Standard
21385 This is an implementation of 
21386 \begin_inset Quotes eld
21387 \end_inset
21388
21389 build-script
21390 \begin_inset Quotes erd
21391 \end_inset
21392
21393  that you can place in a directory on your path:
21394 \end_layout
21395
21396 \begin_layout LyX-Code
21397 #!/bin/sh
21398 \end_layout
21399
21400 \begin_layout LyX-Code
21401 #
21402 \end_layout
21403
21404 \begin_layout LyX-Code
21405 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21406 \end_layout
21407
21408 \begin_layout Standard
21409 The next part of the converter setting is the 
21410 \begin_inset Quotes eld
21411 \end_inset
21412
21413 Flags
21414 \begin_inset Quotes erd
21415 \end_inset
21416
21417  which is to be set to 
21418 \begin_inset Quotes eld
21419 \end_inset
21420
21421
21422 \family typewriter
21423 parselog=listerrors
21424 \family default
21425
21426 \begin_inset Quotes erd
21427 \end_inset
21428
21429 .
21430  This will run any errors that are generated by the 
21431 \begin_inset Quotes eld
21432 \end_inset
21433
21434 build-script
21435 \begin_inset Quotes erd
21436 \end_inset
21437
21438  process through the 
21439 \begin_inset Quotes eld
21440 \end_inset
21441
21442 listerrors
21443 \begin_inset Quotes erd
21444 \end_inset
21445
21446  program.
21447 \end_layout
21448
21449 \begin_layout Standard
21450 The converter code looks in 
21451 \emph on
21452 MYLYXDIR/scripts
21453 \emph default
21454  first, then in 
21455 \emph on
21456 LIBDIR/scripts
21457 \emph default
21458  then on the path for the 
21459 \begin_inset Quotes eld
21460 \end_inset
21461
21462 listerrors
21463 \begin_inset Quotes erd
21464 \end_inset
21465
21466  program.
21467 \end_layout
21468
21469 \begin_layout Standard
21470 The build will normally take place in LyX's temporary directory, so the
21471  files produced by the conversion will be in that directory.
21472  LyX will copy out what it regards as the `main' file, but the 
21473 \family typewriter
21474 Noweb->Program
21475 \family default
21476  conversion may produce several files, and so most of these would then be
21477  deleted when LyX was closed.
21478  The present solution is to use a `copier',
21479 \begin_inset Foot
21480 status collapsed
21481
21482 \begin_layout Plain Layout
21483 See section 
21484 \emph on
21485 Copiers
21486 \emph default
21487  of the 
21488 \emph on
21489 Customization
21490 \emph default
21491  manual for information on these.
21492 \end_layout
21493
21494 \end_inset
21495
21496  in this case, the 
21497 \family typewriter
21498 ext_copy.py
21499 \family default
21500  script in its default mode, so that the entire contents of the temporary
21501  directory is copied.
21502  More will get copied than is needed, to be sure, but nothing will be lost.
21503  If, however, you know what extensions the generated files will have, this
21504  can be improved by using the 
21505 \family typewriter
21506 -e
21507 \family default
21508  option to 
21509 \family typewriter
21510 ext_copy
21511 \family default
21512 .
21513  This option takes a comma-separated list of extensions to copy.
21514  So, for example, if the conversion will generate only files with the extensions
21515  
21516 \family typewriter
21517 .c
21518 \family default
21519  and 
21520 \family typewriter
21521 .h
21522 \family default
21523 , then the correct definition would be:
21524 \end_layout
21525
21526 \begin_layout LyX-Code
21527 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21528 \end_layout
21529
21530 \begin_layout Standard
21531 The result will be that only files with these two extensions will be copied
21532  out.
21533 \end_layout
21534
21535 \begin_layout Paragraph
21536 Build instructions in the document
21537 \end_layout
21538
21539 \begin_layout Standard
21540 The last piece of the integration between LyX and noweb is the 
21541 \begin_inset Quotes eld
21542 \end_inset
21543
21544 build-script
21545 \begin_inset Quotes erd
21546 \end_inset
21547
21548  scrap.
21549  Generally, the instructions for building your program should be embedded
21550  in a scrap of its own.
21551  The noweb-specific 
21552 \begin_inset Quotes eld
21553 \end_inset
21554
21555 build-script
21556 \begin_inset Quotes erd
21557 \end_inset
21558
21559  above uses the notangle command to look for this scrap (called 
21560 \begin_inset Quotes eld
21561 \end_inset
21562
21563 build-script
21564 \begin_inset Quotes erd
21565 \end_inset
21566
21567 ) and runs its contents through 
21568 \begin_inset Quotes eld
21569 \end_inset
21570
21571 sh
21572 \begin_inset Quotes erd
21573 \end_inset
21574
21575 .
21576 \end_layout
21577
21578 \begin_layout Standard
21579 Typically, such a scrap would look something like this:
21580 \end_layout
21581
21582 \begin_layout LyX-Code
21583 <<build-script>>=
21584 \begin_inset Newline newline
21585 \end_inset
21586
21587 #!/bin/sh
21588 \begin_inset Newline newline
21589 \end_inset
21590
21591
21592 \begin_inset Newline newline
21593 \end_inset
21594
21595 if [ -z "${NOWEB_SOURCE}" ]
21596 \begin_inset Newline newline
21597 \end_inset
21598
21599 then
21600 \begin_inset Newline newline
21601 \end_inset
21602
21603   NOWEB_SOURCE=myfile.nw
21604 \begin_inset Newline newline
21605 \end_inset
21606
21607 fi
21608 \begin_inset Newline newline
21609 \end_inset
21610
21611 [...
21612  code to extract files ...]
21613 \begin_inset Newline newline
21614 \end_inset
21615
21616 [...
21617  code to compile files ...]
21618 \begin_inset Newline newline
21619 \end_inset
21620
21621 @
21622 \end_layout
21623
21624 \begin_layout Standard
21625 Look in 
21626 \emph on
21627 LIBDIR/examples/listerrors.lyx
21628 \emph default
21629  or in 
21630 \emph on
21631 LIBDIR/examples/Literate.lyx
21632 \emph default
21633  which implement two versions of the 
21634 \begin_inset Quotes eld
21635 \end_inset
21636
21637 listerrors
21638 \begin_inset Quotes erd
21639 \end_inset
21640
21641  program for some illustrations of how all of these pieces go together or
21642  in 
21643 \emph on
21644 LIBDIR/examples/noweb2lyx.lyx.
21645
21646 \emph default
21647  Interestingly, these three files show off the language-indepence of the
21648  LyX literate programming support since they are written in Python, C and
21649  Perl respectively.
21650 \end_layout
21651
21652 \begin_layout Subsubsection
21653 Configuring LyX
21654 \end_layout
21655
21656 \begin_layout Standard
21657 All the Literate Programming support is configured by the 
21658 \family sans
21659 Tools\SpecialChar \menuseparator
21660 Preferences
21661 \family default
21662  panel in the 
21663 \begin_inset Quotes eld
21664 \end_inset
21665
21666 Conversion
21667 \begin_inset Quotes erd
21668 \end_inset
21669
21670  tab.
21671  The important parts are:
21672 \end_layout
21673
21674 \begin_layout Description
21675 the
21676 \begin_inset space ~
21677 \end_inset
21678
21679
21680 \begin_inset Quotes eld
21681 \end_inset
21682
21683 literate
21684 \begin_inset Quotes erd
21685 \end_inset
21686
21687
21688 \begin_inset space ~
21689 \end_inset
21690
21691 format Set up via the Formats tab, this is where the Noweb-specific pieces
21692  are set up.
21693  The 
21694 \family sans
21695 GUI Name
21696 \family default
21697  is set to 
21698 \family typewriter
21699 NoWeb
21700 \family default
21701 , the file extension is set to 
21702 \family typewriter
21703 .nw
21704 \family default
21705 .
21706  This tells LyX to create a file with a 
21707 \family typewriter
21708 .nw
21709 \family default
21710  extension in the first step of the conversion process.
21711 \end_layout
21712
21713 \begin_layout Description
21714 the
21715 \begin_inset space ~
21716 \end_inset
21717
21718
21719 \family sans
21720 Program
21721 \family default
21722
21723 \begin_inset space ~
21724 \end_inset
21725
21726 format This is an empty format whose sole purpose is to be the endpoint
21727  of a conversion (which then allows us to set up a converter for it).
21728 \end_layout
21729
21730 \begin_layout Description
21731
21732 \family sans
21733 NoWeb
21734 \family default
21735 ->
21736 \family sans
21737 LaTeX
21738 \family default
21739  This converter performs the 
21740 \begin_inset Quotes eld
21741 \end_inset
21742
21743 weaving
21744 \begin_inset Quotes erd
21745 \end_inset
21746
21747  of the literate document.
21748  For Noweb, it is set to 
21749 \begin_inset Quotes eld
21750 \end_inset
21751
21752
21753 \family typewriter
21754 noweave -delay -index $$i > $$o
21755 \family default
21756
21757 \begin_inset Quotes erd
21758 \end_inset
21759
21760
21761 \end_layout
21762
21763 \begin_layout Description
21764
21765 \family sans
21766 NoWeb
21767 \family default
21768 ->
21769 \family sans
21770 Program
21771 \family default
21772  This performs the 
21773 \begin_inset Quotes eld
21774 \end_inset
21775
21776 tangling step
21777 \begin_inset Quotes erd
21778 \end_inset
21779
21780 .
21781  As stated above, the Converter is set to 
21782 \begin_inset Quotes eld
21783 \end_inset
21784
21785
21786 \family typewriter
21787 build-script $$i
21788 \family default
21789
21790 \begin_inset Quotes erd
21791 \end_inset
21792
21793 , with Flags set to 
21794 \begin_inset Quotes eld
21795 \end_inset
21796
21797
21798 \family typewriter
21799 originaldir,parselog=listerrors
21800 \family default
21801
21802 \begin_inset Quotes erd
21803 \end_inset
21804
21805 .
21806 \end_layout
21807
21808 \begin_layout Subsubsection
21809 Debug extensions
21810 \end_layout
21811
21812 \begin_layout Standard
21813 There is also a new function implemented in the LyX server, the 
21814 \begin_inset Quotes eld
21815 \end_inset
21816
21817 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21818  
21819 \end_layout
21820
21821 \begin_layout Standard
21822 When debugging code with ddd/gdb, it is possible to invoke a text editor
21823  at the current execution position with a single key stroke.
21824  The default ddd configuration for that is shift-ctrl-V.
21825  It happens that you can define the editor command line invocation in ddd
21826  by accessing the 
21827 \family sans
21828 Edit\SpecialChar \menuseparator
21829 Preferences\SpecialChar \menuseparator
21830 Helpers
21831 \family default
21832  dialog and changing the "Edit Sources" entry.
21833 \end_layout
21834
21835 \begin_layout Standard
21836 I take advantage of the new created LyX server function and this ddd feature,
21837  and set 
21838 \begin_inset Quotes eld
21839 \end_inset
21840
21841 Edit Sources
21842 \begin_inset Quotes erd
21843 \end_inset
21844
21845  to:
21846 \end_layout
21847
21848 \begin_layout LyX-Code
21849 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21850 \end_layout
21851
21852 \begin_layout Standard
21853 With this, whenever you are using ddd and find a point in the program that
21854  you want to edit, you just press shift-ctrl-V (in the ddd window), and
21855  ddd you forward this information to LyX through the LyX server and then
21856  the LyX window will show the same file with the cursor at the same position
21857  ddd was pointing to.
21858  No more guessing or long scrolling to locate a point in the program back
21859  from debugging !
21860 \end_layout
21861
21862 \begin_layout Standard
21863 Note however that you must enable the LyX server to get this feature working
21864  (it is disabled by default).
21865  You can enable it in 
21866 \family sans
21867 Preferences
21868 \family default
21869  (tabs 
21870 \family sans
21871 Inputs
21872 \family default
21873
21874 \family sans
21875 Paths
21876 \family default
21877 ) by entering in the 
21878 \family sans
21879 LyXserver pipe
21880 \family default
21881  a path like 
21882 \begin_inset Quotes eld
21883 \end_inset
21884
21885
21886 \family typewriter
21887 /home/<your-home-directory>/.lyx/lyxpipe
21888 \family default
21889
21890 \begin_inset Quotes erd
21891 \end_inset
21892
21893
21894 \end_layout
21895
21896 \begin_layout Standard
21897 Read the LyX server documentation in the 
21898 \emph on
21899 Customization Manual
21900 \emph default
21901  for further information.
21902 \end_layout
21903
21904 \begin_layout Subsubsection
21905 Toolbar extensions
21906 \end_layout
21907
21908 \begin_layout Standard
21909 There are six new buttons that can be added to your LyX toolbar.
21910  Five of these buttons are short cuts to layout styles: 
21911 \family sans
21912 Standard
21913 \family default
21914
21915 \family sans
21916 Section
21917 \family default
21918
21919 \family sans
21920 LaTeX
21921 \family default
21922
21923 \family sans
21924 LyX-Code
21925 \family default
21926 , and 
21927 \family sans
21928 Scrap
21929 \family default
21930 .
21931  The last one is a short cut to the 
21932 \begin_inset Quotes eld
21933 \end_inset
21934
21935 Build Program
21936 \begin_inset Quotes erd
21937 \end_inset
21938
21939  File menu entry.
21940  
21941 \end_layout
21942
21943 \begin_layout Standard
21944 LyX has a range of buttons that are available for tool bar customization.
21945  In my toolbar I like to combine the six short cuts above with two more:
21946  One for 
21947 \family sans
21948 View
21949 \family default
21950 \SpecialChar \menuseparator
21951
21952 \family sans
21953 Update
21954 \family default
21955 \SpecialChar \menuseparator
21956
21957 \family sans
21958 DVI
21959 \family default
21960  and the other for 
21961 \family sans
21962 View\SpecialChar \menuseparator
21963 DVI
21964 \family default
21965  File menu entries.
21966  Here is how it looks like:
21967 \end_layout
21968
21969 \begin_layout LyX-Code
21970 Toolbar
21971 \end_layout
21972
21973 \begin_layout LyX-Code
21974   Layouts
21975 \end_layout
21976
21977 \begin_layout LyX-Code
21978   Icon "layout Standard"
21979 \end_layout
21980
21981 \begin_layout LyX-Code
21982   Icon "layout Section"
21983 \end_layout
21984
21985 \begin_layout LyX-Code
21986   Icon "layout LaTeX"
21987 \end_layout
21988
21989 \begin_layout LyX-Code
21990   Icon "layout LyX-Code"
21991 \end_layout
21992
21993 \begin_layout LyX-Code
21994   Icon "layout Scrap"
21995 \end_layout
21996
21997 \begin_layout LyX-Code
21998   Separator
21999 \end_layout
22000
22001 \begin_layout LyX-Code
22002   Icon "buffer-view"
22003 \end_layout
22004
22005 \begin_layout LyX-Code
22006   Icon "buffer-typeset"
22007 \end_layout
22008
22009 \begin_layout LyX-Code
22010   Icon "build-program"
22011 \end_layout
22012
22013 \begin_layout LyX-Code
22014   Separator
22015 \end_layout
22016
22017 \begin_layout LyX-Code
22018 .
22019 \end_layout
22020
22021 \begin_layout LyX-Code
22022 .
22023 \end_layout
22024
22025 \begin_layout LyX-Code
22026 .
22027 \end_layout
22028
22029 \begin_layout LyX-Code
22030 End
22031 \end_layout
22032
22033 \begin_layout Subsubsection
22034 Colors customization
22035 \end_layout
22036
22037 \begin_layout Standard
22038 There are a number of colors in LyX that can be customized in 
22039 \family sans
22040 Preferences
22041 \family default
22042 .
22043  One of the things that bothers people is the LaTeX font color.
22044  The default color is red, since the scraps uses LaTeX font, and there is
22045  a lot of scraps in literate documents, you may get tired of seeing everything
22046  in red.
22047  You can change it by going to the tabs 
22048 \family sans
22049 Look&Feel
22050 \family default
22051
22052 \family sans
22053 Colors.
22054 \end_layout
22055
22056 \begin_layout Standard
22057 The next thing is the visible presence of the newline character in the screen.
22058  You can choose the color of this particular character and make it blend
22059  in the background.
22060  I recommend you choosing a color that is close to the background but not
22061  equal, that way you still can see it is there, but it is not bothering
22062  you anymore.
22063  
22064 \end_layout
22065
22066 \begin_layout Chapter
22067 Secrets of the LaTeX Masters
22068 \begin_inset CommandInset label
22069 LatexCommand label
22070 name "cha:secrets"
22071
22072 \end_inset
22073
22074
22075 \end_layout
22076
22077 \begin_layout Standard
22078 Though LyX is a powerful tool, it cannot hope to support everything that
22079  can be done with pure TeX/LaTeX.
22080  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22081  as long as you are not afraid to use that 
22082 \begin_inset Quotes eld
22083 \end_inset
22084
22085 TeX
22086 \begin_inset Quotes erd
22087 \end_inset
22088
22089  button on the toolbar or add things to the LaTeX preamble.
22090  This section lists some tips, tricks, and otherwise cool ideas to give
22091  your document that extra little flair.
22092  
22093 \emph on
22094 Do try this at home
22095 \emph default
22096 , just start with something a little smaller and less important than your
22097  dissertation!
22098 \end_layout
22099
22100 \begin_layout Standard
22101 Most ideas in this section require less common files in your LaTeX installation.
22102  If you have a system like TeXLive, most will already be available.
22103  A few, however, will need to be downloaded from one of the CTAN archives.
22104  Often, there are several ways to do something, or several LaTeX style files
22105  which do the same thing.
22106  We do not endorse one choice over another, we simply claim that we have
22107  done a particular task with a particular file.
22108  Put on your wizard hat, keep an eye out for dragons, and let us begin.
22109 \end_layout
22110
22111 \begin_layout Section
22112 Multiple Columns
22113 \end_layout
22114
22115 \begin_layout Standard
22116 by 
22117 \noun on
22118 Lars Gullik Bjønnes
22119 \end_layout
22120
22121 \begin_layout Subsection
22122 Purpose
22123 \end_layout
22124
22125 \begin_layout Standard
22126 The aim for this chapter
22127 \begin_inset Foot
22128 status collapsed
22129
22130 \begin_layout Plain Layout
22131 Editor's note: Lars' original chapter was a masterful description of how
22132  to use the 
22133 \family typewriter
22134 multicol
22135 \family default
22136  package.
22137  However, it was too long to flow smoothly in this document.
22138  I have therefore chosen to excerpt the most important sections here (sorry,
22139  Lars); you can read the original chapter (and more of the story!) in the
22140  example file 
22141 \family typewriter
22142 examples/multicol.lyx
22143 \family default
22144 .
22145  — mer
22146 \end_layout
22147
22148 \end_inset
22149
22150  is to show how the LaTeX package 
22151 \family typewriter
22152 multicol
22153 \family default
22154  can be used in a LyX document.
22155  As LyX doesn't support the 
22156 \family typewriter
22157 multicol
22158 \family default
22159  package natively yet, we have to use some small hacks.
22160  By reading this section it should be obvious how to do this.
22161 \end_layout
22162
22163 \begin_layout Subsection
22164 Limitations 
22165 \end_layout
22166
22167 \begin_layout Standard
22168 The 
22169 \family typewriter
22170 multicol
22171 \family default
22172  package allows switching between one and multicolumn format on the same
22173  page.
22174  Footnotes are handled correctly (for the most part), but will be placed
22175  at the bottom of the page and not under each column.
22176  LaTeX's float mechanism, however, is partly disabled in the current implementat
22177 ion.
22178  At the moment only page-wide floats can be used within the scope of the
22179  environment.
22180 \end_layout
22181
22182 \begin_layout Subsection
22183 Examples
22184 \end_layout
22185
22186 \begin_layout Subsubsection
22187 Two columns
22188 \end_layout
22189
22190 \begin_layout Standard
22191 If you want to have two columns in your text, you have use LaTeX mode to
22192  insert 
22193 \family typewriter
22194
22195 \backslash
22196 begin{multicols}{2}
22197 \family default
22198  at the point where you want the two column layout to start, and then 
22199 \family typewriter
22200
22201 \backslash
22202 end{multicols}
22203 \family default
22204  where you want it to end.
22205  Like this:
22206 \end_layout
22207
22208 \begin_layout Standard
22209 \begin_inset ERT
22210 status open
22211
22212 \begin_layout Plain Layout
22213
22214
22215 \backslash
22216 begin{multicols}{2}
22217 \end_layout
22218
22219 \end_inset
22220
22221
22222 \end_layout
22223
22224 \begin_layout Standard
22225 \noindent
22226
22227 \series bold
22228 \size small
22229 The Adventure of the Empty House
22230 \series default
22231
22232 \begin_inset Newline newline
22233 \end_inset
22234
22235 by 
22236 \noun on
22237 Sir Arthur Conan Doyle
22238 \end_layout
22239
22240 \begin_layout Standard
22241
22242 \size small
22243 It was in the spring of the year 1894 that all London was interested, and
22244  the fashionable world dismayed, by the murder of the Honourable Ronald
22245  Adair under most unusual and inexplicable circumstances.
22246  The public has already learned those particulars of the crime which came
22247  out in the police investigation, but a good deal was suppressed upon that
22248  occasion, since the case for the prosecution was so overwhelmingly strong
22249  that it was not necessary to bring forward all the facts.
22250  Only now, at the end of nearly ten years, am I allowed to supply those
22251  missing links which make up the whole of that remarkable chain.
22252  The crime was of interest in itself, but that interest was as nothing to
22253  me compared to the inconceivable sequel, which afforded me the greatest
22254  shock and surprise of any event in my adventurous life.
22255  Even now, after this long interval, I find myself thrilling as I think
22256  of it, and feeling once more that sudden flood of joy, amazement, and increduli
22257 ty which utterly submerged my mind.
22258  Let me say to that public, which has shown some interest in those glimpses
22259  which I have occasionally given them of the thoughts and actions of a very
22260  remarkable man, that they are not to blame me if I have not shared my knowledge
22261  with them, for I should have considered it my first duty to do so, had
22262  I not been barred by a positive prohibition from his own lips, which was
22263  only withdrawn upon the third of last month.
22264 \end_layout
22265
22266 \begin_layout Standard
22267 \begin_inset ERT
22268 status open
22269
22270 \begin_layout Plain Layout
22271
22272
22273 \backslash
22274 end{multicols}
22275 \end_layout
22276
22277 \end_inset
22278
22279
22280 \end_layout
22281
22282 \begin_layout Subsubsection
22283 Multiple columns
22284 \end_layout
22285
22286 \begin_layout Standard
22287 The same pattern is used when you want more than two columns:
22288 \end_layout
22289
22290 \begin_layout Standard
22291 \begin_inset ERT
22292 status open
22293
22294 \begin_layout Plain Layout
22295
22296
22297 \backslash
22298 begin{multicols}{3}
22299 \end_layout
22300
22301 \end_inset
22302
22303
22304 \end_layout
22305
22306 \begin_layout Standard
22307
22308 \size footnotesize
22309 It can be imagined that my close intimacy with Sherlock Holmes had interested
22310  me deeply in crime, and that after his disappearance I never failed to
22311  read with care the various problems which came before the public.
22312  And I even attempted, more than once, for my own private satisfaction,
22313  to employ his methods in their solution, though with indifferent success.
22314  There was none, however, which appealed to me like this tragedy of Ronald
22315  Adair.
22316  As I read the evidence at the inquest, which led up to a verdict of willful
22317  murder against some person or persons unknown, I realized more clearly
22318  than I had ever done the loss which the community had sustained by the
22319  death of Sherlock Holmes.
22320  There were points about this strange business which would, I was sure,
22321  have specially appealed to him, and the efforts of the police would have
22322  been supplemented, or more probably anticipated, by the trained observation
22323  and the alert mind of the first criminal agent in Europe.
22324  All day, as I drove upon my round, I turned over the case in my mind and
22325  found no explanation which appeared to me to be adequate.
22326  At the risk of telling a twice-told tale, I will recapitulate the facts
22327  as they were known to the public at the conclusion of the inquest.
22328 \end_layout
22329
22330 \begin_layout Standard
22331 \begin_inset ERT
22332 status open
22333
22334 \begin_layout Plain Layout
22335
22336
22337 \backslash
22338 end{multicols}
22339 \end_layout
22340
22341 \end_inset
22342
22343
22344 \end_layout
22345
22346 \begin_layout Standard
22347 You can have more than 3 columns if you want to, but that might not be very
22348  pleasant for the eye.
22349 \end_layout
22350
22351 \begin_layout Subsubsection
22352 Columns inside columns
22353 \end_layout
22354
22355 \begin_layout Standard
22356 You can even have columns inside columns:
22357 \end_layout
22358
22359 \begin_layout Standard
22360 \begin_inset ERT
22361 status open
22362
22363 \begin_layout Plain Layout
22364
22365
22366 \backslash
22367 begin{multicols}{2}
22368 \end_layout
22369
22370 \end_inset
22371
22372
22373 \end_layout
22374
22375 \begin_layout Standard
22376
22377 \size footnotesize
22378 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22379  at that time governor of one of the Australian colonies.
22380  Adair's mother had returned from Australia to undergo the operation for
22381  cataract, and she, her son Ronald, and her daughter Hilda were living together
22382  at 427 Park Lane.
22383 \end_layout
22384
22385 \begin_layout Standard
22386 \begin_inset ERT
22387 status open
22388
22389 \begin_layout Plain Layout
22390
22391
22392 \backslash
22393 begin{multicols}{2}
22394 \end_layout
22395
22396 \end_inset
22397
22398
22399 \end_layout
22400
22401 \begin_layout Standard
22402
22403 \size footnotesize
22404 The youth moved in the best society–had, so far as was known, no enemies
22405  and no particular vices.
22406  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22407  had been broken off by mutual consent some months before, and there was
22408  no sign that it had left any very profound feeling behind it.
22409  For the rest {sic} the man's life moved in a narrow and conventional circle,
22410  for his habits were quiet and his nature unemotional.
22411  Yet it was upon this easy-going young aristocrat that death came, in most
22412  strange and unexpected form, between the hours of ten and eleven-twenty
22413  on the night of March 30, 1894.
22414 \end_layout
22415
22416 \begin_layout Standard
22417 \begin_inset ERT
22418 status open
22419
22420 \begin_layout Plain Layout
22421
22422
22423 \backslash
22424 end{multicols}
22425 \end_layout
22426
22427 \end_inset
22428
22429
22430 \end_layout
22431
22432 \begin_layout Standard
22433
22434 \size footnotesize
22435 Ronald Adair was fond of cards–playing continually, but never for such stakes
22436  as would hurt him.
22437  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22438  It was shown that, after dinner on the day of his death, he had played
22439  a rubber of whist at the latter club.
22440  He had also played there in the afternoon.
22441
22442 \size default
22443  
22444 \size footnotesize
22445 The evidence of those who had played with him– Mr.
22446  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22447  and that there was a fairly equal fall of the cards.
22448  Adair might have lost five pounds, but not more.
22449  His fortune was a considerable one, and such a loss could not in any way
22450  affect him.
22451  He had played nearly every day at one club or other, but he was a cautious
22452  player, and usually rose a winner.
22453  It came out in evidence that, in partnership with Colonel Moran, he had
22454  actually won as much as four hundred and twenty pounds in a sitting, some
22455  weeks before, from Godfrey Milner and Lord Balmoral.
22456  So much for his recent history as it came out at the inquest.
22457 \end_layout
22458
22459 \begin_layout Standard
22460 \begin_inset ERT
22461 status open
22462
22463 \begin_layout Plain Layout
22464
22465
22466 \backslash
22467 end{multicols}
22468 \end_layout
22469
22470 \end_inset
22471
22472
22473 \end_layout
22474
22475 \begin_layout Standard
22476 Please do read the file 
22477 \family typewriter
22478 examples/multicol.lyx
22479 \family default
22480  for more advanced examples including column and header spacing, vertical
22481  separator lines, and more.
22482 \end_layout
22483
22484 \begin_layout Section
22485 Numbering in the 
22486 \family sans
22487 Enumerate
22488 \family default
22489  Paragraph Environment
22490 \begin_inset Argument
22491 status collapsed
22492
22493 \begin_layout Plain Layout
22494 Numbering in Enumerate
22495 \end_layout
22496
22497 \end_inset
22498
22499
22500 \end_layout
22501
22502 \begin_layout Standard
22503 by 
22504 \noun on
22505 John Weiss
22506 \end_layout
22507
22508 \begin_layout Standard
22509 \begin_inset VSpace bigskip
22510 \end_inset
22511
22512
22513 \end_layout
22514
22515 \begin_layout Standard
22516 \noindent
22517 The default numbering for the 
22518 \family sans
22519 Enumerate
22520 \family default
22521  paragraph environment begins with Arabic numbers and ends with uppercase
22522  letters.
22523  Suppose, however, you wanted a different type of numbering scheme.
22524  Here's a quickie example of how to change the numbering scheme:
22525 \end_layout
22526
22527 \begin_layout LyX-Code
22528
22529 \backslash
22530 renewcommand{
22531 \backslash
22532 labelenumi}{
22533 \backslash
22534 Roman{enumi}.}
22535 \end_layout
22536
22537 \begin_layout LyX-Code
22538
22539 \backslash
22540 renewcommand{
22541 \backslash
22542 labelenumii}{
22543 \backslash
22544 Alph{enumii}.}
22545 \end_layout
22546
22547 \begin_layout LyX-Code
22548
22549 \backslash
22550 renewcommand{
22551 \backslash
22552 labelenumiii}{
22553 \backslash
22554 arabic{enumiii}.}
22555 \end_layout
22556
22557 \begin_layout LyX-Code
22558
22559 \backslash
22560 renewcommand{
22561 \backslash
22562 labelenumiv}{
22563 \backslash
22564 alph{enumiv}.)}
22565 \end_layout
22566
22567 \begin_layout Standard
22568 \SpecialChar \ldots{}
22569  which changes the numbering scheme to uppercase Roman numerals, uppercase
22570  letters, Arabic numbers, and lowercase letter.
22571 \end_layout
22572
22573 \begin_layout Standard
22574 Additionally, the previous example also adds a little bit extra to the numbering
22575  scheme.
22576  For example, the first level label actually looks like: 
22577 \begin_inset Quotes eld
22578 \end_inset
22579
22580 I.
22581 \begin_inset Quotes erd
22582 \end_inset
22583
22584 .
22585  For ease of reading, we'll describe what the numbering schemes look like
22586  using a notation something like this: <
22587 \begin_inset Quotes eld
22588 \end_inset
22589
22590 I.
22591 \begin_inset Quotes erd
22592 \end_inset
22593
22594 ,
22595 \begin_inset space ~
22596 \end_inset
22597
22598
22599 \begin_inset Quotes erd
22600 \end_inset
22601
22602 A.
22603 \begin_inset Quotes erd
22604 \end_inset
22605
22606 ,
22607 \begin_inset space ~
22608 \end_inset
22609
22610
22611 \begin_inset Quotes erd
22612 \end_inset
22613
22614 1.
22615 \begin_inset Quotes erd
22616 \end_inset
22617
22618 ,
22619 \begin_inset space ~
22620 \end_inset
22621
22622
22623 \begin_inset Quotes eld
22624 \end_inset
22625
22626 a.)
22627 \begin_inset Quotes erd
22628 \end_inset
22629
22630 >.
22631  
22632 \end_layout
22633
22634 \begin_layout Standard
22635 As you can see in the example, there is a label command for each nesting
22636  level, 
22637 \family typewriter
22638
22639 \backslash
22640 labelenumi
22641 \family default
22642  \SpecialChar \ldots{}
22643  
22644 \family typewriter
22645
22646 \backslash
22647 labelenumiv
22648 \family default
22649 , as well as a counter, 
22650 \family typewriter
22651 enumi
22652 \family default
22653  \SpecialChar \ldots{}
22654  
22655 \family typewriter
22656 enumiv
22657 \family default
22658 .
22659  There are also five 
22660 \begin_inset Quotes eld
22661 \end_inset
22662
22663 number printing
22664 \begin_inset Quotes erd
22665 \end_inset
22666
22667  commands, 
22668 \family typewriter
22669
22670 \backslash
22671 arabic{}
22672 \family default
22673
22674 \family typewriter
22675
22676 \backslash
22677 roman{}
22678 \family default
22679
22680 \family typewriter
22681
22682 \backslash
22683 Roman{}
22684 \family default
22685
22686 \family typewriter
22687
22688 \backslash
22689 alph{}
22690 \family default
22691 , and 
22692 \family typewriter
22693
22694 \backslash
22695 Alph{}
22696 \family default
22697 , each of which take one counter as an argument.
22698  You can add characters before or after these, but there's no need to add
22699  spaces.
22700 \end_layout
22701
22702 \begin_layout Standard
22703 You can get really fancy with these.
22704  For example:
22705 \end_layout
22706
22707 \begin_layout LyX-Code
22708
22709 \backslash
22710 renewcommand{
22711 \backslash
22712 labelenumi}{
22713 \backslash
22714 #
22715 \backslash
22716 Alph{enumi}
22717 \backslash
22718 #}
22719 \end_layout
22720
22721 \begin_layout LyX-Code
22722
22723 \backslash
22724 renewcommand{
22725 \backslash
22726 labelenumii}{
22727 \backslash
22728 Alph{enumi}.
22729 \backslash
22730 arabic{enumii}}
22731 \end_layout
22732
22733 \begin_layout LyX-Code
22734
22735 \backslash
22736 renewcommand{
22737 \backslash
22738 labelenumiii}{
22739 \backslash
22740 alph{enumiii}+}
22741 \end_layout
22742
22743 \begin_layout LyX-Code
22744
22745 \backslash
22746 renewcommand{
22747 \backslash
22748 labelenumiv}{(
22749 \backslash
22750 roman{enumiv})}
22751 \end_layout
22752
22753 \begin_layout Standard
22754 produces the somewhat out of hand numbering scheme: <
22755 \begin_inset Quotes eld
22756 \end_inset
22757
22758 #A#
22759 \begin_inset Quotes erd
22760 \end_inset
22761
22762 ,
22763 \begin_inset space ~
22764 \end_inset
22765
22766
22767 \begin_inset Quotes erd
22768 \end_inset
22769
22770 A.1
22771 \begin_inset Quotes erd
22772 \end_inset
22773
22774 ,
22775 \begin_inset space ~
22776 \end_inset
22777
22778
22779 \begin_inset Quotes erd
22780 \end_inset
22781
22782 a+
22783 \begin_inset Quotes erd
22784 \end_inset
22785
22786 ,
22787 \begin_inset space ~
22788 \end_inset
22789
22790
22791 \begin_inset Quotes eld
22792 \end_inset
22793
22794 (i)
22795 \begin_inset Quotes erd
22796 \end_inset
22797
22798 >.
22799  
22800 \end_layout
22801
22802 \begin_layout Section
22803 Dropped Capitals
22804 \end_layout
22805
22806 \begin_layout Standard
22807 by 
22808 \noun on
22809 Mike Ressler
22810 \end_layout
22811
22812 \begin_layout Standard
22813 \begin_inset VSpace bigskip
22814 \end_inset
22815
22816
22817 \end_layout
22818
22819 \begin_layout Standard
22820 \noindent
22821 \begin_inset ERT
22822 status collapsed
22823
22824 \begin_layout Plain Layout
22825
22826
22827 \backslash
22828 newfont{
22829 \backslash
22830 tmpfont}{cmr17 scaled 2500}{
22831 \backslash
22832 tmpfont T}
22833 \backslash
22834 vspace*{-8.4ex}
22835 \end_layout
22836
22837 \end_inset
22838
22839
22840 \end_layout
22841
22842 \begin_layout Standard
22843 \noindent
22844 \begin_inset ERT
22845 status open
22846
22847 \begin_layout Plain Layout
22848
22849
22850 \backslash
22851 hangindent=3.3em 
22852 \backslash
22853 hangafter=-3
22854 \end_layout
22855
22856 \end_inset
22857
22858  hose of you who like the style of old books probably also like 
22859 \begin_inset Quotes eld
22860 \end_inset
22861
22862 dropped capitals
22863 \begin_inset Quotes erd
22864 \end_inset
22865
22866 —those large capital letters which begin each new chapter or section.
22867  Implementing them with plain LyX/LaTeX is straightforward (assuming you
22868  know some plain TeX!) but does require a lot of work and many iterations,
22869  as you can see by all the ugly TeX-mode stuff at the beginning of this
22870  paragraph.
22871 \end_layout
22872
22873 \begin_layout Standard
22874 \begin_inset ERT
22875 status open
22876
22877 \begin_layout Plain Layout
22878
22879
22880 \backslash
22881 verb+
22882 \backslash
22883 bigdrop{-1em}{3}{ptmri}{T}+
22884 \end_layout
22885
22886 \end_inset
22887
22888 here is a much easier way of doing this, of course.
22889  The 
22890 \family typewriter
22891 dropcaps
22892 \family default
22893  (or the newer 
22894 \family typewriter
22895 dropping
22896 \family default
22897 ) package from CTAN allows a simple way to add such letters to your documents.
22898  Since this package is not a standard part of TeXLive, I can't demonstrate
22899  it within this document, but if you copy this paragraph to a new document,
22900  delete the 
22901 \begin_inset Quotes eld
22902 \end_inset
22903
22904
22905 \family typewriter
22906
22907 \backslash
22908 verb
22909 \family default
22910
22911 \begin_inset Quotes erd
22912 \end_inset
22913
22914  and the pluses from the TeX code at the beginning of the paragraph, and
22915  add 
22916 \family typewriter
22917
22918 \backslash
22919 usepackage{dropcaps}
22920 \family default
22921  to your LaTeX preamble, you will get a nice Times Roman Italic 
22922 \begin_inset Quotes eld
22923 \end_inset
22924
22925 T
22926 \begin_inset Quotes erd
22927 \end_inset
22928
22929 , whose height is three lines of text and which protrudes 1 em into the
22930  margin.
22931  (Make certain you have copied 
22932 \begin_inset Quotes eld
22933 \end_inset
22934
22935
22936 \family typewriter
22937 dropcaps.sty
22938 \family default
22939
22940 \begin_inset Quotes erd
22941 \end_inset
22942
22943  into a directory where TeX can see it.) The first argument is the amount
22944  of indentation; in this case the negative sign moves it into the margin.
22945  The second argument is the height of the letter in number of lines of text.
22946  The third argument is the font name: virtually anything which has a tfm
22947  file should work (wade through the 
22948 \family typewriter
22949 .../texmf/fonts/tfm
22950 \family default
22951  directory for possibilities).
22952  My personal favorite is 
22953 \begin_inset Quotes eld
22954 \end_inset
22955
22956
22957 \family typewriter
22958 yinit
22959 \family default
22960
22961 \begin_inset Quotes erd
22962 \end_inset
22963
22964 , a fancy German font specifically designed for dropped capitals.
22965  The fourth argument is the letter (or letters) to be dropped.
22966  The 
22967 \family typewriter
22968 dropping
22969 \family default
22970  package also offers the 
22971 \family typewriter
22972
22973 \backslash
22974 bigdrop
22975 \family default
22976  command, as well as a slightly simplified 
22977 \family typewriter
22978
22979 \backslash
22980 dropping
22981 \family default
22982  command.
22983 \end_layout
22984
22985 \begin_layout Section
22986 Non-standard Paragraph Shapes
22987 \end_layout
22988
22989 \begin_layout Standard
22990 by 
22991 \noun on
22992 Mike Ressler
22993 \end_layout
22994
22995 \begin_layout Standard
22996 \begin_inset VSpace bigskip
22997 \end_inset
22998
22999
23000 \end_layout
23001
23002 \begin_layout Standard
23003 \begin_inset ERT
23004 status collapsed
23005
23006 \begin_layout Plain Layout
23007
23008
23009 \backslash
23010 begin{sloppypar}
23011 \end_layout
23012
23013 \end_inset
23014
23015
23016 \end_layout
23017
23018 \begin_layout Standard
23019 \begin_inset ERT
23020 status collapsed
23021
23022 \begin_layout Plain Layout
23023
23024
23025 \backslash
23026 newdimen
23027 \backslash
23028 varunit 
23029 \end_layout
23030
23031 \begin_layout Plain Layout
23032
23033
23034 \backslash
23035 setlength{
23036 \backslash
23037 varunit}{4.5in}
23038 \end_layout
23039
23040 \end_inset
23041
23042
23043 \end_layout
23044
23045 \begin_layout Standard
23046 \noindent
23047 \begin_inset ERT
23048 status collapsed
23049
23050 \begin_layout Plain Layout
23051
23052
23053 \backslash
23054 parshape 19 0.45
23055 \backslash
23056 varunit 0.332
23057 \backslash
23058 varunit
23059 \end_layout
23060
23061 \begin_layout Plain Layout
23062
23063 0.40
23064 \backslash
23065 varunit 0.300
23066 \backslash
23067 varunit
23068 \end_layout
23069
23070 \begin_layout Plain Layout
23071
23072 0.35
23073 \backslash
23074 varunit 0.293
23075 \backslash
23076 varunit
23077 \end_layout
23078
23079 \begin_layout Plain Layout
23080
23081 0.30
23082 \backslash
23083 varunit 0.300
23084 \backslash
23085 varunit
23086 \end_layout
23087
23088 \begin_layout Plain Layout
23089
23090 0.25
23091 \backslash
23092 varunit 0.317
23093 \backslash
23094 varunit
23095 \end_layout
23096
23097 \begin_layout Plain Layout
23098
23099 0.20
23100 \backslash
23101 varunit 0.342
23102 \backslash
23103 varunit
23104 \end_layout
23105
23106 \begin_layout Plain Layout
23107
23108 0.15
23109 \backslash
23110 varunit 0.373
23111 \backslash
23112 varunit
23113 \end_layout
23114
23115 \begin_layout Plain Layout
23116
23117 0.10
23118 \backslash
23119 varunit 0.410
23120 \backslash
23121 varunit
23122 \end_layout
23123
23124 \begin_layout Plain Layout
23125
23126 0.05
23127 \backslash
23128 varunit 0.453
23129 \backslash
23130 varunit
23131 \end_layout
23132
23133 \begin_layout Plain Layout
23134
23135 0.00
23136 \backslash
23137 varunit 0.500
23138 \backslash
23139 varunit
23140 \end_layout
23141
23142 \begin_layout Plain Layout
23143
23144 0.05
23145 \backslash
23146 varunit 0.453
23147 \backslash
23148 varunit
23149 \end_layout
23150
23151 \begin_layout Plain Layout
23152
23153 0.10
23154 \backslash
23155 varunit 0.410
23156 \backslash
23157 varunit
23158 \end_layout
23159
23160 \begin_layout Plain Layout
23161
23162 0.15
23163 \backslash
23164 varunit 0.373
23165 \backslash
23166 varunit
23167 \end_layout
23168
23169 \begin_layout Plain Layout
23170
23171 0.20
23172 \backslash
23173 varunit 0.342
23174 \backslash
23175 varunit
23176 \end_layout
23177
23178 \begin_layout Plain Layout
23179
23180 0.25
23181 \backslash
23182 varunit 0.317
23183 \backslash
23184 varunit
23185 \end_layout
23186
23187 \begin_layout Plain Layout
23188
23189 0.30
23190 \backslash
23191 varunit 0.300
23192 \backslash
23193 varunit
23194 \end_layout
23195
23196 \begin_layout Plain Layout
23197
23198 0.35
23199 \backslash
23200 varunit 0.293
23201 \backslash
23202 varunit
23203 \end_layout
23204
23205 \begin_layout Plain Layout
23206
23207 0.40
23208 \backslash
23209 varunit 0.300
23210 \backslash
23211 varunit
23212 \end_layout
23213
23214 \begin_layout Plain Layout
23215
23216 0.45
23217 \backslash
23218 varunit 0.332
23219 \backslash
23220 varunit
23221 \end_layout
23222
23223 \begin_layout Plain Layout
23224
23225 \end_layout
23226
23227 \end_inset
23228
23229 There are times when the tyranny of rectangular paragraphs must be overthrown.
23230  In such situations, a call to the delightful plain TeX command 
23231 \family typewriter
23232
23233 \backslash
23234 parshape
23235 \family default
23236  is called for.
23237  As you can see, completely arbitrary shapes can be laid out with a suitable
23238  set of linelength definitions.
23239  While this parshape may look a bit silly and useless, one could conceive
23240  of situations such as finely tuned dropped capitals, word wrapping around
23241  non-rectangular graphics, etc.
23242  which will benefit from such handcrafting.
23243 \end_layout
23244
23245 \begin_layout Standard
23246 \begin_inset VSpace bigskip
23247 \end_inset
23248
23249
23250 \end_layout
23251
23252 \begin_layout Standard
23253 The syntax is 
23254 \family typewriter
23255
23256 \backslash
23257 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23258  #nindent #nlength
23259 \family default
23260 , where 
23261 \family typewriter
23262 numlines
23263 \family default
23264  is the number of lines of text which define the paragraph.
23265  If there turn out to be fewer lines, the shape is truncated; if there are
23266  more, the excess lines have the same dimensions as the last line of the
23267  definition.
23268  The 
23269 \family typewriter
23270 #nindent
23271 \family default
23272  and 
23273 \family typewriter
23274 #nlength
23275 \family default
23276  entries specify the indentation of the line from the left margin, and the
23277  length of the line as measured from that point.
23278  The shape applies only to the current paragraph; everything is reset to
23279  normal for the next paragraph.
23280 \end_layout
23281
23282 \begin_layout Standard
23283 \begin_inset ERT
23284 status collapsed
23285
23286 \begin_layout Plain Layout
23287
23288
23289 \backslash
23290 end{sloppypar}
23291 \end_layout
23292
23293 \end_inset
23294
23295
23296 \end_layout
23297
23298 \begin_layout Section
23299 Summary
23300 \end_layout
23301
23302 \begin_layout Standard
23303 As you can see, the examples in this section range from the useful to the
23304  whimsical.
23305  While I don't expect that anyone will ever need the paragraph shape demonstrate
23306 d in the last section, the important point is that you can do almost anything
23307  you want in LyX if you are willing to figure out how to do it in TeX and
23308  LaTeX.
23309  TeX is a fantastically powerful typesetting system and all that power is
23310  available to you since LyX uses it as its backend.
23311  Happy LyXing!
23312 \end_layout
23313
23314 \end_body
23315 \end_document