]> git.lyx.org Git - lyx.git/blob - lib/doc/Additional.lyx
324ff77b2842f0e71941bf5563134cd888b6ce7c
[lyx.git] / lib / doc / Additional.lyx
1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
2 \lyxformat 370
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 \begin_local_layout
55 Format 7
56 InsetLayout CharStyle:MenuItem
57 LyxType               charstyle
58 LabelString           menu
59 LatexType             command
60 LatexName             menuitem
61 Font
62 Family              Sans
63 EndFont
64 Preamble
65 \newcommand*{\menuitem}[1]{{\sffamily #1}}
66 EndPreamble
67 End
68 \end_local_layout
69 \language english
70 \inputencoding latin1
71 \font_roman default
72 \font_sans default
73 \font_typewriter default
74 \font_default_family default
75 \use_xetex false
76 \font_sc false
77 \font_osf false
78 \font_sf_scale 100
79 \font_tt_scale 100
80
81 \graphics default
82 \default_output_format default
83 \bibtex_command default
84 \index_command default
85 \paperfontsize 12
86 \spacing single
87 \use_hyperref true
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
92 \pdf_bookmarks true
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
96 \pdf_breaklinks false
97 \pdf_pdfborder false
98 \pdf_colorlinks true
99 \pdf_backref false
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,  pdfpagelayout=OneColumn, pdfnewwindow=true,  pdfstartview=XYZ, plainpages=false, pdfpagelabels"
102 \papersize default
103 \use_geometry false
104 \use_amsmath 0
105 \use_esint 0
106 \cite_engine basic
107 \use_bibtopic false
108 \use_indices false
109 \paperorientation portrait
110 \suppress_date false
111 \index Index
112 \shortcut idx
113 \color #008000
114 \end_index
115 \secnumdepth 3
116 \tocdepth 3
117 \paragraph_separation indent
118 \paragraph_indentation default
119 \quotes_language english
120 \papercolumns 1
121 \papersides 2
122 \paperpagestyle headings
123 \tracking_changes false
124 \output_changes false
125 \end_header
126
127 \begin_body
128
129 \begin_layout Title
130 Additional LyX Features
131 \end_layout
132
133 \begin_layout Author
134 by the LyX Team
135 \begin_inset Foot
136 status collapsed
137
138 \begin_layout Plain Layout
139 \noindent
140 Principal maintainer of this file is
141 \noun on
142  Richard Heck
143 \noun default
144 .
145  If you have comments or error corrections, please send them to the LyX
146  Documentation mailing list, 
147 \begin_inset Flex CharStyle:Code
148 status collapsed
149
150 \begin_layout Plain Layout
151 \noindent
152 <lyx-docs@lists.lyx.org>
153 \end_layout
154
155 \end_inset
156
157 .
158 \end_layout
159
160 \end_inset
161
162  
163 \end_layout
164
165 \begin_layout Standard
166 \begin_inset CommandInset toc
167 LatexCommand tableofcontents
168
169 \end_inset
170
171
172 \end_layout
173
174 \begin_layout Chapter
175 Introduction
176 \end_layout
177
178 \begin_layout Standard
179 This manual is essentially Part II of the 
180 \emph on
181 User's Guide\SpecialChar \@.
182
183 \emph default
184  The reason for separating this document out is simple: the 
185 \emph on
186 User's Guide
187 \emph default
188  is already quite lengthy, and it contains information on all of the basic
189  features one needs to know in order to prepare most documents.
190  However, the LyX Team has worked to LyX extensible through various configuratio
191 n files and external packages.
192  That means that if you want to support the Fizzwizzle LaTeX package, you
193  can create a layout file (or module) for it without having to alter LyX
194  itself.
195  We've already had contributions of several new features this way.
196  This is the place where all of those get documented.
197 \end_layout
198
199 \begin_layout Standard
200 This manual also documents some special features, like fax support, version
201  control, and SGML support, which require additional software to work properly.
202  Lastly, there's a chapter of LaTeX tools and tips, things you can use to
203  spruce up your documents by directly using the powerful features of LaTeX.
204  After all, LyX 
205 \emph on
206 is
207 \emph default
208  only WYSIWYM and will only ever interface to some, not all, LaTeX features.
209 \end_layout
210
211 \begin_layout Standard
212 If you haven't read the 
213 \emph on
214 Introduction
215 \emph default
216  yet, you are definitely in the wrong manual.
217  The 
218 \emph on
219 Introduction
220 \emph default
221  is the first place to go, since it describes the notation and format of
222  all of the manuals.
223  You should also be thoroughly familiar with the 
224 \emph on
225 User's Guide
226 \emph default
227  and all of the basic features of LyX before attempting to read this one.
228 \end_layout
229
230 \begin_layout Standard
231 Since all the topics in this manual depend heavily on LyX's interaction
232  with LaTeX, this first chapter covers the inner workings of LyX and how
233  to direct LyX to generate exactly the LaTeX code you want.
234  It is obviously for more seasoned LyX users.
235 \end_layout
236
237 \begin_layout Chapter
238 LyX and LaTeX
239 \end_layout
240
241 \begin_layout Section
242 How LyX Uses LaTeX
243 \end_layout
244
245 \begin_layout Standard
246 This chapter is for both TeX-nicians and the LaTeX-curious.
247  In it, we'll explain how LyX and LaTeX work together to produce printable
248  output.
249  This is the only place in any of the manuals where we assume you know something
250  about LaTeX.
251 \end_layout
252
253 \begin_layout Standard
254 At one time, LyX was called a 
255 \begin_inset Quotes eld
256 \end_inset
257
258 WYSIWYM frontend to LaTeX,
259 \begin_inset Quotes erd
260 \end_inset
261
262  but that's no longer true.
263  There are frontends to LaTeX out there.
264 \begin_inset Foot
265 status collapsed
266
267 \begin_layout Plain Layout
268 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
269  There are also the LaTeX modes for vi and emacs, of course.
270 \end_layout
271
272 \end_inset
273
274  These are basically text editors with the ability to run LaTeX and mark
275  any errors in the file you're editing.
276  Although LyX 
277 \emph on
278 is
279 \emph default
280  an editor, and it 
281 \emph on
282 does
283 \emph default
284  run LaTeX, and it also indicates errors in the file, it also does much,
285  much more.
286  For one thing, you don't need to know LaTeX to use LyX effectively.
287  And LyX has added its own extensions to LaTeX.
288  Try the following sometime: select 
289 \begin_inset Flex CharStyle:MenuItem
290 status collapsed
291
292 \begin_layout Plain Layout
293 Export\SpecialChar \menuseparator
294 LaTeX
295 \end_layout
296
297 \end_inset
298
299  from the 
300 \begin_inset Flex CharStyle:MenuItem
301 status collapsed
302
303 \begin_layout Plain Layout
304 File
305 \end_layout
306
307 \end_inset
308
309  menu (or 
310 \begin_inset Flex CharStyle:MenuItem
311 status collapsed
312
313 \begin_layout Plain Layout
314 View\SpecialChar \menuseparator
315 Source
316 \end_layout
317
318 \end_inset
319
320 ), then look at the preamble of the resulting 
321 \begin_inset Flex CharStyle:Code
322 status collapsed
323
324 \begin_layout Plain Layout
325 .tex
326 \end_layout
327
328 \end_inset
329
330  file.
331  You'll notice a variety of new macros defined specifically by LyX.
332  These macros are defined automatically, according to the features you use
333  in the document.
334 \end_layout
335
336 \begin_layout Standard
337 There are several commands that automatically invoke LaTeX.
338  They are:
339 \end_layout
340
341 \begin_layout Itemize
342 \begin_inset Flex CharStyle:MenuItem
343 status collapsed
344
345 \begin_layout Plain Layout
346 View\SpecialChar \menuseparator
347 Format
348 \end_layout
349
350 \end_inset
351
352
353 \end_layout
354
355 \begin_layout Itemize
356 \begin_inset Flex CharStyle:MenuItem
357 status collapsed
358
359 \begin_layout Plain Layout
360 View\SpecialChar \menuseparator
361 Update\SpecialChar \menuseparator
362 Format
363 \end_layout
364
365 \end_inset
366
367
368 \end_layout
369
370 \begin_layout Itemize
371 \begin_inset Flex CharStyle:MenuItem
372 status collapsed
373
374 \begin_layout Plain Layout
375 File\SpecialChar \menuseparator
376 Print
377 \end_layout
378
379 \end_inset
380
381
382 \end_layout
383
384 \begin_layout Itemize
385 \begin_inset Flex CharStyle:MenuItem
386 status collapsed
387
388 \begin_layout Plain Layout
389 File\SpecialChar \menuseparator
390 Fax
391 \end_layout
392
393 \end_inset
394
395
396 \end_layout
397
398 \begin_layout Standard
399 They will only invoke LaTeX if the file has changed since the last time
400  LaTeX was run.
401  
402 \end_layout
403
404 \begin_layout Standard
405 When LyX runs LaTeX on the file you're editing, it performs these steps:
406 \end_layout
407
408 \begin_layout Enumerate
409 Convert the document to LaTeX and save to a file with the extension 
410 \begin_inset Flex CharStyle:Code
411 status collapsed
412
413 \begin_layout Plain Layout
414 .tex
415 \end_layout
416
417 \end_inset
418
419  in place of 
420 \begin_inset Flex CharStyle:Code
421 status collapsed
422
423 \begin_layout Plain Layout
424 .lyx
425 \end_layout
426
427 \end_inset
428
429 .
430 \end_layout
431
432 \begin_layout Enumerate
433 Run LaTeX on the 
434 \begin_inset Flex CharStyle:Code
435 status collapsed
436
437 \begin_layout Plain Layout
438 .tex
439 \end_layout
440
441 \end_inset
442
443  file (maybe several times), and run any other commands (such as 
444 \begin_inset Flex CharStyle:Code
445 status collapsed
446
447 \begin_layout Plain Layout
448 bibtex
449 \end_layout
450
451 \end_inset
452
453  or 
454 \begin_inset Flex CharStyle:Code
455 status collapsed
456
457 \begin_layout Plain Layout
458 makeindex
459 \end_layout
460
461 \end_inset
462
463 ) needed to compile the LaTeX file.
464 \end_layout
465
466 \begin_layout Enumerate
467 If there are any errors, show the error log.
468 \end_layout
469
470 \begin_layout Standard
471 If you've run LaTeX using 
472 \begin_inset Flex CharStyle:MenuItem
473 status collapsed
474
475 \begin_layout Plain Layout
476 View
477 \bar under
478 \SpecialChar \menuseparator
479
480 \bar default
481 DVI
482 \end_layout
483
484 \end_inset
485
486 , LyX then runs a DVI viewer to display the DVI-file.
487  If you've used 
488 \begin_inset Flex CharStyle:MenuItem
489 status collapsed
490
491 \begin_layout Plain Layout
492 View
493 \bar under
494 \SpecialChar \menuseparator
495
496 \bar default
497 PostScript
498 \end_layout
499
500 \end_inset
501
502 , LyX performs further steps:
503 \end_layout
504
505 \begin_layout Itemize
506 Run 
507 \begin_inset Flex CharStyle:Code
508 status collapsed
509
510 \begin_layout Plain Layout
511 dvips
512 \end_layout
513
514 \end_inset
515
516  to convert the DVI file to PostScript.
517 \end_layout
518
519 \begin_layout Itemize
520 Run a PostScript viewer, such as 
521 \begin_inset Flex CharStyle:Code
522 status collapsed
523
524 \begin_layout Plain Layout
525 ghostview
526 \end_layout
527
528 \end_inset
529
530 , to display the PostScript file.
531 \end_layout
532
533 \begin_layout Standard
534 LyX does similar things when viewing, or exporting, other formats.
535 \end_layout
536
537 \begin_layout Section
538 Translating LaTeX files into LyX
539 \end_layout
540
541 \begin_layout Standard
542 You can import a LaTeX file into LyX by using the 
543 \begin_inset Flex CharStyle:MenuItem
544 status collapsed
545
546 \begin_layout Plain Layout
547 File\SpecialChar \menuseparator
548 Import\SpecialChar \menuseparator
549 LaTeX
550 \end_layout
551
552 \end_inset
553
554  command in LyX.
555  This will call a program named 
556 \begin_inset Flex CharStyle:Code
557 status collapsed
558
559 \begin_layout Plain Layout
560 tex2lyx
561 \end_layout
562
563 \end_inset
564
565  which will create a file 
566 \begin_inset Flex CharStyle:Code
567 status collapsed
568
569 \begin_layout Plain Layout
570 foo.lyx
571 \end_layout
572
573 \end_inset
574
575  from the file 
576 \begin_inset Flex CharStyle:Code
577 status collapsed
578
579 \begin_layout Plain Layout
580 foo.tex
581 \end_layout
582
583 \end_inset
584
585 .
586  LyX will then open that file.
587 \begin_inset Foot
588 status collapsed
589
590 \begin_layout Plain Layout
591 \begin_inset Flex CharStyle:Code
592 status collapsed
593
594 \begin_layout Plain Layout
595 tex2lyx
596 \end_layout
597
598 \end_inset
599
600  can also be run from the command line, of course.
601 \end_layout
602
603 \end_inset
604
605
606 \end_layout
607
608 \begin_layout Standard
609 \begin_inset Flex CharStyle:Code
610 status collapsed
611
612 \begin_layout Plain Layout
613 tex2lyx
614 \end_layout
615
616 \end_inset
617
618  will translate most legal LaTeX, but not everything.
619  It will put things it doesn't understand into TeX code, so after translating
620  a file with 
621 \begin_inset Flex CharStyle:Code
622 status collapsed
623
624 \begin_layout Plain Layout
625 tex2lyx
626 \end_layout
627
628 \end_inset
629
630 , you can look for TeX code and hand-edit it until it looks right.
631 \end_layout
632
633 \begin_layout Standard
634 If you don't know what TeX code is, read the next section.
635 \end_layout
636
637 \begin_layout Section
638 \begin_inset CommandInset label
639 LatexCommand label
640 name "sec:Inserting-TeX-Code"
641
642 \end_inset
643
644 Inserting TeX Code into LyX Documents 
645 \end_layout
646
647 \begin_layout Standard
648 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
649  You can always insert TeX code into any LyX document.
650  LyX cannot, and will never be able to, display every possible LaTeX construct.
651  If ever you need to insert LaTeX commands into your LyX document, you can
652  use the 
653 \begin_inset Flex CharStyle:Code
654 status collapsed
655
656 \begin_layout Plain Layout
657 TeX Code
658 \end_layout
659
660 \end_inset
661
662  box, which you can insert into your document with 
663 \begin_inset Flex CharStyle:MenuItem
664 status collapsed
665
666 \begin_layout Plain Layout
667 Insert\SpecialChar \menuseparator
668 TeX Code
669 \end_layout
670
671 \end_inset
672
673 .
674 \end_layout
675
676 \begin_layout Standard
677 Here's an example of inserting LaTeX commands in a LyX document.
678  The code looks like this:
679 \end_layout
680
681 \begin_layout LyX-Code
682
683 \backslash
684 begin{tabular}{ll}
685 \begin_inset Newline newline
686 \end_inset
687
688
689 \backslash
690 begin{minipage}{5cm}
691 \begin_inset Newline newline
692 \end_inset
693
694 This is an example for a minipage environment.
695  You 
696 \begin_inset Newline newline
697 \end_inset
698
699 can put nearly everything in it, even (non-floating) 
700 \begin_inset Newline newline
701 \end_inset
702
703 figures and tables.
704  
705 \begin_inset Newline newline
706 \end_inset
707
708
709 \backslash
710 end{minipage}
711 \begin_inset Newline newline
712 \end_inset
713
714 &
715 \begin_inset Newline newline
716 \end_inset
717
718
719 \backslash
720 begin{minipage}{5cm}
721 \begin_inset Newline newline
722 \end_inset
723
724
725 \backslash
726 begin{verbatim}
727 \begin_inset Newline newline
728 \end_inset
729
730
731 \backslash
732 begin{minipage}{5cm}
733 \begin_inset Newline newline
734 \end_inset
735
736 This ...
737  
738 \begin_inset Newline newline
739 \end_inset
740
741
742 \backslash
743 end{minipage}
744 \begin_inset Newline newline
745 \end_inset
746
747
748 \backslash
749 end{verbatim}
750 \begin_inset Newline newline
751 \end_inset
752
753
754 \backslash
755 end{minipage}
756 \begin_inset Newline newline
757 \end_inset
758
759
760 \backslash
761 end{tabular}
762 \end_layout
763
764 \begin_layout LyX-Code
765
766 \end_layout
767
768 \begin_layout Standard
769 The 
770 \begin_inset Flex CharStyle:Code
771 status collapsed
772
773 \begin_layout Plain Layout
774 TeX Code
775 \end_layout
776
777 \end_inset
778
779  box containing this text is directly after this paragraph.
780  Those of you reading the manual in LyX will only see the TeX code inset.
781  Those reading a printed version of the manuals will see the actual results:
782 \end_layout
783
784 \begin_layout Standard
785 \begin_inset ERT
786 status collapsed
787
788 \begin_layout Plain Layout
789
790
791 \backslash
792 begin{tabular}{ll}
793 \end_layout
794
795 \begin_layout Plain Layout
796
797
798 \backslash
799 begin{minipage}{5cm}
800 \end_layout
801
802 \begin_layout Plain Layout
803
804 This is an example for a minipage environment.
805  You can put nearly everything in it, even (non-floating) figures and tables.
806  
807 \end_layout
808
809 \begin_layout Plain Layout
810
811
812 \backslash
813 end{minipage}
814 \end_layout
815
816 \begin_layout Plain Layout
817
818 &
819 \end_layout
820
821 \begin_layout Plain Layout
822
823
824 \backslash
825 begin{minipage}{5cm}
826 \end_layout
827
828 \begin_layout Plain Layout
829
830
831 \backslash
832 begin{verbatim}
833 \end_layout
834
835 \begin_layout Plain Layout
836
837
838 \backslash
839 begin{minipage}{5cm}
840 \end_layout
841
842 \begin_layout Plain Layout
843
844 This ...
845  
846 \end_layout
847
848 \begin_layout Plain Layout
849
850
851 \backslash
852 end{minipage}
853 \end_layout
854
855 \begin_layout Plain Layout
856
857
858 \backslash
859 end{verbatim}
860 \end_layout
861
862 \begin_layout Plain Layout
863
864
865 \backslash
866 end{minipage}
867 \end_layout
868
869 \begin_layout Plain Layout
870
871
872 \backslash
873 end{tabular}
874 \end_layout
875
876 \end_inset
877
878
879 \end_layout
880
881 \begin_layout Standard
882 In addition to using TeX code, you can also create a separate file containing
883  some complex LaTeX structure and then use 
884 \begin_inset Flex CharStyle:MenuItem
885 status collapsed
886
887 \begin_layout Plain Layout
888 Insert\SpecialChar \menuseparator
889 Child
890 \begin_inset space ~
891 \end_inset
892
893 Document
894 \end_layout
895
896 \end_inset
897
898  to include your file (you should select the type 
899 \begin_inset Flex CharStyle:Code
900 status collapsed
901
902 \begin_layout Plain Layout
903 Input
904 \end_layout
905
906 \end_inset
907
908 ).
909  We recommend that you only do this if you have a 
910 \begin_inset Flex CharStyle:Code
911 status collapsed
912
913 \begin_layout Plain Layout
914 .tex
915 \end_layout
916
917 \end_inset
918
919  file which you 
920 \emph on
921 know
922 \emph default
923  works already.
924  Otherwise, you'll have a big job tracking down LaTeX errors.
925 \end_layout
926
927 \begin_layout Standard
928 There are a few last points to emphasize:
929 \end_layout
930
931 \begin_layout Itemize
932 LyX 
933 \emph on
934 does not
935 \emph default
936  check if your LaTeX code is correct.
937 \end_layout
938
939 \begin_layout Itemize
940 Beware reinventing the wheel.
941 \end_layout
942
943 \begin_layout Standard
944 On that last point, LyX does have quite a few features tucked into it, and
945  more are coming.
946  Be sure to check the manuals to make sure that LyX doesn't have such-and-such
947  feature before you decide you have to do it by hand.
948  Moreover, there are numerous LaTeX packages out there to do all sorts of
949  things, from labels to envelopes to fancy multipage tables.
950  Check out 
951 \begin_inset CommandInset href
952 LatexCommand href
953 name "CTAN"
954 target "http://www.ctan.org/"
955
956 \end_inset
957
958  for details, and see chapter 
959 \begin_inset CommandInset ref
960 LatexCommand ref
961 reference "cha:secrets"
962
963 \end_inset
964
965 .
966 \end_layout
967
968 \begin_layout Standard
969 If you do need to do some wild and fancy things within your document, be
970  sure to check out a good LaTeX book for assistance.
971  There are a number of them listed in the bibliography of the 
972 \emph on
973 User's Guide
974 \emph default
975 .
976 \end_layout
977
978 \begin_layout Section
979 LyX and the LaTeX Preamble
980 \end_layout
981
982 \begin_layout Subsection
983 About the LaTeX Preamble
984 \end_layout
985
986 \begin_layout Standard
987 If you already know LaTeX, there is no need to explain here what the preamble
988  is good for.
989  If you don't, the following will give you some ideas—we recommend again
990  that you consult a LaTeX book for further information.
991  In any case, you should read the points below, because they explain what
992  you can do and what you don't need to do in the LaTeX preamble of a LyX
993  document.
994 \end_layout
995
996 \begin_layout Standard
997 The LaTeX preamble comes at the very beginning of a document, 
998 \emph on
999 before
1000 \emph default
1001  the text.
1002  It serves to:
1003 \end_layout
1004
1005 \begin_layout Itemize
1006 Declare the document class.
1007  
1008 \begin_inset Newline newline
1009 \end_inset
1010
1011 LyX already does this for you.
1012  If you're a seasoned LaTeX-nician, and you have a custom document class
1013  you want to use, check out the 
1014 \emph on
1015 Customization Manual
1016 \emph default
1017  for information on how to make LyX interface to it.
1018 \end_layout
1019
1020 \begin_layout Itemize
1021 Declare the usage of packages.
1022  
1023 \begin_inset Newline newline
1024 \end_inset
1025
1026 LaTeX packages provide special commands, which are only available within
1027  a document when the package has been declared in the preamble.
1028  For example, the package 
1029 \begin_inset Flex CharStyle:Code
1030 status collapsed
1031
1032 \begin_layout Plain Layout
1033 indentfirst
1034 \end_layout
1035
1036 \end_inset
1037
1038  forces all paragraphs to be indented.
1039  There are other packages for labels, envelopes, margins, etc.
1040  
1041 \end_layout
1042
1043 \begin_layout Itemize
1044 Set counters, variables, lengths and widths.
1045  
1046 \begin_inset Newline newline
1047 \end_inset
1048
1049 There are several LaTeX counters and variables which 
1050 \emph on
1051 must
1052 \emph default
1053  be set globally from within the preamble in order to have the desired effect.
1054  (There are variables which you can set and reset inside the document, too.)
1055  Margins are a good example of something which must be set in the preamble.
1056  Another example is the label format for lists.
1057  You can actually set these just about anywhere, but it's best to do it
1058  just once, inside the preamble.
1059 \end_layout
1060
1061 \begin_layout Itemize
1062 Declare user defined commands (with 
1063 \begin_inset Flex CharStyle:Code
1064 status collapsed
1065
1066 \begin_layout Plain Layout
1067
1068 \backslash
1069 newcommand
1070 \end_layout
1071
1072 \end_inset
1073
1074  or 
1075 \begin_inset Flex CharStyle:Code
1076 status collapsed
1077
1078 \begin_layout Plain Layout
1079
1080 \backslash
1081 renewcommand
1082 \end_layout
1083
1084 \end_inset
1085
1086 ).
1087 \begin_inset Newline newline
1088 \end_inset
1089
1090 These are abbreviations for LaTeX commands which appear very often inside
1091  a document.
1092  Although the preamble is a good place to declare such commands, they 
1093 \emph on
1094 can
1095 \emph default
1096  be declared anywhere (before they are used for the first time, of course).
1097  This can be useful if there is a lot of raw LaTeX code in your document,
1098  which normally should not be the case.
1099 \end_layout
1100
1101 \begin_layout Standard
1102 LyX adds its own set of definitions to the preamble of the 
1103 \begin_inset Flex CharStyle:Code
1104 status collapsed
1105
1106 \begin_layout Plain Layout
1107 .tex
1108 \end_layout
1109
1110 \end_inset
1111
1112  file it produces.
1113  This makes LaTeX files generated by LyX portable.
1114 \end_layout
1115
1116 \begin_layout Subsection
1117 Changing the Preamble
1118 \end_layout
1119
1120 \begin_layout Standard
1121 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1122  can't change them without patching LyX itself.
1123  You can, however, add your own stuff to the preamble by selecting 
1124 \begin_inset Flex CharStyle:MenuItem
1125 status collapsed
1126
1127 \begin_layout Plain Layout
1128 LaTeX
1129 \begin_inset space ~
1130 \end_inset
1131
1132 Preamble
1133 \end_layout
1134
1135 \end_inset
1136
1137  in the 
1138 \begin_inset Flex CharStyle:MenuItem
1139 status collapsed
1140
1141 \begin_layout Plain Layout
1142 Document\SpecialChar \menuseparator
1143 Settings
1144 \end_layout
1145
1146 \end_inset
1147
1148  dialog.
1149  LyX adds anything in the 
1150 \begin_inset Flex CharStyle:MenuItem
1151 status collapsed
1152
1153 \begin_layout Plain Layout
1154 Preamble
1155 \end_layout
1156
1157 \end_inset
1158
1159  dialog to its own built-in preamble.
1160  Before adding your own declarations in the preamble, you should make sure
1161  that LyX doesn't already support what you want to do.
1162  (Remember what we said about reinventing the wheel?) Also, 
1163 \emph on
1164 make sure your preamble code is correct
1165 \emph default
1166 .
1167  LyX doesn't check it for you.
1168  If there is an error, you're likely to get an error like 
1169 \begin_inset Quotes eld
1170 \end_inset
1171
1172
1173 \begin_inset Flex CharStyle:Code
1174 status collapsed
1175
1176 \begin_layout Plain Layout
1177 Missing 
1178 \backslash
1179 begin{document}
1180 \end_layout
1181
1182 \end_inset
1183
1184
1185 \begin_inset Quotes erd
1186 \end_inset
1187
1188 .
1189  If you see this error, check your preamble.
1190 \end_layout
1191
1192 \begin_layout Subsection
1193 Examples
1194 \end_layout
1195
1196 \begin_layout Standard
1197 Here are some examples of what you can add to a preamble, and what they
1198  do.
1199 \end_layout
1200
1201 \begin_layout Subsubsection
1202 Example #1: Offsets
1203 \end_layout
1204
1205 \begin_layout Standard
1206 There are two variables under LaTeX that control page position: 
1207 \begin_inset Flex CharStyle:Code
1208 status collapsed
1209
1210 \begin_layout Plain Layout
1211
1212 \backslash
1213 hoffset
1214 \end_layout
1215
1216 \end_inset
1217
1218  and 
1219 \begin_inset Flex CharStyle:Code
1220 status collapsed
1221
1222 \begin_layout Plain Layout
1223
1224 \backslash
1225 voffset
1226 \end_layout
1227
1228 \end_inset
1229
1230 .
1231  Their names should be self-explanatory.
1232  These variables are useful if you think for a moment about computer labels.
1233  Sometimes, the size of a print medium and the area of the medium that you
1234  can actually print on aren't the same.
1235  This is where 
1236 \begin_inset Flex CharStyle:Code
1237 status collapsed
1238
1239 \begin_layout Plain Layout
1240
1241 \backslash
1242 hoffset
1243 \end_layout
1244
1245 \end_inset
1246
1247  and 
1248 \begin_inset Flex CharStyle:Code
1249 status collapsed
1250
1251 \begin_layout Plain Layout
1252
1253 \backslash
1254 voffset
1255 \end_layout
1256
1257 \end_inset
1258
1259  come in.
1260 \end_layout
1261
1262 \begin_layout Standard
1263 The default values for 
1264 \begin_inset Flex CharStyle:Code
1265 status collapsed
1266
1267 \begin_layout Plain Layout
1268
1269 \backslash
1270 hoffset
1271 \end_layout
1272
1273 \end_inset
1274
1275  and 
1276 \begin_inset Flex CharStyle:Code
1277 status collapsed
1278
1279 \begin_layout Plain Layout
1280
1281 \backslash
1282 voffset
1283 \end_layout
1284
1285 \end_inset
1286
1287  are both 0
1288 \begin_inset space \thinspace{}
1289 \end_inset
1290
1291 points, i.
1292 \begin_inset space \thinspace{}
1293 \end_inset
1294
1295 g.
1296 \begin_inset space \space{}
1297 \end_inset
1298
1299 the page isn't shifted.
1300  Unfortunately, some DVI drivers always seem to shift the page.
1301  We have no idea why, or why the sysadmin hasn't fixed such behavior.
1302  If you're using LyX on a system that you don't personally maintain, and
1303  your sysadmin is a doofus, 
1304 \begin_inset Flex CharStyle:Code
1305 status collapsed
1306
1307 \begin_layout Plain Layout
1308
1309 \backslash
1310 hoffset
1311 \end_layout
1312
1313 \end_inset
1314
1315  and 
1316 \begin_inset Flex CharStyle:Code
1317 status collapsed
1318
1319 \begin_layout Plain Layout
1320
1321 \backslash
1322 voffset
1323 \end_layout
1324
1325 \end_inset
1326
1327  can save the day.
1328  Suppose you're left and top margins are always 0.5
1329 \begin_inset space \thinspace{}
1330 \end_inset
1331
1332 inches too big.
1333  You can add this to the preamble:
1334 \end_layout
1335
1336 \begin_layout LyX-Code
1337
1338 \backslash
1339 setlength{
1340 \backslash
1341 hoffset}{-0.5 in}
1342 \end_layout
1343
1344 \begin_layout LyX-Code
1345
1346 \backslash
1347 setlength{
1348 \backslash
1349 voffset}{-0.5 in}
1350 \end_layout
1351
1352 \begin_layout Standard
1353 and your margins should now be correct.
1354 \end_layout
1355
1356 \begin_layout Subsubsection
1357 Example #2: Labels
1358 \end_layout
1359
1360 \begin_layout Standard
1361 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1362  There's a rather nice package, available at your nearest CTAN archive,
1363  for printing sheets of labels: 
1364 \begin_inset Flex CharStyle:Code
1365 status collapsed
1366
1367 \begin_layout Plain Layout
1368 labels.sty
1369 \end_layout
1370
1371 \end_inset
1372
1373 .
1374  Now, your system may not have this package installed by default.
1375  We leave that up to you to check.
1376  You'll also want to read the documentation for it; we're not going to do
1377  that for you.
1378  Since this is an example, however, we'll give you an example of how you
1379  use this package.
1380 \end_layout
1381
1382 \begin_layout Standard
1383 First, make sure you're using the 
1384 \begin_inset Flex CharStyle:Code
1385 status collapsed
1386
1387 \begin_layout Plain Layout
1388 article
1389 \end_layout
1390
1391 \end_inset
1392
1393  document class.
1394  Next, you need to put the following in your preamble:
1395 \end_layout
1396
1397 \begin_layout LyX-Code
1398
1399 \backslash
1400 usepackage{labels}
1401 \end_layout
1402
1403 \begin_layout LyX-Code
1404
1405 \backslash
1406 LabelCols=3
1407 \end_layout
1408
1409 \begin_layout LyX-Code
1410
1411 \backslash
1412 LabelRows=7
1413 \end_layout
1414
1415 \begin_layout LyX-Code
1416
1417 \backslash
1418 LeftBorder=8mm
1419 \end_layout
1420
1421 \begin_layout LyX-Code
1422
1423 \backslash
1424 RightBorder=8mm
1425 \end_layout
1426
1427 \begin_layout LyX-Code
1428
1429 \backslash
1430 TopBorder=9mm
1431 \end_layout
1432
1433 \begin_layout LyX-Code
1434
1435 \backslash
1436 BottomBorder=2mm
1437 \end_layout
1438
1439 \begin_layout Standard
1440 This sets things up for Avery label sheets, stock #5360.
1441  You're now ready to print labels, but you'll need to insert LaTeX code,
1442  placing the commands 
1443 \begin_inset Flex CharStyle:Code
1444 status collapsed
1445
1446 \begin_layout Plain Layout
1447
1448 \backslash
1449 begin{labels}
1450 \end_layout
1451
1452 \end_inset
1453
1454  and 
1455 \begin_inset Flex CharStyle:Code
1456 status collapsed
1457
1458 \begin_layout Plain Layout
1459
1460 \backslash
1461 end{labels}
1462 \end_layout
1463
1464 \end_inset
1465
1466  around each label text.
1467  This and other special features of 
1468 \begin_inset Flex CharStyle:Code
1469 status collapsed
1470
1471 \begin_layout Plain Layout
1472 labels.sty
1473 \end_layout
1474
1475 \end_inset
1476
1477  are explained in its documentation.
1478 \end_layout
1479
1480 \begin_layout Standard
1481 Someday, someone may write a LyX layout file to support this package directly.
1482  Maybe that someone is you.
1483 \end_layout
1484
1485 \begin_layout Subsubsection
1486 Example #3: Paragraph Indentation
1487 \end_layout
1488
1489 \begin_layout Standard
1490 Americans are trained to indent the first line of 
1491 \emph on
1492 every
1493 \emph default
1494  paragraph.
1495  As with all of their other weird quirks, most Americans will whine and
1496  moan until they can have their way and indent the first line of all paragraphs.
1497  (Yes, we're joking.
1498  (We are?) 
1499 \emph on
1500 Yeah
1501 \emph default
1502 , we are.)
1503 \end_layout
1504
1505 \begin_layout Standard
1506 Of course, this behavior isn't standard typography.
1507  In books, you typically only indent the first line of a paragraph 
1508 \emph on
1509 if
1510 \emph default
1511  it follows another one.
1512  The idea behind indenting the first line of a paragraph is to distinguish
1513  neighboring paragraphs from one another.
1514  If there is no previous paragraph—for example, if it follows a figure or
1515  is the first paragraph in a section—then there is no need for indentation.
1516  
1517 \end_layout
1518
1519 \begin_layout Standard
1520 If you're a typical American (we're still joking!), though, you don't care
1521  about such esoteric things; you want your indentation! Add this to the
1522  preamble:
1523 \end_layout
1524
1525 \begin_layout LyX-Code
1526
1527 \backslash
1528 usepackage{indentfirst}
1529 \end_layout
1530
1531 \begin_layout Standard
1532 If your TeX distribution isn't braindead, you'll have this package, and
1533  all of your paragraphs will get the indentation the Founding Fathers intended
1534  they should have.
1535 \end_layout
1536
1537 \begin_layout Subsubsection
1538 Example #4: This Document
1539 \end_layout
1540
1541 \begin_layout Standard
1542 You can also check out the preamble of this document to get an idea of some
1543  of the advanced things you can do.
1544  Also, there are more examples and an assortment of LaTeX 
1545 \begin_inset Quotes eld
1546 \end_inset
1547
1548 dirty tricks
1549 \begin_inset Quotes erd
1550 \end_inset
1551
1552  given in Chapter
1553 \begin_inset space ~
1554 \end_inset
1555
1556
1557 \begin_inset CommandInset ref
1558 LatexCommand ref
1559 reference "cha:secrets"
1560
1561 \end_inset
1562
1563 .
1564  
1565 \end_layout
1566
1567 \begin_layout Section
1568 LyX and LaTeX Errors
1569 \end_layout
1570
1571 \begin_layout Standard
1572 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1573  going.
1574  It then uses the logfile from the LaTeX run to do a post-mortem.
1575  After analyzing the logfile,LyX displays a dialog listing the errors.
1576  Clicking on any one of them will take you to the position in your LyX file
1577  where the error occurred.
1578 \begin_inset Foot
1579 status collapsed
1580
1581 \begin_layout Plain Layout
1582 Well, usually.
1583  Analyzing the logfile is a tough job, and LyX doesn't always go to the
1584  right line.
1585  There are also cases where LaTeX reports the error on one line, but the
1586  actual error is earlier.
1587  This is not unlike forgetting a closing brace in a program: You'll get
1588  an error, but only later.
1589 \end_layout
1590
1591 \end_inset
1592
1593
1594 \end_layout
1595
1596 \begin_layout Standard
1597 Some folks also like to look at the log file directly: It is available from
1598  
1599 \begin_inset Flex CharStyle:MenuItem
1600 status collapsed
1601
1602 \begin_layout Plain Layout
1603 Document
1604 \bar under
1605 \SpecialChar \menuseparator
1606
1607 \bar default
1608 Latex
1609 \begin_inset space ~
1610 \end_inset
1611
1612 Log
1613 \end_layout
1614
1615 \end_inset
1616
1617 .
1618  There are some fairly common error messages and warnings.
1619  We'll cover those here.
1620  You should look at a good LaTeX book for a complete listing.
1621 \end_layout
1622
1623 \begin_layout Itemize
1624 \begin_inset Flex CharStyle:Code
1625 status collapsed
1626
1627 \begin_layout Plain Layout
1628 LaTeX Warning
1629 \end_layout
1630
1631 \end_inset
1632
1633
1634 \begin_inset Newline newline
1635 \end_inset
1636
1637 Anything beginning with these words is a warning message for the purpose
1638  of 
1639 \begin_inset Quotes eld
1640 \end_inset
1641
1642 debugging
1643 \begin_inset Quotes erd
1644 \end_inset
1645
1646  the LaTeX code itself.
1647  You'll get messages like this if you added or changed cross-references
1648  or bibliography entries, in which case, LaTeX is trying to tell you that
1649  you need to make another run.
1650  You can by-and-large ignore these.
1651 \end_layout
1652
1653 \begin_layout Itemize
1654 \begin_inset Flex CharStyle:Code
1655 status collapsed
1656
1657 \begin_layout Plain Layout
1658 LaTeX Font Warning
1659 \end_layout
1660
1661 \end_inset
1662
1663
1664 \begin_inset Newline newline
1665 \end_inset
1666
1667 Another warning message, this time about fonts which LaTeX couldn't find.
1668  The rest of the message will often say something about a replacement font
1669  that LaTeX used.
1670  You can safely ignore these, too.
1671 \end_layout
1672
1673 \begin_layout Itemize
1674 \begin_inset Flex CharStyle:Code
1675 status collapsed
1676
1677 \begin_layout Plain Layout
1678 Overfull 
1679 \backslash
1680 hbox
1681 \end_layout
1682
1683 \end_inset
1684
1685
1686 \begin_inset Newline newline
1687 \end_inset
1688
1689 LaTeX absolutely 
1690 \emph on
1691 loves
1692 \emph default
1693  to spew these out.
1694  They are warnings about lines that were too long and run past the right
1695  margin.
1696  Almost always, this is unnoticeable in the final output.
1697  (It can be just a point or two.) Or, only one or two characters extend past
1698  the margin.
1699  LaTeX seems to generate at least one of these messages for just about any
1700  document you write.
1701 \begin_inset Newline newline
1702 \end_inset
1703
1704 You can ignore these messages.
1705  Your eyes will tell you if there's a problem with something that's too
1706  wide; just look at the output.
1707 \begin_inset Foot
1708 status collapsed
1709
1710 \begin_layout Plain Layout
1711 You can also enable the `draft' option in 
1712 \begin_inset Flex CharStyle:MenuItem
1713 status collapsed
1714
1715 \begin_layout Plain Layout
1716 Document
1717 \bar under
1718 \SpecialChar \menuseparator
1719
1720 \bar default
1721 Settings
1722 \end_layout
1723
1724 \end_inset
1725
1726 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1727 \end_layout
1728
1729 \end_inset
1730
1731
1732 \end_layout
1733
1734 \begin_layout Itemize
1735 \begin_inset Flex CharStyle:Code
1736 status collapsed
1737
1738 \begin_layout Plain Layout
1739 Underfull 
1740 \backslash
1741 hbox
1742 \end_layout
1743
1744 \end_inset
1745
1746
1747 \begin_inset Newline newline
1748 \end_inset
1749
1750 Not quite as common as its cousin.
1751  LaTeX seems to like to print lines that are a bit too wide as opposed to
1752  ones that are a bit too narrow.
1753  We have no idea why.
1754 \end_layout
1755
1756 \begin_layout Itemize
1757 \begin_inset Flex CharStyle:Code
1758 status collapsed
1759
1760 \begin_layout Plain Layout
1761 Overfull 
1762 \backslash
1763 vbox
1764 \end_layout
1765
1766 \end_inset
1767
1768  and 
1769 \begin_inset Flex CharStyle:Code
1770 status collapsed
1771
1772 \begin_layout Plain Layout
1773 Underfull 
1774 \backslash
1775 vbox
1776 \end_layout
1777
1778 \end_inset
1779
1780
1781 \begin_inset Newline newline
1782 \end_inset
1783
1784 Warnings about troubles breaking the page.
1785  Once again, just look at the output.
1786  Your eyes will tell you where something has gone wrong.
1787 \end_layout
1788
1789 \begin_layout Itemize
1790 \begin_inset Flex CharStyle:Code
1791 status collapsed
1792
1793 \begin_layout Plain Layout
1794  LaTeX Error: File 
1795 \begin_inset Quotes els
1796 \end_inset
1797
1798 Xxxx
1799 \begin_inset Quotes ers
1800 \end_inset
1801
1802  not found
1803 \end_layout
1804
1805 \end_inset
1806
1807
1808 \begin_inset Newline newline
1809 \end_inset
1810
1811 The file 
1812 \begin_inset Quotes eld
1813 \end_inset
1814
1815 Xxxx
1816 \begin_inset Quotes erd
1817 \end_inset
1818
1819  isn't installed on this system.
1820  This usually appears because some package your document needs isn't installed.
1821  If you didn't touch the preamble or didn't use the 
1822 \begin_inset Flex CharStyle:Code
1823 status collapsed
1824
1825 \begin_layout Plain Layout
1826
1827 \backslash
1828 usepackage{}
1829 \end_layout
1830
1831 \end_inset
1832
1833  command, then one of the packages LyX tried to load is missing.
1834  Use 
1835 \begin_inset Flex CharStyle:MenuItem
1836 status collapsed
1837
1838 \begin_layout Plain Layout
1839 Help\SpecialChar \menuseparator
1840 LaTeX Configuration
1841 \end_layout
1842
1843 \end_inset
1844
1845  to get a list of packages that LyX knows about.
1846  This file is updated whenever you reconfigure LyX (using 
1847 \begin_inset Flex CharStyle:MenuItem
1848 status collapsed
1849
1850 \begin_layout Plain Layout
1851 Tools\SpecialChar \menuseparator
1852 Reconfigure
1853 \end_layout
1854
1855 \end_inset
1856
1857 ) and tells you which packages have been detected and what they do.
1858 \begin_inset Newline newline
1859 \end_inset
1860
1861 If you did use the 
1862 \begin_inset Flex CharStyle:Code
1863 status collapsed
1864
1865 \begin_layout Plain Layout
1866
1867 \backslash
1868 usepackage{}
1869 \end_layout
1870
1871 \end_inset
1872
1873  command and the package in question isn't installed, then you'll need to
1874  install it yourself.
1875 \end_layout
1876
1877 \begin_layout Itemize
1878 \begin_inset Flex CharStyle:Code
1879 status collapsed
1880
1881 \begin_layout Plain Layout
1882 LaTeX Error: Unknown option
1883 \end_layout
1884
1885 \end_inset
1886
1887
1888 \begin_inset Newline newline
1889 \end_inset
1890
1891 Error messages beginning with this are trying to tell you that you specified
1892  a bad or undefined option to a package.
1893  Check the package's documentation.
1894 \end_layout
1895
1896 \begin_layout Itemize
1897 \begin_inset Flex CharStyle:Code
1898 status collapsed
1899
1900 \begin_layout Plain Layout
1901 Undefined control sequence
1902 \end_layout
1903
1904 \end_inset
1905
1906
1907 \begin_inset Newline newline
1908 \end_inset
1909
1910 If you've inserted LaTeX code into your document, but made a typo, you'll
1911  get one of these.
1912  You may have forgotten to load a package.
1913  In any case, this error message usually means that you used an undefined
1914  command.
1915  
1916 \end_layout
1917
1918 \begin_layout Standard
1919 There are other error and warning messages.
1920  Some are self-explanatory.
1921  These are usually LaTeX messages.
1922  Others are downright cryptic.
1923  These are usually TeX error messages, and we really have 
1924 \emph on
1925 no clue
1926 \emph default
1927  what they mean or how to decipher them.
1928  No-one does.
1929 \end_layout
1930
1931 \begin_layout Standard
1932 There's a general sequence you should follow if you get error messages:
1933 \end_layout
1934
1935 \begin_layout Enumerate
1936 Look at the LaTeX code you inserted for typos.
1937 \end_layout
1938
1939 \begin_layout Enumerate
1940 If there are no typos, check that you used the command(s) correctly.
1941 \end_layout
1942
1943 \begin_layout Enumerate
1944 If you get a bunch of error boxes piled up at the very top of the document—and
1945  especially if you see a 
1946 \begin_inset Quotes eld
1947 \end_inset
1948
1949
1950 \begin_inset Flex CharStyle:Code
1951 status collapsed
1952
1953 \begin_layout Plain Layout
1954 Missing 
1955 \backslash
1956 begin{document}
1957 \end_layout
1958
1959 \end_inset
1960
1961
1962 \begin_inset Quotes erd
1963 \end_inset
1964
1965  error—it means that there are errors in the preamble.
1966  Start debugging your preamble.
1967 \end_layout
1968
1969 \begin_layout Enumerate
1970 If you didn't add anything to the preamble and didn't add any LaTeX code
1971  to the document, the first suspect is your LaTeX distribution itself.
1972  Check for missing packages and install them.
1973 \end_layout
1974
1975 \begin_layout Enumerate
1976 Okay, so there are no missing packages.
1977  Did you use any of the fine-tuning options in LyX? Specifically, did you
1978  
1979 \emph on
1980 misuse
1981 \emph default
1982  any of them, like trying to manually insert lots of 
1983 \begin_inset Flex CharStyle:Code
1984 status collapsed
1985
1986 \begin_layout Plain Layout
1987 Protected
1988 \begin_inset space ~
1989 \end_inset
1990
1991 Blanks
1992 \end_layout
1993
1994 \end_inset
1995
1996
1997 \begin_inset Flex CharStyle:Code
1998 status collapsed
1999
2000 \begin_layout Plain Layout
2001 Linebreaks
2002 \end_layout
2003
2004 \end_inset
2005
2006 , or 
2007 \begin_inset Flex CharStyle:Code
2008 status collapsed
2009
2010 \begin_layout Plain Layout
2011 Pagebreaks
2012 \end_layout
2013
2014 \end_inset
2015
2016 ? Did you try to kludge something together with these instead of using the
2017  appropriate paragraph environment?
2018 \end_layout
2019
2020 \begin_layout Enumerate
2021 All right, you didn't use any of the fine-tuning options, you played by
2022  the rules.
2023  Did you try to pull a fancy maneuver? Did you do something funky inside
2024  a table or an equation, like inserting a graphic into a table cell?
2025 \end_layout
2026
2027 \begin_layout Enumerate
2028 Do you have long sections of text where LaTeX cannot find a place to break
2029  a line? By default, LaTeX is rather strict about how much extra inter-word
2030  spacing it will add in order to break a line.
2031  Preferably, you should rework the paragraph to avoid the problem.
2032  If this isn't an option, you can wrap your text in 
2033 \begin_inset Flex CharStyle:Code
2034 status collapsed
2035
2036 \begin_layout Plain Layout
2037
2038 \backslash
2039 sloppypar
2040 \end_layout
2041
2042 \end_inset
2043
2044  to make LaTeX's line breaking more, well, sloppy.
2045 \end_layout
2046
2047 \begin_layout Enumerate
2048 Did you go overboard with the nesting? LyX (currently) doesn't check to
2049  make sure you're in the limits for nesting environments.
2050  If you nested a bunch of environments to the 
2051 \begin_inset Formula $17^{\mathrm{th}}$
2052 \end_inset
2053
2054  level, that's the problem.
2055  (The limit in LaTeX is five.)
2056 \end_layout
2057
2058 \begin_layout Enumerate
2059 Okay, you didn't get any error messages, but your output looks awful.
2060  If you have a table or figure that's too wide or long for the page, you
2061  need to:
2062 \end_layout
2063
2064 \begin_deeper
2065 \begin_layout Enumerate
2066 rescale the figure so it fits.
2067 \end_layout
2068
2069 \begin_layout Enumerate
2070 trim down the table so it fits.
2071 \end_layout
2072
2073 \end_deeper
2074 \begin_layout Enumerate
2075 If something else is wrong with the output, and you didn't try to pull anything
2076  fancy or kludge the fine-tuning options, we're not sure what's wrong.
2077 \end_layout
2078
2079 \begin_layout Standard
2080 If all this doesn't help—well, then 
2081 \emph on
2082 perhaps
2083 \emph default
2084  you might have found a bug in LyX\SpecialChar \ldots{}
2085 .
2086 \end_layout
2087
2088 \begin_layout Chapter
2089 Supplemental Tools
2090 \end_layout
2091
2092 \begin_layout Section
2093 Customizing Bibliographies with BibTeX
2094 \end_layout
2095
2096 \begin_layout Standard
2097 The basics how to use BibTeX are explained in section 
2098 \emph on
2099 Bibliography databases (BibTeX)
2100 \emph default
2101  of the 
2102 \emph on
2103 User's Guide
2104 \emph default
2105 .
2106  The following subsections explain special bibliography features supported
2107  by LyX.
2108 \end_layout
2109
2110 \begin_layout Subsection
2111 Alternative Citation Styles
2112 \end_layout
2113
2114 \begin_layout Standard
2115 Standard BibTeX uses numbers (e.
2116 \begin_inset space \thinspace{}
2117 \end_inset
2118
2119 g.
2120 \begin_inset space \space{}
2121 \end_inset
2122
2123
2124 \begin_inset Quotes eld
2125 \end_inset
2126
2127 [12]
2128 \begin_inset Quotes erd
2129 \end_inset
2130
2131 ) to refer to a cited work.
2132  However, in many scientific disciplines, other citation styles are in use.
2133  The most common one is the author-year style (e.
2134 \begin_inset space \thinspace{}
2135 \end_inset
2136
2137 g.
2138 \begin_inset space \space{}
2139 \end_inset
2140
2141
2142 \begin_inset Quotes eld
2143 \end_inset
2144
2145 Knuth 1984a
2146 \begin_inset Quotes erd
2147 \end_inset
2148
2149 ).
2150  LyX supports two packages that provide this style, 
2151 \begin_inset Flex CharStyle:Code
2152 status collapsed
2153
2154 \begin_layout Plain Layout
2155 natbib
2156 \end_layout
2157
2158 \end_inset
2159
2160  and 
2161 \begin_inset Flex CharStyle:Code
2162 status collapsed
2163
2164 \begin_layout Plain Layout
2165 jurabib
2166 \end_layout
2167
2168 \end_inset
2169
2170 .
2171  Both packages have their pros and cons, which cannot be listed in detail.
2172  If you only want to have simple author-year (or author-numerical) style,
2173  or if you want to use one of the countless style files for 
2174 \begin_inset Flex CharStyle:Code
2175 status collapsed
2176
2177 \begin_layout Plain Layout
2178 natbib
2179 \end_layout
2180
2181 \end_inset
2182
2183 , than the established 
2184 \begin_inset Flex CharStyle:Code
2185 status collapsed
2186
2187 \begin_layout Plain Layout
2188 natbib
2189 \end_layout
2190
2191 \end_inset
2192
2193  package is probably your choice.
2194  If you need special features like short title references, ibidem etc., you
2195  might consider the 
2196 \begin_inset Flex CharStyle:Code
2197 status collapsed
2198
2199 \begin_layout Plain Layout
2200 jurabib
2201 \end_layout
2202
2203 \end_inset
2204
2205  package.
2206 \end_layout
2207
2208 \begin_layout Standard
2209 The handling of both packages in LyX is basically the same.
2210  Go to 
2211 \begin_inset Flex CharStyle:MenuItem
2212 status collapsed
2213
2214 \begin_layout Plain Layout
2215 Document\SpecialChar \menuseparator
2216 Settings
2217 \end_layout
2218
2219 \end_inset
2220
2221  and select under 
2222 \begin_inset Flex CharStyle:MenuItem
2223 status collapsed
2224
2225 \begin_layout Plain Layout
2226 Bibliography
2227 \end_layout
2228
2229 \end_inset
2230
2231  the option 
2232 \begin_inset Flex CharStyle:MenuItem
2233 status collapsed
2234
2235 \begin_layout Plain Layout
2236 Natbib
2237 \end_layout
2238
2239 \end_inset
2240
2241  or 
2242 \begin_inset Flex CharStyle:MenuItem
2243 status collapsed
2244
2245 \begin_layout Plain Layout
2246 Jurabib
2247 \end_layout
2248
2249 \end_inset
2250
2251 .
2252  With both packages, you will get some extra features in the citation dialog
2253  and you can select the style of the reference (
2254 \begin_inset Quotes eld
2255 \end_inset
2256
2257 Knuth 1984
2258 \begin_inset Quotes erd
2259 \end_inset
2260
2261
2262 \begin_inset Quotes eld
2263 \end_inset
2264
2265 Knuth (1984)
2266 \begin_inset Quotes erd
2267 \end_inset
2268
2269
2270 \begin_inset Quotes eld
2271 \end_inset
2272
2273 Knuth, 1984
2274 \begin_inset Quotes erd
2275 \end_inset
2276
2277
2278 \begin_inset Quotes eld
2279 \end_inset
2280
2281 1984
2282 \begin_inset Quotes erd
2283 \end_inset
2284
2285  etc.).
2286  Note that both packages need specifically designed style files.
2287  They both ship their own, but there are lots of additional style files,
2288  and there is even an interactive style file builder
2289 \begin_inset Foot
2290 status collapsed
2291
2292 \begin_layout Plain Layout
2293 See 
2294 \begin_inset Flex URL
2295 status open
2296
2297 \begin_layout Plain Layout
2298
2299 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2300 \end_layout
2301
2302 \end_inset
2303
2304
2305 \end_layout
2306
2307 \end_inset
2308
2309  for 
2310 \begin_inset Flex CharStyle:Code
2311 status collapsed
2312
2313 \begin_layout Plain Layout
2314 natbib
2315 \end_layout
2316
2317 \end_inset
2318
2319 .
2320 \end_layout
2321
2322 \begin_layout Subsection
2323 Sectioned Bibliographies
2324 \end_layout
2325
2326 \begin_layout Standard
2327 Sometimes you might need to divide your bibliography into several sections.
2328  If you are for instance a historian, the possibility to separate sources
2329  and scientific works is most likely a 
2330 \begin_inset Quotes eld
2331 \end_inset
2332
2333 must have
2334 \begin_inset Quotes erd
2335 \end_inset
2336
2337 .
2338  Unfortunately, BibTeX itself does not allow you to do this.
2339  But with the help of some LaTeX packages, BibTeX can be extended to fit
2340  your needs.
2341 \end_layout
2342
2343 \begin_layout Standard
2344 LyX provides native support for one of these packages, 
2345 \family typewriter
2346 bibtopic
2347 \family default
2348 .
2349 \begin_inset Foot
2350 status collapsed
2351
2352 \begin_layout Plain Layout
2353 Available from 
2354 \begin_inset Flex URL
2355 status open
2356
2357 \begin_layout Plain Layout
2358
2359 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2360 \end_layout
2361
2362 \end_inset
2363
2364
2365 \end_layout
2366
2367 \end_inset
2368
2369  The advantage of this package (compared to other packages like 
2370 \family typewriter
2371 multibib
2372 \family default
2373 ) is that you don't need to define new citation commands.
2374  Instead, you need to prepare different bibliographic databases which include
2375  the entries for the different sections of the bibliography.
2376  For example: If you want to divide your bibliography into the sections
2377  
2378 \begin_inset Quotes eld
2379 \end_inset
2380
2381 Sources
2382 \begin_inset Quotes erd
2383 \end_inset
2384
2385  and 
2386 \begin_inset Quotes eld
2387 \end_inset
2388
2389 Scientific works
2390 \begin_inset Quotes erd
2391 \end_inset
2392
2393 , you first need to create two bibliographic databases, e.
2394 \begin_inset space \thinspace{}
2395 \end_inset
2396
2397 g.
2398 \begin_inset space \space{}
2399 \end_inset
2400
2401
2402 \begin_inset Flex CharStyle:Code
2403 status collapsed
2404
2405 \begin_layout Plain Layout
2406 sources.bib
2407 \end_layout
2408
2409 \end_inset
2410
2411  and 
2412 \begin_inset Flex CharStyle:Code
2413 status collapsed
2414
2415 \begin_layout Plain Layout
2416 scientific.bib
2417 \end_layout
2418
2419 \end_inset
2420
2421 .
2422  
2423 \end_layout
2424
2425 \begin_layout Standard
2426 Go to 
2427 \begin_inset Flex CharStyle:MenuItem
2428 status collapsed
2429
2430 \begin_layout Plain Layout
2431 Document\SpecialChar \menuseparator
2432 Settings
2433 \end_layout
2434
2435 \end_inset
2436
2437  and check under 
2438 \begin_inset Flex CharStyle:MenuItem
2439 status collapsed
2440
2441 \begin_layout Plain Layout
2442 Bibliography
2443 \end_layout
2444
2445 \end_inset
2446
2447  the option 
2448 \begin_inset Flex CharStyle:MenuItem
2449 status collapsed
2450
2451 \begin_layout Plain Layout
2452 Sectioned bibliography
2453 \end_layout
2454
2455 \end_inset
2456
2457 .
2458  Now you can insert multiple BibTeX bibliographies, one for each section
2459  of your bibliography.
2460  Returning to our example: Insert the BibTeX bibliography 
2461 \begin_inset Flex CharStyle:Code
2462 status collapsed
2463
2464 \begin_layout Plain Layout
2465 sources.bib
2466 \end_layout
2467
2468 \end_inset
2469
2470  and a second one for the database 
2471 \begin_inset Flex CharStyle:Code
2472 status collapsed
2473
2474 \begin_layout Plain Layout
2475 scientific.bib
2476 \end_layout
2477
2478 \end_inset
2479
2480 .
2481  You are free to use the same or different styles for each section.
2482  Additionally, you can chose if the bibliography section should contain
2483  
2484 \begin_inset Quotes eld
2485 \end_inset
2486
2487 all cited references
2488 \begin_inset Quotes erd
2489 \end_inset
2490
2491  of the specified database(s) (which is the default), 
2492 \begin_inset Quotes eld
2493 \end_inset
2494
2495 all uncited references
2496 \begin_inset Quotes erd
2497 \end_inset
2498
2499  or even 
2500 \begin_inset Quotes eld
2501 \end_inset
2502
2503 all references
2504 \begin_inset Quotes erd
2505 \end_inset
2506
2507 .
2508  This might be useful if you would like to separate your bibliography into
2509  three sections: 
2510 \begin_inset Quotes eld
2511 \end_inset
2512
2513 Cited sources
2514 \begin_inset Quotes erd
2515 \end_inset
2516
2517
2518 \begin_inset Quotes eld
2519 \end_inset
2520
2521 Uncited sources
2522 \begin_inset Quotes erd
2523 \end_inset
2524
2525 , and 
2526 \begin_inset Quotes eld
2527 \end_inset
2528
2529 Scientific works
2530 \begin_inset Quotes erd
2531 \end_inset
2532
2533 .
2534  The titles for the sections can be added as ordinary sections or subsections.
2535  Since 
2536 \begin_inset Flex CharStyle:Code
2537 status collapsed
2538
2539 \begin_layout Plain Layout
2540 bibtopic
2541 \end_layout
2542
2543 \end_inset
2544
2545  removes the bibliography title, you have manually re-add that, too (as
2546  a chapter* or section*, for instance).
2547 \end_layout
2548
2549 \begin_layout Subsection
2550 Multiple Bibliographies
2551 \end_layout
2552
2553 \begin_layout Standard
2554 Multiple bibliographies, e.
2555 \begin_inset space \thinspace{}
2556 \end_inset
2557
2558 g.
2559 \begin_inset space \space{}
2560 \end_inset
2561
2562 a bibliography for each section or chapter of the document, are not supported
2563  by BibTeX itself.
2564  But the 
2565 \begin_inset Flex CharStyle:Code
2566 status collapsed
2567
2568 \begin_layout Plain Layout
2569 bibtopic
2570 \end_layout
2571
2572 \end_inset
2573
2574  package, which is used for the creation of sectioned bibliographies in
2575  LyX (see the previous section), provides an easy way to solve this task,
2576  if you are willing to use some 
2577 \begin_inset Flex CharStyle:MenuItem
2578 status collapsed
2579
2580 \begin_layout Plain Layout
2581 TeX Code
2582 \end_layout
2583
2584 \end_inset
2585
2586  (see section
2587 \begin_inset space ~
2588 \end_inset
2589
2590
2591 \begin_inset CommandInset ref
2592 LatexCommand ref
2593 reference "sec:Inserting-TeX-Code"
2594
2595 \end_inset
2596
2597 ).
2598 \begin_inset Foot
2599 status collapsed
2600
2601 \begin_layout Plain Layout
2602 An alternative approach is to use the 
2603 \begin_inset Flex CharStyle:Code
2604 status collapsed
2605
2606 \begin_layout Plain Layout
2607 chapterbib
2608 \end_layout
2609
2610 \end_inset
2611
2612  or 
2613 \begin_inset Flex CharStyle:Code
2614 status collapsed
2615
2616 \begin_layout Plain Layout
2617 bibunits
2618 \end_layout
2619
2620 \end_inset
2621
2622  package, respectively.
2623 \end_layout
2624
2625 \end_inset
2626
2627
2628 \end_layout
2629
2630 \begin_layout Standard
2631 First go to 
2632 \begin_inset Flex CharStyle:MenuItem
2633 status collapsed
2634
2635 \begin_layout Plain Layout
2636 Document\SpecialChar \menuseparator
2637 Settings
2638 \end_layout
2639
2640 \end_inset
2641
2642  and under 
2643 \begin_inset Flex CharStyle:MenuItem
2644 status collapsed
2645
2646 \begin_layout Plain Layout
2647 Bibliography
2648 \end_layout
2649
2650 \end_inset
2651
2652  check 
2653 \begin_inset Flex CharStyle:MenuItem
2654 status collapsed
2655
2656 \begin_layout Plain Layout
2657 Sectioned bibliography
2658 \end_layout
2659
2660 \end_inset
2661
2662 .
2663  In the document, you have to enclose the sections, which shall contain
2664  their own bibliography (including the BibTeX bibliography itself), between
2665  
2666 \begin_inset Flex CharStyle:Code
2667 status collapsed
2668
2669 \begin_layout Plain Layout
2670
2671 \backslash
2672 begin{btUnit}
2673 \end_layout
2674
2675 \end_inset
2676
2677  and 
2678 \begin_inset Flex CharStyle:Code
2679 status collapsed
2680
2681 \begin_layout Plain Layout
2682
2683 \backslash
2684 end{btUnit}
2685 \end_layout
2686
2687 \end_inset
2688
2689  (those commands have to be inserted as TeX code).
2690  The bibliography will contain all references which have been cited in the
2691  current 
2692 \begin_inset Flex CharStyle:Code
2693 status collapsed
2694
2695 \begin_layout Plain Layout
2696 btUnit
2697 \end_layout
2698
2699 \end_inset
2700
2701 .
2702  
2703 \series bold
2704 Note:
2705 \series default
2706  If you are using this approach, then every citation reference has to be
2707  inside some 
2708 \begin_inset Flex CharStyle:Code
2709 status collapsed
2710
2711 \begin_layout Plain Layout
2712 btUnit
2713 \end_layout
2714
2715 \end_inset
2716
2717 .
2718  Also, the 
2719 \begin_inset Flex CharStyle:Code
2720 status collapsed
2721
2722 \begin_layout Plain Layout
2723 btUnit
2724 \end_layout
2725
2726 \end_inset
2727
2728 s cannot be nested.
2729 \end_layout
2730
2731 \begin_layout Section
2732 Multipart Documents
2733 \end_layout
2734
2735 \begin_layout Subsection
2736 General Operation
2737 \end_layout
2738
2739 \begin_layout Standard
2740 When you are working on a large file with many sections, it is often convenient
2741  to break up the document into several files, or perhaps you have something
2742  where a table may change from time to time, but the preceding text does
2743  not.
2744  In these cases, you should seriously consider using multipart documents.
2745  For example, scientific papers often have five major sections: the introduction
2746 , observations, results, discussion, and conclusion.
2747  Each of these could be its own separate LyX file, with one 
2748 \begin_inset Quotes eld
2749 \end_inset
2750
2751 master
2752 \begin_inset Quotes erd
2753 \end_inset
2754
2755  file which contains the title, authors, abstract, references, etc., plus
2756  the five included files.
2757  It is important to note that each of these files is a full LyX file which
2758  can be formatted and printed on its own, as well as included in a master
2759  file.
2760  Each of these files must have the same document class, however—don't attempt
2761  to mix book classes with article classes.
2762  You may also include LaTeX files; however, these files must not have their
2763  own preamble (i.
2764 \begin_inset space \thinspace{}
2765 \end_inset
2766
2767 g.
2768 \begin_inset space \space{}
2769 \end_inset
2770
2771 everything up to and including the 
2772 \begin_inset Flex CharStyle:Code
2773 status collapsed
2774
2775 \begin_layout Plain Layout
2776
2777 \backslash
2778 begin{document}
2779 \end_layout
2780
2781 \end_inset
2782
2783  line as well as the 
2784 \begin_inset Flex CharStyle:Code
2785 status collapsed
2786
2787 \begin_layout Plain Layout
2788
2789 \backslash
2790 end{document}
2791 \end_layout
2792
2793 \end_inset
2794
2795  line must be deleted) or else errors will be generated when you try to
2796  make a DVI file.
2797 \end_layout
2798
2799 \begin_layout Standard
2800 LyX allows you to include files quite easily with 
2801 \begin_inset Flex CharStyle:MenuItem
2802 status collapsed
2803
2804 \begin_layout Plain Layout
2805 Insert\SpecialChar \menuseparator
2806 ChiId
2807 \begin_inset space ~
2808 \end_inset
2809
2810 Document
2811 \end_layout
2812
2813 \end_inset
2814
2815 .
2816  When you click on this selection a small box is inserted into the file
2817  at the current cursor location.
2818  Clicking on the box raises a dialog which allows you to select the file
2819  to be included, and the method of its inclusion.
2820  
2821 \end_layout
2822
2823 \begin_layout Standard
2824 The file selection box should by now be obvious.
2825  The three inclusion methods are 
2826 \begin_inset Quotes eld
2827 \end_inset
2828
2829 include
2830 \begin_inset Quotes erd
2831 \end_inset
2832
2833
2834 \begin_inset Quotes eld
2835 \end_inset
2836
2837 input
2838 \begin_inset Quotes erd
2839 \end_inset
2840
2841 , and 
2842 \begin_inset Quotes eld
2843 \end_inset
2844
2845 verbatim
2846 \begin_inset Quotes erd
2847 \end_inset
2848
2849 .
2850  The difference between 
2851 \begin_inset Quotes eld
2852 \end_inset
2853
2854 include
2855 \begin_inset Quotes erd
2856 \end_inset
2857
2858  and 
2859 \begin_inset Quotes eld
2860 \end_inset
2861
2862 input
2863 \begin_inset Quotes erd
2864 \end_inset
2865
2866  is really only meaningful to LaTeXperts, but the practical difference is
2867  that files which are 
2868 \begin_inset Quotes eld
2869 \end_inset
2870
2871 included
2872 \begin_inset Quotes erd
2873 \end_inset
2874
2875  are typeset beginning on a new page, while files which are 
2876 \begin_inset Quotes eld
2877 \end_inset
2878
2879 inputted
2880 \begin_inset Quotes erd
2881 \end_inset
2882
2883  are typeset starting on the current page.
2884 \end_layout
2885
2886 \begin_layout Standard
2887 Generally, the master file is converted into a full LaTeX file before typesettin
2888 g, while the included files are converted to LaTeX files which do not have
2889  all the preamble information.
2890 \end_layout
2891
2892 \begin_layout Standard
2893
2894 \begin_inset Quotes eld
2895 \end_inset
2896
2897 verbatim
2898 \begin_inset Quotes erd
2899 \end_inset
2900
2901  included file allows you to include a file typeset exactly as it appears
2902  in the file, i.
2903 \begin_inset space \thinspace{}
2904 \end_inset
2905
2906 g.
2907 \begin_inset space \space{}
2908 \end_inset
2909
2910 in 
2911 \begin_inset Flex CharStyle:Code
2912 status collapsed
2913
2914 \begin_layout Plain Layout
2915 verbatim
2916 \end_layout
2917
2918 \end_inset
2919
2920  mode, with the characters set in a fixed-width typewriter font.
2921  Normally, spaces in this file are invisible, though two consecutive spaces
2922  are conserved, unlike LyX's normal treatment of spaces.
2923  However, setting the 
2924 \begin_inset Flex CharStyle:MenuItem
2925 status collapsed
2926
2927 \begin_layout Plain Layout
2928 Mark
2929 \begin_inset space ~
2930 \end_inset
2931
2932 spaces
2933 \begin_inset space ~
2934 \end_inset
2935
2936 in
2937 \begin_inset space ~
2938 \end_inset
2939
2940 output
2941 \end_layout
2942
2943 \end_inset
2944
2945  checkbox typesets a mark to unambiguously define the presence of a space.
2946  
2947 \end_layout
2948
2949 \begin_layout Subsection
2950 Cross-References Between Files
2951 \end_layout
2952
2953 \begin_layout Standard
2954 \begin_inset Box Shadowbox
2955 position "t"
2956 hor_pos "c"
2957 has_inner_box 1
2958 inner_pos "t"
2959 use_parbox 0
2960 width "100col%"
2961 special "none"
2962 height "1in"
2963 height_special "totalheight"
2964 status open
2965
2966 \begin_layout Plain Layout
2967 This section is somewhat out of date.
2968  Need to describe default master documents and how children are opened when
2969  the master is.
2970  [[FIXME]]
2971 \end_layout
2972
2973 \end_inset
2974
2975
2976 \end_layout
2977
2978 \begin_layout Standard
2979 It is possible to set up cross-references between the different files.
2980  First, open all the files in question: let's call them A and B in a two
2981  file example, where B is included in A.
2982  Let's say you insert a label in A, then want to reference it in B.
2983  Open the cross-reference dialog in whilst in document B, and you can select
2984  the 
2985 \begin_inset Quotes eld
2986 \end_inset
2987
2988 buffer
2989 \begin_inset Quotes erd
2990 \end_inset
2991
2992  to use.
2993 \end_layout
2994
2995 \begin_layout Subsection
2996 Bibliography Lists in all Subdocuments
2997 \end_layout
2998
2999 \begin_layout Standard
3000 \begin_inset Box Frameless
3001 position "t"
3002 hor_pos "c"
3003 has_inner_box 1
3004 inner_pos "t"
3005 use_parbox 0
3006 width "100col%"
3007 special "none"
3008 height "1in"
3009 height_special "totalheight"
3010 status open
3011
3012 \begin_layout Plain Layout
3013 This section also needs updating.
3014  There is now material about this on the wiki, and it could be copied here.
3015 \end_layout
3016
3017 \end_inset
3018
3019
3020 \end_layout
3021
3022 \begin_layout Standard
3023 Copy the bibliography list with all entries to all subdocuments and transform
3024  them to a comment.
3025  This way LyX will find the 
3026 \begin_inset Flex CharStyle:Code
3027 status collapsed
3028
3029 \begin_layout Plain Layout
3030 .bib
3031 \end_layout
3032
3033 \end_inset
3034
3035 -files and you can easily insert references without making the bibliography
3036  list visible.
3037 \end_layout
3038
3039 \begin_layout Standard
3040 As the bibliography list is in a comment, LaTeX won't use use it and the
3041  references will look like this: [?], instead of like this: [1].
3042  One solution is to use the LaTeX-package 
3043 \begin_inset Flex CharStyle:Code
3044 status collapsed
3045
3046 \begin_layout Plain Layout
3047 comment
3048 \end_layout
3049
3050 \end_inset
3051
3052  that will only include comments by processing the files separately.
3053  To do this, add in the LaTeX preamble of every subdocument the following:
3054 \end_layout
3055
3056 \begin_layout LyX-Code
3057
3058 \backslash
3059 usepackage{comment}
3060 \end_layout
3061
3062 \begin_layout LyX-Code
3063
3064 \backslash
3065 includecomment{comment}
3066 \end_layout
3067
3068 \begin_layout Standard
3069 See also 
3070 \begin_inset Flex URL
3071 status collapsed
3072
3073 \begin_layout Plain Layout
3074
3075 http://wiki.lyx.org/FAQ/Unsorted#toc31
3076 \end_layout
3077
3078 \end_inset
3079
3080 .
3081 \end_layout
3082
3083 \begin_layout Section
3084 Fancy Headers and Footers
3085 \end_layout
3086
3087 \begin_layout Standard
3088 The default page layout is rather plain; for an 
3089 \begin_inset Flex CharStyle:Code
3090 status collapsed
3091
3092 \begin_layout Plain Layout
3093 article
3094 \end_layout
3095
3096 \end_inset
3097
3098  document class, all you get is a centered page number at the bottom of
3099  the page.
3100  This document uses KOMA-script's book class, so it appears to be a bit
3101  fancier.
3102  But to really put on a show, you need to set the document page style to
3103  
3104 \begin_inset Quotes eld
3105 \end_inset
3106
3107 fancy
3108 \begin_inset Quotes erd
3109 \end_inset
3110
3111 , as mentioned in the 
3112 \emph on
3113 User Guide
3114 \emph default
3115 .
3116  This section describes the LaTeX code you need to insert in your LaTeX
3117  preamble in order to get the desired effects.
3118 \end_layout
3119
3120 \begin_layout Standard
3121 For more information on fancy headers, see the 
3122 \begin_inset Flex CharStyle:Code
3123 status collapsed
3124
3125 \begin_layout Plain Layout
3126 fancyhdr
3127 \end_layout
3128
3129 \end_inset
3130
3131  package documentation.
3132  This can be found in the file 
3133 \begin_inset Flex CharStyle:Code
3134 status collapsed
3135
3136 \begin_layout Plain Layout
3137 fancyhdr.dvi
3138 \end_layout
3139
3140 \end_inset
3141
3142 , which should have been installed with your LaTeX distribution, or 
3143 \begin_inset CommandInset href
3144 LatexCommand href
3145 name "online"
3146 target "http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/"
3147
3148 \end_inset
3149
3150 .
3151 \end_layout
3152
3153 \begin_layout Standard
3154 The page header is divided into three fields, not surprisingly labeled 
3155 \begin_inset Quotes eld
3156 \end_inset
3157
3158 left
3159 \begin_inset Quotes erd
3160 \end_inset
3161
3162
3163 \begin_inset Quotes eld
3164 \end_inset
3165
3166 center
3167 \begin_inset Quotes erd
3168 \end_inset
3169
3170 , and 
3171 \begin_inset Quotes eld
3172 \end_inset
3173
3174 right
3175 \begin_inset Quotes erd
3176 \end_inset
3177
3178 .
3179  The footer is also divided into these three fields.
3180  The LaTeX commands to set these fields in the simplest manner are 
3181 \begin_inset Flex CharStyle:Code
3182 status collapsed
3183
3184 \begin_layout Plain Layout
3185
3186 \backslash
3187 lhead
3188 \end_layout
3189
3190 \end_inset
3191
3192
3193 \begin_inset Flex CharStyle:Code
3194 status collapsed
3195
3196 \begin_layout Plain Layout
3197
3198 \backslash
3199 chead
3200 \end_layout
3201
3202 \end_inset
3203
3204
3205 \begin_inset Flex CharStyle:Code
3206 status collapsed
3207
3208 \begin_layout Plain Layout
3209
3210 \backslash
3211 rhead
3212 \end_layout
3213
3214 \end_inset
3215
3216
3217 \begin_inset Flex CharStyle:Code
3218 status collapsed
3219
3220 \begin_layout Plain Layout
3221
3222 \backslash
3223 lfoot
3224 \end_layout
3225
3226 \end_inset
3227
3228 , etc.
3229  Suppose you wish to put your name in the upper left hand corner of each
3230  page.
3231  Simply insert the following command in the preamble: 
3232 \end_layout
3233
3234 \begin_layout Standard
3235
3236 \family typewriter
3237
3238 \backslash
3239 lhead{John Q.
3240  DocWriter}
3241 \end_layout
3242
3243 \begin_layout Standard
3244 You will now see your name in the upper left.
3245  If a field has a default entry that you would like to get rid of (often
3246  the page number appears in the central footer, simply include a command
3247  with a blank argument, e.
3248 \begin_inset space \thinspace{}
3249 \end_inset
3250
3251 g.:
3252 \end_layout
3253
3254 \begin_layout Standard
3255
3256 \family typewriter
3257
3258 \backslash
3259 cfoot{}
3260 \end_layout
3261
3262 \begin_layout Standard
3263 Let's get really fancy: lets put the section number with the word 
3264 \begin_inset Quotes eld
3265 \end_inset
3266
3267 Section
3268 \begin_inset Quotes erd
3269 \end_inset
3270
3271  (e.
3272 \begin_inset space \thinspace{}
3273 \end_inset
3274
3275 g.
3276 \begin_inset space \space{}
3277 \end_inset
3278
3279 Section 3) in the upper left, the page number (e.
3280 \begin_inset space \thinspace{}
3281 \end_inset
3282
3283 g.
3284 \begin_inset space \space{}
3285 \end_inset
3286
3287 Page 4) in the upper right, your name in the lower left, and the date in
3288  the lower right.
3289  The following commands should now appear in the preamble:
3290 \end_layout
3291
3292 \begin_layout Standard
3293
3294 \family typewriter
3295
3296 \backslash
3297 lhead{Section 
3298 \backslash
3299 thesection}
3300 \end_layout
3301
3302 \begin_layout Standard
3303
3304 \family typewriter
3305
3306 \backslash
3307 chead{}
3308 \end_layout
3309
3310 \begin_layout Standard
3311
3312 \family typewriter
3313
3314 \backslash
3315 rhead{Page 
3316 \backslash
3317 thepage}
3318 \end_layout
3319
3320 \begin_layout Standard
3321
3322 \family typewriter
3323
3324 \backslash
3325 lfoot{John Q.
3326  DocWriter}
3327 \end_layout
3328
3329 \begin_layout Standard
3330
3331 \family typewriter
3332
3333 \backslash
3334 cfoot{}
3335 \end_layout
3336
3337 \begin_layout Standard
3338
3339 \family typewriter
3340
3341 \backslash
3342 rfoot{
3343 \backslash
3344 today}
3345 \end_layout
3346
3347 \begin_layout Standard
3348 The commands 
3349 \begin_inset Flex CharStyle:Code
3350 status collapsed
3351
3352 \begin_layout Plain Layout
3353
3354 \backslash
3355 thesection
3356 \end_layout
3357
3358 \end_inset
3359
3360  and 
3361 \begin_inset Flex CharStyle:Code
3362 status collapsed
3363
3364 \begin_layout Plain Layout
3365
3366 \backslash
3367 thepage
3368 \end_layout
3369
3370 \end_inset
3371
3372  access LaTeX's section and page counters, and so print out the current
3373  section and page numbers.
3374  
3375 \begin_inset Flex CharStyle:Code
3376 status collapsed
3377
3378 \begin_layout Plain Layout
3379
3380 \backslash
3381 today
3382 \end_layout
3383
3384 \end_inset
3385
3386  simply prints out today's date.
3387 \end_layout
3388
3389 \begin_layout Standard
3390 The thicknesses of the horizontal rules drawn beneath the header and above
3391  the footer can also be modified.
3392  If you don't want one of the rules, set its thickness to 0.
3393  The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3394  Use commands
3395 \family typewriter
3396  
3397 \family default
3398 like 
3399 \begin_inset Flex CharStyle:Code
3400 status collapsed
3401
3402 \begin_layout Plain Layout
3403
3404 \backslash
3405 renewcommand{
3406 \backslash
3407 headrulewidth}{0.4pt}
3408 \end_layout
3409
3410 \end_inset
3411
3412  and 
3413 \begin_inset Flex CharStyle:Code
3414 status collapsed
3415
3416 \begin_layout Plain Layout
3417
3418 \backslash
3419 renewcommand{
3420 \backslash
3421 footrulewidth}{0.4pt}
3422 \end_layout
3423
3424 \end_inset
3425
3426  to set the thicknesses.
3427 \end_layout
3428
3429 \begin_layout Standard
3430 You can switch the header/footer settings on and off for individual pages
3431  using commands like 
3432 \begin_inset Flex CharStyle:Code
3433 status collapsed
3434
3435 \begin_layout Plain Layout
3436
3437 \backslash
3438 thispagestyle{empty}
3439 \end_layout
3440
3441 \end_inset
3442
3443
3444 \begin_inset Flex CharStyle:Code
3445 status collapsed
3446
3447 \begin_layout Plain Layout
3448
3449 \backslash
3450 thispagestyle{plain}
3451 \end_layout
3452
3453 \end_inset
3454
3455 , and 
3456 \begin_inset Flex CharStyle:Code
3457 status collapsed
3458
3459 \begin_layout Plain Layout
3460
3461 \backslash
3462 thispagestyle{fancy}
3463 \end_layout
3464
3465 \end_inset
3466
3467 .
3468  Simply insert them in the text on the page you want changed and mark them
3469  as TeX code.
3470  In fact, title pages are marked as plain by default, while following pages
3471  are marked fancy when using the global fancy setting.
3472 \end_layout
3473
3474 \begin_layout Standard
3475 As a final example, it is possible to include an image in the header or
3476  footer.
3477  Suppose you want to put a company logo in the upper lefthand corner.
3478  You might try something like
3479 \end_layout
3480
3481 \begin_layout Standard
3482
3483 \family typewriter
3484
3485 \backslash
3486 lhead{
3487 \backslash
3488 resizebox{1in}{!}{
3489 \backslash
3490 includegraphics{logo.eps}}}
3491 \end_layout
3492
3493 \begin_layout Standard
3494 \noindent
3495 (you may need to preface this with 
3496 \begin_inset Flex CharStyle:Code
3497 status collapsed
3498
3499 \begin_layout Plain Layout
3500 \noindent
3501
3502 \backslash
3503 usepackage{graphics}
3504 \end_layout
3505
3506 \end_inset
3507
3508  if you don't include graphics elsewhere in your document).
3509 \end_layout
3510
3511 \begin_layout Section
3512 Itemize Bullet Selection
3513 \begin_inset CommandInset label
3514 LatexCommand label
3515 name "sec:bullet"
3516
3517 \end_inset
3518
3519
3520 \end_layout
3521
3522 \begin_layout Standard
3523 by
3524 \noun on
3525  Allan Rae
3526 \end_layout
3527
3528 \begin_layout Subsection
3529 Introduction
3530 \end_layout
3531
3532 \begin_layout Standard
3533 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3534  Using this dialog you can easily specify what bullet shape to use at each
3535  level of an itemized list.
3536  These settings are document-wide so you won't be able to specify different
3537  sets of bullets for different paragraphs.
3538 \begin_inset Foot
3539 status collapsed
3540
3541 \begin_layout Plain Layout
3542 Well, actually you can but you'll have to do it by hand.
3543 \end_layout
3544
3545 \end_inset
3546
3547
3548 \end_layout
3549
3550 \begin_layout Subsection
3551 How it looks
3552 \end_layout
3553
3554 \begin_layout Standard
3555 Open the dialog by selecting the 
3556 \begin_inset Flex CharStyle:MenuItem
3557 status collapsed
3558
3559 \begin_layout Plain Layout
3560 Document\SpecialChar \menuseparator
3561 Settings
3562 \end_layout
3563
3564 \end_inset
3565
3566  menu item and then select the 
3567 \begin_inset Flex CharStyle:MenuItem
3568 status collapsed
3569
3570 \begin_layout Plain Layout
3571 Bullets
3572 \end_layout
3573
3574 \end_inset
3575
3576  tab.
3577 \end_layout
3578
3579 \begin_layout Standard
3580 The dialog provides you with a table of bullet shapes.
3581  A column of buttons on the left of the table provides access to the six
3582  different panels of bullet shapes.
3583  The row of buttons across the top is used to select which bullet depth
3584  you are changing.
3585  A text entry under the table shows the currently selected bullet shape's
3586  LaTeX equivalent and this can be edited if desired.
3587  If you do modify the text you will also need to specify any needed packages
3588  in the LaTeX preamble.
3589 \end_layout
3590
3591 \begin_layout Standard
3592 The six panels are divided up by the packages they require.
3593  The following table shows the mappings from button name to LaTeX packages.
3594 \end_layout
3595
3596 \begin_layout Standard
3597 \align center
3598 \begin_inset Tabular
3599 <lyxtabular version="3" rows="7" columns="2">
3600 <features tabularvalignment="middle">
3601 <column alignment="center" valignment="top" width="0pt">
3602 <column alignment="center" valignment="top" width="0pt">
3603 <row>
3604 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3605 \begin_inset Text
3606
3607 \begin_layout Plain Layout
3608
3609 \family roman
3610 \series medium
3611 \shape up
3612 \size normal
3613 \emph off
3614 \bar no
3615 \noun off
3616 \color none
3617 Button
3618 \end_layout
3619
3620 \end_inset
3621 </cell>
3622 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3623 \begin_inset Text
3624
3625 \begin_layout Plain Layout
3626
3627 \family roman
3628 \series medium
3629 \shape up
3630 \size normal
3631 \emph off
3632 \bar no
3633 \noun off
3634 \color none
3635 Packages Required
3636 \end_layout
3637
3638 \end_inset
3639 </cell>
3640 </row>
3641 <row>
3642 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3643 \begin_inset Text
3644
3645 \begin_layout Plain Layout
3646
3647 \family sans
3648 \series medium
3649 \shape up
3650 \size normal
3651 \emph off
3652 \bar no
3653 \noun off
3654 \color none
3655 Standard
3656 \end_layout
3657
3658 \end_inset
3659 </cell>
3660 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3661 \begin_inset Text
3662
3663 \begin_layout Plain Layout
3664
3665 \series medium
3666 \shape up
3667 \size normal
3668 \emph off
3669 \bar no
3670 \noun off
3671 \color none
3672 base LaTeX
3673 \end_layout
3674
3675 \end_inset
3676 </cell>
3677 </row>
3678 <row>
3679 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3680 \begin_inset Text
3681
3682 \begin_layout Plain Layout
3683
3684 \family sans
3685 \series medium
3686 \shape up
3687 \size normal
3688 \emph off
3689 \bar no
3690 \noun off
3691 \color none
3692 Maths
3693 \end_layout
3694
3695 \end_inset
3696 </cell>
3697 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3698 \begin_inset Text
3699
3700 \begin_layout Plain Layout
3701
3702 \family typewriter
3703 \series medium
3704 \shape up
3705 \size normal
3706 \emph off
3707 \bar no
3708 \noun off
3709 \color none
3710 amssymb.sty
3711 \end_layout
3712
3713 \end_inset
3714 </cell>
3715 </row>
3716 <row>
3717 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3718 \begin_inset Text
3719
3720 \begin_layout Plain Layout
3721
3722 \family sans
3723 \series medium
3724 \shape up
3725 \size normal
3726 \emph off
3727 \bar no
3728 \noun off
3729 \color none
3730 Ding1
3731 \end_layout
3732
3733 \end_inset
3734 </cell>
3735 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3736 \begin_inset Text
3737
3738 \begin_layout Plain Layout
3739
3740 \family typewriter
3741 \series medium
3742 \shape up
3743 \size normal
3744 \emph off
3745 \bar no
3746 \noun off
3747 \color none
3748 pifont.sty
3749 \end_layout
3750
3751 \end_inset
3752 </cell>
3753 </row>
3754 <row>
3755 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3756 \begin_inset Text
3757
3758 \begin_layout Plain Layout
3759
3760 \family sans
3761 \series medium
3762 \shape up
3763 \size normal
3764 \emph off
3765 \bar no
3766 \noun off
3767 \color none
3768 Ding2
3769 \end_layout
3770
3771 \end_inset
3772 </cell>
3773 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3774 \begin_inset Text
3775
3776 \begin_layout Plain Layout
3777
3778 \family typewriter
3779 \series medium
3780 \shape up
3781 \size normal
3782 \emph off
3783 \bar no
3784 \noun off
3785 \color none
3786 pifont.sty
3787 \end_layout
3788
3789 \end_inset
3790 </cell>
3791 </row>
3792 <row>
3793 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3794 \begin_inset Text
3795
3796 \begin_layout Plain Layout
3797
3798 \family sans
3799 \series medium
3800 \shape up
3801 \size normal
3802 \emph off
3803 \bar no
3804 \noun off
3805 \color none
3806 Ding3
3807 \end_layout
3808
3809 \end_inset
3810 </cell>
3811 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3812 \begin_inset Text
3813
3814 \begin_layout Plain Layout
3815
3816 \family typewriter
3817 \series medium
3818 \shape up
3819 \size normal
3820 \emph off
3821 \bar no
3822 \noun off
3823 \color none
3824 pifont.sty
3825 \end_layout
3826
3827 \end_inset
3828 </cell>
3829 </row>
3830 <row>
3831 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3832 \begin_inset Text
3833
3834 \begin_layout Plain Layout
3835
3836 \family sans
3837 \series medium
3838 \shape up
3839 \size normal
3840 \emph off
3841 \bar no
3842 \noun off
3843 \color none
3844 Ding4
3845 \end_layout
3846
3847 \end_inset
3848 </cell>
3849 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3850 \begin_inset Text
3851
3852 \begin_layout Plain Layout
3853
3854 \family typewriter
3855 \series medium
3856 \shape up
3857 \size normal
3858 \emph off
3859 \bar no
3860 \noun off
3861 \color none
3862 pifont.sty
3863 \end_layout
3864
3865 \end_inset
3866 </cell>
3867 </row>
3868 </lyxtabular>
3869
3870 \end_inset
3871
3872
3873 \end_layout
3874
3875 \begin_layout Standard
3876 LyX doesn't stop you using bullets from packages you don't have.
3877  If you get errors from LaTeX when you try to view or print the file, then
3878  it is likely you are missing a package.
3879 \begin_inset Foot
3880 status collapsed
3881
3882 \begin_layout Plain Layout
3883 LyX doesn't restrict your use since you may be editing locally and exporting
3884  elsewhere.
3885 \end_layout
3886
3887 \end_inset
3888
3889
3890 \end_layout
3891
3892 \begin_layout Subsection
3893 How to use it
3894 \end_layout
3895
3896 \begin_layout Standard
3897 Select which bullet depth you want to change then select the bullet shape
3898  and size.
3899  Any changes will not be visible in LyX, but are visible when viewing the
3900  document.
3901 \end_layout
3902
3903 \begin_layout Standard
3904 You can reset a bullet shape to the default simply by clicking your right
3905  mouse button on the appropriate bullet depth button.
3906 \begin_inset Foot
3907 status collapsed
3908
3909 \begin_layout Plain Layout
3910 If you 
3911 \emph on
3912 really
3913 \emph default
3914  want to have multiple sets of paragraphs with different sets of bullets
3915  in each, then you're going to have to get your hands dirty with TeX code.
3916  The bullet selection dialog can help though because it provides you with
3917  the LaTeX code for a wide range of bullet shapes.
3918  To make your own custom paragraphs you have the following options:
3919 \end_layout
3920
3921 \begin_layout Plain Layout
3922 \begin_inset ERT
3923 status open
3924
3925 \begin_layout Plain Layout
3926
3927
3928 \backslash
3929 let
3930 \backslash
3931 savelabelitemi=
3932 \backslash
3933 labelitemi
3934 \end_layout
3935
3936 \end_inset
3937
3938
3939 \end_layout
3940
3941 \begin_layout Plain Layout
3942 \begin_inset ERT
3943 status open
3944
3945 \begin_layout Plain Layout
3946
3947
3948 \backslash
3949 renewcommand
3950 \backslash
3951 labelitemi[0]{
3952 \backslash
3953 small
3954 \backslash
3955 (
3956 \backslash
3957 sharp
3958 \backslash
3959 )}
3960 \end_layout
3961
3962 \end_inset
3963
3964
3965 \end_layout
3966
3967 \begin_layout Itemize
3968 Use the LaTeX command 
3969 \begin_inset Flex CharStyle:Code
3970 status collapsed
3971
3972 \begin_layout Plain Layout
3973
3974 \backslash
3975 renewcommand{}{}
3976 \end_layout
3977
3978 \end_inset
3979
3980  to specify a new bullet shape for a given depth.
3981  You'll also need to save the current bullet shape so you can restore it
3982  again afterwards.
3983  In this itemized list the following LaTeX code was used to change the bullet
3984  used for the first depth.
3985 \end_layout
3986
3987 \begin_deeper
3988 \begin_layout LyX-Code
3989
3990 \backslash
3991 let
3992 \backslash
3993 savelabelitemi=
3994 \backslash
3995 labelitemi 
3996 \end_layout
3997
3998 \begin_layout LyX-Code
3999
4000 \backslash
4001 renewcommand
4002 \backslash
4003 labelitemi[0]{
4004 \backslash
4005 small
4006 \backslash
4007 (
4008 \backslash
4009 sharp
4010 \backslash
4011 )}
4012 \end_layout
4013
4014 \end_deeper
4015 \begin_layout Itemize
4016 Note that the itemize depth is specified in Roman numerals as part of the
4017  
4018 \family typewriter
4019
4020 \backslash
4021 labelitem
4022 \family default
4023  command.
4024 \end_layout
4025
4026 \begin_layout Itemize
4027 \begin_inset ERT
4028 status open
4029
4030 \begin_layout Plain Layout
4031
4032 [
4033 \backslash
4034 (
4035 \backslash
4036 star
4037 \backslash
4038 )]
4039 \end_layout
4040
4041 \end_inset
4042
4043  Specify each individual entry by starting each item with the bullet shape
4044  enclosed in square brackets and set as 
4045 \begin_inset Flex CharStyle:MenuItem
4046 status collapsed
4047
4048 \begin_layout Plain Layout
4049 TeX Code
4050 \end_layout
4051
4052 \end_inset
4053
4054 .
4055  For example, this item was started with 
4056 \begin_inset Flex CharStyle:Code
4057 status collapsed
4058
4059 \begin_layout Plain Layout
4060 [
4061 \backslash
4062 (
4063 \backslash
4064 star
4065 \backslash
4066 )]
4067 \end_layout
4068
4069 \end_inset
4070
4071 .
4072 \end_layout
4073
4074 \begin_layout Plain Layout
4075 \begin_inset ERT
4076 status open
4077
4078 \begin_layout Plain Layout
4079
4080
4081 \backslash
4082 renewcommand
4083 \backslash
4084 labelitemi[0]{
4085 \backslash
4086 savelabelitemi}
4087 \end_layout
4088
4089 \end_inset
4090
4091
4092 \end_layout
4093
4094 \begin_layout Plain Layout
4095 You'll also need to revert the labelitem back to its previous setting for
4096  the global bullet shape settings to remain in effect.
4097  The way used here was:
4098 \end_layout
4099
4100 \begin_layout LyX-Code
4101
4102 \backslash
4103 renewcommand
4104 \backslash
4105 labelitemi[0]{
4106 \backslash
4107 savelabelitemi}
4108 \end_layout
4109
4110 \end_inset
4111
4112
4113 \end_layout
4114
4115 \begin_layout Chapter
4116 The LyX Server
4117 \end_layout
4118
4119 \begin_layout Section
4120 Introduction
4121 \end_layout
4122
4123 \begin_layout Standard
4124 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4125  and retrieve information about the LyX internal state.
4126  This is only intended for advanced users, but they should find it useful.
4127  It is by writing to the LyX server, for example, that bibliography managers,
4128  such as JabRef, are able to 
4129 \begin_inset Quotes eld
4130 \end_inset
4131
4132 push
4133 \begin_inset Quotes erd
4134 \end_inset
4135
4136  citations to LyX.
4137 \end_layout
4138
4139 \begin_layout Standard
4140 Please note that, at present, 
4141 \emph on
4142 the server does not work natively on Windows
4143 \emph default
4144
4145 \begin_inset Foot
4146 status collapsed
4147
4148 \begin_layout Plain Layout
4149 There is no reason it cannot do so.
4150  But none of the developers on Windows have yet implemented this functionality
4151  there.
4152 \end_layout
4153
4154 \end_inset
4155
4156  but it does work with Cygwin versions of LyX.
4157 \end_layout
4158
4159 \begin_layout Section
4160 Starting the LyX Server
4161 \end_layout
4162
4163 \begin_layout Standard
4164 The LyX server works through the use of a pair of named pipes.
4165  These are usually located in 
4166 \begin_inset Flex CharStyle:Code
4167 status collapsed
4168
4169 \begin_layout Plain Layout
4170 UserDir
4171 \end_layout
4172
4173 \end_inset
4174
4175  and have the names 
4176 \begin_inset Quotes eld
4177 \end_inset
4178
4179
4180 \begin_inset Flex CharStyle:Code
4181 status collapsed
4182
4183 \begin_layout Plain Layout
4184 lyxpipe.in
4185 \end_layout
4186
4187 \end_inset
4188
4189
4190 \begin_inset Quotes erd
4191 \end_inset
4192
4193  and 
4194 \begin_inset Quotes eld
4195 \end_inset
4196
4197
4198 \begin_inset Flex CharStyle:Code
4199 status collapsed
4200
4201 \begin_layout Plain Layout
4202 lyxpipe.out
4203 \end_layout
4204
4205 \end_inset
4206
4207
4208 \begin_inset Quotes erd
4209 \end_inset
4210
4211 .
4212  External programs write into 
4213 \begin_inset Flex CharStyle:Code
4214 status collapsed
4215
4216 \begin_layout Plain Layout
4217 .lyxpipe.in
4218 \end_layout
4219
4220 \end_inset
4221
4222  and read back data from 
4223 \begin_inset Flex CharStyle:Code
4224 status collapsed
4225
4226 \begin_layout Plain Layout
4227 .lyxpipe.out
4228 \end_layout
4229
4230 \end_inset
4231
4232 .
4233  The stem of the pipe names can be defined in the 
4234 \begin_inset Flex CharStyle:MenuItem
4235 status collapsed
4236
4237 \begin_layout Plain Layout
4238 Tools\SpecialChar \menuseparator
4239 Preferences
4240 \end_layout
4241
4242 \end_inset
4243
4244  dialog, for example 
4245 \begin_inset Flex CharStyle:Code
4246 status collapsed
4247
4248 \begin_layout Plain Layout
4249 "/home/myhome/lyxpipe"
4250 \end_layout
4251
4252 \end_inset
4253
4254 .
4255  You 
4256 \emph on
4257 must
4258 \emph default
4259  configure this manually in order for the server to start.
4260 \end_layout
4261
4262 \begin_layout Standard
4263 LyX will add the '
4264 \begin_inset Flex CharStyle:Code
4265 status collapsed
4266
4267 \begin_layout Plain Layout
4268 .in
4269 \end_layout
4270
4271 \end_inset
4272
4273 ' and '
4274 \begin_inset Flex CharStyle:Code
4275 status collapsed
4276
4277 \begin_layout Plain Layout
4278 .out
4279 \end_layout
4280
4281 \end_inset
4282
4283 ' to create the pipes.
4284  If one of the pipes already exists, LyX will assume that another LyX process
4285  is already running and will not start the server.
4286  If for some other reason, an unused 
4287 \begin_inset Quotes eld
4288 \end_inset
4289
4290 stale
4291 \begin_inset Quotes erd
4292 \end_inset
4293
4294  pipe is left in existence when LyX closes, then LyX will try to delete
4295  it.
4296  If this fails for some reason, you will need to delete the pipes manually
4297  and then restart LyX.
4298 \end_layout
4299
4300 \begin_layout Standard
4301 To have several LyX processes with servers at the same time, you have to
4302  use different configurations, perhaps by using separate user directories,
4303  each with its own 
4304 \begin_inset Flex CharStyle:Code
4305 status collapsed
4306
4307 \begin_layout Plain Layout
4308 preferences
4309 \end_layout
4310
4311 \end_inset
4312
4313  file, for each process.
4314 \end_layout
4315
4316 \begin_layout Standard
4317 If you are developing a client program, you might find it useful to enable
4318  debugging information from the LyX server.
4319  Do this by starting LyX as 
4320 \begin_inset Flex CharStyle:Code
4321 status collapsed
4322
4323 \begin_layout Plain Layout
4324 lyx -dbg lyxserver
4325 \end_layout
4326
4327 \end_inset
4328
4329 .
4330 \end_layout
4331
4332 \begin_layout Standard
4333 You can find a complete example client written in C in the source distribution
4334  as 
4335 \begin_inset Flex CharStyle:Code
4336 status collapsed
4337
4338 \begin_layout Plain Layout
4339 development/lyxserver/server_monitor.c
4340 \end_layout
4341
4342 \end_inset
4343
4344 .
4345 \end_layout
4346
4347 \begin_layout Standard
4348 Another useful tool is command-line based client you will find in 
4349 \begin_inset Flex CharStyle:Code
4350 status collapsed
4351
4352 \begin_layout Plain Layout
4353 src/client/lyxclient
4354 \end_layout
4355
4356 \end_inset
4357
4358 .
4359 \end_layout
4360
4361 \begin_layout Section
4362 Normal communication
4363 \end_layout
4364
4365 \begin_layout Standard
4366 To issue a LyX call, the client writes a line of ASCII text into the input
4367  pipe.
4368  This line has the following format:
4369 \end_layout
4370
4371 \begin_layout Quote
4372 LYXCMD:
4373 \emph on
4374 clientname
4375 \emph default
4376 :
4377 \emph on
4378 function
4379 \emph default
4380 :
4381 \emph on
4382 argument
4383 \end_layout
4384
4385 \begin_layout Description
4386 clientname is a name that the client can choose arbitrarily.
4387  Its only use is that LyX will echo it if it sends an answer—so a client
4388  can dispatch results from different requesters.
4389 \end_layout
4390
4391 \begin_layout Description
4392 function is the function you want LyX to perform.
4393  It is the same as the commands you'd use in the minibuffer.
4394 \end_layout
4395
4396 \begin_layout Description
4397 argument is an optional argument which is meaningful only to some functions
4398  (for instance, the 
4399 \begin_inset Quotes eld
4400 \end_inset
4401
4402 self-insert
4403 \begin_inset Quotes erd
4404 \end_inset
4405
4406  LFUN will insert the argument as text at the cursor position).
4407 \end_layout
4408
4409 \begin_layout Standard
4410 The answer from LyX will arrive in the output pipe and be of the form
4411 \end_layout
4412
4413 \begin_layout Quote
4414 INFO:
4415 \emph on
4416 clientname
4417 \emph default
4418 :
4419 \emph on
4420 function
4421 \emph default
4422 :
4423 \emph on
4424 data
4425 \end_layout
4426
4427 \begin_layout Standard
4428 where 
4429 \emph on
4430 clientname
4431 \emph default
4432  and 
4433 \emph on
4434 function
4435 \emph default
4436  are just echoed from the command request, while 
4437 \emph on
4438 data
4439 \emph default
4440  is more or less useful information filled according to how the command
4441  execution worked out.
4442  Some commands, such as 
4443 \begin_inset Quotes eld
4444 \end_inset
4445
4446 font-state
4447 \begin_inset Quotes erd
4448 \end_inset
4449
4450 , will return information about the internal state of LyX, while other will
4451  return an empty data-response.
4452  This means that the command execution went fine.
4453 \end_layout
4454
4455 \begin_layout Standard
4456 In case of errors, the response from LyX will have this form
4457 \end_layout
4458
4459 \begin_layout Quote
4460 ERROR:
4461 \emph on
4462 clientname
4463 \emph default
4464 :
4465 \emph on
4466 function
4467 \emph default
4468 :
4469 \emph on
4470 error message
4471 \end_layout
4472
4473 \begin_layout Standard
4474 where the 
4475 \emph on
4476 error message
4477 \emph default
4478  should contain an explanation of why the command failed.
4479 \end_layout
4480
4481 \begin_layout Standard
4482 Examples:
4483 \end_layout
4484
4485 \begin_layout LyX-Code
4486 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
4487 \begin_inset Newline newline
4488 \end_inset
4489
4490 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
4491 \begin_inset Newline newline
4492 \end_inset
4493
4494 read a <~/.lyxpipe.out
4495 \begin_inset Newline newline
4496 \end_inset
4497
4498 echo $a
4499 \end_layout
4500
4501 \begin_layout Section
4502 Notification
4503 \end_layout
4504
4505 \begin_layout Standard
4506 LyX can notify clients of events going on asynchronously.
4507  Currently it will only do this if the user binds a key sequence with the
4508  function 
4509 \begin_inset Quotes eld
4510 \end_inset
4511
4512 notify
4513 \begin_inset Quotes erd
4514 \end_inset
4515
4516 .
4517  The format of the string LyX sends is as follows:
4518 \end_layout
4519
4520 \begin_layout Quote
4521 \begin_inset Flex CharStyle:Code
4522 status collapsed
4523
4524 \begin_layout Plain Layout
4525 NOTIFY:
4526 \end_layout
4527
4528 \end_inset
4529
4530
4531 \emph on
4532 key-sequence
4533 \end_layout
4534
4535 \begin_layout Standard
4536 where 
4537 \emph on
4538 key-sequence
4539 \emph default
4540  is the printed representation of the key sequence that was actually typed
4541  by the user.
4542 \end_layout
4543
4544 \begin_layout Standard
4545 This mechanism can be used to extend LyX's command set and implement macros.
4546  Bind some key sequence to 
4547 \begin_inset Quotes eld
4548 \end_inset
4549
4550 notify
4551 \begin_inset Quotes erd
4552 \end_inset
4553
4554 .
4555  Then start a client that listens on the output pipe, dispatches the command
4556  according to the sequence, and starts a function that may use LyX calls
4557  and LyX requests to issue a command or a series of commands to LyX.
4558 \end_layout
4559
4560 \begin_layout Section
4561 The simple LyX Server Protocol
4562 \end_layout
4563
4564 \begin_layout Standard
4565 LyX implements a simple protocol that can be used for session management.
4566  All messages are of the form
4567 \end_layout
4568
4569 \begin_layout Quote
4570 LYXSRV:
4571 \emph on
4572 clientname
4573 \emph default
4574 :
4575 \emph on
4576 protocol message
4577 \end_layout
4578
4579 \begin_layout Standard
4580 where 
4581 \emph on
4582 protocol message
4583 \emph default
4584  can be 
4585 \begin_inset Quotes eld
4586 \end_inset
4587
4588 hello
4589 \begin_inset Quotes erd
4590 \end_inset
4591
4592  or 
4593 \begin_inset Quotes eld
4594 \end_inset
4595
4596 bye
4597 \begin_inset Quotes erd
4598 \end_inset
4599
4600 .
4601  If 
4602 \begin_inset Quotes eld
4603 \end_inset
4604
4605 hello
4606 \begin_inset Quotes erd
4607 \end_inset
4608
4609  is received from a client, LyX will report back to inform the client that
4610  it's listening to it's messages, while 
4611 \begin_inset Quotes eld
4612 \end_inset
4613
4614 bye
4615 \begin_inset Quotes erd
4616 \end_inset
4617
4618  sent from LyX will inform clients that LyX is closing.
4619 \end_layout
4620
4621 \begin_layout Section
4622 Reverse DVI/PDF search
4623 \end_layout
4624
4625 \begin_layout Standard
4626 Some DVI/PDF viewers
4627 \begin_inset Foot
4628 status collapsed
4629
4630 \begin_layout Plain Layout
4631 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
4632  Skim on Mac OSX and SumatraPDF on Windows.
4633 \end_layout
4634
4635 \end_inset
4636
4637  provide 
4638 \emph on
4639 reverse search
4640 \emph default
4641  facility (also called 
4642 \emph on
4643 inverse search
4644 \emph default
4645 ).
4646  This means that you can tell LyX to put the cursor to a specific line in
4647  the document by clicking at the respective position in the DVI/PDF output.
4648  To achieve this, the viewer must be able to communicate with LyX.
4649  This is done via the LyX server either by using the named pipe (
4650 \emph on
4651 lyxpipe
4652 \emph default
4653 ), or the UNIX domain socket (
4654 \emph on
4655 lyxsocket
4656 \emph default
4657 ) that LyX creates in its temporary directory (this is the way the 
4658 \begin_inset Flex CharStyle:Code
4659 status collapsed
4660
4661 \begin_layout Plain Layout
4662 lyxclient
4663 \end_layout
4664
4665 \end_inset
4666
4667  program communicates with LyX).
4668  In some cases, you need a helper script that mediates between the viewer
4669  and LyX, in others, the viewer can communicate with LyX directly.
4670  This depends on the selected viewer and on your operating system.
4671  The same applies to the way viewers need to be configured and the way the
4672  reverse search is actually performed.
4673  In what follows, we will thus describe how to setup reverse search for
4674  specific viewers.
4675  Before we turn to this, though, we will explain what needs to be done generally
4676  to enable reverse search in the DVI/PDF output.
4677 \end_layout
4678
4679 \begin_layout Subsection
4680 Enabling reverse search
4681 \end_layout
4682
4683 \begin_layout Standard
4684 LaTeX provides several different methods for reverse search.
4685  Some are built-in in the 
4686 \begin_inset Flex CharStyle:Code
4687 status collapsed
4688
4689 \begin_layout Plain Layout
4690 latex/pdflatex
4691 \end_layout
4692
4693 \end_inset
4694
4695  program, some are provided by external packages.
4696  Your choice depends on whether your LaTeX distribution already provides
4697  a given method (the built-in methods are rather new) and whether your viewer
4698  can cope with it.
4699  The available methods are described in the following.
4700 \end_layout
4701
4702 \begin_layout Subsubsection*
4703 Built-in DVI-search via src-specials (DVI only) 
4704 \end_layout
4705
4706 \begin_layout Standard
4707 This method provides the DVI file with the necessary information for reverse
4708  search.
4709  It is available in LaTeX since quite some time (any somewhat recent LaTeX
4710  distribution should include it), and it works reliably.
4711  To enable it, change the 
4712 \begin_inset Flex CharStyle:MenuItem
4713 status collapsed
4714
4715 \begin_layout Plain Layout
4716 LaT
4717 \begin_inset ERT
4718 status collapsed
4719
4720 \begin_layout Plain Layout
4721
4722 {}
4723 \end_layout
4724
4725 \end_inset
4726
4727 eX (plain)->DVI
4728 \end_layout
4729
4730 \end_inset
4731
4732  or 
4733 \begin_inset Flex CharStyle:MenuItem
4734 status collapsed
4735
4736 \begin_layout Plain Layout
4737 LaT
4738 \begin_inset ERT
4739 status collapsed
4740
4741 \begin_layout Plain Layout
4742
4743 {}
4744 \end_layout
4745
4746 \end_inset
4747
4748 eX (plain)->DraftDVI
4749 \end_layout
4750
4751 \end_inset
4752
4753  converter in 
4754 \begin_inset Flex CharStyle:MenuItem
4755 status collapsed
4756
4757 \begin_layout Plain Layout
4758 Preferences\SpecialChar \menuseparator
4759 File Handling\SpecialChar \menuseparator
4760 Converters
4761 \end_layout
4762
4763 \end_inset
4764
4765  to 
4766 \begin_inset Flex CharStyle:Code
4767 status collapsed
4768
4769 \begin_layout Plain Layout
4770 latex -src-specials $$i
4771 \end_layout
4772
4773 \end_inset
4774
4775 .
4776  If this doesn't work, check if your TeX engine needs different options
4777  (the syntax might differ in some distributions).
4778 \end_layout
4779
4780 \begin_layout Subsubsection*
4781 External Packages (PDFSync and scrltx) 
4782 \end_layout
4783
4784 \begin_layout Standard
4785 The packages 
4786 \emph on
4787 pdfsync
4788 \emph default
4789  and 
4790 \emph on
4791 scrltx
4792 \emph default
4793  provide reverse search facility for PDF output (via pdflatex) and DVI output,
4794  respectively.
4795  In order to enable it, load the packages in the LyX preamble: 
4796 \end_layout
4797
4798 \begin_layout Itemize
4799 \begin_inset Flex CharStyle:Code
4800 status collapsed
4801
4802 \begin_layout Plain Layout
4803
4804 \backslash
4805 usepackage{pdfsync}
4806 \end_layout
4807
4808 \end_inset
4809
4810  for reverse PDF search,
4811 \end_layout
4812
4813 \begin_layout Itemize
4814  
4815 \begin_inset Flex CharStyle:Code
4816 status collapsed
4817
4818 \begin_layout Plain Layout
4819
4820 \backslash
4821 usepackage[active]{srcltx}
4822 \end_layout
4823
4824 \end_inset
4825
4826  for reverse DVI search.
4827 \end_layout
4828
4829 \begin_layout Standard
4830 If you want to be able to perform both DVI and PDF reverse searches, you
4831  can also insert in the preamble the following lines
4832 \end_layout
4833
4834 \begin_layout LyX-Code
4835
4836 \backslash
4837 usepackage{ifpdf}
4838 \begin_inset Newline newline
4839 \end_inset
4840
4841
4842 \backslash
4843 ifpdf
4844 \begin_inset Newline newline
4845 \end_inset
4846
4847   
4848 \backslash
4849 usepackage{pdfsync}
4850 \begin_inset Newline newline
4851 \end_inset
4852
4853
4854 \backslash
4855 else
4856 \begin_inset Newline newline
4857 \end_inset
4858
4859   
4860 \backslash
4861 usepackage[active]{srcltx}
4862 \begin_inset Newline newline
4863 \end_inset
4864
4865
4866 \backslash
4867 fi
4868 \end_layout
4869
4870 \begin_layout Standard
4871 This way, you can preview the file as either DVI or PDF (pdflatex) and the
4872  right package will be used.
4873 \end_layout
4874
4875 \begin_layout Standard
4876 Note that PDFSync might affect the output layout of your document.
4877  It is therefore advised to disable PDFsync for final documents.
4878 \end_layout
4879
4880 \begin_layout Subsubsection*
4881 Built-in reverse search via SyncTeX (DVI and PDF) 
4882 \end_layout
4883
4884 \begin_layout Standard
4885 Recent versions of 
4886 \begin_inset Flex CharStyle:Code
4887 status collapsed
4888
4889 \begin_layout Plain Layout
4890 (pdf)latex
4891 \end_layout
4892
4893 \end_inset
4894
4895  have built-in support for both PDF and DVI reverse search.
4896  This so-called 
4897 \emph on
4898 SyncTeX
4899 \emph default
4900  facility is basically the result of the integration of the PDFSync package
4901  to the pdftex program and its merge with the 
4902 \emph on
4903 scr-specials
4904 \emph default
4905  approach.
4906  You need at least TeXLive 2008 or a recent MikTeX distribution in order
4907  to use it.
4908  Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
4909  already provide SyncTeX support.
4910 \end_layout
4911
4912 \begin_layout Standard
4913 To enable SyncTeX for DVI output, change the 
4914 \begin_inset Flex CharStyle:MenuItem
4915 status collapsed
4916
4917 \begin_layout Plain Layout
4918 LaT
4919 \begin_inset ERT
4920 status collapsed
4921
4922 \begin_layout Plain Layout
4923
4924 {}
4925 \end_layout
4926
4927 \end_inset
4928
4929 eX (plain) -> DVI
4930 \end_layout
4931
4932 \end_inset
4933
4934  or 
4935 \begin_inset Flex CharStyle:MenuItem
4936 status collapsed
4937
4938 \begin_layout Plain Layout
4939 LaT
4940 \begin_inset ERT
4941 status collapsed
4942
4943 \begin_layout Plain Layout
4944
4945 {}
4946 \end_layout
4947
4948 \end_inset
4949
4950 eX (plain) -> DraftDVI
4951 \end_layout
4952
4953 \end_inset
4954
4955  converter in 
4956 \begin_inset Flex CharStyle:MenuItem
4957 status collapsed
4958
4959 \begin_layout Plain Layout
4960 Preferences\SpecialChar \menuseparator
4961 File Handling\SpecialChar \menuseparator
4962 Converters
4963 \end_layout
4964
4965 \end_inset
4966
4967  to 
4968 \begin_inset Flex CharStyle:Code
4969 status collapsed
4970
4971 \begin_layout Plain Layout
4972 latex -synctex=1 $$i
4973 \end_layout
4974
4975 \end_inset
4976
4977 , and for PDF output, change the 
4978 \begin_inset Flex CharStyle:MenuItem
4979 status collapsed
4980
4981 \begin_layout Plain Layout
4982 LaT
4983 \begin_inset ERT
4984 status collapsed
4985
4986 \begin_layout Plain Layout
4987
4988 {}
4989 \end_layout
4990
4991 \end_inset
4992
4993 eX (pdflatex) -> PDF (pdflatex)
4994 \end_layout
4995
4996 \end_inset
4997
4998  or converter to 
4999 \begin_inset Flex CharStyle:Code
5000 status collapsed
5001
5002 \begin_layout Plain Layout
5003 pdflatex -synctex=1 $$i
5004 \end_layout
5005
5006 \end_inset
5007
5008 .
5009  Check the documentation of your viewer whether the viewer needs to be configure
5010 d for the use with SyncTeX.
5011 \begin_inset Foot
5012 status collapsed
5013
5014 \begin_layout Plain Layout
5015 The 
5016 \begin_inset Flex CharStyle:Code
5017 status collapsed
5018
5019 \begin_layout Plain Layout
5020 -synctex=1
5021 \end_layout
5022
5023 \end_inset
5024
5025  option enables gzip compression.
5026  If your viewer does not support it, you should instead use 
5027 \begin_inset Flex CharStyle:Code
5028 status collapsed
5029
5030 \begin_layout Plain Layout
5031 -synctex=-1
5032 \end_layout
5033
5034 \end_inset
5035
5036 .
5037 \end_layout
5038
5039 \end_inset
5040
5041
5042 \end_layout
5043
5044 \begin_layout Subsection
5045 Configuring and using specific viewers
5046 \end_layout
5047
5048 \begin_layout Subsubsection*
5049 Xdvi (all platforms)
5050 \end_layout
5051
5052 \begin_layout Standard
5053 If you use 
5054 \begin_inset Flex CharStyle:Code
5055 status collapsed
5056
5057 \begin_layout Plain Layout
5058 xdvi
5059 \end_layout
5060
5061 \end_inset
5062
5063 , you don't need to do anything else for performing a reverse DVI search,
5064  as LyX already provides the necessary hooks for automatically using the
5065  
5066 \begin_inset Flex CharStyle:Code
5067 status collapsed
5068
5069 \begin_layout Plain Layout
5070 lyxclient
5071 \end_layout
5072
5073 \end_inset
5074
5075  program.
5076  Just setup your document as described above (reverse search is triggered
5077  by Ctrl-click or Alt-click on Mac OSX, respectively).
5078 \end_layout
5079
5080 \begin_layout Standard
5081 However, if for whatever reason you want to use the named pipe instead of
5082  the socket for communicating with LyX, simply change the DVI viewer in
5083  
5084 \begin_inset Flex CharStyle:MenuItem
5085 status collapsed
5086
5087 \begin_layout Plain Layout
5088 Preferences\SpecialChar \menuseparator
5089 File Handling\SpecialChar \menuseparator
5090 File formats
5091 \end_layout
5092
5093 \end_inset
5094
5095  to
5096 \begin_inset Foot
5097 status collapsed
5098
5099 \begin_layout Plain Layout
5100 On Mac OSX you have to use 
5101 \begin_inset Flex CharStyle:Code
5102 status collapsed
5103
5104 \begin_layout Plain Layout
5105 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5106 \end_layout
5107
5108 \end_inset
5109
5110
5111 \end_layout
5112
5113 \end_inset
5114
5115  
5116 \begin_inset Flex CharStyle:Code
5117 status collapsed
5118
5119 \begin_layout Plain Layout
5120 xdvi -editor 'lyxeditor.sh %f %l'
5121 \end_layout
5122
5123 \end_inset
5124
5125 , where 
5126 \begin_inset Flex CharStyle:Code
5127 status collapsed
5128
5129 \begin_layout Plain Layout
5130 lyxeditor.sh
5131 \end_layout
5132
5133 \end_inset
5134
5135  is a suitable script.
5136  For example, a minimal shell script is the following one:
5137 \end_layout
5138
5139 \begin_layout LyX-Code
5140 #!/bin/sh
5141 \begin_inset Newline newline
5142 \end_inset
5143
5144 LYXPIPE="/path/to/lyxpipe"
5145 \begin_inset Newline newline
5146 \end_inset
5147
5148 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
5149 \begin_inset Newline newline
5150 \end_inset
5151
5152 echo "$COMMAND" > "${LYXPIPE}".in || exit
5153 \begin_inset Newline newline
5154 \end_inset
5155
5156 read < "${LYXPIPE}".out || exit
5157 \end_layout
5158
5159 \begin_layout Standard
5160 where 
5161 \begin_inset Flex CharStyle:Code
5162 status collapsed
5163
5164 \begin_layout Plain Layout
5165 /path/to/lyxpipe
5166 \end_layout
5167
5168 \end_inset
5169
5170  is the Ly
5171 \begin_inset ERT
5172 status collapsed
5173
5174 \begin_layout Plain Layout
5175
5176 {}
5177 \end_layout
5178
5179 \end_inset
5180
5181 XServer pipe path specified in 
5182 \begin_inset Flex CharStyle:MenuItem
5183 status collapsed
5184
5185 \begin_layout Plain Layout
5186 Preferences\SpecialChar \menuseparator
5187 Paths
5188 \end_layout
5189
5190 \end_inset
5191
5192 .
5193 \begin_inset Foot
5194 status collapsed
5195
5196 \begin_layout Plain Layout
5197 In the 
5198 \begin_inset Flex CharStyle:Code
5199 status collapsed
5200
5201 \begin_layout Plain Layout
5202 development/tools
5203 \end_layout
5204
5205 \end_inset
5206
5207  folder of a source distribution you can find a 
5208 \begin_inset Flex CharStyle:Code
5209 status collapsed
5210
5211 \begin_layout Plain Layout
5212 lyxeditor
5213 \end_layout
5214
5215 \end_inset
5216
5217  script which is able to locate the 
5218 \emph on
5219 lyxpipe
5220 \emph default
5221  based on your preferences.
5222 \end_layout
5223
5224 \end_inset
5225
5226
5227 \end_layout
5228
5229 \begin_layout Subsubsection*
5230 MacDviX (Mac OSX)
5231 \end_layout
5232
5233 \begin_layout Standard
5234 At the end of 
5235 \begin_inset Flex CharStyle:Code
5236 status collapsed
5237
5238 \begin_layout Plain Layout
5239 /Applications/MacDviX_Folder/calleditor.script
5240 \end_layout
5241
5242 \end_inset
5243
5244 , add the following lines:
5245 \end_layout
5246
5247 \begin_layout LyX-Code
5248 /Applications/Ly
5249 \begin_inset ERT
5250 status collapsed
5251
5252 \begin_layout Plain Layout
5253
5254 {}
5255 \end_layout
5256
5257 \end_inset
5258
5259 X.app/Contents/MacOS/lyxeditor "$2" $1
5260 \begin_inset Newline newline
5261 \end_inset
5262
5263 exit 1
5264 \end_layout
5265
5266 \begin_layout Standard
5267 Modify the lines accordingly if you install LyX somewhere else than in the
5268  Applications folder.
5269 \end_layout
5270
5271 \begin_layout Standard
5272 Reverse search is triggered by Alt-click (OPTION-click).
5273 \end_layout
5274
5275 \begin_layout Subsubsection*
5276 Skim (Mac OSX)
5277 \end_layout
5278
5279 \begin_layout Standard
5280 Enter 
5281 \begin_inset Flex CharStyle:Code
5282 status collapsed
5283
5284 \begin_layout Plain Layout
5285 open -a Skim.app $$i
5286 \end_layout
5287
5288 \end_inset
5289
5290  to the viewer setting in 
5291 \begin_inset Flex CharStyle:MenuItem
5292 status collapsed
5293
5294 \begin_layout Plain Layout
5295 Preferences\SpecialChar \menuseparator
5296 File Handling\SpecialChar \menuseparator
5297 File formats\SpecialChar \menuseparator
5298 PDF (pdflatex)
5299 \end_layout
5300
5301 \end_inset
5302
5303 , and then in 
5304 \begin_inset Flex CharStyle:MenuItem
5305 status collapsed
5306
5307 \begin_layout Plain Layout
5308 Skim\SpecialChar \menuseparator
5309 Preferences\SpecialChar \menuseparator
5310 Sync
5311 \end_layout
5312
5313 \end_inset
5314
5315  select Ly
5316 \begin_inset ERT
5317 status collapsed
5318
5319 \begin_layout Plain Layout
5320
5321 {}
5322 \end_layout
5323
5324 \end_inset
5325
5326 X.
5327 \end_layout
5328
5329 \begin_layout Standard
5330 Reverse search is triggered by COMMAND-SHIFT-click
5331 \end_layout
5332
5333 \begin_layout Subsubsection*
5334 Okular (KDE)
5335 \end_layout
5336
5337 \begin_layout Standard
5338 Go to 
5339 \begin_inset Flex CharStyle:MenuItem
5340 status collapsed
5341
5342 \begin_layout Plain Layout
5343 Settings\SpecialChar \menuseparator
5344 Configure Okular\SpecialChar \ldots{}
5345 \SpecialChar \menuseparator
5346 Editor
5347 \end_layout
5348
5349 \end_inset
5350
5351 , select 
5352 \begin_inset Quotes eld
5353 \end_inset
5354
5355 Custom Text Editor
5356 \begin_inset Quotes erd
5357 \end_inset
5358
5359  and add the command 
5360 \begin_inset Flex CharStyle:Code
5361 status collapsed
5362
5363 \begin_layout Plain Layout
5364 lyxclient -g %f %l
5365 \end_layout
5366
5367 \end_inset
5368
5369 .
5370 \end_layout
5371
5372 \begin_layout Standard
5373 Reverse search is triggered by SHIFT-click.
5374 \end_layout
5375
5376 \begin_layout Subsubsection*
5377 YAP (Cygwin)
5378 \end_layout
5379
5380 \begin_layout Standard
5381 Launch yap, choose its 
5382 \begin_inset Flex CharStyle:MenuItem
5383 status collapsed
5384
5385 \begin_layout Plain Layout
5386 View\SpecialChar \menuseparator
5387 Options
5388 \end_layout
5389
5390 \end_inset
5391
5392  menu and select the 
5393 \begin_inset Quotes eld
5394 \end_inset
5395
5396 Inverse DVI Search
5397 \begin_inset Quotes erd
5398 \end_inset
5399
5400  tab.
5401  Click on the 
5402 \begin_inset Quotes eld
5403 \end_inset
5404
5405 New\SpecialChar \ldots{}
5406
5407 \begin_inset Quotes erd
5408 \end_inset
5409
5410  button and, in the window that opens, enter 
5411 \begin_inset Quotes eld
5412 \end_inset
5413
5414 LyX Editor
5415 \begin_inset Quotes erd
5416 \end_inset
5417
5418  (or any other name you like) in the 
5419 \begin_inset Quotes eld
5420 \end_inset
5421
5422 Name:
5423 \begin_inset Quotes erd
5424 \end_inset
5425
5426  field.
5427  Now click on the button labeled 
5428 \begin_inset Quotes eld
5429 \end_inset
5430
5431 \SpecialChar \ldots{}
5432
5433 \begin_inset Quotes erd
5434 \end_inset
5435
5436  to open a file dialog and navigate to the directory containing the batch
5437  file 
5438 \begin_inset Flex CharStyle:Code
5439 status collapsed
5440
5441 \begin_layout Plain Layout
5442 lyxeditor.bat
5443 \end_layout
5444
5445 \end_inset
5446
5447  (see below).
5448  Select 
5449 \begin_inset Flex CharStyle:Code
5450 status collapsed
5451
5452 \begin_layout Plain Layout
5453 lyxeditor.bat
5454 \end_layout
5455
5456 \end_inset
5457
5458  and then specify the program arguments as 
5459 \begin_inset Flex CharStyle:Code
5460 status collapsed
5461
5462 \begin_layout Plain Layout
5463 %f %l
5464 \end_layout
5465
5466 \end_inset
5467
5468  if you want to use the shell script above, or as 
5469 \begin_inset Flex CharStyle:Code
5470 status collapsed
5471
5472 \begin_layout Plain Layout
5473 -g %f %l
5474 \end_layout
5475
5476 \end_inset
5477
5478  if you want to use the 
5479 \begin_inset Flex CharStyle:Code
5480 status collapsed
5481
5482 \begin_layout Plain Layout
5483 lyxclient
5484 \end_layout
5485
5486 \end_inset
5487
5488  program.
5489  Since yap is a native Windows application, the filename it provides should
5490  be converted to POSIX style before being passed to 
5491 \begin_inset Flex CharStyle:Code
5492 status collapsed
5493
5494 \begin_layout Plain Layout
5495 lyxeditor.sh
5496 \end_layout
5497
5498 \end_inset
5499
5500  or 
5501 \begin_inset Flex CharStyle:Code
5502 status collapsed
5503
5504 \begin_layout Plain Layout
5505 lyxclient
5506 \end_layout
5507
5508 \end_inset
5509
5510 , and this is the purpose of the 
5511 \begin_inset Flex CharStyle:Code
5512 status collapsed
5513
5514 \begin_layout Plain Layout
5515 lyxeditor.bat
5516 \end_layout
5517
5518 \end_inset
5519
5520  wrapper, which is as follows:
5521 \end_layout
5522
5523 \begin_layout LyX-Code
5524 @echo off
5525 \begin_inset Newline newline
5526 \end_inset
5527
5528 if "%1" == "-g" goto lyxclient
5529 \begin_inset Newline newline
5530 \end_inset
5531
5532 bash -c 'lyxeditor.sh $(cygpath -a "%1") %2'
5533 \begin_inset Newline newline
5534 \end_inset
5535
5536 exit
5537 \begin_inset Newline newline
5538 \end_inset
5539
5540 :lyxclient
5541 \begin_inset Newline newline
5542 \end_inset
5543
5544 bash -c 'lyxclient %1 $(cygpath -a "%2") %3'
5545 \end_layout
5546
5547 \begin_layout Standard
5548 You have to make sure that both 
5549 \begin_inset Flex CharStyle:Code
5550 status collapsed
5551
5552 \begin_layout Plain Layout
5553 lyxeditor.sh
5554 \end_layout
5555
5556 \end_inset
5557
5558  and 
5559 \begin_inset Flex CharStyle:Code
5560 status collapsed
5561
5562 \begin_layout Plain Layout
5563 lyxclient.exe
5564 \end_layout
5565
5566 \end_inset
5567
5568  are in the command PATH, otherwise you have to use their full posix path
5569  in the above batch file.
5570 \end_layout
5571
5572 \begin_layout Standard
5573 In yap, reverse search is triggered by double-click.
5574 \end_layout
5575
5576 \begin_layout Subsubsection*
5577 SumatraPDF (Cygwin)
5578 \end_layout
5579
5580 \begin_layout Standard
5581 In SumatraPDF, you can set the name of the program that communicates with
5582  LyX by simply launching SumatraPDF as 
5583 \begin_inset Flex CharStyle:Code
5584 status collapsed
5585
5586 \begin_layout Plain Layout
5587 SumatraPDF -inverse-search "lyxeditor.bat -g %f %l"
5588 \end_layout
5589
5590 \end_inset
5591
5592  and then quit.
5593  The program will remember the setting and using the 
5594 \begin_inset Flex CharStyle:Code
5595 status collapsed
5596
5597 \begin_layout Plain Layout
5598 -inverse-search
5599 \end_layout
5600
5601 \end_inset
5602
5603  option will not be needed from now on
5604 \begin_inset Foot
5605 status collapsed
5606
5607 \begin_layout Plain Layout
5608 It has been reported that SumatraPDF is not able to remember the settings
5609  if it is installed in the Program Files system folder.
5610  This problem can be avoided by installing it somewhere else, for example
5611  in 
5612 \begin_inset Flex CharStyle:Code
5613 status collapsed
5614
5615 \begin_layout Plain Layout
5616 /usr/local/bin
5617 \end_layout
5618
5619 \end_inset
5620
5621 .
5622 \end_layout
5623
5624 \end_inset
5625
5626  (in this way you will be using the lyxsocket; omit the 
5627 \begin_inset Flex CharStyle:Code
5628 status collapsed
5629
5630 \begin_layout Plain Layout
5631 -g
5632 \end_layout
5633
5634 \end_inset
5635
5636  option if you want to use the lyxpipe and be sure that the 
5637 \begin_inset Flex CharStyle:Code
5638 status collapsed
5639
5640 \begin_layout Plain Layout
5641 lyxeditor.sh
5642 \end_layout
5643
5644 \end_inset
5645
5646  script is in your command PATH).
5647  If SumatraPDF is not your default PDF viewer, you should enter 
5648 \begin_inset Flex CharStyle:Code
5649 status collapsed
5650
5651 \begin_layout Plain Layout
5652 SumatraPDF.sh
5653 \end_layout
5654
5655 \end_inset
5656
5657  in the viewer setting in 
5658 \begin_inset Flex CharStyle:MenuItem
5659 status collapsed
5660
5661 \begin_layout Plain Layout
5662 Preferences\SpecialChar \menuseparator
5663 File Handling\SpecialChar \menuseparator
5664 File formats\SpecialChar \menuseparator
5665 PDF (pdflatex)
5666 \end_layout
5667
5668 \end_inset
5669
5670 , where 
5671 \begin_inset Flex CharStyle:Code
5672 status collapsed
5673
5674 \begin_layout Plain Layout
5675 SumatraPDF.sh
5676 \end_layout
5677
5678 \end_inset
5679
5680  is the following script (to be placed in your command PATH, 
5681 \begin_inset Flex CharStyle:Code
5682 status collapsed
5683
5684 \begin_layout Plain Layout
5685 /usr/local/bin
5686 \end_layout
5687
5688 \end_inset
5689
5690  being the best choice):
5691 \end_layout
5692
5693 \begin_layout LyX-Code
5694 #!/bin/bash
5695 \begin_inset Newline newline
5696 \end_inset
5697
5698 cd $(dirname $1)
5699 \begin_inset Newline newline
5700 \end_inset
5701
5702 SumatraPDF.exe $(basename $1)
5703 \end_layout
5704
5705 \begin_layout Standard
5706 This is needed because SumatraPDF is a native Windows application and does
5707  not understand the posix paths used by the Cygwin version of LyX.
5708 \end_layout
5709
5710 \begin_layout Standard
5711 Reverse search is triggered by double-click.
5712 \end_layout
5713
5714 \begin_layout Chapter
5715 Special Document Classes
5716 \end_layout
5717
5718 \begin_layout Section
5719 A&A Paper
5720 \end_layout
5721
5722 \begin_layout Standard
5723 by 
5724 \noun on
5725 Peter Sütterlin
5726 \end_layout
5727
5728 \begin_layout Subsection
5729 Introduction
5730 \end_layout
5731
5732 \begin_layout Standard
5733 This section describes how LyX can be used to write articles for submission
5734  to the scientific journal 
5735 \emph on
5736 Astronomy and Astrophysics
5737 \emph default
5738  (www.edpsciences.fr/aa/ 
5739 \begin_inset Flex URL
5740 status collapsed
5741
5742 \begin_layout Plain Layout
5743
5744 http://www.edpsciences.fr/aa/
5745 \end_layout
5746
5747 \end_inset
5748
5749 ) using Version 5.01 of the document class 
5750 \family typewriter
5751 aa.cls
5752 \family default
5753 .
5754  This package can be downloaded from the ftp site
5755 \end_layout
5756
5757 \begin_layout Standard
5758 \begin_inset VSpace medskip
5759 \end_inset
5760
5761
5762 \end_layout
5763
5764 \begin_layout Standard
5765 \align center
5766 \begin_inset Flex URL
5767 status collapsed
5768
5769 \begin_layout Plain Layout
5770
5771 ftp://ftp.edpsciences.org/pub/aa/readme.html
5772 \end_layout
5773
5774 \end_inset
5775
5776
5777 \end_layout
5778
5779 \begin_layout Standard
5780 \begin_inset VSpace medskip
5781 \end_inset
5782
5783
5784 \end_layout
5785
5786 \begin_layout Standard
5787 A manual comes together with that package, and this text is not meant to
5788  replace the original manual but merely a short guide how to realize the
5789  correct form of your paper.
5790  
5791 \end_layout
5792
5793 \begin_layout Standard
5794 Please note that the publisher of the journal was changed from Springer
5795  to EDP Sciences starting January 1, 2001.
5796  That change implicated also some slight changes of the style files, namely
5797  the removal of the thesaurus command.
5798  The LyX class aa supports the newest version of these style files, V 5.01.
5799  If you have an older version installed, please upgrade.
5800  For compatibility, the old (version 4) layout has been kept as 
5801 \family sans
5802 article (A&A V4)
5803 \family default
5804 .
5805  Please refer to the comments in 
5806 \family typewriter
5807 LyXDir/layouts/aapaper.layout
5808 \family default
5809 .
5810 \end_layout
5811
5812 \begin_layout Subsection
5813 Getting started
5814 \end_layout
5815
5816 \begin_layout Standard
5817 It is recommended you start from the example template distributed with LyX.
5818  If you are not using a template, note the following settings:
5819 \end_layout
5820
5821 \begin_layout Itemize
5822 Select 
5823 \family sans
5824 article (A&A)
5825 \family default
5826  in the 
5827 \family sans
5828 Document\SpecialChar \menuseparator
5829 Settings
5830 \family default
5831  dialog (OK, that one was obvious).
5832 \end_layout
5833
5834 \begin_layout Itemize
5835 Don't change the option 
5836 \family sans
5837 Page
5838 \begin_inset space ~
5839 \end_inset
5840
5841 style
5842 \family default
5843 : Leave it set to 
5844 \family sans
5845 default
5846 \family default
5847 .
5848  The whole layout is done by the macros, you shouldn't change anything.
5849 \end_layout
5850
5851 \begin_layout Subsection
5852 The header block
5853 \end_layout
5854
5855 \begin_layout Standard
5856 First thing to enter is the header information.
5857  It consists of seven entries, of which some are optional.
5858  They are
5859 \end_layout
5860
5861 \begin_layout Itemize
5862
5863 \family sans
5864 Title
5865 \family default
5866 : [required] 
5867 \end_layout
5868
5869 \begin_layout Itemize
5870
5871 \family sans
5872 Subtitle
5873 \family default
5874 : [optional] 
5875 \end_layout
5876
5877 \begin_layout Itemize
5878
5879 \family sans
5880 Author
5881 \family default
5882 : [required]
5883 \end_layout
5884
5885 \begin_layout Itemize
5886
5887 \family sans
5888 Address
5889 \family default
5890 : [required]
5891 \end_layout
5892
5893 \begin_layout Itemize
5894
5895 \family sans
5896 Offprints
5897 \family default
5898 : [optional] if more than one author: whom to contact for offprint requests.
5899 \end_layout
5900
5901 \begin_layout Itemize
5902
5903 \family sans
5904 Mail
5905 \family default
5906 : [optional] mail address for contacts.
5907 \end_layout
5908
5909 \begin_layout Itemize
5910
5911 \family sans
5912 Date
5913 \family default
5914 : [required].
5915  Suggested format is 
5916 \family typewriter
5917 Received: <date>; Accepted <date> 
5918 \end_layout
5919
5920 \begin_layout Standard
5921 There is no need to issue the 
5922 \family typewriter
5923
5924 \backslash
5925 maketitle
5926 \family default
5927  command, this is done automatically by LyX when the header is finished.
5928  Although the order of the single header entries doesn't matter it is advised
5929  to keep the above sequence, just to get the best optics and meets the layout
5930  of the real document.
5931 \end_layout
5932
5933 \begin_layout Standard
5934 If you want to place footnotes in the header block, e.
5935 \begin_inset space \thinspace{}
5936 \end_inset
5937
5938 g.
5939 \begin_inset space \space{}
5940 \end_inset
5941
5942 to state your present address, just use the standard footnote via the menu
5943  
5944 \family sans
5945 Insert\SpecialChar \menuseparator
5946 Footnote.
5947
5948 \family default
5949  LyX will automagically use the term 
5950 \family typewriter
5951
5952 \backslash
5953 thanks{}
5954 \family default
5955  in that case.
5956 \end_layout
5957
5958 \begin_layout Standard
5959 In addition to these topics, the macros use three additional LaTeX commands
5960  that have no counterpart in LyX:
5961 \end_layout
5962
5963 \begin_layout Itemize
5964
5965 \family typewriter
5966
5967 \backslash
5968 and
5969 \family default
5970  to separate different names for more than one author and institute, respectivel
5971 y.
5972 \end_layout
5973
5974 \begin_layout Itemize
5975
5976 \family typewriter
5977
5978 \backslash
5979 inst{<nr>}
5980 \family default
5981 to mark corresponding author/institute pairs.
5982  The institutes are numbered sequentially as they appear in the 
5983 \family sans
5984 Address
5985 \family default
5986  field, so you have to put a marker to each author.
5987 \end_layout
5988
5989 \begin_layout Itemize
5990
5991 \family typewriter
5992
5993 \backslash
5994 email{address}
5995 \family default
5996  to supply an email address for fast contact.
5997 \end_layout
5998
5999 \begin_layout Standard
6000 In all cases, the appropriate command has to be entered in LyX and marked
6001  as LaTeX code.
6002  See the examples.
6003  
6004 \end_layout
6005
6006 \begin_layout Subsection
6007 The abstract
6008 \end_layout
6009
6010 \begin_layout Standard
6011 The abstract should immediately follow the header block.
6012  With version 5 the abstract environment was changed to a command, and there
6013  is now a resctriction to only one paragraph.
6014  In addition, it should contain an entry with the keywords.
6015  This is not yet implemented for LyX, therefore you have to enter the LaTeX
6016  command 
6017 \family typewriter
6018
6019 \backslash
6020 keywords{}
6021 \family default
6022  by hand and mark it as LaTeX code.
6023  Refer to the example paper.
6024 \end_layout
6025
6026 \begin_layout Subsection
6027 Supported environments
6028 \end_layout
6029
6030 \begin_layout Standard
6031 The A&A paper layout supports the following environments for structuring
6032  your text:
6033 \end_layout
6034
6035 \begin_layout Itemize
6036
6037 \family sans
6038 Standard
6039 \end_layout
6040
6041 \begin_layout Itemize
6042
6043 \family sans
6044 Section
6045 \end_layout
6046
6047 \begin_layout Itemize
6048
6049 \family sans
6050 Subsection
6051 \end_layout
6052
6053 \begin_layout Itemize
6054
6055 \family sans
6056 Subsubsection
6057 \end_layout
6058
6059 \begin_layout Itemize
6060
6061 \family sans
6062 Itemize
6063 \end_layout
6064
6065 \begin_layout Itemize
6066
6067 \family sans
6068 Enumerate
6069 \end_layout
6070
6071 \begin_layout Itemize
6072
6073 \family sans
6074 Description
6075 \end_layout
6076
6077 \begin_layout Itemize
6078
6079 \family sans
6080 Caption
6081 \end_layout
6082
6083 \begin_layout Itemize
6084
6085 \family sans
6086 Abstract
6087 \end_layout
6088
6089 \begin_layout Itemize
6090
6091 \family sans
6092 Acknowledgment
6093 \end_layout
6094
6095 \begin_layout Itemize
6096
6097 \family sans
6098 Bibliography
6099 \end_layout
6100
6101 \begin_layout Itemize
6102
6103 \family sans
6104 LaTeX
6105 \end_layout
6106
6107 \begin_layout Subsection
6108 Commands not supported by LyX
6109 \end_layout
6110
6111 \begin_layout Standard
6112 Some commands are not yet supported by the 
6113 \family sans
6114 paper (A&A)
6115 \family default
6116  layout for LyX.
6117  Some have already been mentioned.
6118  For the sake of completeness, they are listed all together here:
6119 \end_layout
6120
6121 \begin_layout Itemize
6122
6123 \family typewriter
6124
6125 \backslash
6126 and
6127 \end_layout
6128
6129 \begin_layout Itemize
6130
6131 \family typewriter
6132
6133 \backslash
6134 email
6135 \end_layout
6136
6137 \begin_layout Itemize
6138
6139 \family typewriter
6140
6141 \backslash
6142 appendix
6143 \end_layout
6144
6145 \begin_layout Itemize
6146
6147 \family typewriter
6148
6149 \backslash
6150 authorrunning
6151 \end_layout
6152
6153 \begin_layout Itemize
6154
6155 \family typewriter
6156
6157 \backslash
6158 inst{}
6159 \end_layout
6160
6161 \begin_layout Itemize
6162
6163 \family typewriter
6164
6165 \backslash
6166 keywords{}
6167 \end_layout
6168
6169 \begin_layout Itemize
6170
6171 \family typewriter
6172
6173 \backslash
6174 object{}
6175 \end_layout
6176
6177 \begin_layout Itemize
6178
6179 \family typewriter
6180
6181 \backslash
6182 titlerunning{}
6183 \end_layout
6184
6185 \begin_layout Standard
6186 If you want to use any of these commands, you have to enter them yourself.
6187  
6188 \series bold
6189 Do not forget to mark them as LaTeX code!
6190 \end_layout
6191
6192 \begin_layout Subsection
6193 Figure and Table Floats
6194 \end_layout
6195
6196 \begin_layout Standard
6197 LyX provides support for the necessary float environments 
6198 \family sans
6199 figure, figure*, table
6200 \family default
6201  and 
6202 \family sans
6203 table*
6204 \family default
6205 , therefore we won't tell much about it here.
6206  Refer to the 
6207 \emph on
6208 User's
6209 \begin_inset space ~
6210 \end_inset
6211
6212 Guide
6213 \emph default
6214 .
6215  Just remember that tables should be left-aligned.
6216  For that, select the table and change the alignment in 
6217 \family sans
6218 Edit\SpecialChar \menuseparator
6219 Paragraph
6220 \begin_inset space ~
6221 \end_inset
6222
6223 Settings.
6224 \end_layout
6225
6226 \begin_layout Standard
6227 There is only one special thing: the figures with caption besides the figure.
6228  To create such a figure, you have to do the following:
6229 \end_layout
6230
6231 \begin_layout Enumerate
6232 Create a wide figure float: 
6233 \family sans
6234 Insert\SpecialChar \menuseparator
6235 Float\SpecialChar \menuseparator
6236 Figure
6237 \family default
6238 , then right click in the figure and select 
6239 \family sans
6240 \bar under
6241 S
6242 \bar default
6243 pan
6244 \begin_inset space ~
6245 \end_inset
6246
6247 columns
6248 \family default
6249 .
6250 \end_layout
6251
6252 \begin_layout Enumerate
6253 Enter your caption text.
6254 \end_layout
6255
6256 \begin_layout Enumerate
6257 Press 
6258 \family sans
6259 Return
6260 \family default
6261  to move the cursor above the caption.
6262 \end_layout
6263
6264 \begin_layout Enumerate
6265 Insert your figure
6266 \end_layout
6267
6268 \begin_layout Enumerate
6269 Position the cursor behind the figure and insert a horizontal fill: 
6270 \family sans
6271 Insert\SpecialChar \menuseparator
6272 Special
6273 \begin_inset space ~
6274 \end_inset
6275
6276 Character\SpecialChar \menuseparator
6277 Horizontal
6278 \begin_inset space ~
6279 \end_inset
6280
6281 Fill
6282 \family default
6283 .
6284 \end_layout
6285
6286 \begin_layout Enumerate
6287 Switch to LaTeX mode: 
6288 \family sans
6289 M-c
6290 \begin_inset space ~
6291 \end_inset
6292
6293 t
6294 \family default
6295 .
6296 \end_layout
6297
6298 \begin_layout Enumerate
6299 Enter 
6300 \family typewriter
6301
6302 \backslash
6303 parbox[b]{55mm}{
6304 \family default
6305 .
6306  
6307 \series bold
6308 Do not close the brace!
6309 \end_layout
6310
6311 \begin_layout Enumerate
6312 Position the cursor behind the caption text, switch to LaTeX mode and insert
6313  the closing brace: 
6314 \family sans
6315 M-c
6316 \begin_inset space ~
6317 \end_inset
6318
6319 t
6320 \family default
6321  
6322 \family typewriter
6323 }
6324 \family default
6325 .
6326 \end_layout
6327
6328 \begin_layout Standard
6329 Also, refer to the figures in the example paper.
6330 \end_layout
6331
6332 \begin_layout Subsection
6333 Referee layout
6334 \end_layout
6335
6336 \begin_layout Standard
6337 For submission, the paper has to be formated in a special double-spacing
6338  layout.
6339  For this purpose, you have to give the option 
6340 \family typewriter
6341 referee
6342 \family default
6343  to the documentclass.
6344  This must be done using the extra class options field in the 
6345 \family sans
6346 Document\SpecialChar \menuseparator
6347 Settings
6348 \family default
6349  dialog.
6350  Just enter the string 
6351 \family typewriter
6352 referee
6353 \family default
6354  there.
6355 \end_layout
6356
6357 \begin_layout Subsection
6358 The example paper
6359 \end_layout
6360
6361 \begin_layout Standard
6362 The 
6363 \family sans
6364 Examples
6365 \family default
6366  directory contains an example paper written with LyX.
6367  It is the example paper from the original macro package, translated to
6368  LyX.
6369  Use it for inspiration, and compare the original LaTeX code with LyX way
6370  of writing.
6371 \end_layout
6372
6373 \begin_layout Section
6374 AASTeX
6375 \end_layout
6376
6377 \begin_layout Standard
6378 by 
6379 \noun on
6380 Mike Ressler
6381 \end_layout
6382
6383 \begin_layout Subsection
6384 Introduction
6385 \end_layout
6386
6387 \begin_layout Standard
6388 AASTeX is a set of macros produced by the American Astronomical Society
6389  to facilitate electronic manuscript submission to the three journals they
6390  publish: the Astrophysical Journal (including the Letters and Supplement),
6391  the Astronomical Journal, and the Publications of the Astronomical Society
6392  of the Pacific.
6393  LyX has proven to be an excellent tool for generating these documents,
6394  especially given its equation, citation, and figure handling capabilities.
6395  LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
6396  is the version described here, or higher.
6397  Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
6398  incompatible with LyX.
6399  The AASTeX package may be downloaded from the AASTeX Web site
6400 \end_layout
6401
6402 \begin_layout Standard
6403 \begin_inset VSpace medskip
6404 \end_inset
6405
6406
6407 \end_layout
6408
6409 \begin_layout Standard
6410 \align center
6411 \begin_inset Flex URL
6412 status collapsed
6413
6414 \begin_layout Plain Layout
6415
6416 http://www.journals.uchicago.edu/AAS/AASTeX
6417 \end_layout
6418
6419 \end_inset
6420
6421
6422 \end_layout
6423
6424 \begin_layout Standard
6425 \begin_inset VSpace medskip
6426 \end_inset
6427
6428
6429 \end_layout
6430
6431 \begin_layout Standard
6432 A complete user guide is contained in that package and you should familiarize
6433  yourself with it thoroughly before embarking on writing a paper in LyX.
6434  LyX will not reduce the need to figure out all the AASTeX commands, it
6435  will only reduce the drudgery of typing everything in.
6436  It is your responsibility to ensure that the final exported LaTeX document
6437  conforms completely to the requirements of the journal to which you are
6438  submitting your paper.
6439 \end_layout
6440
6441 \begin_layout Subsection
6442 Starting a New Paper
6443 \end_layout
6444
6445 \begin_layout Standard
6446 I strongly suggest that you start with the AASTeX template file.
6447  Click on 
6448 \family sans
6449 File\SpecialChar \menuseparator
6450 New from
6451 \family default
6452  
6453 \family sans
6454 Template
6455 \family default
6456 , enter the new file name, then choose the 
6457 \family typewriter
6458 aastex.lyx
6459 \family default
6460  template.
6461  This will show the most common fields found in a manuscript.
6462  Simply overwrite the existing text (including the brackets, 
6463 \family typewriter
6464 <>
6465 \family default
6466 ) with the correct information.
6467  Many of the AASTeX commands and environments can be implemented directly
6468  in LyX, but some cannot: most noticeably 
6469 \family typewriter
6470
6471 \backslash
6472 altaffilmark
6473 \family default
6474  and 
6475 \family typewriter
6476
6477 \backslash
6478 altaffiltext
6479 \family default
6480 , which should stick out like a sore thumb if you actually just opened the
6481  template file.
6482  For commands such as these, the LaTeX code must be entered directly and
6483  marked as such.
6484  Such commands are referred to as TeX code, or Evil Red Text.
6485  I tried to minimize the amount of TeX code needed in an AASTeX document,
6486  but there is still a bit more required than any of us would like.
6487 \end_layout
6488
6489 \begin_layout Subsection
6490 Finishing Your Paper
6491 \end_layout
6492
6493 \begin_layout Standard
6494 When the paper is finished to your satisfaction and previews/prints correctly,
6495  there are a few 
6496 \begin_inset Quotes eld
6497 \end_inset
6498
6499 postprocessing
6500 \begin_inset Quotes erd
6501 \end_inset
6502
6503  actions which need to be done before you submit it to the journals.
6504  
6505 \end_layout
6506
6507 \begin_layout Enumerate
6508 Export your paper as a LaTeX file (
6509 \family sans
6510 File\SpecialChar \menuseparator
6511 Export\SpecialChar \menuseparator
6512 LaTeX
6513 \family default
6514 ).
6515  
6516 \end_layout
6517
6518 \begin_layout Enumerate
6519 Edit the resulting 
6520 \family typewriter
6521 .tex
6522 \family default
6523  file with your favorite text editor
6524 \end_layout
6525
6526 \begin_deeper
6527 \begin_layout Enumerate
6528 remove the comment lines before the 
6529 \family typewriter
6530
6531 \backslash
6532 documentclass
6533 \family default
6534  command
6535 \end_layout
6536
6537 \begin_layout Enumerate
6538 remove the 
6539 \family typewriter
6540
6541 \backslash
6542 usepackage...{fontenc}
6543 \family default
6544  line if it appears (usually just after 
6545 \family typewriter
6546
6547 \backslash
6548 documentclass
6549 \family default
6550 }; also remove the 
6551 \family typewriter
6552
6553 \backslash
6554 secnumdepth
6555 \family default
6556  line if it appears.
6557 \end_layout
6558
6559 \begin_layout Enumerate
6560 remove everything between (and including) the 
6561 \family typewriter
6562
6563 \backslash
6564 makeatletter
6565 \family default
6566  and 
6567 \family typewriter
6568
6569 \backslash
6570 makeatother
6571 \family default
6572  commands, except for any commands you specifically put into the LaTeX preamble
6573  (which should appear immediately after the 
6574 \begin_inset Quotes eld
6575 \end_inset
6576
6577 User specified LaTeX commands
6578 \begin_inset Quotes erd
6579 \end_inset
6580
6581  comment in the 
6582 \family typewriter
6583 .tex
6584 \family default
6585  file).
6586 \end_layout
6587
6588 \end_deeper
6589 \begin_layout Enumerate
6590 Run the resulting file through LaTeX to make sure it still processes correctly.
6591 \end_layout
6592
6593 \begin_layout Enumerate
6594 Reread the journal requirements to make sure your filenames and formats
6595  are correct.
6596 \end_layout
6597
6598 \begin_layout Enumerate
6599 Submit it.
6600 \end_layout
6601
6602 \begin_layout Subsection
6603 Comments On Specific Commands
6604 \end_layout
6605
6606 \begin_layout Standard
6607 I will not describe the detailed usage of the individual AASTeX commands:
6608  the AASTeX User Guide (
6609 \family typewriter
6610 aasguide.tex
6611 \family default
6612 ) gives a good description of each.
6613  Thus it's probably easiest for me to go down the list as found in the guide
6614  and offer comments where necessary.
6615  So let's begin \SpecialChar \ldots{}
6616
6617 \end_layout
6618
6619 \begin_layout Subsubsection
6620 Things that work as expected
6621 \end_layout
6622
6623 \begin_layout Standard
6624 \begin_inset ERT
6625 status open
6626
6627 \begin_layout Plain Layout
6628
6629
6630 \backslash
6631 begin{sloppypar}
6632 \end_layout
6633
6634 \end_inset
6635
6636
6637 \end_layout
6638
6639 \begin_layout Standard
6640 Because they work as you might expect, I simply list them and the section
6641  they are found in: 
6642 \family typewriter
6643
6644 \backslash
6645 documentclass
6646 \family default
6647  (2.1.1), 
6648 \family typewriter
6649
6650 \backslash
6651 begin{document}
6652 \family default
6653  (2.2), 
6654 \family typewriter
6655
6656 \backslash
6657 title
6658 \family default
6659  (2.3), 
6660 \family typewriter
6661
6662 \backslash
6663 author
6664 \family default
6665  (2.3), 
6666 \family typewriter
6667
6668 \backslash
6669 affil
6670 \family default
6671  (2.3), 
6672 \family typewriter
6673
6674 \backslash
6675 abstract
6676 \family default
6677  (2.4), 
6678 \family typewriter
6679
6680 \backslash
6681 keywords
6682 \family default
6683  (2.5), 
6684 \family typewriter
6685
6686 \backslash
6687 section
6688 \family default
6689  (2.7), 
6690 \family typewriter
6691
6692 \backslash
6693 subsection
6694 \family default
6695  (2.7), 
6696 \family typewriter
6697
6698 \backslash
6699 subsubsection
6700 \family default
6701  (2.7), 
6702 \family typewriter
6703
6704 \backslash
6705 paragraph
6706 \family default
6707  (2.7), 
6708 \family typewriter
6709
6710 \backslash
6711 facility
6712 \family default
6713  (2.10), 
6714 \family typewriter
6715
6716 \backslash
6717 begin{displaymath}
6718 \family default
6719  (2.12), 
6720 \family typewriter
6721
6722 \backslash
6723 begin{equation}
6724 \family default
6725  (2.12), 
6726 \family typewriter
6727
6728 \backslash
6729 begin{eqnarray}
6730 \family default
6731  (2.12), 
6732 \family typewriter
6733
6734 \backslash
6735 begin{mathletters}
6736 \family default
6737  (2.12), 
6738 \family typewriter
6739
6740 \backslash
6741 begin{thebibliography}
6742 \family default
6743  (2.13.1), 
6744 \family typewriter
6745
6746 \backslash
6747 bibitem
6748 \family default
6749  (2.13.2), all the cite commands and their variations (2.13.2), the generic
6750  graphicx figure commands (2.14.1), 
6751 \family typewriter
6752
6753 \backslash
6754 begin{table}
6755 \family default
6756  (2.15.4), 
6757 \family typewriter
6758
6759 \backslash
6760 begin{tabular}
6761 \family default
6762  (2.15.4), 
6763 \family typewriter
6764
6765 \backslash
6766 caption
6767 \family default
6768  (2.15.4), 
6769 \family typewriter
6770
6771 \backslash
6772 label
6773 \family default
6774  (2.15.4, amongst other places), 
6775 \family typewriter
6776
6777 \backslash
6778 tablerefs
6779 \family default
6780  (2.15.5), 
6781 \family typewriter
6782
6783 \backslash
6784 tablecomments
6785 \family default
6786  (2.15.5), 
6787 \family typewriter
6788
6789 \backslash
6790 url
6791 \family default
6792  (2.17.4), 
6793 \family typewriter
6794
6795 \backslash
6796 end{document}
6797 \family default
6798  (2.18).
6799 \end_layout
6800
6801 \begin_layout Standard
6802 The following style options also work correctly: 
6803 \family typewriter
6804 longabstract
6805 \family default
6806  (2.4), 
6807 \family typewriter
6808 preprint
6809 \family default
6810  (3.2.1), 
6811 \family typewriter
6812 preprint2
6813 \family default
6814  (3.2.2), 
6815 \family typewriter
6816 eqsecnum
6817 \family default
6818  (3.3), 
6819 \family typewriter
6820 flushrt
6821 \family default
6822  (3.4).
6823  Simply put them in the 
6824 \family sans
6825 Options
6826 \family default
6827  box in 
6828 \family sans
6829 Layout\SpecialChar \menuseparator
6830 Document
6831 \family default
6832 .
6833 \end_layout
6834
6835 \begin_layout Standard
6836 \begin_inset ERT
6837 status open
6838
6839 \begin_layout Plain Layout
6840
6841
6842 \backslash
6843 end{sloppypar}
6844 \end_layout
6845
6846 \end_inset
6847
6848
6849 \end_layout
6850
6851 \begin_layout Subsubsection
6852 Things that work, but require more comment
6853 \end_layout
6854
6855 \begin_layout Standard
6856 The following items work, but require a little more discussion:
6857 \end_layout
6858
6859 \begin_layout Itemize
6860 These items are reserved for use by the journal editors, but you can put
6861  them into the LaTeX preamble if you feel compelled to do so: 
6862 \family typewriter
6863
6864 \backslash
6865 received
6866 \family default
6867
6868 \family typewriter
6869
6870 \backslash
6871 revised
6872 \family default
6873
6874 \family typewriter
6875
6876 \backslash
6877 accepted
6878 \family default
6879
6880 \family typewriter
6881
6882 \backslash
6883 ccc
6884 \family default
6885
6886 \family typewriter
6887
6888 \backslash
6889 cpright
6890 \family default
6891  (all from 2.1.3)
6892 \end_layout
6893
6894 \begin_layout Itemize
6895 These items may be placed in the LaTeX preamble, and are included as blanks
6896  in the template file: 
6897 \family typewriter
6898
6899 \backslash
6900 slugcomment
6901 \family default
6902  (2.1.4), 
6903 \family typewriter
6904
6905 \backslash
6906 shorttitle
6907 \family default
6908  (2.1.5), 
6909 \family typewriter
6910
6911 \backslash
6912 shortauthors
6913 \family default
6914  (2.1.5)
6915 \end_layout
6916
6917 \begin_layout Itemize
6918
6919 \family typewriter
6920
6921 \backslash
6922 email
6923 \family default
6924  (2.3) â€“ can only be used 
6925 \begin_inset Quotes eld
6926 \end_inset
6927
6928 standalone
6929 \begin_inset Quotes erd
6930 \end_inset
6931
6932 , not in the middle of a paragraph.
6933  Use TeX code if you need to embed it.
6934 \end_layout
6935
6936 \begin_layout Itemize
6937
6938 \family typewriter
6939
6940 \backslash
6941 and
6942 \family default
6943  (2.3) â€“ will have extra {} after it.
6944  This should not cause an error.
6945 \end_layout
6946
6947 \begin_layout Itemize
6948
6949 \family typewriter
6950
6951 \backslash
6952 notetoeditor
6953 \family default
6954  (2.6) â€“ can only be used 
6955 \begin_inset Quotes eld
6956 \end_inset
6957
6958 standalone
6959 \begin_inset Quotes erd
6960 \end_inset
6961
6962 , not in the middle of a paragraph.
6963  Use TeX code if you need to embed it.
6964 \end_layout
6965
6966 \begin_layout Itemize
6967
6968 \family typewriter
6969
6970 \backslash
6971 placetable
6972 \family default
6973  (2.8) â€“ can't insert a cross-reference tag, you must type the tag name by
6974  hand
6975 \end_layout
6976
6977 \begin_layout Itemize
6978
6979 \family typewriter
6980
6981 \backslash
6982 placefigure
6983 \family default
6984  (2.8) â€“ same as for 
6985 \family typewriter
6986
6987 \backslash
6988 placetable
6989 \end_layout
6990
6991 \begin_layout Itemize
6992
6993 \family typewriter
6994
6995 \backslash
6996 acknowledgements
6997 \family default
6998  (2.9) â€“ will have extra {} after it.
6999  This should not cause an error.
7000 \end_layout
7001
7002 \begin_layout Itemize
7003
7004 \family typewriter
7005
7006 \backslash
7007 appendix
7008 \family default
7009  (2.11) â€“ will have extra {} after it.
7010  This should not cause an error.
7011 \end_layout
7012
7013 \begin_layout Itemize
7014
7015 \family typewriter
7016
7017 \backslash
7018 figcaption
7019 \family default
7020  (2.14.2) â€“ you can insert an optional filename argument by placing the cursor
7021  at the beginning of the text and selecting 
7022 \family sans
7023 Insert\SpecialChar \menuseparator
7024 Short Title
7025 \family default
7026 .
7027  
7028 \begin_inset Quotes eld
7029 \end_inset
7030
7031 Short Title
7032 \begin_inset Quotes erd
7033 \end_inset
7034
7035  inserts an optional argument of the type needed by 
7036 \family typewriter
7037
7038 \backslash
7039 figcaption
7040 \family default
7041 .
7042  Hopefully it will be renamed someday.
7043 \end_layout
7044
7045 \begin_layout Itemize
7046
7047 \family typewriter
7048
7049 \backslash
7050 objectname
7051 \family default
7052  (2.17.1) â€“ same as 
7053 \family typewriter
7054
7055 \backslash
7056 figcaption
7057 \family default
7058  for the catalog ID optional parameter
7059 \end_layout
7060
7061 \begin_layout Itemize
7062
7063 \family typewriter
7064
7065 \backslash
7066 dataset
7067 \family default
7068  (2.17.1) â€“ same as 
7069 \family typewriter
7070
7071 \backslash
7072 figcaption
7073 \family default
7074  for the catalog ID optional parameter
7075 \end_layout
7076
7077 \begin_layout Subsubsection
7078 Things not implemented, use TeX code
7079 \end_layout
7080
7081 \begin_layout Standard
7082 \begin_inset ERT
7083 status open
7084
7085 \begin_layout Plain Layout
7086
7087
7088 \backslash
7089 begin{sloppypar}
7090 \end_layout
7091
7092 \end_inset
7093
7094
7095 \end_layout
7096
7097 \begin_layout Standard
7098
7099 \family typewriter
7100
7101 \backslash
7102 altaffilmark
7103 \family default
7104  (2.3), 
7105 \family typewriter
7106
7107 \backslash
7108 altaffiltext
7109 \family default
7110  (2.3), 
7111 \family typewriter
7112
7113 \backslash
7114 eqnum
7115 \family default
7116  (2.12), 
7117 \family typewriter
7118
7119 \backslash
7120 setcounter{equation}
7121 \family default
7122  (2.12), Journal name abbreviations (2.13.4), 
7123 \family typewriter
7124
7125 \backslash
7126 figurenum
7127 \family default
7128  (2.14.1), 
7129 \family typewriter
7130
7131 \backslash
7132 epsscale
7133 \family default
7134  (2.14.1), 
7135 \family typewriter
7136
7137 \backslash
7138 plotone
7139 \family default
7140  (2.14.1), 
7141 \family typewriter
7142
7143 \backslash
7144 plottwo
7145 \family default
7146  (2.14.1), 
7147 \family typewriter
7148
7149 \backslash
7150 tablenum
7151 \family default
7152  (2.15.4), 
7153 \family typewriter
7154
7155 \backslash
7156 tableline
7157 \family default
7158  (2.15.4, insert it as the first element in the lefthand cell after where
7159  you want it.
7160  Don't use any of LyX's rules in the table), 
7161 \family typewriter
7162
7163 \backslash
7164 tablenotemark
7165 \family default
7166  (2.15.5), 
7167 \family typewriter
7168
7169 \backslash
7170 tablenotetext
7171 \family default
7172  (2.15.5), much of Misc (2.17, except 
7173 \family typewriter
7174
7175 \backslash
7176 objectname
7177 \family default
7178
7179 \family typewriter
7180
7181 \backslash
7182 dataset
7183 \family default
7184
7185 \family typewriter
7186
7187 \backslash
7188 url
7189 \family default
7190 , and 
7191 \family typewriter
7192
7193 \backslash
7194 email
7195 \family default
7196 ; see above), 
7197 \family typewriter
7198
7199 \backslash
7200 singlespace
7201 \family default
7202  (3.1), 
7203 \family typewriter
7204
7205 \backslash
7206 doublespace
7207 \family default
7208  (3.1), 
7209 \family typewriter
7210
7211 \backslash
7212 onecolumn
7213 \family default
7214  (3.2), 
7215 \family typewriter
7216
7217 \backslash
7218 twocolumn
7219 \family default
7220  (3.2)
7221 \end_layout
7222
7223 \begin_layout Standard
7224 \begin_inset ERT
7225 status open
7226
7227 \begin_layout Plain Layout
7228
7229
7230 \backslash
7231 end{sloppypar}
7232 \end_layout
7233
7234 \end_inset
7235
7236
7237 \end_layout
7238
7239 \begin_layout Subsubsection
7240 Things that cannot be implemented
7241 \end_layout
7242
7243 \begin_layout Standard
7244 \SpecialChar \ldots{}
7245  at least in any meaningful sort of way, so I suggest ignoring them.
7246  They are the references environment (2.13.3), and the deluxetable environment
7247  (2.15).
7248  If you really, really need to use deluxetable, I suggest editing it in
7249  a separate file with a text editor, then using 
7250 \family sans
7251 Insert\SpecialChar \menuseparator
7252 Child
7253 \begin_inset space ~
7254 \end_inset
7255
7256 Document
7257 \family default
7258  to include it in your LyX document.
7259  See the 
7260 \family typewriter
7261 aas_sample.lyx
7262 \family default
7263  file to see an example of this.
7264 \end_layout
7265
7266 \begin_layout Subsection
7267 FAQs, Tips, Tricks, and Other Ruminations
7268 \end_layout
7269
7270 \begin_layout Subsubsection
7271 Getting LyX and AASTeX to cooperate
7272 \end_layout
7273
7274 \begin_layout Standard
7275 It can be a bit tricky to get LyX to recognize a new layout and document
7276  class.
7277  When all else fails, do this:
7278 \end_layout
7279
7280 \begin_layout Enumerate
7281 Make certain that LaTeX can find AASTeX.
7282  Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
7283  a directory completely unrelated to LaTeX or AASTeX and run LaTeX on 
7284 \family typewriter
7285 sample.tex
7286 \family default
7287 .
7288 \end_layout
7289
7290 \begin_layout Enumerate
7291 Make certain that 
7292 \family typewriter
7293 aastex.layout
7294 \family default
7295  appears in LyX's 
7296 \family typewriter
7297 layouts
7298 \family default
7299  folder
7300 \end_layout
7301
7302 \begin_layout Enumerate
7303 Rerun 
7304 \family sans
7305 Tools\SpecialChar \menuseparator
7306 Reconfigure
7307 \family default
7308  in LyX, then restart LyX.
7309 \end_layout
7310
7311 \begin_layout Enumerate
7312 Open a regular new file, not from a template.
7313  Does AASTeX appear in the class list in 
7314 \family sans
7315 Document\SpecialChar \menuseparator
7316 Settings
7317 \family default
7318 ?
7319 \end_layout
7320
7321 \begin_layout Standard
7322 If you get a warning from an existing AASTeX document about not being able
7323  to find the AASTeX layout or a message about 
7324 \begin_inset Quotes eld
7325 \end_inset
7326
7327 You should not mix title layouts with normal ones
7328 \begin_inset Quotes erd
7329 \end_inset
7330
7331 , things haven't been installed correctly.
7332 \end_layout
7333
7334 \begin_layout Subsubsection
7335 LaTeX error processing a table 
7336 \end_layout
7337
7338 \begin_layout Standard
7339 LyX, by default, attempts to center the table caption/title.
7340  This seems to produce a bad interaction in AASTeX so you should click somewhere
7341  in the caption/title, then select 
7342 \family sans
7343 Edit\SpecialChar \menuseparator
7344 Paragraph
7345 \begin_inset space ~
7346 \end_inset
7347
7348 Settings
7349 \family default
7350 , then set the 
7351 \family sans
7352 Alignment
7353 \family default
7354  to 
7355 \family sans
7356 Block
7357 \family default
7358 .
7359  This took care of it for me.
7360 \end_layout
7361
7362 \begin_layout Subsubsection
7363 References
7364 \end_layout
7365
7366 \begin_layout Standard
7367 A couple of things: 1) I have noticed some funny spacing in the reference
7368  entries in the text.
7369  When you enter the bibliography item data, make sure their is 
7370 \emph on
7371 no
7372 \emph default
7373  space between the last author and the parenthesis setting off the year;
7374  
7375 \emph on
7376 e.
7377 \begin_inset space \thinspace{}
7378 \end_inset
7379
7380 g.
7381 \begin_inset space \space{}
7382 \end_inset
7383
7384
7385 \emph default
7386 type 
7387 \family typewriter
7388 Ressler(1992)
7389 \family default
7390 , not 
7391 \family typewriter
7392 Ressler (1992)
7393 \family default
7394 .
7395  2) Entering the references at all is not obvious.
7396  The easiest thing is to start typing your first reference at the end of
7397  the document, then mark it as type 
7398 \family sans
7399 References
7400 \family default
7401 .
7402  That will put a small gray box in front of what you just typed.
7403  Click on the box to fill in the rest of the information.
7404  For new references, go to the end of an existing reference and press return.
7405  That will create a new line with its own box, etc.
7406 \end_layout
7407
7408 \begin_layout Subsubsection
7409 Including EPS files
7410 \end_layout
7411
7412 \begin_layout Standard
7413 Even though AASTeX provides its own figure commands (
7414 \family typewriter
7415
7416 \backslash
7417 plotone
7418 \family default
7419 , for example), I much prefer LaTeX's standard figure commands (with the
7420  default graphicx).
7421  You can insert the 
7422 \family typewriter
7423
7424 \backslash
7425 plotone
7426 \family default
7427 , etc.
7428 \begin_inset space ~
7429 \end_inset
7430
7431 commands as TeX code into a Figure Float box if you desire, but I never
7432  have much luck getting the layout right.
7433  With the standard graphics, LyX will insert a 
7434 \family typewriter
7435
7436 \backslash
7437 usepackage{graphicx}
7438 \family default
7439  command into the LaTeX preamble and handle the figures in the standard
7440  LaTeX2e way, interspersing the figures in the text.
7441  I believe ApJ accepts figures exactly this way now; AJ might still use
7442  the 
7443 \begin_inset Quotes eld
7444 \end_inset
7445
7446 stack everything at the end
7447 \begin_inset Quotes erd
7448 \end_inset
7449
7450  technique.
7451 \end_layout
7452
7453 \begin_layout Subsubsection
7454 Things I could have done, but didn't
7455 \end_layout
7456
7457 \begin_layout Standard
7458 There are a few 
7459 \begin_inset Quotes eld
7460 \end_inset
7461
7462 pretty
7463 \begin_inset Quotes erd
7464 \end_inset
7465
7466  things I could have implemented, but chose not to.
7467  For instance, I saw no point in double-spacing the text in the LyX window,
7468  even though it is double-spaced in the paper manuscript.
7469  Also, I chose not to make separate layouts for the preprint and preprint2
7470  styles.
7471  Since I assume you will spend most of your time in the plain manuscript
7472  mode anyway, I decided not to chew up more disk space with this.
7473  
7474 \end_layout
7475
7476 \begin_layout Subsection
7477 Final Caveat
7478 \end_layout
7479
7480 \begin_layout Standard
7481 Your mileage may vary.
7482  I've now had papers published by both ApJ and AJ that have had 98% of the
7483  effort done in LyX; the last 2% was the LaTeX post-processing and a few
7484  cleanups.
7485  I have had no trouble with the submission process, and I'm sure the journals
7486  were never aware that there might be a difference.
7487  So, go forth and publish!
7488 \end_layout
7489
7490 \begin_layout Section
7491 AMS LaTeX
7492 \end_layout
7493
7494 \begin_layout Standard
7495 by 
7496 \noun on
7497 David Johnson; updated by Richard Heck
7498 \end_layout
7499
7500 \begin_layout Standard
7501 \begin_inset VSpace bigskip
7502 \end_inset
7503
7504
7505 \end_layout
7506
7507 \begin_layout Standard
7508 \noindent
7509 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
7510  papers to be submitted to American Mathematical Society publications.
7511  The layouts are not tailored to a specific journal, but easily can be.
7512  You should refer to the AMS documentation for specific instructions for
7513  each journal (usually it will entail only changing a single line in the
7514  TeX output).
7515  That documentation is available on the Web at 
7516 \begin_inset Flex URL
7517 status open
7518
7519 \begin_layout Plain Layout
7520
7521 http://www.ams.org
7522 \end_layout
7523
7524 \end_inset
7525
7526  or by ftp at 
7527 \begin_inset Flex URL
7528 status open
7529
7530 \begin_layout Plain Layout
7531
7532 ftp://ftp.ams.org/pub/tex/amslatex/
7533 \end_layout
7534
7535 \end_inset
7536
7537 .
7538  These layouts are appropriate, and useful, for any mathematical writing.
7539  
7540 \end_layout
7541
7542 \begin_layout Standard
7543 There are two basic AMS LaTeX layouts: 
7544 \end_layout
7545
7546 \begin_layout Itemize
7547 amsart: The standard AMS article format.
7548 \end_layout
7549
7550 \begin_layout Itemize
7551 amsbook: the standard AMS book (really, monograph) format.
7552  
7553 \end_layout
7554
7555 \begin_layout Standard
7556 The layouts themselves contain only the minimum necessary to use the AMS
7557  classes.
7558  They do not, in particular, contain any of the `theorem' environments used
7559  for setting theorems, lemmas, and the like.
7560  These are contained, instead, in the 
7561 \begin_inset Flex CharStyle:Code
7562 status collapsed
7563
7564 \begin_layout Plain Layout
7565 Theorems (AMS)
7566 \end_layout
7567
7568 \end_inset
7569
7570  module, which is loaded by default when when you select one of the AMS
7571  classes.
7572  (It can also be used with other classes and can be removed, if you would
7573  rather use something else.) Less commonly used environments are in the 
7574 \begin_inset Flex CharStyle:Code
7575 status collapsed
7576
7577 \begin_layout Plain Layout
7578 Theorems (AMS-Extended)
7579 \end_layout
7580
7581 \end_inset
7582
7583  module, which must be loaded manually.
7584 \end_layout
7585
7586 \begin_layout Standard
7587 By default, theorems and the like are numbered consecutively throughout
7588  the document, but this may be modified by loading the module 
7589 \begin_inset Flex CharStyle:Code
7590 status collapsed
7591
7592 \begin_layout Plain Layout
7593 Theorems (Order by Section)
7594 \end_layout
7595
7596 \end_inset
7597
7598  or, if you are using 
7599 \begin_inset Flex CharStyle:Code
7600 status collapsed
7601
7602 \begin_layout Plain Layout
7603 book (AMS)
7604 \end_layout
7605
7606 \end_inset
7607
7608 , the module 
7609 \begin_inset Flex CharStyle:Code
7610 status collapsed
7611
7612 \begin_layout Plain Layout
7613 Theorems (Order by Chapter)
7614 \end_layout
7615
7616 \end_inset
7617
7618 .
7619  These will number the results as 
7620 \begin_inset Formula $n.m$
7621 \end_inset
7622
7623 , where the first number refers to the section (or chapter) and the second
7624  refers to the total number of results so far in that section (or chapter).
7625  Many environments are also available unnumbered.
7626  These are indicated by an asterisk at the end.
7627  If you happen to want 
7628 \emph on
7629 only
7630 \emph default
7631  unnumbered results, the the module 
7632 \begin_inset Flex CharStyle:Code
7633 status collapsed
7634
7635 \begin_layout Plain Layout
7636 Theorems (Starred)
7637 \end_layout
7638
7639 \end_inset
7640
7641  provides that option.
7642 \end_layout
7643
7644 \begin_layout Standard
7645 Note that these modules do not 
7646 \emph on
7647 have
7648 \emph default
7649  to be used with the AMS classes.
7650  It is perfectly possible to use the 
7651 \begin_inset Flex CharStyle:Code
7652 status collapsed
7653
7654 \begin_layout Plain Layout
7655 Theorems (AMS)
7656 \end_layout
7657
7658 \end_inset
7659
7660  module, and the others mentioned, with other classes, such as 
7661 \begin_inset Flex CharStyle:Code
7662 status collapsed
7663
7664 \begin_layout Plain Layout
7665 article
7666 \end_layout
7667
7668 \end_inset
7669
7670
7671 \begin_inset Flex CharStyle:Code
7672 status collapsed
7673
7674 \begin_layout Plain Layout
7675 report
7676 \end_layout
7677
7678 \end_inset
7679
7680
7681 \begin_inset Flex CharStyle:Code
7682 status collapsed
7683
7684 \begin_layout Plain Layout
7685 book (KOMA-script)
7686 \end_layout
7687
7688 \end_inset
7689
7690 , and so forth.
7691 \end_layout
7692
7693 \begin_layout Subsection
7694 What these layouts provide
7695 \end_layout
7696
7697 \begin_layout Standard
7698 There is a long list of included environments provided by these layouts.
7699  In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
7700  variety of `theorem' environments.
7701  However, the AMS recommends the environments that are available in LyX.
7702  
7703 \end_layout
7704
7705 \begin_layout Standard
7706 The following environments—as well as the standard environments, such as
7707  
7708 \begin_inset Flex CharStyle:Noun
7709 status collapsed
7710
7711 \begin_layout Plain Layout
7712 section
7713 \end_layout
7714
7715 \end_inset
7716
7717
7718 \begin_inset Flex CharStyle:Noun
7719 status collapsed
7720
7721 \begin_layout Plain Layout
7722 bibliography
7723 \end_layout
7724
7725 \end_inset
7726
7727
7728 \begin_inset Flex CharStyle:Noun
7729 status collapsed
7730
7731 \begin_layout Plain Layout
7732 title
7733 \end_layout
7734
7735 \end_inset
7736
7737
7738 \begin_inset Flex CharStyle:Noun
7739 status collapsed
7740
7741 \begin_layout Plain Layout
7742 author
7743 \end_layout
7744
7745 \end_inset
7746
7747 , and 
7748 \begin_inset Flex CharStyle:Noun
7749 status collapsed
7750
7751 \begin_layout Plain Layout
7752 date
7753 \end_layout
7754
7755 \end_inset
7756
7757 —are provided by 
7758 \begin_inset Flex CharStyle:Code
7759 status collapsed
7760
7761 \begin_layout Plain Layout
7762 article (AMS)
7763 \end_layout
7764
7765 \end_inset
7766
7767  and 
7768 \begin_inset Flex CharStyle:Code
7769 status collapsed
7770
7771 \begin_layout Plain Layout
7772 book (AMS)
7773 \end_layout
7774
7775 \end_inset
7776
7777 :
7778 \end_layout
7779
7780 \begin_layout Description
7781 Address This should be the author's permanent address.
7782 \end_layout
7783
7784 \begin_layout Description
7785 Current
7786 \begin_inset space ~
7787 \end_inset
7788
7789 Address This should be the author's temporary address at the time of submission,
7790  if different from the Address.
7791 \end_layout
7792
7793 \begin_layout Description
7794 Email Author's e-mail address
7795 \end_layout
7796
7797 \begin_layout Description
7798 URL Author's Web address, if desired.
7799 \end_layout
7800
7801 \begin_layout Description
7802 Keywords Key words or phrases used to identify specific topics discussed
7803  in the paper.
7804 \end_layout
7805
7806 \begin_layout Description
7807 Subjectclass These refer to the AMS Subject Classifications, published and
7808  described in 
7809 \emph on
7810 Mathematical Reviews
7811 \emph default
7812 .
7813  These are also available online at the AMS cites listed above.
7814 \end_layout
7815
7816 \begin_layout Description
7817 Thanks
7818 \end_layout
7819
7820 \begin_layout Description
7821 Dedicatory
7822 \end_layout
7823
7824 \begin_layout Description
7825 Translator
7826 \end_layout
7827
7828 \begin_layout Standard
7829 The following environments are provided by both the 
7830 \begin_inset Flex CharStyle:Code
7831 status collapsed
7832
7833 \begin_layout Plain Layout
7834 Theorems
7835 \end_layout
7836
7837 \end_inset
7838
7839  and 
7840 \begin_inset Flex CharStyle:Code
7841 status collapsed
7842
7843 \begin_layout Plain Layout
7844 Theorems (AMS)
7845 \end_layout
7846
7847 \end_inset
7848
7849  modules, in the latter case in both starred (unnumbered) and unstarred
7850  (numbered) versions.
7851  These same environments are provided only in the starred versions by the
7852  
7853 \begin_inset Flex CharStyle:Code
7854 status collapsed
7855
7856 \begin_layout Plain Layout
7857 Theorems (Starred)
7858 \end_layout
7859
7860 \end_inset
7861
7862  module:
7863 \end_layout
7864
7865 \begin_layout Theorem
7866 This is typically used for the statements of major results.
7867  
7868 \end_layout
7869
7870 \begin_layout Corollary*
7871 This is used for statements which follow fairly directly from previous statement
7872 s.
7873  Again, these can be major results.
7874  
7875 \end_layout
7876
7877 \begin_layout Lemma
7878 These are smaller results needed to prove other statements.
7879 \end_layout
7880
7881 \begin_layout Proposition
7882 These are less major results which (hopefully) add to the general theory
7883  being discussed.
7884 \end_layout
7885
7886 \begin_layout Conjecture
7887 These are statements provided without justification, which the author does
7888  not know how to prove, but which seem to be true (to the author, at least).
7889 \end_layout
7890
7891 \begin_layout Definition*
7892 Guess what this is for.
7893  The font is different for this environment than for the previous ones.
7894  
7895 \end_layout
7896
7897 \begin_layout Example*
7898 Used for examples illustrating proven results.
7899 \end_layout
7900
7901 \begin_layout Problem
7902 It's not really known what this is for.
7903  You should figure it out.
7904 \end_layout
7905
7906 \begin_layout Exercise*
7907 Write a description for this one.
7908 \end_layout
7909
7910 \begin_layout Remark
7911 This environment is also a type of theorem, usually a lesser sort of observation.
7912 \end_layout
7913
7914 \begin_layout Claim*
7915 Often used in the course of giving a proof of a larger result.
7916 \end_layout
7917
7918 \begin_layout Case
7919 Generally, these are used to break up long arguments, using specific instances
7920  of some condition.
7921  
7922 \end_layout
7923
7924 \begin_layout Case
7925 The numbering scheme for cases is on its own, not together with other numbered
7926  statements.
7927  
7928 \end_layout
7929
7930 \begin_layout Proof
7931 At the end of this environment, a QED symbol (usually a square, but it can
7932  vary with different styles) is placed.
7933  If you want to have other environments within this one—for example, Case
7934  environments—and have the QED symbol appear only after them, then the other
7935  environments need to be nested within the proof environment.
7936  See the section 
7937 \emph on
7938 Nesting Environments
7939 \emph default
7940  of the 
7941 \emph on
7942 User's Guide
7943 \emph default
7944  for information on nesting.
7945 \end_layout
7946
7947 \begin_layout Standard
7948 And these environments are provided by 
7949 \begin_inset Flex CharStyle:Code
7950 status collapsed
7951
7952 \begin_layout Plain Layout
7953 Theorems (AMS-Extended)
7954 \end_layout
7955
7956 \end_inset
7957
7958 :
7959 \end_layout
7960
7961 \begin_layout Criterion*
7962 A required condition.
7963 \end_layout
7964
7965 \begin_layout Algorithm*
7966 A general procedure to be used.
7967 \end_layout
7968
7969 \begin_layout Axiom*
7970 This is a property or statement taken as true within the system being discussed.
7971 \end_layout
7972
7973 \begin_layout Condition*
7974 Sometimes used to state a condition assumed within the present context of
7975  discussion.
7976 \end_layout
7977
7978 \begin_layout Note*
7979 Similar to a Remark.
7980 \end_layout
7981
7982 \begin_layout Notation*
7983 Used for the explanation of, yes, notation.
7984 \end_layout
7985
7986 \begin_layout Summary
7987 Do we really need to tell you? 
7988 \end_layout
7989
7990 \begin_layout Acknowledgement*
7991 Acknowledgement.
7992 \end_layout
7993
7994 \begin_layout Conclusion*
7995 Sometimes used at the end of a long train of argument.
7996 \end_layout
7997
7998 \begin_layout Fact
7999 Used in a way similar to Proposition, though perhaps lower on the scale.
8000 \end_layout
8001
8002 \begin_layout Standard
8003 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8004  fonts packages.
8005  They need to be available on your system in order to use these environments.
8006 \end_layout
8007
8008 \begin_layout Section
8009 AGU journals (
8010 \family sans
8011 aguplus
8012 \family default
8013 )
8014 \end_layout
8015
8016 \begin_layout Standard
8017 by 
8018 \shape smallcaps
8019 Martin Vermeer
8020 \end_layout
8021
8022 \begin_layout Subsection
8023 Description
8024 \end_layout
8025
8026 \begin_layout Standard
8027 These are the layout files for some of the journals of the American Geophysical
8028  Society.
8029  It is assumed that you have both the AGU's own class files and AGUplus
8030  installed (everything to be found at
8031 \begin_inset Flex URL
8032 status collapsed
8033
8034 \begin_layout Plain Layout
8035
8036 ftp://ftp.agu.org/journals/latex/journals
8037 \end_layout
8038
8039 \end_inset
8040
8041 ).
8042 \end_layout
8043
8044 \begin_layout Subsection
8045 New styles
8046 \end_layout
8047
8048 \begin_layout Standard
8049 Redefined are 
8050 \family sans
8051 Paragraph
8052 \family default
8053
8054 \family sans
8055 Paragraph*
8056 \family default
8057 .
8058  They are still called this in the LyX GUI, though their LaTeX equivalents
8059  in the AGU classes are 
8060 \family sans
8061 Subsubsubsection
8062 \family default
8063  and 
8064 \family sans
8065 Subsubsubsection*
8066 \family default
8067 .
8068 \end_layout
8069
8070 \begin_layout Standard
8071 Newly defined styles are 
8072 \family sans
8073 Left_Header
8074 \family default
8075
8076 \family sans
8077 Right_Header
8078 \family default
8079
8080 \family sans
8081 Received
8082 \family default
8083
8084 \family sans
8085 Revised
8086 \family default
8087
8088 \family sans
8089 Accepted
8090 \family default
8091
8092 \family sans
8093 CCC
8094 \family default
8095
8096 \family sans
8097 PaperId
8098 \family default
8099
8100 \family sans
8101 AuthorAddr
8102 \family default
8103
8104 \family sans
8105 SlugComment
8106 \family default
8107 .
8108  These are mostly manuscript attributes and defined in the AGU class documentati
8109 on.
8110 \end_layout
8111
8112 \begin_layout Standard
8113 I suspect this is still badly incomplete.
8114 \end_layout
8115
8116 \begin_layout Subsection
8117 New floats
8118 \end_layout
8119
8120 \begin_layout Standard
8121
8122 \family sans
8123 Planotable
8124 \family default
8125  and 
8126 \family sans
8127 Plate
8128 \family default
8129 .
8130  We also have a new 
8131 \family sans
8132 Table_Caption
8133 \family default
8134 .
8135 \end_layout
8136
8137 \begin_layout Subsection
8138 Supported journals
8139 \end_layout
8140
8141 \begin_layout Itemize
8142
8143 \emph on
8144 Journal of Geophysical Research
8145 \emph default
8146
8147 \family typewriter
8148 jgrga.layout
8149 \family default
8150  â€” Martin Vermeer
8151 \end_layout
8152
8153 \begin_layout Standard
8154 Add your own, it isn't so hard! Look at the 
8155 \family typewriter
8156 jgrga.layout
8157 \family default
8158  example and 
8159 \family typewriter
8160 aguplus.inc
8161 \family default
8162 .
8163 \end_layout
8164
8165 \begin_layout Subsection
8166 Bugs and things to remember
8167 \end_layout
8168
8169 \begin_layout Standard
8170 In order to use the new layouts, you must remember to do the following for
8171  a new document:
8172 \end_layout
8173
8174 \begin_layout Enumerate
8175
8176 \emph on
8177 Turn off babel
8178 \emph default
8179 .
8180  This can be done in the 
8181 \family sans
8182 Layout\SpecialChar \menuseparator
8183 Document
8184 \family default
8185  or 
8186 \family sans
8187 Document\SpecialChar \menuseparator
8188 Settings
8189 \family default
8190  menu item.
8191  (AGU articles are always in English, right? So 
8192 \emph on
8193 don't
8194 \emph default
8195  choose a language.)
8196 \end_layout
8197
8198 \begin_layout Enumerate
8199 Enter 
8200 \family typewriter
8201 jgrga
8202 \family default
8203  into the document's 
8204 \family sans
8205 Extra Options
8206 \family default
8207  field.
8208  (Yes, this is a bug.)
8209 \end_layout
8210
8211 \begin_layout Enumerate
8212 Make sure you use the 
8213 \family typewriter
8214 agu.bst
8215 \family default
8216  bibliography style, by entering 
8217 \family sans
8218 agu
8219 \family default
8220  into the second field of the BibTeX inset.
8221  None of the standard styles will do.
8222 \end_layout
8223
8224 \begin_layout Section
8225 Broadway
8226 \end_layout
8227
8228 \begin_layout Standard
8229 by 
8230 \shape smallcaps
8231 Garst Reese
8232 \end_layout
8233
8234 \begin_layout Subsection
8235 Introduction
8236 \end_layout
8237
8238 \begin_layout Standard
8239 Broadway is for writing plays.
8240  The format is more decorative than Hollywood, and much less standardized.
8241  This format should be suitable for workshops.
8242 \end_layout
8243
8244 \begin_layout Subsection
8245 Special problems
8246 \end_layout
8247
8248 \begin_layout Standard
8249 The same as in Hollywood.
8250 \end_layout
8251
8252 \begin_layout Subsection
8253 Special features
8254 \end_layout
8255
8256 \begin_layout Standard
8257 Insert the 
8258 \family sans
8259 Speaker
8260 \family default
8261  names as labels then cross-reference the label to insert the name.
8262  The cross-reference dialog will show the current cast of characters.
8263 \end_layout
8264
8265 \begin_layout Subsection
8266 Paper size and Margins
8267 \end_layout
8268
8269 \begin_layout Standard
8270 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
8271 \end_layout
8272
8273 \begin_layout Subsection
8274 Environments
8275 \end_layout
8276
8277 \begin_layout Standard
8278 The following environments are available.
8279  You can use broadway.bind to get the bind keys shown at the right.
8280 \end_layout
8281
8282 \begin_layout Itemize
8283
8284 \family sans
8285 Standard
8286 \begin_inset Newline newline
8287 \end_inset
8288
8289
8290 \family default
8291 You should not have to use this, but it is here for anything that does not
8292  fit otherwise.
8293 \end_layout
8294
8295 \begin_layout Itemize
8296
8297 \family sans
8298 Narrative
8299 \begin_inset space \hfill{}
8300 \end_inset
8301
8302 M-z n
8303 \begin_inset Newline newline
8304 \end_inset
8305
8306
8307 \family default
8308 Used to describe stage setting and the action.
8309  First use of speaker names in all CAPs.
8310 \end_layout
8311
8312 \begin_layout Itemize
8313
8314 \family sans
8315 ACT
8316 \begin_inset space \hfill{}
8317 \end_inset
8318
8319 M-z a
8320 \begin_inset Newline newline
8321 \end_inset
8322
8323
8324 \family default
8325 Automatically numbered.
8326  On screen it will be arabic, but will print as Roman.
8327 \end_layout
8328
8329 \begin_layout Itemize
8330
8331 \family sans
8332 ACT*
8333 \begin_inset space \hfill{}
8334 \end_inset
8335
8336 M-z S at
8337 \begin_inset Newline newline
8338 \end_inset
8339
8340
8341 \family default
8342 Subtitle for 
8343 \family sans
8344 ACT.
8345
8346 \family default
8347  It is just centered text.
8348 \end_layout
8349
8350 \begin_layout Itemize
8351
8352 \family sans
8353 SCENE
8354 \begin_inset space \hfill{}
8355 \end_inset
8356
8357 M-z S-S
8358 \begin_inset Newline newline
8359 \end_inset
8360
8361
8362 \family default
8363 Not automatically numbered.
8364  You supply the number.
8365  This is because I couldn't figure out how.
8366 \end_layout
8367
8368 \begin_layout Itemize
8369
8370 \family sans
8371 AT_RISE:
8372 \begin_inset space \hfill{}
8373 \end_inset
8374
8375 M-z S-R
8376 \begin_inset Newline newline
8377 \end_inset
8378
8379
8380 \family default
8381 A special case of Narrative to describe the setting and action as the curtain
8382  rises.
8383 \end_layout
8384
8385 \begin_layout Itemize
8386
8387 \family sans
8388 Speaker
8389 \begin_inset space \hfill{}
8390 \end_inset
8391
8392 M-z s
8393 \begin_inset Newline newline
8394 \end_inset
8395
8396
8397 \family default
8398 The speaker's (actor's) title, centered in all CAPS.
8399 \end_layout
8400
8401 \begin_layout Itemize
8402
8403 \family sans
8404 Parenthetical
8405 \begin_inset space \hfill{}
8406 \end_inset
8407
8408 M-z p
8409 \begin_inset Newline newline
8410 \end_inset
8411
8412
8413 \family default
8414 Instructions to the speaker.
8415  The parentheses are automatically inserted.
8416  The ( will appear on screen, but both will be in the printed play.
8417  This environment is only used within 
8418 \family sans
8419 Dialogue
8420 \family default
8421 .
8422 \end_layout
8423
8424 \begin_layout Itemize
8425
8426 \family sans
8427 Dialogue
8428 \begin_inset space \hfill{}
8429 \end_inset
8430
8431 M-z d
8432 \begin_inset Newline newline
8433 \end_inset
8434
8435
8436 \family default
8437 What the Speaker says.
8438 \end_layout
8439
8440 \begin_layout Itemize
8441
8442 \family sans
8443 CURTAIN
8444 \begin_inset space \hfill{}
8445 \end_inset
8446
8447 M-z S-C
8448 \begin_inset Newline newline
8449 \end_inset
8450
8451
8452 \family default
8453 The curtain comes down.
8454 \end_layout
8455
8456 \begin_layout Itemize
8457
8458 \family sans
8459 Title
8460 \begin_inset space \hfill{}
8461 \end_inset
8462
8463 M-z S-T
8464 \end_layout
8465
8466 \begin_layout Itemize
8467
8468 \family sans
8469 Author
8470 \begin_inset space \hfill{}
8471 \end_inset
8472
8473 M-z S-A
8474 \end_layout
8475
8476 \begin_layout Itemize
8477
8478 \family sans
8479 Right_Address
8480 \begin_inset space \hfill{}
8481 \end_inset
8482
8483 M-z r
8484 \end_layout
8485
8486 \begin_layout Standard
8487 Hello there.
8488 \end_layout
8489
8490 \begin_layout Section
8491 Dinbrief
8492 \end_layout
8493
8494 \begin_layout Standard
8495 The document class 
8496 \family sans
8497 dinbrief
8498 \family default
8499  can be used to type letters according to German conventions.
8500  A template file is included in 
8501 \family typewriter
8502 .../lyx/share/templates
8503 \family default
8504  for you to use as a starting point.
8505 \end_layout
8506
8507 \begin_layout Section
8508 EGS journals (
8509 \family sans
8510 egs
8511 \family default
8512 )
8513 \end_layout
8514
8515 \begin_layout Standard
8516 by 
8517 \shape smallcaps
8518 Martin Vermeer
8519 \end_layout
8520
8521 \begin_layout Subsection
8522 Description
8523 \end_layout
8524
8525 \begin_layout Standard
8526 This is the layout file for the European Geophysical Society journals.
8527  The needed 
8528 \family typewriter
8529 egs.cls
8530 \family default
8531  can be downloaded from the web site of the EGS under 
8532 \begin_inset Flex URL
8533 status collapsed
8534
8535 \begin_layout Plain Layout
8536
8537 www.copernicus.org
8538 \end_layout
8539
8540 \end_inset
8541
8542 .
8543 \end_layout
8544
8545 \begin_layout Subsection
8546 New styles
8547 \end_layout
8548
8549 \begin_layout Standard
8550
8551 \family sans
8552 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
8553  Accepted
8554 \family default
8555
8556 \family sans
8557 Offsets
8558 \family default
8559 .
8560  The current layout file is unfortunately very unmodular and would benefit
8561  from using the various 
8562 \family typewriter
8563 std*.inc
8564 \family default
8565  file inclusions.
8566 \end_layout
8567
8568 \begin_layout Section
8569 Elsevier Journals
8570 \end_layout
8571
8572 \begin_layout Standard
8573 By 
8574 \noun on
8575 Rod Pinna
8576 \end_layout
8577
8578 \begin_layout Standard
8579 Elsevier Science Publishers B.V.
8580  provides a standard LaTeX document class (
8581 \family typewriter
8582 elsart.cls
8583 \family default
8584 ) for submitting articles to their various journals.
8585  The style file can be downloaded directly from their web site: 
8586 \begin_inset Flex URL
8587 status collapsed
8588
8589 \begin_layout Plain Layout
8590
8591 http://authors.elsevier.com/
8592 \end_layout
8593
8594 \end_inset
8595
8596 .
8597  Instructions are supplied along with the class file, which details the
8598  requirements of the publishers.
8599  LyX includes package that allows for the use of this class, by a layout
8600  and a template file.
8601  Installation of the class file is the same as for any other LaTeX package;
8602  instructions are provided in the Elsevier documentation.
8603 \end_layout
8604
8605 \begin_layout Standard
8606 To make use of 
8607 \family typewriter
8608 elsart.cls
8609 \family default
8610 , a file 
8611 \family typewriter
8612 elsart.layout
8613 \family default
8614  is supplied.
8615  As the Elsevier class file is based mainly on the standard article class,
8616  most of the normal functionality is provided.
8617  The Elsevier class defines a number of mathematical environments, which
8618  are similar to the AMS environments.
8619  These commands are all described in the Elsevier documentation, and are
8620  available in LyX.
8621 \end_layout
8622
8623 \begin_layout Standard
8624 The easiest way to use the Elsevier style is to base documents on the included
8625  template file.
8626  It is best not to use options such as fancy headings or the geometry package,
8627  as elements such as these are defined by Elsevier in their style file.
8628  Ideally, no extra packages except those mentioned in the Elsevier documentation
8629  should be used.
8630  Essentially, Elsevier require as 
8631 \begin_inset Quotes eld
8632 \end_inset
8633
8634 clean
8635 \begin_inset Quotes erd
8636 \end_inset
8637
8638  a LaTeX file as possible, as their intention is to take the supplied file
8639  and replace the class file with one for the particular journal to which
8640  the paper has been submitted.
8641  This also means that not too much time should be spent on the formating
8642  of the document.
8643  When it comes to be published, this will change anyway.
8644  The rest of the usage for this layout is substantially the same as for
8645  the normal article class.
8646  For details of what Elsevier do and don't allow, refer to their documentation.
8647 \end_layout
8648
8649 \begin_layout Section
8650 Foils [aka 
8651 \family sans
8652 FoilTeX
8653 \family default
8654 ]
8655 \begin_inset CommandInset label
8656 LatexCommand label
8657 name "sec:foiltex"
8658
8659 \end_inset
8660
8661
8662 \end_layout
8663
8664 \begin_layout Standard
8665 by 
8666 \noun on
8667 Allan Rae
8668 \end_layout
8669
8670 \begin_layout Subsection
8671 Introduction
8672 \end_layout
8673
8674 \begin_layout Standard
8675 This section describes how to use LyX to make slides for overhead projectors.
8676  There are two document classes that can do this: the default slides class
8677  and the 
8678 \family sans
8679 FoilTeX
8680 \family default
8681  slides class.
8682  This section documents the latter.
8683 \end_layout
8684
8685 \begin_layout Standard
8686 I'm going to say this again, nice and clear, so that there's no misunderstanding
8687 :
8688 \end_layout
8689
8690 \begin_layout Standard
8691 \begin_inset VSpace bigskip
8692 \end_inset
8693
8694
8695 \end_layout
8696
8697 \begin_layout Standard
8698 \align center
8699
8700 \size large
8701 This section documents the class 
8702 \begin_inset Quotes eld
8703 \end_inset
8704
8705
8706 \family sans
8707 slides (FoilTeX)
8708 \family default
8709
8710 \begin_inset Quotes erd
8711 \end_inset
8712
8713  
8714 \emph on
8715 only.
8716 \end_layout
8717
8718 \begin_layout Standard
8719 \begin_inset VSpace bigskip
8720 \end_inset
8721
8722
8723 \end_layout
8724
8725 \begin_layout Standard
8726 If you're looking for the documentation for 
8727 \begin_inset Quotes eld
8728 \end_inset
8729
8730
8731 \family sans
8732 slides (default)
8733 \family default
8734
8735 \begin_inset Quotes erd
8736 \end_inset
8737
8738 , check out section
8739 \begin_inset space ~
8740 \end_inset
8741
8742
8743 \begin_inset CommandInset ref
8744 LatexCommand ref
8745 reference "sec:slitex"
8746
8747 \end_inset
8748
8749 .
8750  If your machine doesn't have the 
8751 \family sans
8752 foils
8753 \family default
8754  class [
8755 \begin_inset Quotes eld
8756 \end_inset
8757
8758
8759 \family sans
8760 slides (FoilTeX)
8761 \family default
8762
8763 \begin_inset Quotes erd
8764 \end_inset
8765
8766 ] installed, you'll probably have to use the default 
8767 \family sans
8768 slides
8769 \family default
8770  class, which isn't quite as good as 
8771 \family sans
8772 foils.
8773 \end_layout
8774
8775 \begin_layout Standard
8776 The 
8777 \family sans
8778 foils
8779 \family default
8780  class is designed for use with version 2.1 of the 
8781 \family sans
8782 foils.cls
8783 \family default
8784  LaTeX class file which is now an integral part of LaTeX2e.
8785 \end_layout
8786
8787 \begin_layout Subsection
8788 Getting Started
8789 \end_layout
8790
8791 \begin_layout Standard
8792 Obviously, to use this document class, you need to select 
8793 \begin_inset Quotes eld
8794 \end_inset
8795
8796
8797 \family sans
8798 slides (FoilTeX)
8799 \family default
8800
8801 \begin_inset Quotes erd
8802 \end_inset
8803
8804  from the 
8805 \family sans
8806 Class
8807 \family default
8808  entry in the 
8809 \family sans
8810 Document
8811 \begin_inset space ~
8812 \end_inset
8813
8814 Layout
8815 \family default
8816  dialog.
8817  There are some settings in the 
8818 \family sans
8819 Document
8820 \begin_inset space ~
8821 \end_inset
8822
8823 Layout
8824 \family default
8825  dialog that you should know about that are specific to this class:
8826 \end_layout
8827
8828 \begin_layout Itemize
8829 Don't change the options 
8830 \family sans
8831 Sides
8832 \family default
8833  and 
8834 \family sans
8835 Columns
8836 \family default
8837  on the 
8838 \family sans
8839 Document
8840 \begin_inset space ~
8841 \end_inset
8842
8843 Layout
8844 \family default
8845  dialog.
8846  They're ignored by the 
8847 \family sans
8848 foils
8849 \family default
8850  class.
8851 \end_layout
8852
8853 \begin_layout Itemize
8854 The default font size is 20
8855 \begin_inset space \thinspace{}
8856 \end_inset
8857
8858 pt with the other options being 17
8859 \begin_inset space \thinspace{}
8860 \end_inset
8861
8862 pt, 25
8863 \begin_inset space \thinspace{}
8864 \end_inset
8865
8866 pt and 30
8867 \begin_inset space \thinspace{}
8868 \end_inset
8869
8870 pt.
8871 \end_layout
8872
8873 \begin_layout Itemize
8874 The default font is 
8875 \family sans
8876 sans
8877 \family default
8878  
8879 \family sans
8880 serif
8881 \family default
8882  but all math equations are still typeset in the usual roman font.
8883 \end_layout
8884
8885 \begin_layout Itemize
8886
8887 \family sans
8888 FoilTeX
8889 \family default
8890  supports A4 and Letter paper sizes as well as a special size for working
8891  with 35
8892 \begin_inset space \thinspace{}
8893 \end_inset
8894
8895 mm slides.
8896  It doesn't support A5, B5, legal or executive paper sizes.
8897 \end_layout
8898
8899 \begin_layout Itemize
8900 Don't bother changing the 
8901 \family sans
8902 Float Placement
8903 \family default
8904  settings because they are ignored anyway.
8905  All floats appear where they are defined in the text.
8906 \end_layout
8907
8908 \begin_layout Itemize
8909 The 
8910 \family sans
8911 Pagestyle
8912 \family default
8913  setting behaves a bit differently for this class.
8914  
8915 \family sans
8916 FoilTeX
8917 \family default
8918  provides extensive footer and header capabilities including a user-defined
8919  logo.
8920  See section
8921 \begin_inset space ~
8922 \end_inset
8923
8924
8925 \begin_inset CommandInset ref
8926 LatexCommand ref
8927 reference "sec:foilfoot"
8928
8929 \end_inset
8930
8931  for more details.
8932  The title page is treated differently to all other pages in the document
8933  and is 
8934 \emph on
8935 always
8936 \emph default
8937  unnumbered and 
8938 \emph on
8939 always
8940 \emph default
8941  has the logo centered at the bottom of the page (if one is defined).
8942  The possible page style choices and what they do are as follows:
8943 \end_layout
8944
8945 \begin_deeper
8946 \begin_layout Labeling
8947 \labelwidthstring MMMMMMM
8948
8949 \family sans
8950 \series bold
8951 empty
8952 \family default
8953 \series default
8954  The final output contains no page numbers, or other headers or footers
8955  (except footnotes of course).
8956  
8957 \end_layout
8958
8959 \begin_layout Labeling
8960 \labelwidthstring MMMMMMM
8961
8962 \family sans
8963 \series bold
8964 plain
8965 \family default
8966 \series default
8967  The final output contains page numbers centered at the bottom of the page.
8968  No other headings or footers (other than footnotes).
8969 \end_layout
8970
8971 \begin_layout Labeling
8972 \labelwidthstring MMMMMMM
8973
8974 \series bold
8975 foilheadings
8976 \series default
8977  Page numbers in lower right corner.
8978  Additional headers and footers are also shown.
8979  This is also the default.
8980 \end_layout
8981
8982 \begin_layout Labeling
8983 \labelwidthstring MMMMMMM
8984
8985 \series bold
8986 fancy
8987 \series default
8988  Gives you access to the 
8989 \family sans
8990 fancyheadings
8991 \family default
8992  package although its use with 
8993 \family sans
8994 FoilTeX
8995 \family default
8996  is discouraged by the writer of the 
8997 \family sans
8998 FoilTeX
8999 \family default
9000  package because of some potential page layout clashes.
9001 \end_layout
9002
9003 \end_deeper
9004 \begin_layout Subsubsection
9005 Extra Options
9006 \end_layout
9007
9008 \begin_layout Standard
9009 The following options may be used in the extra class options in the 
9010 \family sans
9011 Document\SpecialChar \menuseparator
9012 Settings
9013 \family default
9014  dialog.
9015 \end_layout
9016
9017 \begin_layout Labeling
9018 \labelwidthstring MMMMMMx
9019
9020 \series bold
9021 35mmSlide
9022 \series default
9023  This sets up the page layout for 7.33
9024 \begin_inset space \thinspace{}
9025 \end_inset
9026
9027 in by 11
9028 \begin_inset space \thinspace{}
9029 \end_inset
9030
9031 in paper, which is about the same aspect ratio as a 35
9032 \begin_inset space \thinspace{}
9033 \end_inset
9034
9035 mm slide, making it a bit easier to work with this medium.
9036 \end_layout
9037
9038 \begin_layout Labeling
9039 \labelwidthstring MMMMMMx
9040
9041 \series bold
9042 headrule
9043 \series default
9044  Places a rule across the page below the header on every page except the
9045  title page.
9046 \end_layout
9047
9048 \begin_layout Labeling
9049 \labelwidthstring MMMMMMx
9050
9051 \series bold
9052 footrule
9053 \series default
9054  Places a rule across the page above the footer on every page except the
9055  title page.
9056 \end_layout
9057
9058 \begin_layout Labeling
9059 \labelwidthstring MMMMMMx
9060
9061 \series bold
9062 dvips
9063 \series default
9064  This is automatically set each time you create a new 
9065 \family sans
9066 foils
9067 \family default
9068  document.
9069  This option tells 
9070 \family sans
9071 FoilTeX
9072 \family default
9073  to use the dvips driver to rotate those pages that are set as landscape
9074  foils.
9075 \end_layout
9076
9077 \begin_layout Labeling
9078 \labelwidthstring MMMMMMx
9079
9080 \series bold
9081 landscape
9082 \series default
9083  Simply changes the page dimensions to those of a landscape page but doesn't
9084  do any rotation.
9085  Thus if you use this option you need to use an external program to rotate
9086  each page or feed your paper through your printer as landscape.
9087  Note that this option effectively reverses the roles of the 
9088 \family sans
9089 Foilhead
9090 \family default
9091  and 
9092 \family sans
9093 Rotatefoilhead
9094 \family default
9095  environments (don't worry these are described in the next section).
9096 \end_layout
9097
9098 \begin_layout Labeling
9099 \labelwidthstring MMMMMMx
9100
9101 \series bold
9102 leqno
9103 \series default
9104  Equation numbers on the left.
9105 \end_layout
9106
9107 \begin_layout Labeling
9108 \labelwidthstring MMMMMMx
9109
9110 \series bold
9111 fleqn
9112 \series default
9113  Flush-left equations.
9114 \end_layout
9115
9116 \begin_layout Subsection
9117 Supported Environments
9118 \end_layout
9119
9120 \begin_layout Standard
9121 Most of the environments commonly supported in other classes are also supported
9122  by the 
9123 \family sans
9124 foils
9125 \family default
9126  class.
9127  There are several additional environments provided by 
9128 \family sans
9129 FoilTeX
9130 \family default
9131  as well as a couple added by LyX.
9132  The following environments are shared with other classes:
9133 \end_layout
9134
9135 \begin_layout Standard
9136 \begin_inset ERT
9137 status open
9138
9139 \begin_layout Plain Layout
9140
9141
9142 \backslash
9143 begin{multicols}{2}
9144 \end_layout
9145
9146 \end_inset
9147
9148
9149 \end_layout
9150
9151 \begin_layout Itemize
9152
9153 \family sans
9154 Standard
9155 \end_layout
9156
9157 \begin_layout Itemize
9158
9159 \family sans
9160 Itemize
9161 \end_layout
9162
9163 \begin_layout Itemize
9164
9165 \family sans
9166 Enumerate
9167 \end_layout
9168
9169 \begin_layout Itemize
9170
9171 \family sans
9172 Description
9173 \end_layout
9174
9175 \begin_layout Itemize
9176
9177 \family sans
9178 List
9179 \end_layout
9180
9181 \begin_layout Itemize
9182
9183 \family sans
9184 LyX-Code
9185 \end_layout
9186
9187 \begin_layout Itemize
9188
9189 \family sans
9190 Verse
9191 \end_layout
9192
9193 \begin_layout Itemize
9194
9195 \family sans
9196 Quote
9197 \end_layout
9198
9199 \begin_layout Itemize
9200
9201 \family sans
9202 Quotation
9203 \end_layout
9204
9205 \begin_layout Itemize
9206
9207 \family sans
9208 Title
9209 \end_layout
9210
9211 \begin_layout Itemize
9212
9213 \family sans
9214 Author
9215 \end_layout
9216
9217 \begin_layout Itemize
9218
9219 \family sans
9220 Date
9221 \end_layout
9222
9223 \begin_layout Itemize
9224
9225 \family sans
9226 Abstract
9227 \end_layout
9228
9229 \begin_layout Itemize
9230
9231 \family sans
9232 Bibliography
9233 \end_layout
9234
9235 \begin_layout Itemize
9236
9237 \family sans
9238 Address
9239 \end_layout
9240
9241 \begin_layout Itemize
9242
9243 \family sans
9244 RightAddress
9245 \end_layout
9246
9247 \begin_layout Itemize
9248
9249 \family sans
9250 Caption
9251 \end_layout
9252
9253 \begin_layout Itemize
9254
9255 \family sans
9256 Comment
9257 \end_layout
9258
9259 \begin_layout Standard
9260 \begin_inset ERT
9261 status open
9262
9263 \begin_layout Plain Layout
9264
9265
9266 \backslash
9267 end{multicols}
9268 \end_layout
9269
9270 \end_inset
9271
9272
9273 \end_layout
9274
9275 \begin_layout Standard
9276 That is, all the major environments apart from the sectioning environments.
9277  Since foils are essentially self-contained sections, with a title and body,
9278  
9279 \family sans
9280 FoilTeX
9281 \family default
9282  provides specific commands for starting new foils and these are:
9283 \end_layout
9284
9285 \begin_layout Itemize
9286
9287 \family sans
9288 Foilhead
9289 \end_layout
9290
9291 \begin_layout Itemize
9292
9293 \family sans
9294 Rotatefoilhead
9295 \end_layout
9296
9297 \begin_layout Standard
9298 LyX also provides slightly modified versions of these two environments called:
9299 \end_layout
9300
9301 \begin_layout Itemize
9302
9303 \family sans
9304 ShortFoilhead
9305 \end_layout
9306
9307 \begin_layout Itemize
9308
9309 \family sans
9310 ShortRotatefoilhead
9311 \end_layout
9312
9313 \begin_layout Standard
9314 and the differences will be explained in the next section.
9315 \end_layout
9316
9317 \begin_layout Standard
9318 Since foils are often used in presenting ideas or new theorems and such
9319  
9320 \family sans
9321 FoilTeX
9322 \family default
9323  also provides a comprehensive box of goodies for presenting them:
9324 \end_layout
9325
9326 \begin_layout Standard
9327 \begin_inset ERT
9328 status open
9329
9330 \begin_layout Plain Layout
9331
9332
9333 \backslash
9334 begin{multicols}{2}
9335 \end_layout
9336
9337 \end_inset
9338
9339
9340 \end_layout
9341
9342 \begin_layout Itemize
9343
9344 \family sans
9345 Theorem
9346 \end_layout
9347
9348 \begin_layout Itemize
9349
9350 \family sans
9351 Lemma
9352 \end_layout
9353
9354 \begin_layout Itemize
9355
9356 \family sans
9357 Corollary
9358 \end_layout
9359
9360 \begin_layout Itemize
9361
9362 \family sans
9363 Proposition
9364 \end_layout
9365
9366 \begin_layout Itemize
9367
9368 \family sans
9369 Definition
9370 \end_layout
9371
9372 \begin_layout Itemize
9373
9374 \family sans
9375 Proof
9376 \end_layout
9377
9378 \begin_layout Itemize
9379
9380 \family sans
9381 Theorem*
9382 \end_layout
9383
9384 \begin_layout Itemize
9385
9386 \family sans
9387 Lemma*
9388 \end_layout
9389
9390 \begin_layout Itemize
9391
9392 \family sans
9393 Corollary*
9394 \end_layout
9395
9396 \begin_layout Itemize
9397
9398 \family sans
9399 Proposition*
9400 \end_layout
9401
9402 \begin_layout Itemize
9403
9404 \family sans
9405 Definition*
9406 \end_layout
9407
9408 \begin_layout Standard
9409 \begin_inset ERT
9410 status open
9411
9412 \begin_layout Plain Layout
9413
9414
9415 \backslash
9416 end{multicols}
9417 \end_layout
9418
9419 \end_inset
9420
9421
9422 \end_layout
9423
9424 \begin_layout Standard
9425 The starred versions are unnumbered while the unstarred versions are numbered.
9426  There are also two list environments added by LyX and these are:
9427 \end_layout
9428
9429 \begin_layout Itemize
9430
9431 \family sans
9432 TickList
9433 \end_layout
9434
9435 \begin_layout Itemize
9436
9437 \family sans
9438 CrossList
9439 \end_layout
9440
9441 \begin_layout Standard
9442
9443 \family sans
9444 FoilTeX
9445 \family default
9446  provides some powerful header and footer capabilities that are best set
9447  in the preamble although they may be set at any point in a document.
9448  If you want to change these settings in your document the best place to
9449  do so is at the very top of a foil, i.
9450 \begin_inset space \thinspace{}
9451 \end_inset
9452
9453 g.
9454 \emph on
9455
9456 \begin_inset space \space{}
9457 \end_inset
9458
9459
9460 \emph default
9461 straight after the foilhead.
9462 \end_layout
9463
9464 \begin_layout Standard
9465 For this purpose, the following command styles are provided [
9466 \shape smallcaps
9467 Martin Vermeer
9468 \shape default
9469 ]:
9470 \end_layout
9471
9472 \begin_layout Standard
9473 \begin_inset ERT
9474 status open
9475
9476 \begin_layout Plain Layout
9477
9478
9479 \backslash
9480 begin{multicols}{2}
9481 \end_layout
9482
9483 \end_inset
9484
9485
9486 \end_layout
9487
9488 \begin_layout Itemize
9489
9490 \family sans
9491 My
9492 \begin_inset space ~
9493 \end_inset
9494
9495 Logo
9496 \end_layout
9497
9498 \begin_layout Itemize
9499
9500 \family sans
9501 Restriction
9502 \end_layout
9503
9504 \begin_layout Itemize
9505
9506 \family sans
9507 Right
9508 \begin_inset space ~
9509 \end_inset
9510
9511 Footer
9512 \end_layout
9513
9514 \begin_layout Itemize
9515
9516 \family sans
9517 Right
9518 \begin_inset space ~
9519 \end_inset
9520
9521 Header
9522 \end_layout
9523
9524 \begin_layout Itemize
9525
9526 \family sans
9527 Left
9528 \begin_inset space ~
9529 \end_inset
9530
9531 Header
9532 \end_layout
9533
9534 \begin_deeper
9535 \begin_layout Standard
9536 \begin_inset space ~
9537 \end_inset
9538
9539
9540 \end_layout
9541
9542 \end_deeper
9543 \begin_layout Standard
9544 \begin_inset ERT
9545 status open
9546
9547 \begin_layout Plain Layout
9548
9549
9550 \backslash
9551 end{multicols}
9552 \end_layout
9553
9554 \end_inset
9555
9556
9557 \end_layout
9558
9559 \begin_layout Standard
9560 There are also a few commands provided by 
9561 \family sans
9562 FoilTeX
9563 \family default
9564  that aren't directly supported by LyX but I'll tell you what they do and
9565  how to use them in section
9566 \begin_inset space ~
9567 \end_inset
9568
9569
9570 \begin_inset CommandInset ref
9571 LatexCommand ref
9572 reference "sec:unsuppfoils"
9573
9574 \end_inset
9575
9576 .
9577 \end_layout
9578
9579 \begin_layout Subsection
9580 Building a Set of Foils
9581 \end_layout
9582
9583 \begin_layout Standard
9584 This section will give a simple introduction to using the different environments
9585  to build a set of foils.
9586  If you want to see an example set of foils, take a look at the 
9587 \family typewriter
9588 Foils.lyx
9589 \family default
9590  file you find in LyX's 
9591 \family typewriter
9592 examples
9593 \family default
9594  folder.
9595 \end_layout
9596
9597 \begin_layout Subsubsection
9598 Give It a Title Page
9599 \end_layout
9600
9601 \begin_layout Standard
9602 Unlike other classes that provide 
9603 \family sans
9604 Title
9605 \family default
9606
9607 \family sans
9608 Author
9609 \family default
9610
9611 \family sans
9612 Date
9613 \family default
9614  and 
9615 \family sans
9616 Abstract
9617 \family default
9618  environments, 
9619 \family sans
9620 foils
9621 \family default
9622  creates the title on a page of its own.
9623  If you leave out the 
9624 \family sans
9625 Date
9626 \family default
9627  environment LaTeX will substitute the current date (every time you regenerate
9628  the output).
9629 \end_layout
9630
9631 \begin_layout Subsubsection
9632 Start a New Foil
9633 \end_layout
9634
9635 \begin_layout Standard
9636 As I mentioned earlier, there are four ways of starting a new foil.
9637  For portrait foils you should use 
9638 \family sans
9639 Foilhead
9640 \family default
9641  or 
9642 \family sans
9643 ShortFoilhead.
9644
9645 \family default
9646  The difference between these two environments is the amount of space between
9647  the title of the foil (the foilhead) and the body of the foil.
9648 \end_layout
9649
9650 \begin_layout Standard
9651 Landscape foils are generated using the 
9652 \family sans
9653 Rotatefoilhead
9654 \family default
9655  and 
9656 \family sans
9657 ShortRotatefoilhead
9658 \family default
9659  environments.
9660  Again the only difference is the spacing between foilhead and body.
9661  Both of the short versions have 0.5 inches less separation between the foilhead
9662  and the body.
9663  
9664 \end_layout
9665
9666 \begin_layout Standard
9667 One problem with the support for landscape foils is the requirement that
9668  you have to use the 
9669 \family typewriter
9670 dvips
9671 \family default
9672  driver to generate the PostScript output otherwise the foils won't be rotated.
9673  It is possible to get landscape foils even if you haven't got the 
9674 \family typewriter
9675 dvips
9676 \family default
9677  driver provided you can feed your foils sideways through your printer ;-)
9678 \end_layout
9679
9680 \begin_layout Subsubsection
9681 Theorems, Lemmas, Proofs and more
9682 \end_layout
9683
9684 \begin_layout Standard
9685 Due to a small bug in LyX you can't have two of the same type of these environme
9686 nts directly following each other.
9687  They must be separated by something.
9688  If you try, you will just be extending the previous environment as if you
9689  had merged the two environments together.
9690  So, how do you get around this problem? The simplest option is to insert
9691  some text between the two environments or add a 
9692 \family sans
9693 LaTeX
9694 \family default
9695  environment between the two with just a 
9696 \begin_inset Quotes eld
9697 \end_inset
9698
9699
9700 \family typewriter
9701 %
9702 \family default
9703
9704 \begin_inset Quotes erd
9705 \end_inset
9706
9707  in it.
9708  This will force LyX to produce two separate environments and hence the
9709  correct LaTeX output.
9710  An example is provided in the example file included with the LyX distribution.
9711  Remember, this problem only occurs if you are trying to place two of the
9712  same type of theorem-like environments one directly after the other.
9713 \end_layout
9714
9715 \begin_layout Subsubsection
9716 Lists
9717 \end_layout
9718
9719 \begin_layout Standard
9720 You get all the commonly supported list styles found in other classes as
9721  well as two new ones.
9722  I'll only describe the new ones here.
9723  If you want to find out more about the other list environments check out
9724  the 
9725 \emph on
9726 User's Guide.
9727
9728 \emph default
9729  If you intend to use itemized lists you might also want to read about the
9730  
9731 \family sans
9732 Itemize
9733 \begin_inset space ~
9734 \end_inset
9735
9736 Bullet
9737 \begin_inset space ~
9738 \end_inset
9739
9740 Selection
9741 \family default
9742  dialog described above in section
9743 \begin_inset space ~
9744 \end_inset
9745
9746
9747 \begin_inset CommandInset ref
9748 LatexCommand ref
9749 reference "sec:bullet"
9750
9751 \end_inset
9752
9753 .
9754 \end_layout
9755
9756 \begin_layout Standard
9757 The two new list styles, 
9758 \family sans
9759 TickList
9760 \family default
9761  and 
9762 \family sans
9763 CrossList
9764 \family default
9765 , are designed to make it easier for you to create lists of do's and don'ts
9766  or right and wrong by providing dedicated environments that use a tick
9767  or a cross as the label of the list.
9768  These lists are in fact dedicated variants of the 
9769 \family sans
9770 Itemize
9771 \family default
9772  environment.
9773  They do however require that you have the 
9774 \family typewriter
9775 psnfss
9776 \family default
9777  packages installed.
9778 \end_layout
9779
9780 \begin_layout Subsubsection
9781 Figures and Tables
9782 \end_layout
9783
9784 \begin_layout Standard
9785
9786 \family sans
9787 FoilTeX
9788 \family default
9789  redefines the floating tables and figures so that they appear exactly where
9790  they are in the text rather than pushing them to the top of the page or
9791  to some user specified location.
9792  In fact if you change the float placement settings they are simply ignored.
9793 \end_layout
9794
9795 \begin_layout Subsubsection
9796 Page Headers and Footers
9797 \begin_inset CommandInset label
9798 LatexCommand label
9799 name "sec:foilfoot"
9800
9801 \end_inset
9802
9803
9804 \end_layout
9805
9806 \begin_layout Standard
9807
9808 \family sans
9809 My
9810 \begin_inset space ~
9811 \end_inset
9812
9813 Logo
9814 \family default
9815  and 
9816 \family sans
9817 Restriction
9818 \family default
9819  are two commands used to control the left-footer text string.
9820  The first is meant to allow you to include a graphic logo on your foils
9821  and defaults to 
9822 \begin_inset Quotes eld
9823 \end_inset
9824
9825 -Typeset by 
9826 \family sans
9827 FoilTeX
9828 \family default
9829 -
9830 \begin_inset Quotes erd
9831 \end_inset
9832
9833 .
9834  While the second is meant to provide a classification for the audience,
9835  
9836 \emph on
9837 e.
9838 \begin_inset space \thinspace{}
9839 \end_inset
9840
9841 g.
9842 \emph default
9843
9844 \begin_inset space \space{}
9845 \end_inset
9846
9847 Confidential.
9848  It is empty by default.
9849 \end_layout
9850
9851 \begin_layout Standard
9852 The remaining page corners can be filled by 
9853 \family sans
9854 Right
9855 \begin_inset space ~
9856 \end_inset
9857
9858 Footer
9859 \family default
9860  (which defaults to page numbers), 
9861 \family sans
9862 Right
9863 \begin_inset space ~
9864 \end_inset
9865
9866 Header
9867 \family default
9868  (top right) and 
9869 \family sans
9870 Left
9871 \begin_inset space ~
9872 \end_inset
9873
9874 Header
9875 \family default
9876  (top left).
9877 \end_layout
9878
9879 \begin_layout Subsection
9880 Unsupported 
9881 \family sans
9882 FoilTeX
9883 \family default
9884  Goodies
9885 \begin_inset CommandInset label
9886 LatexCommand label
9887 name "sec:unsuppfoils"
9888
9889 \end_inset
9890
9891
9892 \end_layout
9893
9894 \begin_layout Standard
9895 All the commands mentioned below need to be set in a 
9896 \family sans
9897 LaTeX
9898 \family default
9899  environment or as 
9900 \family sans
9901 TeX
9902 \family default
9903  within another environment.
9904 \end_layout
9905
9906 \begin_layout Subsubsection
9907 Lengths
9908 \end_layout
9909
9910 \begin_layout Standard
9911 All lengths are adjusted using the 
9912 \family typewriter
9913
9914 \backslash
9915 setlength{
9916 \family default
9917 \emph on
9918 lengthname
9919 \family typewriter
9920 \emph default
9921 }{
9922 \family default
9923 \emph on
9924 newlength
9925 \family typewriter
9926 \emph default
9927 }
9928 \family default
9929  command.
9930  Where 
9931 \emph on
9932 lengthname
9933 \emph default
9934  should be replaced by the name given to the length you want to change and
9935  
9936 \emph on
9937 newlength
9938 \emph default
9939  is the length value.
9940  All lengths should be specified in units of length such as inches (
9941 \family typewriter
9942 in
9943 \family default
9944 ), millimeters (
9945 \family typewriter
9946 mm
9947 \family default
9948 ) or points (
9949 \family typewriter
9950 pt
9951 \family default
9952 ) or relative to some document or font-based length such as 
9953 \family typewriter
9954
9955 \backslash
9956 textwidth
9957 \family default
9958 .
9959  
9960 \end_layout
9961
9962 \begin_layout Standard
9963 It's possible to change the spacing between a foilhead and the body of the
9964  foil by adjusting the length specified by 
9965 \family typewriter
9966
9967 \backslash
9968 foilheadskip
9969 \family default
9970 .
9971  For example, to make 
9972 \emph on
9973 all
9974 \emph default
9975  foilheads 0.5
9976 \begin_inset space \space{}
9977 \end_inset
9978
9979 in closer to their bodies put the following in the preamble: 
9980 \family typewriter
9981
9982 \backslash
9983 setlength{
9984 \backslash
9985 foilheadskip}{-0.5in}
9986 \end_layout
9987
9988 \begin_layout Standard
9989 The spacings around floats can be adjusted by setting these lengths:
9990 \end_layout
9991
9992 \begin_layout Labeling
9993 \labelwidthstring MMMMMMMMMMM
9994
9995 \family typewriter
9996
9997 \backslash
9998 abovefloatskip
9999 \family default
10000  Separation between the text and the top of the float
10001 \end_layout
10002
10003 \begin_layout Labeling
10004 \labelwidthstring MMMMMMMMMMM
10005
10006 \family typewriter
10007
10008 \backslash
10009 abovecaptionskip
10010 \family default
10011  Separation between the float and the caption
10012 \end_layout
10013
10014 \begin_layout Labeling
10015 \labelwidthstring MMMMMMMMMMM
10016
10017 \family typewriter
10018
10019 \backslash
10020 belowcaptionskip
10021 \family default
10022  Separation between the caption and the following text
10023 \end_layout
10024
10025 \begin_layout Labeling
10026 \labelwidthstring MMMMMMMMMMM
10027
10028 \family typewriter
10029
10030 \backslash
10031 captionwidth
10032 \family default
10033  You can make the captions narrower than the surrounding text by adjusting
10034  this length.
10035  Best done relative to 
10036 \family typewriter
10037
10038 \backslash
10039 textwidth
10040 \family default
10041 .
10042 \end_layout
10043
10044 \begin_layout Standard
10045 There are also several title page related lengths that you may find useful
10046  if you have a long title or several authors:
10047 \end_layout
10048
10049 \begin_layout Labeling
10050 \labelwidthstring MMMMMMMMMMM
10051
10052 \family typewriter
10053
10054 \backslash
10055 abovetitleskip
10056 \family default
10057  Separation from headers to 
10058 \family sans
10059 Title
10060 \end_layout
10061
10062 \begin_layout Labeling
10063 \labelwidthstring MMMMMMMMMMM
10064
10065 \family typewriter
10066
10067 \backslash
10068 titleauthorskip
10069 \family default
10070  between 
10071 \family sans
10072 Title
10073 \family default
10074  and 
10075 \family sans
10076 Author
10077 \family default
10078  environments
10079 \end_layout
10080
10081 \begin_layout Labeling
10082 \labelwidthstring MMMMMMMMMMM
10083
10084 \family typewriter
10085
10086 \backslash
10087 authorauthorskip
10088 \family default
10089  between multiple 
10090 \family sans
10091 Author
10092 \family default
10093  lines
10094 \end_layout
10095
10096 \begin_layout Labeling
10097 \labelwidthstring MMMMMMMMMMM
10098
10099 \family typewriter
10100
10101 \backslash
10102 authordateskip
10103 \family default
10104  between the 
10105 \family sans
10106 Author
10107 \family default
10108  and the 
10109 \family sans
10110 Date
10111 \end_layout
10112
10113 \begin_layout Labeling
10114 \labelwidthstring MMMMMMMMMMM
10115
10116 \family typewriter
10117
10118 \backslash
10119 dateabstractskip
10120 \family default
10121  between the 
10122 \family sans
10123 Date
10124 \family default
10125  and the 
10126 \family sans
10127 Abstract
10128 \end_layout
10129
10130 \begin_layout Standard
10131 The last length related command affects all the list environments.
10132  If you place 
10133 \family typewriter
10134
10135 \backslash
10136 zerolistvertdimens
10137 \family default
10138  
10139 \emph on
10140 inside
10141 \emph default
10142  a list environment then all the vertical spacing between the list items
10143  is removed.
10144  Note that this is a command not a length so it doesn't require 
10145 \family typewriter
10146
10147 \backslash
10148 setlength
10149 \family default
10150  like the stuff mentioned above.
10151 \end_layout
10152
10153 \begin_layout Subsubsection
10154 Headers and Footers
10155 \end_layout
10156
10157 \begin_layout Standard
10158 The 
10159 \family typewriter
10160
10161 \backslash
10162 LogoOn
10163 \family default
10164  and 
10165 \family typewriter
10166
10167 \backslash
10168 LogoOff
10169 \family default
10170  commands control whether the logo in the 
10171 \family sans
10172 MyLogo
10173 \family default
10174  definition appear on a given page.
10175  If you put 
10176 \family typewriter
10177
10178 \backslash
10179 LogoOff
10180 \family default
10181  in the preamble then none of the foils will have the logo on them.
10182  If you don't want the logo on a particular page place the 
10183 \family typewriter
10184
10185 \backslash
10186 LogoOff
10187 \family default
10188  directly after the foilhead of that page and the 
10189 \family typewriter
10190
10191 \backslash
10192 LogoOn
10193 \family default
10194  directly after the next foilhead.
10195 \end_layout
10196
10197 \begin_layout Standard
10198 If you decide to use the 
10199 \family sans
10200 fancy
10201 \family default
10202  page style setting in the 
10203 \family sans
10204 Document
10205 \begin_inset space ~
10206 \end_inset
10207
10208 Layout
10209 \family default
10210  dialog you should probably add 
10211 \family typewriter
10212
10213 \backslash
10214 let
10215 \backslash
10216 headwidth
10217 \backslash
10218 textwidth
10219 \family default
10220  to your preamble so headers and footers on landscape pages are correctly
10221  placed when rotated.
10222  This is due to some clashes between the page layouts provided by the 
10223 \family sans
10224 fancyheadings
10225 \family default
10226  package and the 
10227 \family sans
10228 foils
10229 \family default
10230  class.
10231 \end_layout
10232
10233 \begin_layout Section
10234 Hollywood (Hollywood spec scripts)
10235 \end_layout
10236
10237 \begin_layout Standard
10238 by 
10239 \shape smallcaps
10240 Garst Reese
10241 \end_layout
10242
10243 \begin_layout Subsection
10244 Introduction
10245 \end_layout
10246
10247 \begin_layout Standard
10248 Getting the format of a Hollywood script right is a 
10249 \begin_inset Quotes eld
10250 \end_inset
10251
10252 rite of passage.
10253 \begin_inset Quotes erd
10254 \end_inset
10255
10256  It is designed to make the readers focus on content and to be easy and
10257  familiar for the actors to read.
10258  Each page of a script should be one minute of film.
10259  Nothing goes in a script that you cannot see or hear on screen.
10260  The courier 12 pt font should be used throughout.
10261  No italics.
10262 \end_layout
10263
10264 \begin_layout Subsection
10265 Special problems
10266 \end_layout
10267
10268 \begin_layout Standard
10269 Speakers' lines should NEVER break in mid-sentence.
10270  If a speaker's lines continue over a page break, repeat the 
10271 \family sans
10272 Speaker
10273 \family default
10274  title followed by (Cont'd).
10275 \end_layout
10276
10277 \begin_layout Subsection
10278 Special features
10279 \end_layout
10280
10281 \begin_layout Standard
10282 Insert the 
10283 \family sans
10284 Speaker
10285 \family default
10286  names as labels then cross-reference the label to insert the name.
10287  The cross-reference dialog will show the current cast of characters.
10288  You can use this to insert the speaker name in narratives also.
10289 \end_layout
10290
10291 \begin_layout Subsection
10292 Paper size and Margins
10293 \end_layout
10294
10295 \begin_layout Standard
10296 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
10297 \end_layout
10298
10299 \begin_layout Subsection
10300 Environments
10301 \end_layout
10302
10303 \begin_layout Standard
10304 The following environments are available.
10305  You can use hollywood.bind to get the bind keys shown at the right.
10306 \end_layout
10307
10308 \begin_layout Itemize
10309
10310 \family sans
10311 Standard
10312 \begin_inset Newline newline
10313 \end_inset
10314
10315
10316 \family default
10317 Used where nothing else works.
10318  Try to avoid it.
10319 \end_layout
10320
10321 \begin_layout Itemize
10322
10323 \family sans
10324 FADE_IN
10325 \family default
10326 :
10327 \begin_inset space \hfill{}
10328 \end_inset
10329
10330
10331 \family sans
10332 M-z S-I
10333 \family default
10334
10335 \begin_inset Newline newline
10336 \end_inset
10337
10338 Usually followed by something like 
10339 \begin_inset Quotes eld
10340 \end_inset
10341
10342 on Sally waking up.
10343 \begin_inset Quotes erd
10344 \end_inset
10345
10346
10347 \end_layout
10348
10349 \begin_layout Itemize
10350
10351 \family sans
10352 INT:
10353 \begin_inset space \hfill{}
10354 \end_inset
10355
10356 M-z i
10357 \begin_inset Newline newline
10358 \end_inset
10359
10360
10361 \family default
10362 Introduces a new INTERIOR camera set-up.
10363  Always followed by DAY or NIGHT, or something similar to define the lighting
10364  required.
10365  Everthing on this line in CAPS.
10366 \end_layout
10367
10368 \begin_layout Itemize
10369
10370 \family sans
10371 EXT:
10372 \begin_inset space \hfill{}
10373 \end_inset
10374
10375 M-z e
10376 \begin_inset Newline newline
10377 \end_inset
10378
10379
10380 \family default
10381 Introduces a new EXTERIOR camera set-up.
10382  Everthing on this line in CAPS.
10383 \end_layout
10384
10385 \begin_layout Itemize
10386
10387 \family sans
10388 Speaker
10389 \begin_inset space \hfill{}
10390 \end_inset
10391
10392 M-z s
10393 \begin_inset Newline newline
10394 \end_inset
10395
10396
10397 \family default
10398 The character speaking.
10399 \end_layout
10400
10401 \begin_layout Itemize
10402
10403 \family sans
10404 Parenthetical
10405 \begin_inset space \hfill{}
10406 \end_inset
10407
10408 M-z p
10409 \begin_inset Newline newline
10410 \end_inset
10411
10412
10413 \family default
10414 Instructions to the speaker.
10415  The () are automatically inserted, but only the ( will show in LyX.
10416  Both will be printed.
10417 \end_layout
10418
10419 \begin_layout Itemize
10420
10421 \family sans
10422 Dialogue
10423 \begin_inset space \hfill{}
10424 \end_inset
10425
10426 M-z d
10427 \begin_inset Newline newline
10428 \end_inset
10429
10430
10431 \family default
10432 What the 
10433 \family sans
10434 Speaker
10435 \family default
10436  says.
10437 \end_layout
10438
10439 \begin_layout Itemize
10440
10441 \family sans
10442 Transition
10443 \begin_inset space \hfill{}
10444 \end_inset
10445
10446 M-z t
10447 \begin_inset Newline newline
10448 \end_inset
10449
10450
10451 \family default
10452 Camera movement instruction.
10453  e.
10454 \begin_inset space \thinspace{}
10455 \end_inset
10456
10457 g.
10458 \begin_inset space \space{}
10459 \end_inset
10460
10461 CUT TO:
10462 \end_layout
10463
10464 \begin_layout Itemize
10465
10466 \family sans
10467 FADE OUT:
10468 \begin_inset space \hfill{}
10469 \end_inset
10470
10471 M-z S-I
10472 \end_layout
10473
10474 \begin_layout Itemize
10475
10476 \family sans
10477 Author
10478 \begin_inset space \hfill{}
10479 \end_inset
10480
10481 M-z S-A
10482 \end_layout
10483
10484 \begin_layout Itemize
10485
10486 \family sans
10487 Title
10488 \begin_inset space \hfill{}
10489 \end_inset
10490
10491 M-z S-T
10492 \end_layout
10493
10494 \begin_layout Itemize
10495
10496 \family sans
10497 Right_Address
10498 \begin_inset space \hfill{}
10499 \end_inset
10500
10501 M-z r
10502 \end_layout
10503
10504 \begin_layout Subsection
10505 Script jargon
10506 \end_layout
10507
10508 \begin_layout Itemize
10509 (O.S) â€” off screen
10510 \end_layout
10511
10512 \begin_layout Itemize
10513 (V.0) â€” voice over
10514 \end_layout
10515
10516 \begin_layout Itemize
10517 b.
10518 \begin_inset space \thinspace{}
10519 \end_inset
10520
10521 g.
10522  â€” background
10523 \end_layout
10524
10525 \begin_layout Itemize
10526 C.U.
10527  â€” close-up
10528 \end_layout
10529
10530 \begin_layout Itemize
10531 PAN â€” camera movement
10532 \end_layout
10533
10534 \begin_layout Itemize
10535 INSERT â€” cut to close-up of
10536 \end_layout
10537
10538 \begin_layout Section
10539 ijmpc and ijmpd
10540 \end_layout
10541
10542 \begin_layout Standard
10543 by 
10544 \noun on
10545 Panayotis Papasotiriou
10546 \end_layout
10547
10548 \begin_layout Subsection
10549 Overview
10550 \end_layout
10551
10552 \begin_layout Standard
10553 The ijmpc package is a set of macros that facilitates electronic manuscript
10554  submission to the 
10555 \emph on
10556 International Journal of Modern Physics C
10557 \emph default
10558 .
10559  Similarly, the ijmpd package is for creating manuscripts to be submitted
10560  to the 
10561 \emph on
10562 International Journal of Modern Physics D
10563 \emph default
10564 .
10565  Both journals are published by World Scientific.
10566  The corresponding document classes are named 
10567 \family typewriter
10568 ws-ijmpc.cls
10569 \family default
10570  and 
10571 \family typewriter
10572 ws-ijmpd.cls
10573 \family default
10574 , respectively.
10575  These files, together with instructions for the authors, can be downloaded
10576  from the sites 
10577 \begin_inset Flex URL
10578 status collapsed
10579
10580 \begin_layout Plain Layout
10581
10582 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
10583 \end_layout
10584
10585 \end_inset
10586
10587  and 
10588 \begin_inset Flex URL
10589 status collapsed
10590
10591 \begin_layout Plain Layout
10592
10593 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
10594 \end_layout
10595
10596 \end_inset
10597
10598 .
10599  Both packages are modified versions of the standard 
10600 \begin_inset Quotes eld
10601 \end_inset
10602
10603 article
10604 \begin_inset Quotes erd
10605 \end_inset
10606
10607  package, and they are almost (but not exactly) identical.
10608  Most of their features are supported by LyX.
10609  I have used LyX successfully to write articles submitted to both journals
10610  without any problem.
10611 \end_layout
10612
10613 \begin_layout Subsection
10614 Writing a paper
10615 \end_layout
10616
10617 \begin_layout Standard
10618 As usual, the easiest way to write a paper is to start with a template.
10619  Click on 
10620 \family sans
10621 File\SpecialChar \menuseparator
10622 New from
10623 \family default
10624  
10625 \family sans
10626 \bar under
10627 T
10628 \bar default
10629 emplate
10630 \family default
10631 , then choose the 
10632 \family typewriter
10633 ijmpc.lyx
10634 \family default
10635  or 
10636 \family typewriter
10637 ijmpd.lyx
10638 \family default
10639  template.
10640  This will give an (almost) empty document that includes the most common
10641  fields found in a manuscript.
10642  Simply overwrite the existing text (including the brackets, 
10643 \family typewriter
10644 <>
10645 \family default
10646 ) with your text.
10647  You should keep in mind the following remarks.
10648 \end_layout
10649
10650 \begin_layout Enumerate
10651 LyX won't let you change the font size and the page style of the document,
10652  because such modifications are not allowed by both packages.
10653 \end_layout
10654
10655 \begin_layout Enumerate
10656 The language of the document should not be changed.
10657  Before previewing your paper, be sure that the babel package is not used.
10658  To do this, click on 
10659 \family sans
10660 Tools\SpecialChar \menuseparator
10661 Preferences
10662 \family default
10663 , select the 
10664 \family sans
10665 Lang Opts
10666 \family default
10667  tab, deselect the 
10668 \family sans
10669 Use babel
10670 \family default
10671  checkbox in the language settings, and click on 
10672 \family sans
10673 Apply
10674 \family default
10675  (or 
10676 \family sans
10677 Save
10678 \family default
10679 , if you wish to make this change permanent).
10680 \end_layout
10681
10682 \begin_layout Enumerate
10683 The 
10684 \begin_inset Quotes eld
10685 \end_inset
10686
10687 Keywords
10688 \begin_inset Quotes erd
10689 \end_inset
10690
10691  style must be used to define keywords.
10692 \end_layout
10693
10694 \begin_layout Enumerate
10695 The ijmpc package provides a style named 
10696 \begin_inset Quotes eld
10697 \end_inset
10698
10699 Classification Codes
10700 \begin_inset Quotes erd
10701 \end_inset
10702
10703 , which can be used to define classification codes, such as PACS numbers.
10704  Note that this facility is not supported by the ijmpd package.
10705 \end_layout
10706
10707 \begin_layout Enumerate
10708 Several new environments are available: 
10709 \begin_inset Quotes eld
10710 \end_inset
10711
10712 Definition
10713 \begin_inset Quotes erd
10714 \end_inset
10715
10716
10717 \begin_inset Quotes eld
10718 \end_inset
10719
10720 Step
10721 \begin_inset Quotes erd
10722 \end_inset
10723
10724
10725 \begin_inset Quotes eld
10726 \end_inset
10727
10728 Example
10729 \begin_inset Quotes erd
10730 \end_inset
10731
10732
10733 \begin_inset Quotes eld
10734 \end_inset
10735
10736 Remark
10737 \begin_inset Quotes erd
10738 \end_inset
10739
10740
10741 \begin_inset Quotes eld
10742 \end_inset
10743
10744 Notation
10745 \begin_inset Quotes erd
10746 \end_inset
10747
10748
10749 \begin_inset Quotes eld
10750 \end_inset
10751
10752 Theorem
10753 \begin_inset Quotes erd
10754 \end_inset
10755
10756
10757 \begin_inset Quotes eld
10758 \end_inset
10759
10760 Proof
10761 \begin_inset Quotes erd
10762 \end_inset
10763
10764
10765 \begin_inset Quotes eld
10766 \end_inset
10767
10768 Corollary
10769 \begin_inset Quotes erd
10770 \end_inset
10771
10772
10773 \begin_inset Quotes eld
10774 \end_inset
10775
10776 Lemma
10777 \begin_inset Quotes erd
10778 \end_inset
10779
10780
10781 \begin_inset Quotes eld
10782 \end_inset
10783
10784 Proposition
10785 \begin_inset Quotes erd
10786 \end_inset
10787
10788
10789 \begin_inset Quotes eld
10790 \end_inset
10791
10792 Prop
10793 \begin_inset Quotes erd
10794 \end_inset
10795
10796
10797 \begin_inset Quotes eld
10798 \end_inset
10799
10800 Question
10801 \begin_inset Quotes erd
10802 \end_inset
10803
10804
10805 \begin_inset Quotes eld
10806 \end_inset
10807
10808 Claim
10809 \begin_inset Quotes erd
10810 \end_inset
10811
10812 , and 
10813 \begin_inset Quotes eld
10814 \end_inset
10815
10816 Conjecture
10817 \begin_inset Quotes erd
10818 \end_inset
10819
10820 .
10821  Their use is more or less obvious.
10822  LyX supports all these environments; it will use the proper label, text
10823  style, and numbering scheme for each of them.
10824 \end_layout
10825
10826 \begin_layout Enumerate
10827 Both packages use basic citations; the natbib package should not be used.
10828  In LyX, citation references are shown as usual; in the output, citations
10829  are shown as superscripts.
10830  If you want to use a citation as normal text, you should use the 
10831 \family typewriter
10832 refcite
10833 \family default
10834  command, e.
10835 \begin_inset space \thinspace{}
10836 \end_inset
10837
10838 g.
10839 \begin_inset space \space{}
10840 \end_inset
10841
10842
10843 \begin_inset Quotes eld
10844 \end_inset
10845
10846 See Ref.
10847 \begin_inset space \space{}
10848 \end_inset
10849
10850
10851 \family typewriter
10852
10853 \backslash
10854 refcite{key}
10855 \family default
10856
10857 \begin_inset Quotes erd
10858 \end_inset
10859
10860 .
10861 \end_layout
10862
10863 \begin_layout Enumerate
10864 There is no 
10865 \begin_inset Quotes eld
10866 \end_inset
10867
10868 Acknowledgments
10869 \begin_inset Quotes erd
10870 \end_inset
10871
10872  section in both packages.
10873  To put acknowledgments, just use the 
10874 \begin_inset Quotes eld
10875 \end_inset
10876
10877 Section*
10878 \begin_inset Quotes erd
10879 \end_inset
10880
10881  environment.
10882 \end_layout
10883
10884 \begin_layout Enumerate
10885 Appendices may be added to the paper, 
10886 \emph on
10887 after
10888 \emph default
10889  the Acknowledgments and 
10890 \shape italic
10891 before
10892 \shape default
10893  the References.
10894  LyX provides a special environment, called 
10895 \begin_inset Quotes eld
10896 \end_inset
10897
10898 Appendices Section
10899 \begin_inset Quotes erd
10900 \end_inset
10901
10902  which marks the beginning of the appendices.
10903  This environment should be left blank; it just sends a LaTeX command, but
10904  nothing is really printed.
10905  In LyX, the word 
10906 \begin_inset Quotes eld
10907 \end_inset
10908
10909 Appendix
10910 \begin_inset Quotes erd
10911 \end_inset
10912
10913  is printed with blue letters, as a signal that all sections after that
10914  point are appendices.
10915  To write an appendix, use the 
10916 \begin_inset Quotes eld
10917 \end_inset
10918
10919 Appendix
10920 \begin_inset Quotes erd
10921 \end_inset
10922
10923  environment.
10924  LyX will number each appendix with capital letters, as required by both
10925  journals.
10926  Note that 
10927 \begin_inset Quotes eld
10928 \end_inset
10929
10930 Appendices Section
10931 \begin_inset Quotes erd
10932 \end_inset
10933
10934  
10935 \emph on
10936 must
10937 \emph default
10938  be present before the first appendix; if not, all appendices will be numbered
10939  as normal sections in the output.
10940 \end_layout
10941
10942 \begin_layout Enumerate
10943 The ijmpc and the ijmpd packages use the 
10944 \family typewriter
10945 tbl
10946 \family default
10947  command to implement table captions.
10948  As a result, a table created by LyX is printed correctly, but its caption
10949  is ignored.
10950  However, you can use some TeX code to overpass this problem, so that captions
10951  are printed as expected.
10952  To do so, create a float table as usual, remove the caption, and replace
10953  it with the TeX code 
10954 \family typewriter
10955
10956 \backslash
10957 tbl{
10958 \emph on
10959 your table caption
10960 \emph default
10961 }{
10962 \family default
10963  (sic); you must also the TeX code 
10964 \family typewriter
10965 }
10966 \family default
10967  immediately after the tabular material.
10968  Study the example table included in the template files to see how this
10969  trick is implemented.
10970  Alternatively, If you need table captions, you should implement the whole
10971  table float in a 
10972 \family typewriter
10973 .tex
10974 \family default
10975  file, then include this file to the LyX document (
10976 \family sans
10977 Insert\SpecialChar \menuseparator
10978 File\SpecialChar \menuseparator
10979 Child
10980 \begin_inset space ~
10981 \end_inset
10982
10983 Document
10984 \family default
10985 ).
10986  Details on how to create a table float can be found in the files 
10987 \family typewriter
10988 ws-ijmpc.tex
10989 \family default
10990  and 
10991 \family typewriter
10992 ws-ijmpd.tex
10993 \family default
10994 , included in the corresponding packages.
10995 \end_layout
10996
10997 \begin_layout Subsection
10998 Preparing a paper for submission
10999 \end_layout
11000
11001 \begin_layout Standard
11002 Before you submit your paper you must export the LyX document as a LaTeX
11003  file (
11004 \family sans
11005 File\SpecialChar \menuseparator
11006 Export\SpecialChar \menuseparator
11007 LaTeX
11008 \family default
11009 )
11010 \begin_inset Foot
11011 status open
11012
11013 \begin_layout Plain Layout
11014 Actually you have the choice between LaTeX (plain) and pdflatex.
11015  If you intend to use pdflatex to prepare the paper, you should use the
11016  pdflatex option so that included graphics are converted to PDF format,
11017  ready for use by pdflatex.
11018 \end_layout
11019
11020 \end_inset
11021
11022 , then make the following changes to the resulting 
11023 \family typewriter
11024 .tex
11025 \family default
11026  file.
11027 \end_layout
11028
11029 \begin_layout Enumerate
11030 Remove the comment lines before the 
11031 \family typewriter
11032
11033 \backslash
11034 documentclass
11035 \family default
11036  command.
11037 \end_layout
11038
11039 \begin_layout Enumerate
11040 Remove everything between (and including) the 
11041 \family typewriter
11042
11043 \backslash
11044 makeatletter
11045 \family default
11046  and 
11047 \family typewriter
11048
11049 \backslash
11050 makeatother
11051 \family default
11052  commands, except for any commands you specifically put into the LaTeX preamble.
11053 \end_layout
11054
11055 \begin_layout Standard
11056 The modified 
11057 \family typewriter
11058 .tex
11059 \family default
11060  file should be saved and processed through LaTeX as many times as necessary.
11061  You may also want to check the resulting 
11062 \family typewriter
11063 .dvi
11064 \family default
11065  document.
11066 \end_layout
11067
11068 \begin_layout Subsection
11069 Use of TeX code
11070 \end_layout
11071
11072 \begin_layout Standard
11073 The use of TeX code is reduced to two commands, which must be placed at
11074  the top of the document.
11075  If you started writing your paper by using the 
11076 \family typewriter
11077 ijmpc.lyx
11078 \family default
11079  or the 
11080 \family typewriter
11081 ijmpd.lyx
11082 \family default
11083  template, the TeX code needed is already in its place; you usually don't
11084  need to delete it.
11085  You may only modify the first TeX code to specify the information printed
11086  to the top of odd and even pages (authors' names and short paper's title,
11087  respectively).
11088  This TeX code must have the form 
11089 \family typewriter
11090
11091 \backslash
11092 markboth{Authors' Names}{Short Paper's Title}
11093 \family default
11094 .
11095 \end_layout
11096
11097 \begin_layout Section
11098 iopart
11099 \end_layout
11100
11101 \begin_layout Standard
11102 by 
11103 \noun on
11104 Uwe Stöhr
11105 \end_layout
11106
11107 \begin_layout Subsection
11108 Overview
11109 \end_layout
11110
11111 \begin_layout Standard
11112 The iopart package provides a document class to create electronic manuscript
11113  submission to the journals published by the Institute of Physics.
11114  Instructions for the authors how to create a paper using the iopart class
11115  can be downloaded together with the iopart package from the site 
11116 \begin_inset Flex URL
11117 status collapsed
11118
11119 \begin_layout Plain Layout
11120
11121 ftp://ftp.iop.org/pub/journals/latex2e
11122 \end_layout
11123
11124 \end_inset
11125
11126 .
11127 \end_layout
11128
11129 \begin_layout Subsection
11130 Writing a paper
11131 \end_layout
11132
11133 \begin_layout Standard
11134 The easiest way to write a paper is to start with the file 
11135 \emph on
11136 IOP-article.lyx
11137 \emph default
11138  that is available in LyX's examples files folder.
11139  Open this file, save it under a new name, and start writing.
11140  The example file explains how to use the special text environments.
11141  Here are the most important advices:
11142 \end_layout
11143
11144 \begin_layout Itemize
11145 To be able to compile your document to a PDF, PS, or DVI, assure that the
11146  two options 
11147 \family sans
11148 Use AMS math package
11149 \family default
11150  in the document settings under 
11151 \family sans
11152 Math Options
11153 \family default
11154  are not used!
11155 \end_layout
11156
11157 \begin_layout Itemize
11158
11159 \size normal
11160 The title environment defines the kind of your paper.
11161  So use one of the following environments for the title:
11162 \end_layout
11163
11164 \begin_deeper
11165 \begin_layout Itemize
11166
11167 \family sans
11168 \size normal
11169 Title
11170 \family default
11171  for a Paper
11172 \end_layout
11173
11174 \begin_layout Itemize
11175
11176 \family sans
11177 \size normal
11178 Review
11179 \family default
11180  for a Review
11181 \end_layout
11182
11183 \begin_layout Itemize
11184
11185 \family sans
11186 \size normal
11187 Topical
11188 \family default
11189  for a Topical review
11190 \end_layout
11191
11192 \begin_layout Itemize
11193
11194 \family sans
11195 \size normal
11196 Comment
11197 \family default
11198  for a Comment
11199 \end_layout
11200
11201 \begin_layout Itemize
11202
11203 \family sans
11204 \size normal
11205 Note
11206 \family default
11207  for a Note
11208 \end_layout
11209
11210 \begin_layout Itemize
11211
11212 \family sans
11213 \size normal
11214 Paper
11215 \family default
11216  for a Paper (same as Title)
11217 \end_layout
11218
11219 \begin_layout Itemize
11220
11221 \family sans
11222 \size normal
11223 Prelim
11224 \family default
11225  for a Preliminary communication
11226 \end_layout
11227
11228 \begin_layout Itemize
11229
11230 \family sans
11231 \size normal
11232 Rapid
11233 \family default
11234  for a Rapid communication
11235 \end_layout
11236
11237 \begin_layout Itemize
11238
11239 \family sans
11240 \size normal
11241 Letter
11242 \family default
11243  for a Letter to the editor
11244 \end_layout
11245
11246 \end_deeper
11247 \begin_layout Itemize
11248
11249 \size normal
11250 All title environments except of 
11251 \family sans
11252 Letter
11253 \family default
11254  can have an optional short title.
11255 \end_layout
11256
11257 \begin_layout Itemize
11258 There is a general title environment 
11259 \family sans
11260 Article
11261 \family default
11262  which is not directly supported by the LyX.
11263  This can be used as TeX code when your document doesn't fit into one of
11264  the other title types.
11265 \end_layout
11266
11267 \begin_layout Standard
11268 For more informations like hints for special table and formula formatting,
11269  look at the IOP author guidelines.
11270 \end_layout
11271
11272 \begin_layout Section
11273 Kluwer
11274 \end_layout
11275
11276 \begin_layout Standard
11277 by 
11278 \noun on
11279 Panayotis Papasotiriou
11280 \end_layout
11281
11282 \begin_layout Subsection
11283 Overview
11284 \end_layout
11285
11286 \begin_layout Standard
11287 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
11288  that facilitates electronic manuscript submission to the journals they
11289  publish.
11290  Most known of them (at least in my domain of interest) are 
11291 \emph on
11292 Astrophysics and Space Science
11293 \emph default
11294  and 
11295 \emph on
11296 Solar Physics
11297 \emph default
11298 , but there are many others (see a complete list at 
11299 \begin_inset Flex URL
11300 status collapsed
11301
11302 \begin_layout Plain Layout
11303
11304 http://www.wkap.nl/jrnllist.htm/JRNLHOME
11305 \end_layout
11306
11307 \end_inset
11308
11309 ).
11310  The Kluwer package may be downloaded from the site 
11311 \begin_inset Flex URL
11312 status collapsed
11313
11314 \begin_layout Plain Layout
11315
11316 http://www.wkap.nl/kaphtml.htm/STYLEFILES
11317 \end_layout
11318
11319 \end_inset
11320
11321 .
11322  A complete user guide is contained in that package (but it can also be
11323  downloaded separately).
11324 \end_layout
11325
11326 \begin_layout Standard
11327 LyX supports many features of the package but not everything.
11328  However, the TeX code needed is reduced to some 
11329 \begin_inset Quotes eld
11330 \end_inset
11331
11332 peculiar
11333 \begin_inset Quotes erd
11334 \end_inset
11335
11336  commands of the package (see
11337 \begin_inset space ~
11338 \end_inset
11339
11340
11341 \begin_inset CommandInset ref
11342 LatexCommand ref
11343 reference "subsec:kluwer_peculiarities"
11344
11345 \end_inset
11346
11347 ).
11348  I have recently used LyX to write an article submitted to the 
11349 \emph on
11350 Astrophysics and Space Science
11351 \emph default
11352  without any problem.
11353 \end_layout
11354
11355 \begin_layout Subsection
11356 Writing a paper
11357 \end_layout
11358
11359 \begin_layout Standard
11360 The easiest way to write a paper is to start with the Kluwer template file.
11361  Click on 
11362 \family sans
11363 File\SpecialChar \menuseparator
11364 New from
11365 \family default
11366  
11367 \family sans
11368 Template
11369 \family default
11370 , then choose the 
11371 \family typewriter
11372 kluwer.lyx
11373 \family default
11374  template.
11375  This will give an (almost) empty document that includes the most common
11376  fields found in a manuscript and a short description of their use.
11377  As in most templates, simply overwrite the existing text (including the
11378  brackets, 
11379 \family typewriter
11380 <>
11381 \family default
11382 ) with the correct information.
11383 \end_layout
11384
11385 \begin_layout Subsection
11386 Preparing a paper for submission
11387 \end_layout
11388
11389 \begin_layout Standard
11390 As in the AASTeX package, before you submit your paper to a journal you
11391  must 
11392 \begin_inset Quotes eld
11393 \end_inset
11394
11395 postprocess
11396 \begin_inset Quotes erd
11397 \end_inset
11398
11399  it as follows.
11400 \end_layout
11401
11402 \begin_layout Enumerate
11403 Export your paper as a LaTeX file.
11404  To do this, click on 
11405 \family sans
11406 File\SpecialChar \menuseparator
11407 Export\SpecialChar \menuseparator
11408 LaTeX
11409 \family default
11410 .
11411  
11412 \end_layout
11413
11414 \begin_layout Enumerate
11415 Edit the resulting 
11416 \family typewriter
11417 .tex
11418 \family default
11419  file with a text editor and make the following changes
11420 \end_layout
11421
11422 \begin_deeper
11423 \begin_layout Enumerate
11424 remove the comment lines before the 
11425 \family typewriter
11426
11427 \backslash
11428 documentclass
11429 \family default
11430  command,
11431 \end_layout
11432
11433 \begin_layout Enumerate
11434 remove everything between (and including) the 
11435 \family typewriter
11436
11437 \backslash
11438 makeatletter
11439 \family default
11440  and 
11441 \family typewriter
11442
11443 \backslash
11444 makeatother
11445 \family default
11446  commands, except for any commands you specifically put into the LaTeX preamble.
11447 \end_layout
11448
11449 \begin_layout Standard
11450 Save the resulting 
11451 \family typewriter
11452 .tex
11453 \family default
11454  file.
11455 \end_layout
11456
11457 \end_deeper
11458 \begin_layout Enumerate
11459 Run the 
11460 \family typewriter
11461 .tex
11462 \family default
11463  file through LaTeX as many times as necessary (usually up to three).
11464 \end_layout
11465
11466 \begin_layout Enumerate
11467 View the resulting 
11468 \family typewriter
11469 .dvi
11470 \family default
11471  document using, e.
11472 \begin_inset space \thinspace{}
11473 \end_inset
11474
11475 g.
11476 \begin_inset space \space{}
11477 \end_inset
11478
11479
11480 \family sans
11481 xdvi
11482 \family default
11483 , and check if everything is OK (it should, if you didn't make any mistake).
11484 \end_layout
11485
11486 \begin_layout Subsection
11487 \begin_inset Quotes eld
11488 \end_inset
11489
11490 Peculiarities
11491 \begin_inset Quotes erd
11492 \end_inset
11493
11494  of the Kluwer package
11495 \begin_inset CommandInset label
11496 LatexCommand label
11497 name "subsec:kluwer_peculiarities"
11498
11499 \end_inset
11500
11501
11502 \end_layout
11503
11504 \begin_layout Standard
11505 The Kluwer package has the following 
11506 \begin_inset Quotes eld
11507 \end_inset
11508
11509 peculiarities
11510 \begin_inset Quotes erd
11511 \end_inset
11512
11513 .
11514 \end_layout
11515
11516 \begin_layout Enumerate
11517 It is possible to write multiple articles in the same LaTeX file
11518 \begin_inset Foot
11519 status collapsed
11520
11521 \begin_layout Plain Layout
11522 I can't imagine any good reason to do this.
11523 \end_layout
11524
11525 \end_inset
11526
11527 .
11528  Each article must be included in the environment 
11529 \begin_inset Quotes eld
11530 \end_inset
11531
11532 article
11533 \begin_inset Quotes erd
11534 \end_inset
11535
11536 .
11537  Unfortunately, this environment cannot be omitted, even if you write just
11538  one article.
11539  Therefore, each article starts with the command 
11540 \family typewriter
11541
11542 \backslash
11543 begin{article}
11544 \family default
11545  and, obviously, ends with the command 
11546 \family typewriter
11547
11548 \backslash
11549 end{article}
11550 \family default
11551 .
11552  Although this can be implemented in LyX, I didn't included it, since it
11553  looks ugly and can confuse the novice user.
11554  Therefore, you need to enter them directly and mark them as LaTeX code
11555  (the well-known 
11556 \begin_inset Quotes eld
11557 \end_inset
11558
11559 TeX code
11560 \begin_inset Quotes erd
11561 \end_inset
11562
11563 ).
11564 \end_layout
11565
11566 \begin_layout Enumerate
11567 Information given at the beginning of the article (i.
11568 \begin_inset space \thinspace{}
11569 \end_inset
11570
11571 g.
11572 \begin_inset space \space{}
11573 \end_inset
11574
11575 title, subtitle, author, institution, running title, running author, abstract
11576  and keywords) must be included in an environment called 
11577 \begin_inset Quotes eld
11578 \end_inset
11579
11580 opening
11581 \begin_inset Quotes erd
11582 \end_inset
11583
11584 .
11585  This is not implemented in LyX, so you must enter title, subtitle etc.
11586 \begin_inset space ~
11587 \end_inset
11588
11589 between two TeX code lines (
11590 \family typewriter
11591
11592 \backslash
11593 begin{opening}
11594 \family default
11595  and 
11596 \family typewriter
11597
11598 \backslash
11599 end{opening}
11600 \family default
11601 ).
11602 \end_layout
11603
11604 \begin_layout Enumerate
11605 According to the user manual, the label of each bibliography item must be
11606  written as 
11607 \family typewriter
11608
11609 \backslash
11610 protect
11611 \backslash
11612 citeauthoryear{
11613 \family default
11614 \emph on
11615 author(s)
11616 \family typewriter
11617 \emph default
11618 }{
11619 \family default
11620 \emph on
11621 year
11622 \family typewriter
11623 \emph default
11624 }
11625 \family default
11626 .
11627 \end_layout
11628
11629 \begin_layout Standard
11630 The 
11631 \family typewriter
11632 kluwer.lyx
11633 \family default
11634  template takes care of all these 
11635 \begin_inset Quotes eld
11636 \end_inset
11637
11638 peculiarities
11639 \begin_inset Quotes erd
11640 \end_inset
11641
11642 .
11643  If you start a new paper using this template you don't need to do anything
11644  special.
11645  Just 
11646 \end_layout
11647
11648 \begin_layout Enumerate
11649 don't delete the TeX code included in the template, and
11650 \end_layout
11651
11652 \begin_layout Enumerate
11653 copy the example bibliography item included in the template and modify it
11654  as necessary to enter new bibliography items.
11655 \end_layout
11656
11657 \begin_layout Section
11658 Koma-Script
11659 \end_layout
11660
11661 \begin_layout Standard
11662 by 
11663 \noun on
11664 Bernd Rellermeyer
11665 \end_layout
11666
11667 \begin_layout Subsection
11668 Overview
11669 \end_layout
11670
11671 \begin_layout Standard
11672 The LyX document classes 
11673 \emph on
11674 article (koma-script)
11675 \emph default
11676
11677 \emph on
11678 report (koma-script)
11679 \emph default
11680
11681 \emph on
11682 book
11683 \emph default
11684  
11685 \emph on
11686 (koma-script)
11687 \emph default
11688 , and 
11689 \emph on
11690 letter
11691 \emph default
11692  
11693 \emph on
11694 (koma-script)
11695 \emph default
11696  correspond to the LaTeX document classes 
11697 \family typewriter
11698 scrartcl.cls
11699 \family default
11700
11701 \family typewriter
11702 scrreprt.cls
11703 \family default
11704
11705 \family typewriter
11706 scrbook.cls
11707 \family default
11708 , and 
11709 \family typewriter
11710 scrlettr.cls
11711 \family default
11712 , resp.
11713 \begin_inset space ~
11714 \end_inset
11715
11716 of the Koma-Script family.
11717  They are replacements for the standard document classes 
11718 \family typewriter
11719 article.cls
11720 \family default
11721
11722 \family typewriter
11723 report.cls
11724 \family default
11725
11726 \family typewriter
11727 book.cls
11728 \family default
11729  and 
11730 \family typewriter
11731 letter.cls
11732 \family default
11733 , resp., and fit better to European typography conventions in a number of
11734  points.
11735 \end_layout
11736
11737 \begin_layout Itemize
11738 Standard character size is 11pt in 
11739 \emph on
11740 article (koma-script)
11741 \emph default
11742
11743 \emph on
11744 report (koma-script)
11745 \emph default
11746 , and 
11747 \emph on
11748 book (koma-script)
11749 \emph default
11750 , and 12pt in 
11751 \emph on
11752 letter (koma-script)
11753 \emph default
11754 .
11755 \end_layout
11756
11757 \begin_layout Itemize
11758 Headings, labels of the description environment, and a number of elements
11759  of the 
11760 \emph on
11761 letter (koma-script)
11762 \emph default
11763  document class are set in a bold sans serif font.
11764 \begin_inset Foot
11765 status collapsed
11766
11767 \begin_layout Plain Layout
11768 There is a big difference between the bold sans serif old cm fonts and new
11769  ec fonts, especially in the appearance of headings.
11770  In comparison, the ec bold sans serif fonts look a bit thin.
11771  Here the LaTeX package 
11772 \family typewriter
11773 cmsd.sty by
11774 \family default
11775  
11776 \shape smallcaps
11777 Walter Schmidt
11778 \shape default
11779  helps to produce the 
11780 \begin_inset Quotes eld
11781 \end_inset
11782
11783 usual
11784 \begin_inset Quotes erd
11785 \end_inset
11786
11787  appearance when using the ec fonts.
11788 \end_layout
11789
11790 \end_inset
11791
11792  The numbering of chapter headings is made in the same way as the numbering
11793  of section headings, that is without the extra line 
11794 \begin_inset Quotes eld
11795 \end_inset
11796
11797 Chapter\SpecialChar \ldots{}
11798
11799 \begin_inset Quotes erd
11800 \end_inset
11801
11802 .
11803  In addition, the appearance of the headings can be modified by using a
11804  number of options (in LyX to be entered in the field 
11805 \family sans
11806 Extra
11807 \begin_inset space ~
11808 \end_inset
11809
11810 Options
11811 \family default
11812  of the dialog 
11813 \family sans
11814 Layout\SpecialChar \menuseparator
11815 Document
11816 \family default
11817 ).
11818  A detailed German description of these options can be found in the Koma-Script
11819  documentation 
11820 \emph on
11821 scrguide
11822 \emph default
11823 .
11824 \end_layout
11825
11826 \begin_layout Itemize
11827 The main means in the Koma-Script document classes to design the type area
11828  are the options 
11829 \family sans
11830 BCOR
11831 \family default
11832  and 
11833 \family sans
11834 DIV
11835 \family default
11836  (in LyX to be entered in the extra class options field in the dialog 
11837 \family sans
11838 Document\SpecialChar \menuseparator
11839 Settings
11840 \family default
11841 ).
11842  They make a clearer modification of page margins possible as do the options
11843  of the dialog 
11844 \family sans
11845 Document\SpecialChar \menuseparator
11846 Settings
11847 \family default
11848 .
11849  A detailed German description of these and other type area options can
11850  be found in the Koma-Script documentation 
11851 \emph on
11852 scrguide
11853 \emph default
11854 .
11855 \end_layout
11856
11857 \begin_layout Itemize
11858 The LaTeX document classes of the Koma-Script family define a number of
11859  additional commands.
11860  Those part of it which makes sense in LyX is implemented in corresponding
11861  paragraph types.
11862 \end_layout
11863
11864 \begin_layout Standard
11865 A detailed German description of the LaTeX document classes of the Koma-Script
11866  family can be found in the Koma-Script documentation 
11867 \emph on
11868 scrguide
11869 \emph default
11870 .
11871 \begin_inset Foot
11872 status collapsed
11873
11874 \begin_layout Plain Layout
11875 There is an English translation 
11876 \emph on
11877 screnggu
11878 \emph default
11879 , but it is not a complete one.
11880 \end_layout
11881
11882 \end_inset
11883
11884  The following sections describe only those aspects, which are relevant
11885  in LyX.
11886 \end_layout
11887
11888 \begin_layout Subsection
11889 article (koma-script), report (koma-script), and book (koma-script)
11890 \end_layout
11891
11892 \begin_layout Standard
11893 The document classes 
11894 \emph on
11895 article (koma-script)
11896 \emph default
11897
11898 \emph on
11899 report (koma-script)
11900 \emph default
11901 , and 
11902 \emph on
11903 book
11904 \emph default
11905  
11906 \emph on
11907 (koma-script)
11908 \emph default
11909  are implemented in the layout files 
11910 \family typewriter
11911 scrartcl.layout
11912 \family default
11913
11914 \family typewriter
11915 scrreprt.layout
11916 \family default
11917 , and 
11918 \family typewriter
11919 scrbook.layout
11920 \family default
11921 , resp.
11922  They contain all the paragraph types of the corresponding standard document
11923  classes 
11924 \emph on
11925 article
11926 \emph default
11927
11928 \emph on
11929 report
11930 \emph default
11931 , and 
11932 \emph on
11933 book
11934 \emph default
11935 , resp., partly modified, with the exception of the LyX specific 
11936 \family sans
11937 List
11938 \family default
11939 -type, which is replaced by the new 
11940 \family sans
11941 Labeling
11942 \family default
11943 -type having the same functionality.
11944  Beside the 
11945 \family sans
11946 Labeling
11947 \family default
11948 -Type there is a number of new paragraph types added.
11949  They are 
11950 \emph on
11951 not
11952 \emph default
11953  part of 
11954 \emph on
11955 letter (koma-script)
11956 \emph default
11957 .
11958 \end_layout
11959
11960 \begin_layout Itemize
11961
11962 \family sans
11963 Addpart, Addchap
11964 \family default
11965
11966 \family sans
11967 Addsec
11968 \family default
11969 : are equivalents to 
11970 \family sans
11971 Part*, Chapter*
11972 \family default
11973  and 
11974 \family sans
11975 Section*
11976 \family default
11977 , resp., additionally inserting an entry in the table of contents.
11978  
11979 \family sans
11980 Addpart
11981 \family default
11982  and 
11983 \family sans
11984 Addchap
11985 \family default
11986  are not contained in 
11987 \emph on
11988 article (koma-script)
11989 \emph default
11990 .
11991 \end_layout
11992
11993 \begin_layout Itemize
11994
11995 \family sans
11996 Addchap*
11997 \family default
11998
11999 \family sans
12000 Addsec*
12001 \family default
12002 : behave exactly as 
12003 \family sans
12004 Addchap
12005 \family default
12006  and 
12007 \family sans
12008 Addsec
12009 \family default
12010 , resp., additionally clearing running heads.
12011  
12012 \family sans
12013 Addchap*
12014 \family default
12015  is not contained in 
12016 \emph on
12017 article (koma-script)
12018 \emph default
12019 .
12020 \begin_inset Foot
12021 status collapsed
12022
12023 \begin_layout Plain Layout
12024 There is also an 
12025 \family typewriter
12026
12027 \backslash
12028 addpart*
12029 \family default
12030  command in 
12031 \emph on
12032 book (koma-script)
12033 \emph default
12034  and in 
12035 \emph on
12036 report (koma-script)
12037 \emph default
12038 , but since this is identical to 
12039 \family sans
12040 Part*
12041 \family default
12042 , is has not been implemented in LyX.
12043 \end_layout
12044
12045 \end_inset
12046
12047
12048 \end_layout
12049
12050 \begin_layout Itemize
12051
12052 \family sans
12053 Minisec
12054 \family default
12055 : generates a heading directly above the following paragraph in the standard
12056  character size without affecting the structure of the document.
12057 \end_layout
12058
12059 \begin_layout Itemize
12060
12061 \family sans
12062 Captionabove
12063 \family default
12064  and 
12065 \family sans
12066 Captionbelow
12067 \family default
12068  are special captions which respect the different space settings needed
12069  for captions placed above or below an element (if you follow strict typographic
12070  rules, you might want to place table captions always above the table).
12071  You can also use the class option 
12072 \family typewriter
12073 tablecaptionsabove
12074 \family default
12075 , which will switch 
12076 \family sans
12077 caption
12078 \family default
12079  to 
12080 \family sans
12081 captionabove
12082 \family default
12083  for tables and 
12084 \family sans
12085 captionbelow
12086 \family default
12087  for figures.
12088  You need at least Koma-Script version 2.8q to use this.
12089 \end_layout
12090
12091 \begin_layout Itemize
12092
12093 \family sans
12094 Dictum
12095 \family default
12096 : can be used to set a bonmot, e.
12097 \begin_inset space \thinspace{}
12098 \end_inset
12099
12100 g.
12101 \begin_inset space \space{}
12102 \end_inset
12103
12104 at the beginning of a chapter.
12105  If you use the optional argument (
12106 \family sans
12107 Insert\SpecialChar \menuseparator
12108 Short
12109 \begin_inset space ~
12110 \end_inset
12111
12112 Title
12113 \family default
12114 ), you can insert the dictum's author there.
12115  Dictum and author are separated by a line.
12116  You need at least Koma-Script version 2.8q to use this.
12117  
12118 \family sans
12119 Dictum
12120 \family default
12121  is not contained in 
12122 \emph on
12123 article (koma-script)
12124 \emph default
12125 .
12126 \end_layout
12127
12128 \begin_layout Standard
12129 The following types, together with the standard types 
12130 \family sans
12131 Title
12132 \family default
12133
12134 \family sans
12135 Author
12136 \family default
12137 , and 
12138 \family sans
12139 Date
12140 \family default
12141 , form the title area of the document.
12142  They must be entered ahead of the first 
12143 \begin_inset Quotes eld
12144 \end_inset
12145
12146 ordinary
12147 \begin_inset Quotes erd
12148 \end_inset
12149
12150  paragraph.
12151 \begin_inset Foot
12152 status collapsed
12153
12154 \begin_layout Plain Layout
12155 The corresponding LaTeX commands must appear before the 
12156 \family typewriter
12157
12158 \backslash
12159 maketitle
12160 \family default
12161  command.
12162 \end_layout
12163
12164 \end_inset
12165
12166  When such a type is used more than once, the latter usage overwrites the
12167  former one, that means, for every type only the latest usage is valid.
12168  The order of the different types however has, like 
12169 \family sans
12170 Title
12171 \family default
12172
12173 \family sans
12174 Author
12175 \family default
12176 , and 
12177 \family sans
12178 Date
12179 \family default
12180 , no effect on the appearance of the produced document.
12181 \end_layout
12182
12183 \begin_layout Itemize
12184
12185 \family sans
12186 Subject
12187 \family default
12188 : produces a centered paragraph above the ordinary title (
12189 \family sans
12190 Title
12191 \family default
12192
12193 \family sans
12194 Author
12195 \family default
12196
12197 \family sans
12198 Date
12199 \family default
12200 ) for the subject of the document.
12201 \end_layout
12202
12203 \begin_layout Itemize
12204
12205 \family sans
12206 Publishers
12207 \family default
12208 : produces a centered paragraph below the ordinary title (
12209 \family sans
12210 Title
12211 \family default
12212
12213 \family sans
12214 Author
12215 \family default
12216
12217 \family sans
12218 Date
12219 \family default
12220 ) for the publishers' name.
12221 \end_layout
12222
12223 \begin_layout Itemize
12224
12225 \family sans
12226 Dedication
12227 \family default
12228 : in 
12229 \emph on
12230 report (koma-script)
12231 \emph default
12232  and 
12233 \emph on
12234 book (koma-script)
12235 \emph default
12236  produces a centered paragraph on its own page behind the title page, or
12237  in 
12238 \emph on
12239 article (koma-script)
12240 \emph default
12241  produces a centered paragraph below the ordinary title (
12242 \family sans
12243 Title
12244 \family default
12245
12246 \family sans
12247 Author
12248 \family default
12249
12250 \family sans
12251 Date
12252 \family default
12253
12254 \family sans
12255 Publishers
12256 \family default
12257 ) for a dedication.
12258 \end_layout
12259
12260 \begin_layout Itemize
12261
12262 \family sans
12263 Titlehead
12264 \family default
12265 : produces a left aligned paragraph above the ordinary title (
12266 \family sans
12267 Title
12268 \family default
12269
12270 \family sans
12271 Author
12272 \family default
12273
12274 \family sans
12275 Date
12276 \family default
12277
12278 \family sans
12279 Subject
12280 \family default
12281 ) for a document`s head.
12282 \end_layout
12283
12284 \begin_layout Itemize
12285
12286 \family sans
12287 Uppertitleback
12288 \family default
12289 : produces in a double-sided print in 
12290 \emph on
12291 report (koma-script)
12292 \emph default
12293  and 
12294 \emph on
12295 book (koma-script)
12296 \emph default
12297  a left-aligned paragraph at the top of the title page`s back or has no
12298  effect in a single-sided print or in 
12299 \emph on
12300 article (koma-script)
12301 \emph default
12302 .
12303 \end_layout
12304
12305 \begin_layout Itemize
12306
12307 \family sans
12308 Lowertitleback
12309 \family default
12310 : produces in a double-sided print in 
12311 \emph on
12312 report (koma-script)
12313 \emph default
12314  and 
12315 \emph on
12316 book (koma-script)
12317 \emph default
12318  a left-aligned paragraph at the bottom of the title page`s back or has
12319  no effect in a single-sided print or in 
12320 \emph on
12321 article (koma-script)
12322 \emph default
12323 .
12324 \end_layout
12325
12326 \begin_layout Itemize
12327
12328 \family sans
12329 Extratitle
12330 \family default
12331 : produces a special 
12332 \begin_inset Quotes eld
12333 \end_inset
12334
12335 dirty
12336 \begin_inset Quotes erd
12337 \end_inset
12338
12339  page ahead of the actual document containing a paragraph without special
12340  formatting.
12341 \end_layout
12342
12343 \begin_layout Standard
12344 The layout files for the document classes 
12345 \emph on
12346 article (koma-script)
12347 \emph default
12348
12349 \emph on
12350 report (koma-script)
12351 \emph default
12352 , and 
12353 \emph on
12354 book (koma-script)
12355 \emph default
12356  do include the file 
12357 \family typewriter
12358 scrmacros.inc
12359 \family default
12360 .
12361  This is thought of as a place to define your own types.
12362  Copy scrmacros
12363 \family typewriter
12364 .inc
12365 \family default
12366  in your personal layout directory and edit the file!
12367 \end_layout
12368
12369 \begin_layout Subsection
12370 letter (koma-script)
12371 \end_layout
12372
12373 \begin_layout Standard
12374 \begin_inset ERT
12375 status open
12376
12377 \begin_layout Plain Layout
12378
12379
12380 \backslash
12381 begin{sloppypar}
12382 \end_layout
12383
12384 \end_inset
12385
12386
12387 \end_layout
12388
12389 \begin_layout Standard
12390 \noindent
12391 The document class 
12392 \emph on
12393 letter (koma-script)
12394 \emph default
12395  is implemented in the layout file 
12396 \family typewriter
12397 scrlettr.layout
12398 \family default
12399 .
12400  It contains all the paragraph types of the corresponding standard document
12401  class 
12402 \emph on
12403 letter
12404 \emph default
12405 , partly modified, with the exception of the LyX specific types 
12406 \family sans
12407 LyX-Code
12408 \family default
12409  and 
12410 \family sans
12411 Comment
12412 \family default
12413  and the 
12414 \family sans
12415 List
12416 \family default
12417  type, which is replaced by the new 
12418 \family sans
12419 Labeling
12420 \family default
12421  type.
12422  In addition, it contains, in contrast to the standard document class, the
12423  standard types 
12424 \family sans
12425 LaTeX
12426 \family default
12427
12428 \family sans
12429 Quotation
12430 \family default
12431
12432 \family sans
12433 Quote
12434 \family default
12435 , and 
12436 \family sans
12437 Verse
12438 \family default
12439 .
12440  Furthermore, there are a number of new letter specific types.
12441 \end_layout
12442
12443 \begin_layout Standard
12444 \begin_inset ERT
12445 status open
12446
12447 \begin_layout Plain Layout
12448
12449
12450 \backslash
12451 end{sloppypar}
12452 \end_layout
12453
12454 \end_inset
12455
12456
12457 \end_layout
12458
12459 \begin_layout Standard
12460 The appearance of the letter produced by this document class can be controlled
12461  by a number of LaTeX commands, which you can put in the LaTeX preamble.
12462 \begin_inset Foot
12463 status collapsed
12464
12465 \begin_layout Plain Layout
12466 For example, the standard appearance of the letter`s heading, consisting
12467  of name and address, is quite self-willed.
12468  An 
12469 \begin_inset Quotes eld
12470 \end_inset
12471
12472 ordinary
12473 \begin_inset Quotes erd
12474 \end_inset
12475
12476  heading is produced by the following LaTeX commands in the preamble:
12477 \end_layout
12478
12479 \begin_layout LyX-Code
12480
12481 \backslash
12482 firsthead{
12483 \backslash
12484 parbox[b]{
12485 \backslash
12486 textwidth}
12487 \end_layout
12488
12489 \begin_layout LyX-Code
12490   {
12491 \backslash
12492 ignorespaces 
12493 \backslash
12494 fromname
12495 \backslash
12496
12497 \backslash
12498  
12499 \backslash
12500 ignorespaces 
12501 \backslash
12502 fromaddress}} 
12503 \end_layout
12504
12505 \begin_layout LyX-Code
12506
12507 \backslash
12508 nexthead{
12509 \backslash
12510 parbox[b]{
12511 \backslash
12512 textwidth}
12513 \end_layout
12514
12515 \begin_layout LyX-Code
12516   {
12517 \backslash
12518 ignorespaces 
12519 \backslash
12520 fromname 
12521 \backslash
12522 hfill 
12523 \backslash
12524 ignorespaces 
12525 \backslash
12526 pagename
12527 \backslash
12528  
12529 \backslash
12530 thepage}}
12531 \end_layout
12532
12533 \end_inset
12534
12535  A detailed German description of such LaTeX commands can be found in the
12536  Koma-Script documentation 
12537 \emph on
12538 scrguide
12539 \emph default
12540 .
12541  With it, the letter's author can produce his personal letter layout.
12542 \end_layout
12543
12544 \begin_layout Standard
12545 The types 
12546 \family sans
12547 Letter
12548 \family default
12549  and 
12550 \family sans
12551 Opening
12552 \family default
12553  define the beginning of the letter and must be used in every letter.
12554  To emphasize them in the LyX document class, they are marked with the letter
12555  
12556 \shape italic
12557 L
12558 \shape default
12559  or 
12560 \shape italic
12561 O
12562 \shape default
12563 , resp.
12564 \begin_inset space ~
12565 \end_inset
12566
12567 in the left margin.
12568  It is possible to write any number of letters in one file.
12569  An 
12570 \family sans
12571 Opening
12572 \family default
12573  type produces a new letter using the same addressee and a 
12574 \family sans
12575 Letter
12576 \family default
12577  type produces a new addressee.
12578  The types 
12579 \family sans
12580 Closing
12581 \family default
12582
12583 \family sans
12584 PS
12585 \family default
12586
12587 \family sans
12588 CC
12589 \family default
12590 , and 
12591 \family sans
12592 Encl
12593 \family default
12594  are ordinary paragraph types and can also be used several times in one
12595  and the same letter.
12596 \end_layout
12597
12598 \begin_layout Itemize
12599
12600 \family sans
12601 Letter
12602 \family default
12603 : produces a paragraph for the addressee and implicitly defines the beginning
12604  of the letter.
12605 \end_layout
12606
12607 \begin_layout Itemize
12608
12609 \family sans
12610 Opening
12611 \family default
12612 : produces a paragraph for the form of address and implicitly produces a
12613  new letter.
12614 \end_layout
12615
12616 \begin_layout Itemize
12617
12618 \family sans
12619 Closing
12620 \family default
12621 : produces a paragraph for a close.
12622 \end_layout
12623
12624 \begin_layout Itemize
12625
12626 \family sans
12627 PS
12628 \family default
12629 : produces a paragraph for a postscript.
12630 \end_layout
12631
12632 \begin_layout Itemize
12633
12634 \family sans
12635 CC
12636 \family default
12637 : produces a paragraph for a distribution list.
12638 \end_layout
12639
12640 \begin_layout Itemize
12641
12642 \family sans
12643 Encl
12644 \family default
12645 : produces a paragraph for enclosures.
12646 \end_layout
12647
12648 \begin_layout Standard
12649 The types 
12650 \family sans
12651 Name
12652 \family default
12653
12654 \family sans
12655 Signature
12656 \family default
12657
12658 \family sans
12659 Address
12660 \family default
12661
12662 \family sans
12663 Telephone
12664 \family default
12665
12666 \family sans
12667 Place
12668 \family default
12669
12670 \family sans
12671 Backaddress
12672 \family default
12673
12674 \family sans
12675 Specialmail
12676 \family default
12677
12678 \family sans
12679 Location
12680 \family default
12681
12682 \family sans
12683 Title
12684 \family default
12685 , and 
12686 \family sans
12687 Subject
12688 \family default
12689  are input types provided with a label to enter information, which will
12690  be processed by the document class.
12691 \begin_inset Foot
12692 status open
12693
12694 \begin_layout Plain Layout
12695 It could be seen as a matter of inconsequence, that the types 
12696 \family sans
12697 Letter
12698 \family default
12699  and 
12700 \family sans
12701 Opening
12702 \family default
12703  described above are not such input types as well.
12704  Because of the special meaning of those types, however, I have implemented
12705  them as ordinary paragraph types with a one letter mark in the left margin.
12706  Moreover, it would affect my feeling of symmetry, if the 
12707 \family sans
12708 Opening
12709 \family default
12710  type and the 
12711 \family sans
12712 Closing
12713 \family default
12714  type had such a serious different appearance.
12715 \end_layout
12716
12717 \end_inset
12718
12719  The types must be used ahead of the corresponding 
12720 \family sans
12721 Opening
12722 \family default
12723  type.
12724 \end_layout
12725
12726 \begin_layout Standard
12727 An implementation of these types in a WYSIWYG fashion does not seem to make
12728  sense, because the real appearance of the produced letter does not only
12729  depend on the usage of the particular type, but also on other factors.
12730  For example, a signature entered in the 
12731 \family sans
12732 Signature
12733 \family default
12734  type will in the standard behavior appear in the produced letter only,
12735  when in the same letter also a 
12736 \family sans
12737 Closing
12738 \family default
12739  type is used.
12740  The entered value of the 
12741 \family sans
12742 Telephone
12743 \family default
12744  type will in the standard behavior not appear in the produced letter at
12745  all.
12746  The possibility to design the letter`s heading freely is already indicated
12747  in a footnote above.
12748 \end_layout
12749
12750 \begin_layout Standard
12751 The input types can also be used as empty paragraphs.
12752  This makes sense e.
12753 \begin_inset space \thinspace{}
12754 \end_inset
12755
12756 g.
12757 \begin_inset space \space{}
12758 \end_inset
12759
12760 for the 
12761 \family sans
12762 Signature
12763 \family default
12764  type.
12765  If the 
12766 \family sans
12767 Signature
12768 \family default
12769  type is not used at all, in the standard behavior the value of the 
12770 \family sans
12771 Name
12772 \family default
12773  type is used as signature, whereas if an empty 
12774 \family sans
12775 Signature
12776 \family default
12777  type is used, no signature value is defined.
12778 \end_layout
12779
12780 \begin_layout Standard
12781 By using the input types it is possible to write a letter template, containing
12782  filled input types with your personal dates (name, address, etc.) and empty
12783  input types for other dates you want to enter.
12784 \end_layout
12785
12786 \begin_layout Itemize
12787
12788 \family sans
12789 Name
12790 \family default
12791 : sender's name, in the standard behavior appears as a centered paragraph
12792  in small caps in the letter`s heading.
12793 \end_layout
12794
12795 \begin_layout Itemize
12796
12797 \family sans
12798 Signature
12799 \family default
12800 : sender's signature, in the standard behavior appears below the 
12801 \family sans
12802 Closing
12803 \family default
12804  type.
12805  If no 
12806 \family sans
12807 Signature
12808 \family default
12809  type is used, the value of the 
12810 \family sans
12811 Name
12812 \family default
12813  type appears instead.
12814 \end_layout
12815
12816 \begin_layout Itemize
12817
12818 \family sans
12819 Address
12820 \family default
12821 : sender's address, in the standard behavior appears in a centered paragraph
12822  in the letter`s heading below the sender's name.
12823 \end_layout
12824
12825 \begin_layout Itemize
12826
12827 \family sans
12828 Telephone
12829 \family default
12830 : sender's telephone number, in the standard behavior only sets the LaTeX
12831  variable 
12832 \family typewriter
12833
12834 \backslash
12835 telephonenum
12836 \family default
12837 .
12838 \end_layout
12839
12840 \begin_layout Itemize
12841
12842 \family sans
12843 Place
12844 \family default
12845 : place of the letter`s making.
12846 \end_layout
12847
12848 \begin_layout Itemize
12849
12850 \family sans
12851 Date
12852 \family default
12853 : date of the letter`s making.
12854  
12855 \family sans
12856 Place
12857 \family default
12858  and 
12859 \family sans
12860 Date
12861 \family default
12862 , in the standard behavior, produce the place and the date in a right-aligned
12863  line below the addressee's field.
12864  If an empty 
12865 \family sans
12866 Date
12867 \family default
12868  type is used, neither place nor date appear, independent of the value of
12869  the 
12870 \family sans
12871 Place
12872 \family default
12873  type.
12874  If no 
12875 \family sans
12876 Date
12877 \family default
12878  type is used, the date of the letter `s production is used.
12879 \end_layout
12880
12881 \begin_layout Itemize
12882
12883 \family sans
12884 Backaddress
12885 \family default
12886 : sender`s back address, in the standard behavior appears above the addressee's
12887  field in a small sans serif font.
12888 \end_layout
12889
12890 \begin_layout Itemize
12891
12892 \family sans
12893 Specialmail
12894 \family default
12895 : special mail information, in the standard behavior appears underlined
12896  above the addressee's field below the back address.
12897 \end_layout
12898
12899 \begin_layout Itemize
12900
12901 \family sans
12902 Location
12903 \family default
12904 : additional information, in the standard behavior appears on right side
12905  below the addressee`s field.
12906 \end_layout
12907
12908 \begin_layout Itemize
12909
12910 \family sans
12911 Title
12912 \family default
12913 : the letter's title, in the standard behavior appears in a big, bold, sans
12914  serif font above the subject.
12915 \end_layout
12916
12917 \begin_layout Itemize
12918
12919 \family sans
12920 Subject
12921 \family default
12922 : the letter's subject, in the standard behavior appears in a bold font
12923  above the 
12924 \family sans
12925 Opening
12926 \family default
12927  paragraph.
12928 \end_layout
12929
12930 \begin_layout Standard
12931 The types 
12932 \family sans
12933 Yourref
12934 \family default
12935
12936 \family sans
12937 Yourmail
12938 \family default
12939
12940 \family sans
12941 Myref
12942 \family default
12943
12944 \family sans
12945 Customer
12946 \family default
12947 , and 
12948 \family sans
12949 Invoice
12950 \family default
12951  produce a business letter like line above the 
12952 \family sans
12953 Title
12954 \family default
12955  line containing the fields 
12956 \begin_inset Quotes eld
12957 \end_inset
12958
12959 Your ref.
12960 \begin_inset Quotes erd
12961 \end_inset
12962
12963
12964 \begin_inset Quotes eld
12965 \end_inset
12966
12967 Your letter of
12968 \begin_inset Quotes erd
12969 \end_inset
12970
12971
12972 \begin_inset Quotes eld
12973 \end_inset
12974
12975 Our ref.
12976 \begin_inset Quotes erd
12977 \end_inset
12978
12979
12980 \begin_inset Quotes eld
12981 \end_inset
12982
12983 Customer no.
12984 \begin_inset Quotes erd
12985 \end_inset
12986
12987
12988 \begin_inset Quotes eld
12989 \end_inset
12990
12991 Invoice no.
12992 \begin_inset Quotes erd
12993 \end_inset
12994
12995 , and 
12996 \begin_inset Quotes eld
12997 \end_inset
12998
12999 Date
13000 \begin_inset Quotes erd
13001 \end_inset
13002
13003 .
13004  For the date field, the value of the 
13005 \family sans
13006 Date
13007 \family default
13008  type is used.
13009  If one of these 
13010 \begin_inset Quotes eld
13011 \end_inset
13012
13013 business letter types
13014 \begin_inset Quotes erd
13015 \end_inset
13016
13017  is used, the value of the 
13018 \family sans
13019 Place
13020 \family default
13021  type however does not appear, but only the LaTeX variable 
13022 \family typewriter
13023
13024 \backslash
13025 fromplace
13026 \family default
13027  is set.
13028  The ordinary output of place and date in a right-aligned line below the
13029  addressee`s field is suppressed.
13030  The types are implemented as input types provided with a label and must
13031  be used ahead of the corresponding 
13032 \family sans
13033 Opening
13034 \family default
13035  type.
13036 \end_layout
13037
13038 \begin_layout Itemize
13039
13040 \family sans
13041 Yourref
13042 \family default
13043 : Your ref.
13044 \end_layout
13045
13046 \begin_layout Itemize
13047
13048 \family sans
13049 Yourmail
13050 \family default
13051 : Your letter of.
13052 \end_layout
13053
13054 \begin_layout Itemize
13055
13056 \family sans
13057 Myref
13058 \family default
13059 : Our ref.
13060 \end_layout
13061
13062 \begin_layout Itemize
13063
13064 \family sans
13065 Customer
13066 \family default
13067 : Customer no.
13068 \end_layout
13069
13070 \begin_layout Itemize
13071
13072 \family sans
13073 Invoice
13074 \family default
13075 : Invoice no.
13076 \end_layout
13077
13078 \begin_layout Subsection
13079 The new letter class: letter (koma-script v.2)
13080 \end_layout
13081
13082 \begin_layout Standard
13083 by 
13084 \noun on
13085 Jürgen Spitzmüller
13086 \end_layout
13087
13088 \begin_layout Standard
13089 \begin_inset VSpace medskip
13090 \end_inset
13091
13092
13093 \end_layout
13094
13095 \begin_layout Standard
13096 \noindent
13097 Koma-Script version 2.8 has introduced a new letter class 
13098 \family typewriter
13099 scrlttr2
13100 \family default
13101  which supersedes the now unsupported 
13102 \family typewriter
13103 scrlettr
13104 \family default
13105 .
13106  It has â€” on the LaTeX side â€” a completely new interface and is not compatible
13107  with the old class.
13108  Therefore, LyX supports both, though it is recommended to use the new class.
13109 \end_layout
13110
13111 \begin_layout Standard
13112 This class covers the same functionality as 
13113 \emph on
13114 letter (koma-script),
13115 \emph default
13116  and a few more.
13117  The basic items are 
13118 \family sans
13119 Address
13120 \family default
13121  (receiver's address, same as 
13122 \family sans
13123 Letter
13124 \family default
13125  in the old layout), 
13126 \family sans
13127 Opening
13128 \family default
13129 , and 
13130 \family sans
13131 Closing
13132 \family default
13133 .
13134  
13135 \family sans
13136 NextAddress
13137 \family default
13138  will start a new letter (i.
13139 \begin_inset space \thinspace{}
13140 \end_inset
13141
13142 g.
13143 \begin_inset space \space{}
13144 \end_inset
13145
13146 you can write several letters per document).
13147  New elements are sender's 
13148 \family sans
13149 E-Mail
13150 \family default
13151
13152 \family sans
13153 URL
13154 \family default
13155
13156 \family sans
13157 Fax
13158 \family default
13159
13160 \family sans
13161 Bank
13162 \family default
13163  and the possibility to use a 
13164 \family sans
13165 Logo
13166 \family default
13167  (via 
13168 \family sans
13169 Insert\SpecialChar \menuseparator
13170 Graphics
13171 \family default
13172 ) in the header.
13173 \end_layout
13174
13175 \begin_layout Standard
13176 The biggest improvement is, though, that the letter's layout is configurable
13177  at almost any needs.
13178  This can be done via the preamble or with a special style file (Letter
13179  Class Option, extension 
13180 \family typewriter
13181 *.lco
13182 \family default
13183 ), that will be read in as a class option.
13184 \begin_inset Foot
13185 status collapsed
13186
13187 \begin_layout Plain Layout
13188 The KOMA package comes with some default 
13189 \family typewriter
13190 *.lco
13191 \family default
13192  files.
13193  There is, for instance, a 
13194 \family typewriter
13195 DIN.lco
13196 \family default
13197  file that follows german typesetting rules, or a 
13198 \family typewriter
13199 KOMAold.lco
13200 \family default
13201  that provides the default layout of the old 
13202 \family typewriter
13203 scrlettr
13204 \family default
13205  class.
13206  The latter can be loaded with the class option 
13207 \family typewriter
13208 KOMAold
13209 \family default
13210 , inserted via the 
13211 \family sans
13212 \bar under
13213 L
13214 \bar default
13215 ayout\SpecialChar \menuseparator
13216
13217 \bar under
13218 D
13219 \bar default
13220 ocument\SpecialChar \menuseparator
13221 Extra Options
13222 \family default
13223  field.
13224 \end_layout
13225
13226 \end_inset
13227
13228  Have a look at the 
13229 \emph on
13230 koma-letter2
13231 \emph default
13232  template that is included in LyX for examples.
13233  A detailed description is to be found in the Koma-Script documentation
13234  (
13235 \emph on
13236 scrguide
13237 \emph default
13238 ).
13239 \end_layout
13240
13241 \begin_layout Subsection
13242 Problems
13243 \end_layout
13244
13245 \begin_layout Standard
13246 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
13247  some problems.
13248 \end_layout
13249
13250 \begin_layout Itemize
13251 The chapter number of a 
13252 \family sans
13253 Chapter
13254 \family default
13255  type appears on a line of its own above the chapter heading instead of
13256  appearing in the same line ahead of it.
13257  The cause for that is the LyX internal behavior for the labeltype 
13258 \family sans
13259 Counter_Chapter
13260 \family default
13261  in the layout file.
13262 \end_layout
13263
13264 \begin_layout Itemize
13265 The headings of the types 
13266 \family sans
13267 Addchap
13268 \family default
13269  and 
13270 \family sans
13271 Addsec
13272 \family default
13273  are only put in the 
13274 \begin_inset Quotes eld
13275 \end_inset
13276
13277 true
13278 \begin_inset Quotes erd
13279 \end_inset
13280
13281  LaTeX table of contents, but not in the LyX table of contents (
13282 \family sans
13283 Document\SpecialChar \menuseparator
13284 Table
13285 \begin_inset space ~
13286 \end_inset
13287
13288 of
13289 \begin_inset space ~
13290 \end_inset
13291
13292 Contents
13293 \family default
13294 ).
13295 \end_layout
13296
13297 \begin_layout Itemize
13298 The paragraphs in a 
13299 \emph on
13300 letter
13301 \emph default
13302  document class appear in a skip separation mode, not indented.
13303  This is the standard behavior, no special LaTeX commands are needed for
13304  that.
13305  But in the 
13306 \family sans
13307 Document\SpecialChar \menuseparator
13308 Settings
13309 \family default
13310  dialog the corresponding radio button indicates 
13311 \family sans
13312 Indent
13313 \family default
13314 .
13315  A 
13316 \family sans
13317 Skip
13318 \family default
13319  value always has the effect that extra LaTeX commands are inserted in the
13320  document to produce the gap, which is not what is wanted in this case.
13321 \end_layout
13322
13323 \begin_layout Section
13324 Latex8 (IEEE Conference Papers)
13325 \end_layout
13326
13327 \begin_layout Standard
13328 by 
13329 \noun on
13330 Allan Rae
13331 \end_layout
13332
13333 \begin_layout Subsection
13334 Introduction
13335 \end_layout
13336
13337 \begin_layout Standard
13338 Since this class is specifically for writing submissions to IEEE sponsored
13339  conferences I strongly recommend that you get a copy of their Authors Kit.
13340  The 
13341 \family sans
13342 latex.sty
13343 \family default
13344  package and associated bibliography style file is included in the kit.
13345  The Authors Kit is usually sent out by email once your initial submission
13346  has been accepted.
13347  There is a lot of useful information in the Authors Kit explaining formatting
13348  restrictions and so on and I will assume you have read this since that
13349  means I don't have to repeat it all here.
13350 \end_layout
13351
13352 \begin_layout Subsection
13353 Getting Started
13354 \end_layout
13355
13356 \begin_layout Standard
13357 [AR\SpecialChar \@.
13358  more to come]
13359 \end_layout
13360
13361 \begin_layout Subsection
13362 Supported Environments
13363 \end_layout
13364
13365 \begin_layout Itemize
13366
13367 \family sans
13368 Standard
13369 \end_layout
13370
13371 \begin_layout Itemize
13372
13373 \family sans
13374 Title
13375 \end_layout
13376
13377 \begin_layout Itemize
13378
13379 \family sans
13380 Author
13381 \end_layout
13382
13383 \begin_layout Itemize
13384
13385 \family sans
13386 E-mail
13387 \end_layout
13388
13389 \begin_layout Itemize
13390
13391 \family sans
13392 Affiliation
13393 \end_layout
13394
13395 \begin_layout Itemize
13396
13397 \family sans
13398 Abstract
13399 \end_layout
13400
13401 \begin_layout Itemize
13402
13403 \family sans
13404 Section
13405 \end_layout
13406
13407 \begin_layout Itemize
13408
13409 \family sans
13410 SubSection
13411 \end_layout
13412
13413 \begin_layout Itemize
13414
13415 \family sans
13416 Caption
13417 \end_layout
13418
13419 \begin_layout Subsection
13420 Differences Between Screen and Paper
13421 \end_layout
13422
13423 \begin_layout Standard
13424 There are slight differences in appearance mainly with the presentation
13425  of section counters.
13426  On screen the trailing period of the section counter is missing but it
13427  will appear in the output so don't let this worry you.
13428 \end_layout
13429
13430 \begin_layout Section
13431 Memoir
13432 \end_layout
13433
13434 \begin_layout Standard
13435 By 
13436 \noun on
13437 Jürgen Spitzmüller
13438 \end_layout
13439
13440 \begin_layout Subsection
13441 Overview
13442 \end_layout
13443
13444 \begin_layout Standard
13445 Memoir is a very powerful and constantly evolving class.
13446  It has been designed with regard to fictional and non-fictional literature.
13447  Its aim is to let the user have maximum control over the typesetting of
13448  his document.
13449  Memoir is based on the standard book class, but it can also emulate the
13450  article class (see below).
13451 \end_layout
13452
13453 \begin_layout Standard
13454 Peter Wilson, the developer of Memoir, is known as the author of lots of
13455  useful packages in the LaTeX world.
13456  Most of them have been merged with Memoir.
13457  Therefore, it is much easier to layout the table of contents, appendices,
13458  chapter designs and such.
13459  LyX, though, does not support all of these goodies natively.
13460  Some of them might be added to forthcoming releases
13461 \begin_inset Foot
13462 status collapsed
13463
13464 \begin_layout Plain Layout
13465 You are invited to send suggestions to 
13466 \begin_inset Flex URL
13467 status collapsed
13468
13469 \begin_layout Plain Layout
13470
13471 lyx-devel@lists.lyx.org
13472 \end_layout
13473
13474 \end_inset
13475
13476 .
13477 \end_layout
13478
13479 \end_inset
13480
13481 , lots will probably never, due to the limitations of LyX's framework.
13482  Of course you can still use all features with the help of some native LaTeX
13483  commands (TeX code
13484 \begin_inset Foot
13485 status collapsed
13486
13487 \begin_layout Plain Layout
13488 Cf.
13489 \begin_inset ERT
13490 status collapsed
13491
13492 \begin_layout Plain Layout
13493
13494
13495 \backslash
13496  
13497 \end_layout
13498
13499 \end_inset
13500
13501 section
13502 \begin_inset space ~
13503 \end_inset
13504
13505
13506 \begin_inset CommandInset ref
13507 LatexCommand ref
13508 reference "sec:Inserting-TeX-Code"
13509
13510 \end_inset
13511
13512  for details.
13513 \end_layout
13514
13515 \end_inset
13516
13517 ).
13518  In this section, we can only list those features which are natively supported
13519  by LyX.
13520  For detailed descriptions (and for the rest of features) we are recommending
13521  to have a look at the detailed manual of the Memoir class
13522 \begin_inset Foot
13523 status collapsed
13524
13525 \begin_layout Plain Layout
13526 Cf.
13527 \begin_inset ERT
13528 status collapsed
13529
13530 \begin_layout Plain Layout
13531
13532
13533 \backslash
13534  
13535 \end_layout
13536
13537 \end_inset
13538
13539
13540 \begin_inset Flex URL
13541 status collapsed
13542
13543 \begin_layout Plain Layout
13544
13545 CTAN:/macros/latex/memoir/memman.pdf
13546 \end_layout
13547
13548 \end_inset
13549
13550 .
13551 \end_layout
13552
13553 \end_inset
13554
13555 , which is not only a user guide for the class, but also both a comprehensive
13556  description on good typesetting and a superb example for good typesetting
13557  itself.
13558 \end_layout
13559
13560 \begin_layout Subsection
13561 Basic features and restrictions
13562 \end_layout
13563
13564 \begin_layout Standard
13565 Memoir supports basically all features of the standard book classes.
13566  There are, however, some differences, as follows:
13567 \end_layout
13568
13569 \begin_layout Description
13570 Font
13571 \begin_inset space ~
13572 \end_inset
13573
13574 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
13575 \end_layout
13576
13577 \begin_layout Description
13578 Page
13579 \begin_inset space ~
13580 \end_inset
13581
13582 style: The fancy page style is not supported, due to a command clash between
13583  Memoir and the fancyhdr package (they are both defining a command with
13584  the same name, which confuses LaTeX).
13585  Instead, Memoir comes with a bunch of own page styles (see 
13586 \family sans
13587 Layout\SpecialChar \menuseparator
13588 Document\SpecialChar \menuseparator
13589 Page
13590 \begin_inset space ~
13591 \end_inset
13592
13593 Style
13594 \family default
13595 ).
13596  If you want to use these for the chapter pages, you have to use the command
13597  
13598 \family typewriter
13599
13600 \backslash
13601 chapterstyle
13602 \family default
13603  in the main text or in preamble (e.
13604 \begin_inset space \thinspace{}
13605 \end_inset
13606
13607 g.
13608 \begin_inset space \space{}
13609 \end_inset
13610
13611
13612 \family typewriter
13613
13614 \backslash
13615 chapterstyle{companion}
13616 \family default
13617 ).
13618 \end_layout
13619
13620 \begin_layout Description
13621 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
13622  an optional argument in the standard classes.
13623  With this, you can specify an alternative version of the title for the
13624  table of contents and the headers (for instance, if the title is too long).
13625  In LyX, you can do this via 
13626 \family sans
13627 Insert\SpecialChar \menuseparator
13628 Short
13629 \begin_inset space ~
13630 \end_inset
13631
13632 Title
13633 \family default
13634  at the beginning of a chapter/section.
13635  Memoir features a second optional argument and thus separates the table
13636  of contents from the header.
13637  You can define three variants of a title with this: one for the main text,
13638  one for the table of contents, and one for the headers.
13639  Simply insert two optional arguments if you need this feature, the first
13640  one containing the short title for the Table of Contents, the second one
13641  containing an alternative short title for the headers.
13642 \end_layout
13643
13644 \begin_layout Description
13645 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
13646  of contents, the list of figures and the list of table start a new page
13647  automatically.
13648  Memoir does not follow this route.
13649  You have to insert a page break yourself, if you want to have one.
13650 \end_layout
13651
13652 \begin_layout Description
13653 Titlepage: For some unknown reason, Memoir uses pagination on the title
13654  page (in the standard classes, title pages are 
13655 \begin_inset Quotes eld
13656 \end_inset
13657
13658 empty
13659 \begin_inset Quotes erd
13660 \end_inset
13661
13662 , i.
13663 \begin_inset space \thinspace{}
13664 \end_inset
13665
13666 g.
13667 \begin_inset space \space{}
13668 \end_inset
13669
13670 without pagina).
13671  If you want an empty title page, type 
13672 \family typewriter
13673
13674 \backslash
13675 aliaspagestyle{title}{empty}
13676 \family default
13677  in the preamble.
13678 \end_layout
13679
13680 \begin_layout Description
13681 Article: With the class option 
13682 \emph on
13683 article
13684 \emph default
13685  (to be inserted in 
13686 \family sans
13687 Layout\SpecialChar \menuseparator
13688 Document\SpecialChar \menuseparator
13689 Extra
13690 \begin_inset space ~
13691 \end_inset
13692
13693 Options
13694 \family default
13695 ), you can emulate article style.
13696  That is, counters (footnotes, figures, tables etc.) will not be reset on
13697  new chapters, chapters don't start a new page (but are—in contrary to 
13698 \begin_inset Quotes eld
13699 \end_inset
13700
13701 real
13702 \begin_inset Quotes erd
13703 \end_inset
13704
13705  article classes—still allowed), parts, though, use their own page, as in
13706  book.
13707 \end_layout
13708
13709 \begin_layout Description
13710 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
13711  font commands, which have been used in the old LaTeX version 2.09 (e.
13712 \begin_inset space \thinspace{}
13713 \end_inset
13714
13715 g.
13716 \begin_inset space \space{}
13717 \end_inset
13718
13719
13720 \family typewriter
13721
13722 \backslash
13723 rm
13724 \family default
13725
13726 \family typewriter
13727
13728 \backslash
13729 it
13730 \family default
13731 ).
13732  It produces an error and stops LaTeX whenever such a command appears.
13733  The class option 
13734 \emph on
13735 oldfontcommands
13736 \emph default
13737  reallows the commands and spits out warnings instead (which does at least
13738  not stop LaTeX).
13739  Since a lot of packages and particularly BibTeX style files are still using
13740  those commands, we have decided to use this option by default.
13741 \end_layout
13742
13743 \begin_layout Subsection
13744 Extra features
13745 \end_layout
13746
13747 \begin_layout Standard
13748 We will only describe the features supported by LyX (which is not much currently
13749 ).
13750  Please consult the Memoir manual
13751 \begin_inset Foot
13752 status collapsed
13753
13754 \begin_layout Plain Layout
13755 Cf.
13756 \begin_inset ERT
13757 status collapsed
13758
13759 \begin_layout Plain Layout
13760
13761
13762 \backslash
13763  
13764 \end_layout
13765
13766 \end_inset
13767
13768
13769 \begin_inset Flex URL
13770 status collapsed
13771
13772 \begin_layout Plain Layout
13773
13774 CTAN:/macros/latex/memoir/memman.pdf
13775 \end_layout
13776
13777 \end_inset
13778
13779 .
13780 \end_layout
13781
13782 \end_inset
13783
13784  for details.
13785 \end_layout
13786
13787 \begin_layout Description
13788 Abstract: You may wonder why an abstract is an extra feature.
13789  Well, it is in book class.
13790  Usually books don't have abstracts.
13791  Memoir, however, has.
13792  You can use it wherever and how often you like.
13793 \end_layout
13794
13795 \begin_layout Description
13796 Chapterprecis: You may know this from belletristic: The contents of a chapter
13797  is shortly described below the title and also in the table of contents
13798  (e.
13799 \begin_inset space \thinspace{}
13800 \end_inset
13801
13802 g.
13803 \begin_inset space \space{}
13804 \end_inset
13805
13806
13807 \emph on
13808 Our hero arrives in Troia; he loses some friends; he finds others
13809 \emph default
13810 ).
13811  Chapterprecis does exactly this.
13812  It is therefore only sensible below a chapter.
13813 \end_layout
13814
13815 \begin_layout Description
13816 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
13817  The epigraph environment provides an elegant way of typesetting such a
13818  motto.
13819  The motto itself (text) and its author (source) are divided by a short
13820  line.
13821  Unfortunately, we have to fool LyX a bit here again, since the environment
13822  needs two arguments (text and source).
13823  In this case, we have to use curly brackets (in TeX mode) between the two
13824  arguments: 
13825 \emph on
13826 <smart slogan>
13827 \emph default
13828  
13829 \family typewriter
13830 }{
13831 \family default
13832  
13833 \emph on
13834 <author of the slogan>.
13835 \end_layout
13836
13837 \begin_layout Description
13838 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
13839  complex figurative poems).
13840  LyX can only support a few of them.
13841  One is poemtitle, which is a centered title for poems, which will also
13842  be added to the table of contents (verse is the standard environment for
13843  poems.
13844  Memoir has some enhanced versions of verse, but you need to use TeX code,
13845  because they have to be nested inside regular verse environments, which
13846  is not possible with LyX).
13847 \end_layout
13848
13849 \begin_layout Description
13850 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
13851 \end_layout
13852
13853 \begin_layout Section
13854 Article (mwart), book (mwbk) and report (mwrep)
13855 \begin_inset OptArg
13856 status collapsed
13857
13858 \begin_layout Plain Layout
13859 The 
13860 \family typewriter
13861 mw
13862 \family default
13863  Classes
13864 \end_layout
13865
13866 \end_inset
13867
13868
13869 \end_layout
13870
13871 \begin_layout Standard
13872 by 
13873 \noun on
13874 Tomasz Luczak
13875 \end_layout
13876
13877 \begin_layout Standard
13878 The LyX document classes 
13879 \emph on
13880 article (mwart)
13881 \emph default
13882
13883 \emph on
13884 report (mwrep)
13885 \emph default
13886  and 
13887 \emph on
13888 book
13889 \emph default
13890  
13891 \emph on
13892 (mwbk)
13893 \emph default
13894  correspond to the LaTeX document classes 
13895 \family typewriter
13896 mwart.cls
13897 \family default
13898
13899 \family typewriter
13900 mwrep.cls
13901 \family default
13902  and 
13903 \family typewriter
13904 mwbk.cls
13905 \family default
13906 , resp.
13907  They are replacements for the standard document classes 
13908 \family typewriter
13909 article.cls
13910 \family default
13911
13912 \family typewriter
13913 report.cls
13914 \family default
13915  and 
13916 \family typewriter
13917 book.cls
13918 \family default
13919 , resp., and fit better to Polish typography conventions in a number of points.
13920  
13921 \end_layout
13922
13923 \begin_layout Standard
13924 Basic differences:
13925 \end_layout
13926
13927 \begin_layout Itemize
13928 Unnumbered titles (with star, e.
13929 \begin_inset space \thinspace{}
13930 \end_inset
13931
13932 g.
13933 \begin_inset space \space{}
13934 \end_inset
13935
13936
13937 \family sans
13938 Section*
13939 \family default
13940 ) are added into table of contents,
13941 \end_layout
13942
13943 \begin_layout Itemize
13944 Additional page styles:
13945 \end_layout
13946
13947 \begin_deeper
13948 \begin_layout Description
13949 uheadings header with separated lines,
13950 \end_layout
13951
13952 \begin_layout Description
13953 myheadings custom header, contents headers via commands: 
13954 \family typewriter
13955
13956 \backslash
13957 markright
13958 \family default
13959  and 
13960 \family typewriter
13961
13962 \backslash
13963 markboth
13964 \family default
13965 ,
13966 \end_layout
13967
13968 \begin_layout Description
13969 myuheadings custom header with separated lines,
13970 \end_layout
13971
13972 \begin_layout Description
13973 outer page number is placed on outer side of page
13974 \end_layout
13975
13976 \end_deeper
13977 \begin_layout Itemize
13978 Options 
13979 \end_layout
13980
13981 \begin_deeper
13982 \begin_layout Description
13983 rmheadings serif titles â€” default,
13984 \end_layout
13985
13986 \begin_layout Description
13987 sfheadings sansserif titles,
13988 \end_layout
13989
13990 \begin_layout Description
13991 authortitle on title page first placed is author next title â€” default,
13992 \end_layout
13993
13994 \begin_layout Description
13995 titleauthor on title page first placed is title next author,
13996 \end_layout
13997
13998 \begin_layout Description
13999 withmarginpar reserve place on page for margins.
14000 \end_layout
14001
14002 \end_deeper
14003 \begin_layout Section
14004 Paper
14005 \end_layout
14006
14007 \begin_layout Standard
14008 The document class 
14009 \family sans
14010 paper
14011 \family default
14012  provides an alternative to the standard 
14013 \family sans
14014 article
14015 \family default
14016  class.
14017  It provides similar functionality, but you might prefer this layout with
14018  sans serif sections, headings, and more.
14019 \end_layout
14020
14021 \begin_layout Section
14022 RevTeX4
14023 \end_layout
14024
14025 \begin_layout Standard
14026 by 
14027 \noun on
14028 Amir Karger
14029 \end_layout
14030
14031 \begin_layout Standard
14032 \begin_inset VSpace bigskip
14033 \end_inset
14034
14035
14036 \end_layout
14037
14038 \begin_layout Standard
14039 \noindent
14040 The 
14041 \family sans
14042 Revtex
14043 \begin_inset space ~
14044 \end_inset
14045
14046 4
14047 \family default
14048  textclass works with the American Physical Sociey's RevTeX 4.0 (the 
14049 \begin_inset Formula $\beta$
14050 \end_inset
14051
14052  release of May, 1999) class.
14053 \end_layout
14054
14055 \begin_layout Standard
14056 LyX has a 
14057 \family sans
14058 Revtex
14059 \family default
14060  textclass, which works with RevTeX 3.1.
14061  However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14062  That means that it doesn't interact very well with LyX, which requires
14063  LaTeX2e, although it has been kludged to work.
14064  Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14065  LyX with the 
14066 \family sans
14067 RevTeX
14068 \begin_inset space ~
14069 \end_inset
14070
14071 4
14072 \family default
14073  textclass should also be pretty easy to use.
14074 \end_layout
14075
14076 \begin_layout Standard
14077 These documents are supposed to be used in 
14078 \emph on
14079 addition
14080 \emph default
14081  to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14082  macros, and assume you'll know what to put in the preamble if necessary.
14083 \end_layout
14084
14085 \begin_layout Subsection
14086 Installation
14087 \end_layout
14088
14089 \begin_layout Standard
14090 All you need to do is install RevTeX 4, as described in the package's README
14091  file.
14092  The package can be found at The RevTeX 4 Web Site 
14093 \begin_inset Flex URL
14094 status collapsed
14095
14096 \begin_layout Plain Layout
14097
14098 http://publish.aps.org/revtex4/
14099 \end_layout
14100
14101 \end_inset
14102
14103 .
14104  Install it somewhere that LaTeX can see it.
14105  Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14106  (i.
14107 \begin_inset space \thinspace{}
14108 \end_inset
14109
14110 g.
14111 \begin_inset space \space{}
14112 \end_inset
14113
14114 not the directory where you installed the class file.) Then, if you reconfigure
14115  LyX, it will find the class file and let you use the RevTeX4 textclass.
14116 \end_layout
14117
14118 \begin_layout Standard
14119 Probably the easiest way to get started is either to import a RevTeX 4 document
14120  using 
14121 \family typewriter
14122 tex2lyx
14123 \family default
14124 , or to use the 
14125 \family sans
14126 Revtex
14127 \begin_inset space ~
14128 \end_inset
14129
14130 4
14131 \family default
14132  template, found in the templates directory.
14133 \end_layout
14134
14135 \begin_layout Subsection
14136 Preamble Matter
14137 \end_layout
14138
14139 \begin_layout Standard
14140 Optional arguments to 
14141 \family typewriter
14142
14143 \backslash
14144 documentclass
14145 \family default
14146 , like 
14147 \begin_inset Quotes eld
14148 \end_inset
14149
14150 preprint
14151 \begin_inset Quotes erd
14152 \end_inset
14153
14154  and 
14155 \begin_inset Quotes eld
14156 \end_inset
14157
14158 aps
14159 \begin_inset Quotes erd
14160 \end_inset
14161
14162 , go in the 
14163 \family sans
14164 E
14165 \bar under
14166 x
14167 \bar default
14168 tra
14169 \begin_inset space ~
14170 \end_inset
14171
14172 Options
14173 \family default
14174  field in the 
14175 \family sans
14176 Document
14177 \begin_inset space ~
14178 \end_inset
14179
14180 Layout
14181 \family default
14182  dialog, as usual.
14183  Remember that in RevTeX, at least one optional argument is required! 
14184 \end_layout
14185
14186 \begin_layout Standard
14187 Other preamble matter, like 
14188 \family typewriter
14189
14190 \backslash
14191 draft
14192 \family default
14193  etc.
14194 \begin_inset space ~
14195 \end_inset
14196
14197 goes in the 
14198 \family sans
14199 LaTeX
14200 \begin_inset space ~
14201 \end_inset
14202
14203 Preamble
14204 \family default
14205  dialog, also as usual.
14206 \end_layout
14207
14208 \begin_layout Subsection
14209 Layouts
14210 \end_layout
14211
14212 \begin_layout Standard
14213 The layouts basically correspond to the commands in RevTeX4.0.
14214  For example, the Email layout corresponds to 
14215 \family typewriter
14216
14217 \backslash
14218 email{}
14219 \family default
14220 .
14221  Note that (at least as of RevTeX 4.0 Beta), the 
14222 \family sans
14223 Address
14224 \family default
14225  and 
14226 \family sans
14227 Affiliation
14228 \family default
14229  layouts are exactly equivalent, so you shouldn't need to use both.
14230 \begin_inset Foot
14231 status collapsed
14232
14233 \begin_layout Plain Layout
14234 In case you're curious, both were included so that 
14235 \family typewriter
14236 tex2lyx
14237 \family default
14238  would be able to translate both 
14239 \family typewriter
14240
14241 \backslash
14242 address
14243 \family default
14244  and 
14245 \family typewriter
14246
14247 \backslash
14248 affiliation
14249 \family default
14250 .
14251 \end_layout
14252
14253 \end_inset
14254
14255
14256 \end_layout
14257
14258 \begin_layout Subsection
14259 Important Notes
14260 \end_layout
14261
14262 \begin_layout Standard
14263 There are a couple of important unique aspects of RevTeX 4 which might cause
14264  bugs that will be even more confusing in LyX.
14265 \end_layout
14266
14267 \begin_layout Standard
14268 In RevTeX, the 
14269 \family typewriter
14270
14271 \backslash
14272 thanks
14273 \family default
14274  command goes 
14275 \emph on
14276 outside
14277 \emph default
14278  the 
14279 \family typewriter
14280
14281 \backslash
14282 author
14283 \family default
14284  command.
14285  The LyX equivalent is that there is a separate Thanks layout.
14286  Do 
14287 \emph on
14288 not
14289 \emph default
14290  write footnotes in the 
14291 \family sans
14292 Author
14293 \family default
14294  layout, or weird things may happen.
14295  See the RevTeX 4 documentation for more details.
14296 \end_layout
14297
14298 \begin_layout Standard
14299 Also, the 
14300 \family sans
14301 Author
14302 \begin_inset space ~
14303 \end_inset
14304
14305 Email
14306 \family default
14307
14308 \family sans
14309 Author
14310 \begin_inset space ~
14311 \end_inset
14312
14313 URL
14314 \family default
14315 , and 
14316 \family sans
14317 Thanks
14318 \family default
14319  layouts must be placed 
14320 \emph on
14321 in between
14322 \emph default
14323  the 
14324 \family sans
14325 Author
14326 \family default
14327  layout and the corresponding 
14328 \family sans
14329 Address
14330 \family default
14331  (or equivalent 
14332 \family sans
14333 Affiliation
14334 \family default
14335 ) layout.
14336  If you put the 
14337 \family sans
14338 Thanks
14339 \family default
14340  after the 
14341 \family sans
14342 Address
14343 \family default
14344 , the LaTeX won't compile.
14345 \end_layout
14346
14347 \begin_layout Subsection
14348 Drawbacks
14349 \end_layout
14350
14351 \begin_layout Standard
14352 The main problem with this layout is that you can't use the optional arguments
14353  to layouts like Email and Title.
14354  (The problem is not unique to this layout; you can't use optional arguments
14355  to the Section layouts either.) This means that after you export that file
14356  to LaTeX (which you'll need to do eventually to send it in to APS), you'll
14357  need to edit the LaTeX file with a text editor to add the optional arguments
14358  to set, e.
14359 \begin_inset space \thinspace{}
14360 \end_inset
14361
14362 g.
14363 \begin_inset space \space{}
14364 \end_inset
14365
14366 the running title for the page headers.
14367  Lacking these layouts makes the 
14368 \family typewriter
14369
14370 \backslash
14371 altaffiliation
14372 \family default
14373  (and the equivalent 
14374 \family typewriter
14375
14376 \backslash
14377 altaddress
14378 \family default
14379 ) useless, so the corresponding layouts don't exist, and will have to be
14380  added by hand.
14381 \begin_inset Foot
14382 status collapsed
14383
14384 \begin_layout Plain Layout
14385
14386 \emph on
14387 Note from JMarc:
14388 \emph default
14389  actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
14390  has not been updated yet to take advantage of it.
14391 \end_layout
14392
14393 \end_inset
14394
14395  
14396 \end_layout
14397
14398 \begin_layout Section
14399 Springer Journals (
14400 \family sans
14401 svjour
14402 \family default
14403 )
14404 \end_layout
14405
14406 \begin_layout Standard
14407 by 
14408 \noun on
14409 Martin Vermeer
14410 \end_layout
14411
14412 \begin_layout Subsection
14413 Description
14414 \end_layout
14415
14416 \begin_layout Standard
14417 These are the layout files for some of the journal formats used by Springer
14418  Verlag and listed on 
14419 \begin_inset Flex URL
14420 status collapsed
14421
14422 \begin_layout Plain Layout
14423
14424 http://www.springer.de/author/tex/help-journals.html
14425 \end_layout
14426
14427 \end_inset
14428
14429 , where you should also go to fetch the class files (yes, these are LaTeX2e
14430  now!).
14431  It is a modular system: the things common to all journals are implemented
14432  in 
14433 \family typewriter
14434 svjour.inc
14435 \family default
14436 , which journal-specific layout files (such as, e.
14437 \begin_inset space \thinspace{}
14438 \end_inset
14439
14440 g.
14441 \begin_inset space \space{}
14442 \end_inset
14443
14444
14445 \family typewriter
14446 svjog.layout
14447 \family default
14448  for Journal of Geodesy) can include.
14449 \end_layout
14450
14451 \begin_layout Standard
14452 This means that implementing support for any other Springer journal on this
14453  list is as simple as writing your own 
14454 \family typewriter
14455 sv
14456 \family default
14457 <myjournal>
14458 \family typewriter
14459 .layout
14460 \family default
14461  file following the outline given in 
14462 \family typewriter
14463 svjog.layout
14464 \family default
14465 .
14466  
14467 \end_layout
14468
14469 \begin_layout Standard
14470 It is reasonably well tested only for the Journal of Geodesy.
14471  
14472 \family typewriter
14473 svjour
14474 \family default
14475  and 
14476 \family typewriter
14477 svjog
14478 \family default
14479  come with the standard LyX distribution.
14480  Install the relevant class file (downloaded from Springer) in a proper
14481  directory, reconfigure LaTeX (in the teTeX case by running 
14482 \family typewriter
14483 texhash
14484 \family default
14485 , as root if necessary â€” doesn't LyX take care of this?), reconfigure LyX
14486  and it should work.
14487 \end_layout
14488
14489 \begin_layout Subsection
14490 New styles
14491 \end_layout
14492
14493 \begin_layout Standard
14494 A large number of theorem-like styles â€” 
14495 \family sans
14496 Claim, Conjecture,
14497 \family default
14498  
14499 \family sans
14500 \SpecialChar \ldots{}
14501 Theorem
14502 \family default
14503 .
14504 \end_layout
14505
14506 \begin_layout Standard
14507
14508 \family sans
14509 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
14510  Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
14511 \family default
14512 .
14513  See the Springer class file documentation for details.
14514 \end_layout
14515
14516 \begin_layout Subsection
14517 Supported journals
14518 \end_layout
14519
14520 \begin_layout Itemize
14521
14522 \emph on
14523 Journal of Geodesy
14524 \emph default
14525
14526 \family typewriter
14527 svjog.layout
14528 \family default
14529  â€” Martin Vermeer
14530 \end_layout
14531
14532 \begin_layout Itemize
14533
14534 \emph on
14535 Probability Theory and Related Fields
14536 \emph default
14537
14538 \family typewriter
14539 svprobth.layout
14540 \family default
14541  â€” Jean-Marc Lasgouttes
14542 \end_layout
14543
14544 \begin_layout Standard
14545 Add your own, it isn't so hard!
14546 \end_layout
14547
14548 \begin_layout Subsection
14549 Credits
14550 \end_layout
14551
14552 \begin_layout Standard
14553 These files are partly based on the older 
14554 \family typewriter
14555 ejour2.layout
14556 \family default
14557 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
14558  file from Springer.
14559  All this, and the 
14560 \family typewriter
14561 ejour2
14562 \family default
14563  layout, are now defunct.
14564  Jean-Marc Lasgouttes helped out big in making me find my way around the
14565  LyX layout file mechanism.
14566 \end_layout
14567
14568 \begin_layout Subsection
14569 Bugs
14570 \end_layout
14571
14572 \begin_layout Standard
14573 Probably.
14574  But probably less than in the old hacked-LaTeX 
14575 \family typewriter
14576 ejour2
14577 \family default
14578 .
14579 \end_layout
14580
14581 \begin_layout Standard
14582 Limitations e.
14583 \begin_inset space \thinspace{}
14584 \end_inset
14585
14586 g.: does not display the number for theorem-like layouts, just #.
14587 \end_layout
14588
14589 \begin_layout Section
14590 Slides [aka 
14591 \noun on
14592 SliTeX
14593 \noun default
14594 ]
14595 \begin_inset CommandInset label
14596 LatexCommand label
14597 name "sec:slitex"
14598
14599 \end_inset
14600
14601
14602 \end_layout
14603
14604 \begin_layout Standard
14605 by 
14606 \noun on
14607 John Weiss
14608 \noun default
14609  
14610 \end_layout
14611
14612 \begin_layout Subsection
14613 Introduction
14614 \end_layout
14615
14616 \begin_layout Standard
14617 This section describes how to use LyX to make slides for overhead projectors.
14618  There are two document classes that can do this: the default slides class
14619  and the 
14620 \family sans
14621 FoilTeX
14622 \family default
14623  slides class.
14624  This section documents the former.
14625 \end_layout
14626
14627 \begin_layout Standard
14628 I'm going to say this again, nice and clear, so that there's no misunderstanding
14629 :
14630 \end_layout
14631
14632 \begin_layout Standard
14633 \begin_inset VSpace bigskip
14634 \end_inset
14635
14636
14637 \end_layout
14638
14639 \begin_layout Standard
14640 \align center
14641
14642 \size large
14643 This section documents the class 
14644 \begin_inset Quotes eld
14645 \end_inset
14646
14647
14648 \family sans
14649 slides (default)
14650 \family default
14651
14652 \begin_inset Quotes erd
14653 \end_inset
14654
14655  
14656 \emph on
14657 only.
14658 \end_layout
14659
14660 \begin_layout Standard
14661 \begin_inset VSpace bigskip
14662 \end_inset
14663
14664
14665 \end_layout
14666
14667 \begin_layout Standard
14668 If you're looking for the documentation for 
14669 \begin_inset Quotes eld
14670 \end_inset
14671
14672
14673 \family sans
14674 slides (FoilTeX)
14675 \family default
14676
14677 \begin_inset Quotes erd
14678 \end_inset
14679
14680 , check out section
14681 \begin_inset space ~
14682 \end_inset
14683
14684
14685 \begin_inset CommandInset ref
14686 LatexCommand ref
14687 reference "sec:foiltex"
14688
14689 \end_inset
14690
14691 .
14692  The 
14693 \family sans
14694 foils
14695 \family default
14696  class [
14697 \begin_inset Quotes eld
14698 \end_inset
14699
14700
14701 \family sans
14702 slides (FoilTeX)
14703 \family default
14704
14705 \begin_inset Quotes erd
14706 \end_inset
14707
14708 ] is actually somewhat better than the default 
14709 \family sans
14710 slides
14711 \family default
14712  class,
14713 \begin_inset Foot
14714 status collapsed
14715
14716 \begin_layout Plain Layout
14717 \SpecialChar \ldots{}
14718 or so I've been told repeatedly by its advocates.
14719  Having never used it, I have no idea if this claim is true or not.
14720 \end_layout
14721
14722 \end_inset
14723
14724  which this section documents.
14725 \end_layout
14726
14727 \begin_layout Standard
14728 This class is the LaTeX2e improvement of the old 
14729 \noun on
14730 SliTeX
14731 \noun default
14732  package.
14733  Every LaTeX2e distribution includes this class [which I'll just refer to
14734  as 
14735 \begin_inset Quotes eld
14736 \end_inset
14737
14738
14739 \family sans
14740 slides
14741 \family default
14742
14743 \begin_inset Quotes erd
14744 \end_inset
14745
14746  from now on], so you're bound to have it.
14747  As I noted earlier, there are other classes, such as 
14748 \family sans
14749 foils
14750 \family default
14751 , which also produce slides for overhead projectors and do a better job
14752  at it.
14753  However, there are some things which 
14754 \family sans
14755 slides
14756 \family default
14757  can do which the others can't, such as generate overlays.
14758  Read on to learn more!
14759 \end_layout
14760
14761 \begin_layout Subsection
14762 Getting Started
14763 \begin_inset CommandInset label
14764 LatexCommand label
14765 name "sec:slidesetup"
14766
14767 \end_inset
14768
14769
14770 \end_layout
14771
14772 \begin_layout Standard
14773 Obviously, to use this document class, you need to select 
14774 \begin_inset Quotes eld
14775 \end_inset
14776
14777
14778 \family sans
14779 slides (default)
14780 \family default
14781
14782 \begin_inset Quotes erd
14783 \end_inset
14784
14785  from the class list in the 
14786 \family sans
14787 Document\SpecialChar \menuseparator
14788 Settings
14789 \family default
14790  dialog.
14791  There are some other special things you should know about this class:
14792 \end_layout
14793
14794 \begin_layout Itemize
14795 Don't bother changing the options 
14796 \family sans
14797 Sides and Columns
14798 \family default
14799 .
14800  They're not supported by the 
14801 \family sans
14802 slides
14803 \family default
14804  class, anyways.
14805 \end_layout
14806
14807 \begin_layout Itemize
14808 The option 
14809 \family sans
14810 Page
14811 \begin_inset space ~
14812 \end_inset
14813
14814 style
14815 \family default
14816  behaves a bit differently for this class.
14817  The possible choices and what they do are as follows:
14818 \end_layout
14819
14820 \begin_deeper
14821 \begin_layout Description
14822
14823 \family sans
14824 plain
14825 \family default
14826  The final output contains page numbers in the lower right corner.
14827 \end_layout
14828
14829 \begin_layout Description
14830
14831 \family sans
14832 headings
14833 \family default
14834  Like 
14835 \family sans
14836 plain
14837 \family default
14838 , but also prints out any time markers you've put in.
14839  This is the default.
14840 \end_layout
14841
14842 \begin_layout Description
14843
14844 \family sans
14845 empty
14846 \family default
14847  The final output contains no page numbers, time markers, or alignment markers.
14848 \end_layout
14849
14850 \end_deeper
14851 \begin_layout Itemize
14852 The 
14853 \family sans
14854 slides
14855 \family default
14856  class has an extra option: 
14857 \family typewriter
14858 clock
14859 \family default
14860 .
14861  To use it, put 
14862 \begin_inset Quotes eld
14863 \end_inset
14864
14865
14866 \family typewriter
14867 clock
14868 \family default
14869
14870 \begin_inset Quotes erd
14871 \end_inset
14872
14873  in the extra class options.
14874 \end_layout
14875
14876 \begin_deeper
14877 \begin_layout Standard
14878 Using this options allows you to add time markers to 
14879 \family sans
14880 Note
14881 \family default
14882 s.
14883  See section
14884 \begin_inset space ~
14885 \end_inset
14886
14887
14888 \begin_inset CommandInset ref
14889 LatexCommand ref
14890 reference "sec:slideNote"
14891
14892 \end_inset
14893
14894  for more details.
14895 \end_layout
14896
14897 \end_deeper
14898 \begin_layout Standard
14899 You can also use the template file 
14900 \begin_inset Quotes eld
14901 \end_inset
14902
14903
14904 \family typewriter
14905 slides.lyx
14906 \family default
14907
14908 \begin_inset Quotes erd
14909 \end_inset
14910
14911  to automatically set up a document to use the 
14912 \family sans
14913 slides
14914 \family default
14915  class [using 
14916 \family sans
14917 File\SpecialChar \menuseparator
14918 New
14919 \begin_inset space ~
14920 \end_inset
14921
14922 from
14923 \begin_inset space ~
14924 \end_inset
14925
14926 Template
14927 \family default
14928  to open your new document].
14929  The template file also contains some examples of the special paragraph
14930  environments used by this class.
14931  I'll describe those next.
14932 \end_layout
14933
14934 \begin_layout Subsection
14935 Paragraph Environments
14936 \end_layout
14937
14938 \begin_layout Subsubsection
14939 Supported Environments
14940 \end_layout
14941
14942 \begin_layout Standard
14943 The first thing you'll notice when you start up a new 
14944 \family sans
14945 slides
14946 \family default
14947  document is the font size and type: it's the equivalent of the size 
14948 \begin_inset Quotes eld
14949 \end_inset
14950
14951
14952 \family sans
14953 Largest
14954 \family default
14955
14956 \begin_inset Quotes erd
14957 \end_inset
14958
14959  in the 
14960 \family sans
14961 Sans
14962 \begin_inset space ~
14963 \end_inset
14964
14965 Serif
14966 \family default
14967  font.
14968  This is also what's used in the output.
14969  Think of this as a 
14970 \begin_inset Quotes eld
14971 \end_inset
14972
14973 visual cue
14974 \begin_inset Quotes erd
14975 \end_inset
14976
14977  to remind you that this is a slide.
14978  Your final slides will use a larger font; ergo, you'll have less space.
14979  Of course, the larger default screen font isn't WYSIWYG, only a reminder.
14980 \end_layout
14981
14982 \begin_layout Standard
14983 The next thing that becomes obvious is the changes to the paragraph environment
14984  pull-down box [at the far-left end of the toolbar].
14985  Most of the paragraph environments you're used to seeing are missing.
14986  There are also five new ones.
14987  That's because the 
14988 \family sans
14989 slides
14990 \family default
14991  class itself only supports certain paragraph environments:
14992 \end_layout
14993
14994 \begin_layout Itemize
14995
14996 \family sans
14997 Standard
14998 \end_layout
14999
15000 \begin_layout Itemize
15001
15002 \family sans
15003 Itemize
15004 \end_layout
15005
15006 \begin_layout Itemize
15007
15008 \family sans
15009 Enumerate
15010 \end_layout
15011
15012 \begin_layout Itemize
15013
15014 \family sans
15015 Description
15016 \end_layout
15017
15018 \begin_layout Itemize
15019
15020 \family sans
15021 List
15022 \end_layout
15023
15024 \begin_layout Itemize
15025
15026 \family sans
15027 Quotation
15028 \end_layout
15029
15030 \begin_layout Itemize
15031
15032 \family sans
15033 Quote
15034 \end_layout
15035
15036 \begin_layout Itemize
15037
15038 \family sans
15039 Verse
15040 \end_layout
15041
15042 \begin_layout Itemize
15043
15044 \family sans
15045 Caption
15046 \end_layout
15047
15048 \begin_layout Itemize
15049
15050 \family sans
15051 LyX-Code
15052 \end_layout
15053
15054 \begin_layout Itemize
15055
15056 \family sans
15057 Comment
15058 \end_layout
15059
15060 \begin_layout Standard
15061 All of the other standard environments, including the section-heading environmen
15062 ts, aren't used in the 
15063 \family sans
15064 slides
15065 \family default
15066  class.
15067 \end_layout
15068
15069 \begin_layout Standard
15070 On the other hand, you'll notice the following new environments:
15071 \end_layout
15072
15073 \begin_layout Itemize
15074
15075 \family sans
15076 Slide
15077 \end_layout
15078
15079 \begin_layout Itemize
15080
15081 \family sans
15082 Overlay
15083 \end_layout
15084
15085 \begin_layout Itemize
15086
15087 \family sans
15088 Note
15089 \end_layout
15090
15091 \begin_layout Itemize
15092
15093 \family sans
15094 InvisibleText
15095 \end_layout
15096
15097 \begin_layout Itemize
15098
15099 \family sans
15100 VisibleText
15101 \end_layout
15102
15103 \begin_layout Standard
15104 These five are kind of quirky, due to a 
15105 \begin_inset Quotes eld
15106 \end_inset
15107
15108 feature
15109 \begin_inset Quotes erd
15110 \end_inset
15111
15112  in LyX.
15113  You see, LyX doesn't permit you to nest any other paragraph environment
15114  into an empty environment.
15115  Now, that's fine and dandy, but it means that you wouldn't be able to start
15116  a slide with anything except plain text.
15117  To deal with this, I've performed a little 
15118 \begin_inset Quotes eld
15119 \end_inset
15120
15121 LaTeX magic.
15122 \begin_inset Quotes erd
15123 \end_inset
15124
15125  
15126 \end_layout
15127
15128 \begin_layout Subsubsection
15129 Quirks of the New Environments
15130 \begin_inset CommandInset label
15131 LatexCommand label
15132 name "sec:slideQuirk"
15133
15134 \end_inset
15135
15136
15137 \end_layout
15138
15139 \begin_layout Standard
15140 All five of the new paragraph environments are somewhat quirky due to inherent
15141  limitiations in the current version of LyX.
15142  As I just mentioned, LyX forbids environments that begin with another environme
15143 nt.
15144  To get around this, the 
15145 \family sans
15146 Slide
15147 \family default
15148  environment isn't a paragraph environment as described in the 
15149 \emph on
15150 User's Guide
15151 \emph default
15152 .
15153  
15154 \end_layout
15155
15156 \begin_layout Standard
15157 You should consider 
15158 \family sans
15159 Slide
15160 \family default
15161
15162 \family sans
15163 Overlay
15164 \family default
15165 , and 
15166 \family sans
15167 Note
15168 \family default
15169  to be 
15170 \begin_inset Quotes eld
15171 \end_inset
15172
15173 pseudo-environments.
15174 \begin_inset Quotes erd
15175 \end_inset
15176
15177  They look like a section heading or a 
15178 \begin_inset Quotes eld
15179 \end_inset
15180
15181
15182 \family sans
15183 Caption
15184 \family default
15185 ,
15186 \begin_inset Quotes erd
15187 \end_inset
15188
15189  but really begin a [and, if necessary, end the previous] paragraph environment.
15190  Likewise, treat 
15191 \family sans
15192 InvisibleText
15193 \family default
15194  and 
15195 \family sans
15196 VisibleText
15197 \family default
15198  as 
15199 \begin_inset Quotes eld
15200 \end_inset
15201
15202 pseudo-commands.
15203 \begin_inset Quotes erd
15204 \end_inset
15205
15206  These two perform some action.
15207 \end_layout
15208
15209 \begin_layout Standard
15210 A common feature of all five environments, 
15211 \family sans
15212 Slide
15213 \family default
15214
15215 \family sans
15216 Overlay
15217 \family default
15218
15219 \family sans
15220 Note
15221 \family default
15222
15223 \family sans
15224 InvisibleText
15225 \family default
15226  and 
15227 \family sans
15228 VisibleText
15229 \family default
15230 , is a rather long-ish label.
15231  The text following this label â€” ordinarily the contents of the paragraph
15232  environment â€” is utterly irrelevant for 
15233 \family sans
15234 Slide
15235 \family default
15236
15237 \family sans
15238 Overlay
15239 \family default
15240
15241 \family sans
15242 Note
15243 \family default
15244
15245 \family sans
15246 InvisibleText
15247 \family default
15248  and 
15249 \family sans
15250 VisibleText
15251 \family default
15252 .
15253  LyX completely ignores it.
15254  In fact, you can leave these five environments completely empty.
15255  
15256 \end_layout
15257
15258 \begin_layout Standard
15259 While you don't 
15260 \emph on
15261 have
15262 \emph default
15263  to put any text after the rather long-ish label, you might want to.
15264  This could be a short description of the contents of the 
15265 \family sans
15266 Slide
15267 \family default
15268 , for example.
15269  In that case, enter in your descriptive comment and hit 
15270 \family sans
15271 Return
15272 \family default
15273  as you normally would.
15274 \end_layout
15275
15276 \begin_layout Standard
15277 If, on the other hand, you don't want to enter in any descriptive text,
15278  you'll hit another LyX quirk.
15279  LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
15280  environment until you put something in the old one.
15281  So, do this:
15282 \end_layout
15283
15284 \begin_layout Itemize
15285 Start entering the text that will 
15286 \emph on
15287 follow
15288 \emph default
15289  the new 
15290 \family sans
15291 Slide
15292 \family default
15293
15294 \family sans
15295 Overlay
15296 \family default
15297
15298 \family sans
15299 Note
15300 \family default
15301
15302 \family sans
15303 InvisibleText
15304 \family default
15305  or 
15306 \family sans
15307 VisibleText
15308 \family default
15309 .
15310  
15311 \end_layout
15312
15313 \begin_layout Itemize
15314 Now move to the beginning of that paragraph.
15315  
15316 \end_layout
15317
15318 \begin_layout Itemize
15319 Next, hit 
15320 \family sans
15321 Return
15322 \family default
15323 .
15324  
15325 \end_layout
15326
15327 \begin_layout Itemize
15328 Finally, change this new, empty paragraph to a 
15329 \family sans
15330 Slide
15331 \family default
15332
15333 \family sans
15334 Overlay
15335 \family default
15336
15337 \family sans
15338 Note
15339 \family default
15340
15341 \family sans
15342 InvisibleText
15343 \family default
15344  or 
15345 \family sans
15346 VisibleText
15347 \family default
15348 .
15349  
15350 \end_layout
15351
15352 \begin_layout Standard
15353 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
15354
15355 \end_layout
15356
15357 \begin_layout Subsection
15358 Making a Presentation with 
15359 \family sans
15360 Slide
15361 \family default
15362
15363 \family sans
15364 Overlay
15365 \family default
15366  and 
15367 \family sans
15368 Note
15369 \end_layout
15370
15371 \begin_layout Subsubsection
15372 Using the 
15373 \family sans
15374 Slide
15375 \family default
15376  Environment
15377 \end_layout
15378
15379 \begin_layout Standard
15380 If you're expecting this section to teach you how to actually make a presentatio
15381 n, you'll be sorely disappointed.
15382  Naturally, I'll describe all of the ways the 
15383 \family sans
15384 slides
15385 \family default
15386  class can assist you in preparing the materials for a presentation.
15387  Filling in the contents, however, is up to you.
15388  [Then again, that 
15389 \emph on
15390 is
15391 \emph default
15392  the LyX philosophy.]
15393 \end_layout
15394
15395 \begin_layout Standard
15396 Choosing the 
15397 \family sans
15398 Slide
15399 \family default
15400  environment [in the manner described in section
15401 \begin_inset space ~
15402 \end_inset
15403
15404
15405 \begin_inset CommandInset ref
15406 LatexCommand ref
15407 reference "sec:slideQuirk"
15408
15409 \end_inset
15410
15411 ] tells LyX to begin a new slide [duh].
15412  The label for this environment/
15413 \begin_inset Quotes erd
15414 \end_inset
15415
15416 pseudo-command
15417 \begin_inset Quotes erd
15418 \end_inset
15419
15420  is an 
15421 \begin_inset Quotes eld
15422 \end_inset
15423
15424 ASCII line,
15425 \begin_inset Quotes erd
15426 \end_inset
15427
15428  in cool blue, followed by the label, 
15429 \begin_inset Quotes eld
15430 \end_inset
15431
15432 NewSlide:
15433 \begin_inset Quotes erd
15434 \end_inset
15435
15436 .
15437  Any text or paragraph environments that follow this one go on the new slide.
15438  It's that simple.
15439 \end_layout
15440
15441 \begin_layout Standard
15442 Slides are probably the only time you'll need to forcibly end pages in LyX
15443  (this can be specified in the 
15444 \family sans
15445 Paragraph Layout
15446 \family default
15447  dialog).
15448  In fact, you'll want to, once you finish entering the contents of one slide.
15449  If you've entered more text than can physically fit on a slide, the extra
15450  overflows onto a new slide.
15451  I don't recommend doing this, however, since the overflow slide won't have
15452  any page number on it.
15453  Furthermore, it may interfere with any 
15454 \family sans
15455 Overlay
15456 \family default
15457  you've made to accompany the oversized 
15458 \family sans
15459 Slide
15460 \family default
15461 .
15462 \end_layout
15463
15464 \begin_layout Standard
15465 The 
15466 \family sans
15467 Overlay
15468 \family default
15469  and 
15470 \family sans
15471 Note
15472 \family default
15473  environments work the same way as the 
15474 \family sans
15475 Slide
15476 \family default
15477  environment.
15478  They both create an 
15479 \begin_inset Quotes eld
15480 \end_inset
15481
15482 ASCII line
15483 \begin_inset Quotes erd
15484 \end_inset
15485
15486  followed by a label [
15487 \begin_inset Quotes eld
15488 \end_inset
15489
15490 NewOverlay:
15491 \begin_inset Quotes erd
15492 \end_inset
15493
15494  and 
15495 \begin_inset Quotes eld
15496 \end_inset
15497
15498 NewNote:
15499 \begin_inset Quotes erd
15500 \end_inset
15501
15502 , respectively].
15503  The color is a stunning magenta instead of blue, and the 
15504 \begin_inset Quotes eld
15505 \end_inset
15506
15507 ASCII line
15508 \begin_inset Quotes erd
15509 \end_inset
15510
15511  will look different, in style and in length.
15512  The label fonts of all three also differ from one another.
15513 \end_layout
15514
15515 \begin_layout Standard
15516 As with a 
15517 \family sans
15518 Slide
15519 \family default
15520 , if the contents of a 
15521 \family sans
15522 Note
15523 \family default
15524  or 
15525 \family sans
15526 Overlay
15527 \family default
15528  exceed the physical size of a slide or sheet of paper, the extra will overflow
15529  onto a new sheet.
15530  Again, you should avoid this.
15531  It defeats the whole purpose of 
15532 \family sans
15533 Note
15534 \family default
15535 s and 
15536 \family sans
15537 Overlay
15538 \family default
15539 s.
15540 \end_layout
15541
15542 \begin_layout Subsubsection
15543 Using 
15544 \family sans
15545 Overlay
15546 \family default
15547  with 
15548 \family sans
15549 Slide
15550 \end_layout
15551
15552 \begin_layout Standard
15553 The idea behind an 
15554 \family sans
15555 Overlay
15556 \family default
15557  is a slide that sits atop another slide.
15558  Perhaps you wish to discuss a figure on the main 
15559 \family sans
15560 Slide
15561 \family default
15562  before displaying the text associated with it.
15563  One way to accomplish this is tape a flap of dark paper over the part of
15564  the 
15565 \family sans
15566 Slide
15567 \family default
15568  you want to display later.
15569  This method fails, however, if you wish to overlap one graph with another,
15570  for example.
15571  You would then have to fumble while speaking to align the two separate,
15572  overlapping 
15573 \family sans
15574 Slide
15575 \family default
15576 s to align the two graphs.
15577  The use of an 
15578 \family sans
15579 Overlay
15580 \family default
15581  environment in both cases makes life much easier.
15582 \end_layout
15583
15584 \begin_layout Standard
15585 Each 
15586 \family sans
15587 Overlay
15588 \family default
15589  receives the page number of its 
15590 \begin_inset Quotes eld
15591 \end_inset
15592
15593 parent
15594 \begin_inset Quotes erd
15595 \end_inset
15596
15597  
15598 \family sans
15599 Slide
15600 \family default
15601 , appended by 
15602 \begin_inset Quotes eld
15603 \end_inset
15604
15605
15606 \family typewriter
15607 -a
15608 \family default
15609
15610 \begin_inset Quotes erd
15611 \end_inset
15612
15613 .
15614 \begin_inset Foot
15615 status collapsed
15616
15617 \begin_layout Plain Layout
15618 Presumably, mutliple 
15619 \family sans
15620 Overlay
15621 \family default
15622 s would have 
15623 \begin_inset Quotes eld
15624 \end_inset
15625
15626
15627 \family typewriter
15628 -a
15629 \family default
15630
15631 \begin_inset Quotes erd
15632 \end_inset
15633
15634
15635 \begin_inset Quotes eld
15636 \end_inset
15637
15638
15639 \family typewriter
15640 -b
15641 \family default
15642
15643 \begin_inset Quotes erd
15644 \end_inset
15645
15646
15647 \begin_inset Quotes eld
15648 \end_inset
15649
15650
15651 \family typewriter
15652 -c
15653 \family default
15654
15655 \begin_inset Quotes erd
15656 \end_inset
15657
15658 , etc.
15659 \begin_inset space ~
15660 \end_inset
15661
15662 appended to the page number of the parent 
15663 \family sans
15664 Slide
15665 \family default
15666 .
15667  
15668 \end_layout
15669
15670 \end_inset
15671
15672  Clearly, you want the contents of both the 
15673 \family sans
15674 Slide
15675 \family default
15676  and the 
15677 \family sans
15678 Overlay
15679 \family default
15680  to each fit on a single physical slide! You should probably consider an
15681  
15682 \family sans
15683 Overlay
15684 \family default
15685  as 
15686 \begin_inset Quotes eld
15687 \end_inset
15688
15689 part of
15690 \begin_inset Quotes erd
15691 \end_inset
15692
15693  a 
15694 \family sans
15695 Slide
15696 \family default
15697 .
15698  Indeed, the LyX 
15699 \family sans
15700 slides
15701 \family default
15702  class provides a visual cue for this: the label at the start of an 
15703 \family sans
15704 Overlay
15705 \family default
15706  is shorter than that at the start of a 
15707 \family sans
15708 Slide
15709 \family default
15710 .
15711  Lastly, when you generate printable output, you'll find alignment markers
15712  in all four corners of both the 
15713 \family sans
15714 Overlay
15715 \family default
15716  page and its parent 
15717 \family sans
15718 Slide
15719 \family default
15720 .
15721  These will assist you in lining up the two physical slides.
15722 \end_layout
15723
15724 \begin_layout Standard
15725 The major problem in overlaying two slides is aligning the contents of the
15726  two transparencies.
15727  How much space should you leave for that graph on the second slide? Worse
15728  still, what if you want a graph and a sentence on second slide, but there
15729  is text on the main transparency that goes in between them? You could try
15730  and insert vertical space of the right size.
15731  The better way is to use 
15732 \family sans
15733 InvisibleText
15734 \family default
15735  and 
15736 \family sans
15737 VisibleText
15738 \family default
15739 .
15740 \end_layout
15741
15742 \begin_layout Standard
15743 As their names imply, 
15744 \family sans
15745 InvisibleText
15746 \family default
15747  and 
15748 \family sans
15749 VisibleText
15750 \family default
15751  are two command-like paragraph environments that make all subsequent text
15752  invisible and visible, respectively.
15753  Note from section
15754 \begin_inset space ~
15755 \end_inset
15756
15757
15758 \begin_inset CommandInset ref
15759 LatexCommand ref
15760 reference "sec:slideQuirk"
15761
15762 \end_inset
15763
15764  that you don't place anything 
15765 \emph on
15766 into
15767 \emph default
15768  these two environments, however.
15769  When you create an 
15770 \family sans
15771 InvisibleText
15772 \family default
15773 , it inserts a centered, sky-blue label into the page reading 
15774 \begin_inset Quotes eld
15775 \end_inset
15776
15777 <Invisible Text Follows>
15778 \begin_inset Quotes erd
15779 \end_inset
15780
15781 .
15782  For paragraphs following this label, the parts of the 
15783 \family sans
15784 Slide
15785 \family default
15786  [or 
15787 \family sans
15788 Overlay
15789 \family default
15790 ; it doesn't matter which] where they would be contain instead blank space.
15791  
15792 \end_layout
15793
15794 \begin_layout Standard
15795 For 
15796 \family sans
15797 VisibleText
15798 \family default
15799 , the corresponding centered label is 
15800 \begin_inset Quotes eld
15801 \end_inset
15802
15803 <Visible Text Follows>
15804 \begin_inset Quotes erd
15805 \end_inset
15806
15807  in blazing green.
15808  Paragraphs following this label behave normally.
15809  Note that the beginning of a new 
15810 \family sans
15811 Slide
15812 \family default
15813
15814 \family sans
15815 Overlay
15816 \family default
15817 , or 
15818 \family sans
15819 Note
15820 \family default
15821  automatically shuts off an 
15822 \family sans
15823 InvisibleText
15824 \family default
15825 .
15826  It's therefore not necessary to use 
15827 \family sans
15828 VisibleText
15829 \family default
15830  at the end of a 
15831 \family sans
15832 Slide
15833 \family default
15834 .
15835 \end_layout
15836
15837 \begin_layout Standard
15838 By now, it should be obvious how to create overlay transparencies using
15839  the proper combination of 
15840 \family sans
15841 InvisibleText
15842 \family default
15843  and 
15844 \family sans
15845 VisibleText
15846 \family default
15847  on a 
15848 \family sans
15849 Slide
15850 \family default
15851  and 
15852 \family sans
15853 Overlay
15854 \family default
15855 :
15856 \end_layout
15857
15858 \begin_layout Enumerate
15859 Create a 
15860 \family sans
15861 Slide
15862 \family default
15863 , including everything that will appear on it, whether on the main slide
15864  or on the 
15865 \family sans
15866 Overlay
15867 \family default
15868 .
15869 \end_layout
15870
15871 \begin_layout Enumerate
15872 Before each figure or paragraph that will appear only on the 
15873 \family sans
15874 Overlay
15875 \family default
15876 , insert an 
15877 \family sans
15878 InvisibleText
15879 \family default
15880  environment.
15881  If necessary, insert a 
15882 \family sans
15883 VisibleText
15884 \family default
15885  environment after the 
15886 \family sans
15887 Overlay
15888 \family default
15889 -only text.
15890 \end_layout
15891
15892 \begin_layout Enumerate
15893 Start an 
15894 \family sans
15895 Overlay
15896 \family default
15897  immediately following the 
15898 \family sans
15899 Slide
15900 \family default
15901 .
15902 \end_layout
15903
15904 \begin_layout Enumerate
15905 Copy the contents of this 
15906 \family sans
15907 Slide
15908 \family default
15909  into the 
15910 \family sans
15911 Overlay
15912 \family default
15913 .
15914 \end_layout
15915
15916 \begin_layout Enumerate
15917 Within the 
15918 \family sans
15919 Overlay
15920 \family default
15921 , change all of the 
15922 \family sans
15923 InvisibleText
15924 \family default
15925  lines to 
15926 \family sans
15927 VisibleText
15928 \family default
15929  and vice-versa.
15930 \end_layout
15931
15932 \begin_layout Standard
15933 That's it.
15934  You've just made an 
15935 \family sans
15936 Overlay
15937 \family default
15938 .
15939 \end_layout
15940
15941 \begin_layout Standard
15942 There's one problem with the way I've designed the LyX 
15943 \family sans
15944 slides
15945 \family default
15946  class: you can't make text in the middle of a paragraph invisible, nor
15947  make text in the middle of an invisible paragraph visible again.
15948  To accomplish this feat, you'll need to use some inlined LaTeX codes.
15949 \begin_inset Foot
15950 status collapsed
15951
15952 \begin_layout Plain Layout
15953 The commands of interest are: 
15954 \end_layout
15955
15956 \begin_layout Itemize
15957
15958 \family typewriter
15959 {
15960 \backslash
15961 invisible \SpecialChar \ldots{}
15962  }
15963 \end_layout
15964
15965 \begin_layout Itemize
15966
15967 \family typewriter
15968 {
15969 \backslash
15970 visible \SpecialChar \ldots{}
15971  }
15972 \end_layout
15973
15974 \begin_layout Plain Layout
15975 \SpecialChar \ldots{}
15976 and need to be marked as TeX.
15977  The text whose 
15978 \begin_inset Quotes eld
15979 \end_inset
15980
15981 visibility
15982 \begin_inset Quotes erd
15983 \end_inset
15984
15985  you wish to change goes in between the brackets [and after the 
15986 \family typewriter
15987
15988 \backslash
15989 invisible
15990 \family default
15991  or 
15992 \family typewriter
15993
15994 \backslash
15995 visible
15996 \family default
15997  command].
15998  If you don't know how to mark text as TeX, see the appropriate section
15999  of the 
16000 \emph on
16001 User's Guide
16002 \emph default
16003 .
16004 \end_layout
16005
16006 \end_inset
16007
16008
16009 \end_layout
16010
16011 \begin_layout Subsubsection
16012 Using 
16013 \family sans
16014 Note
16015 \family default
16016  with 
16017 \family sans
16018 Slide
16019 \family default
16020
16021 \begin_inset CommandInset label
16022 LatexCommand label
16023 name "sec:slideNote"
16024
16025 \end_inset
16026
16027
16028 \end_layout
16029
16030 \begin_layout Standard
16031 Like an 
16032 \family sans
16033 Overlay
16034 \family default
16035 , a 
16036 \family sans
16037 Note
16038 \family default
16039  is associated with a 
16040 \begin_inset Quotes eld
16041 \end_inset
16042
16043 parent
16044 \begin_inset Quotes erd
16045 \end_inset
16046
16047  
16048 \family sans
16049 Slide
16050 \family default
16051 .
16052  Here, too, the LyX 
16053 \family sans
16054 slides
16055 \family default
16056  class provides visual cues.
16057  The label for a 
16058 \family sans
16059 Note
16060 \family default
16061  is shorter than that of a 
16062 \family sans
16063 Slide
16064 \family default
16065  [yet longer than that of an 
16066 \family sans
16067 Overlay
16068 \family default
16069 ] and, like the label of an 
16070 \family sans
16071 Overlay
16072 \family default
16073  is shockingly magenta.
16074  Additionally, the printed 
16075 \family sans
16076 Note
16077 \family default
16078  has the page number of its 
16079 \begin_inset Quotes eld
16080 \end_inset
16081
16082 parent
16083 \begin_inset Quotes erd
16084 \end_inset
16085
16086  
16087 \family sans
16088 Slide
16089 \family default
16090 , appended by 
16091 \begin_inset Quotes eld
16092 \end_inset
16093
16094
16095 \family typewriter
16096 -
16097 \family default
16098 1
16099 \begin_inset Quotes erd
16100 \end_inset
16101
16102
16103 \begin_inset Quotes eld
16104 \end_inset
16105
16106
16107 \family typewriter
16108 -
16109 \family default
16110 2
16111 \begin_inset Quotes erd
16112 \end_inset
16113
16114
16115 \begin_inset Quotes eld
16116 \end_inset
16117
16118
16119 \family typewriter
16120 -
16121 \family default
16122 3
16123 \begin_inset Quotes erd
16124 \end_inset
16125
16126 , etc.
16127  You can have multiple 
16128 \family sans
16129 Note
16130 \family default
16131 s associated with a single 
16132 \family sans
16133 Slide
16134 \family default
16135 , and, as with 
16136 \family sans
16137 Slide
16138 \family default
16139  and 
16140 \family sans
16141 Overlay
16142 \family default
16143 , you'll probably want to break up long 
16144 \family sans
16145 Note
16146 \family default
16147 s so that they fit on a single sheet of paper.
16148 \end_layout
16149
16150 \begin_layout Standard
16151 The purpose of a 
16152 \family sans
16153 Note
16154 \family default
16155  is obvious: it contains anything additional you might want to say about
16156  a 
16157 \family sans
16158 Slide
16159 \family default
16160 .
16161  It could also be used as a sheet of reminders for a particular 
16162 \family sans
16163 Slide
16164 \family default
16165 .
16166  In the case of the latter, you might want to make use of time markers.
16167  Currently, the LyX 
16168 \family sans
16169 slides
16170 \family default
16171  class has no 
16172 \begin_inset Quotes eld
16173 \end_inset
16174
16175 native
16176 \begin_inset Quotes erd
16177 \end_inset
16178
16179  support for time markers, a 
16180 \noun on
16181 SliTeX
16182 \noun default
16183  feature.
16184  So, you'll have to resort to using the LaTeX codes.
16185 \end_layout
16186
16187 \begin_layout Standard
16188 To use time markers, you'll need to specify the extra class option 
16189 \begin_inset Quotes eld
16190 \end_inset
16191
16192
16193 \family typewriter
16194 clock
16195 \family default
16196
16197 \begin_inset Quotes erd
16198 \end_inset
16199
16200  [see section
16201 \begin_inset space ~
16202 \end_inset
16203
16204
16205 \begin_inset CommandInset ref
16206 LatexCommand ref
16207 reference "sec:slidesetup"
16208
16209 \end_inset
16210
16211 ].
16212  This option turns on timing marks, which will appear in the lower-left-hand
16213  corner of every 
16214 \family sans
16215 Note
16216 \family default
16217  you generate.
16218  To set what appears in the time marker, you use the LaTeX commands 
16219 \begin_inset Quotes eld
16220 \end_inset
16221
16222
16223 \family typewriter
16224
16225 \backslash
16226 settime{}
16227 \family default
16228
16229 \begin_inset Quotes erd
16230 \end_inset
16231
16232  and 
16233 \begin_inset Quotes eld
16234 \end_inset
16235
16236
16237 \family typewriter
16238
16239 \backslash
16240 addtime{}
16241 \family default
16242
16243 \begin_inset Quotes erd
16244 \end_inset
16245
16246 .
16247  The arguments of both commands are time measured in seconds.
16248  
16249 \begin_inset Quotes eld
16250 \end_inset
16251
16252
16253 \family typewriter
16254
16255 \backslash
16256 settime{}
16257 \family default
16258
16259 \begin_inset Quotes erd
16260 \end_inset
16261
16262  sets the time marker to a given time.
16263  
16264 \begin_inset Quotes eld
16265 \end_inset
16266
16267
16268 \family typewriter
16269
16270 \backslash
16271 addtime{}
16272 \family default
16273
16274 \begin_inset Quotes erd
16275 \end_inset
16276
16277  increments the time marker by the specified amount.
16278  Using time markers and 
16279 \family sans
16280 Note
16281 \family default
16282 s in this fashion, you can remind yourself how much time to spend on a particula
16283
16284 \family sans
16285 Slide
16286 \family default
16287 .
16288 \end_layout
16289
16290 \begin_layout Standard
16291 There's one last feature to describe.
16292  Clearly, you'd like to print out all of your 
16293 \family sans
16294 Slide
16295 \family default
16296 s and 
16297 \family sans
16298 Overlay
16299 \family default
16300 s on transparencies while printing all of your 
16301 \family sans
16302 Note
16303 \family default
16304 s on plain paper.
16305  However, a 
16306 \family sans
16307 Note
16308 \family default
16309  
16310 \emph on
16311 must
16312 \emph default
16313  follow the 
16314 \family sans
16315 Slide
16316 \family default
16317  with which it is associated.
16318  What's a person to do?
16319 \end_layout
16320
16321 \begin_layout Standard
16322 Luckily, there are two LaTeX commands that allow you to select what to print
16323  out.
16324  Both must be placed into the preamble of your document.
16325  The command 
16326 \begin_inset Quotes eld
16327 \end_inset
16328
16329
16330 \family typewriter
16331
16332 \backslash
16333 onlyslides{
16334 \backslash
16335 slides}
16336 \family default
16337
16338 \begin_inset Quotes erd
16339 \end_inset
16340
16341  will cause the output to contain only the 
16342 \family sans
16343 Slide
16344 \family default
16345 s and 
16346 \family sans
16347 Overlay
16348 \family default
16349 s.
16350  Correspondingly, the command 
16351 \begin_inset Quotes eld
16352 \end_inset
16353
16354
16355 \family typewriter
16356
16357 \backslash
16358 onlynotes{
16359 \backslash
16360 notes}
16361 \family default
16362
16363 \begin_inset Quotes erd
16364 \end_inset
16365
16366  prevents the output of anything but 
16367 \family sans
16368 Note
16369 \family default
16370 s.
16371  I'd advise placing both commands in the preamble and initially comment
16372  both out.
16373  You can then preview your entire presentation as you write.
16374  When you're done writing, you can then uncomment one of the two to select
16375  what you want to print.
16376  I like to uncomment 
16377 \begin_inset Quotes eld
16378 \end_inset
16379
16380
16381 \family typewriter
16382
16383 \backslash
16384 onlyslides{
16385 \backslash
16386 slides}
16387 \family default
16388
16389 \begin_inset Quotes erd
16390 \end_inset
16391
16392  , print to a file with 
16393 \begin_inset Quotes eld
16394 \end_inset
16395
16396
16397 \family typewriter
16398 -slides
16399 \family default
16400
16401 \begin_inset Quotes erd
16402 \end_inset
16403
16404  in its name, comment it back out, then uncomment 
16405 \begin_inset Quotes eld
16406 \end_inset
16407
16408
16409 \family typewriter
16410
16411 \backslash
16412 onlynotes{
16413 \backslash
16414 notes}
16415 \family default
16416
16417 \begin_inset Quotes erd
16418 \end_inset
16419
16420  and print to a 
16421 \begin_inset Quotes eld
16422 \end_inset
16423
16424
16425 \family typewriter
16426 *-notes.ps
16427 \family default
16428
16429 \begin_inset Quotes erd
16430 \end_inset
16431
16432  file.
16433  I can then send either file to a printer, loading transparencies or plain
16434  paper as appropriate.
16435 \end_layout
16436
16437 \begin_layout Standard
16438 You can also provide other arguments to the 
16439 \begin_inset Quotes eld
16440 \end_inset
16441
16442
16443 \family typewriter
16444
16445 \backslash
16446 onlyslides{}
16447 \family default
16448
16449 \begin_inset Quotes erd
16450 \end_inset
16451
16452  and 
16453 \begin_inset Quotes eld
16454 \end_inset
16455
16456
16457 \family typewriter
16458
16459 \backslash
16460 onlynotes{}
16461 \family default
16462
16463 \begin_inset Quotes erd
16464 \end_inset
16465
16466  commands.
16467  See a good LaTeX book for details.
16468 \end_layout
16469
16470 \begin_layout Subsection
16471 The 
16472 \family sans
16473 slides
16474 \family default
16475  Class Template File
16476 \end_layout
16477
16478 \begin_layout Standard
16479 I have also provided a template file, 
16480 \begin_inset Quotes eld
16481 \end_inset
16482
16483
16484 \family typewriter
16485 slides.lyx
16486 \family default
16487
16488 \begin_inset Quotes erd
16489 \end_inset
16490
16491 , with the 
16492 \family sans
16493 slides
16494 \family default
16495  class.
16496  To use it, begin your new presentation with 
16497 \family sans
16498 \bar under
16499 F
16500 \bar default
16501 ile\SpecialChar \menuseparator
16502 New
16503 \begin_inset space ~
16504 \end_inset
16505
16506 from
16507 \begin_inset space ~
16508 \end_inset
16509
16510
16511 \bar under
16512 T
16513 \bar default
16514 emplate
16515 \family default
16516 .
16517  Your new LyX presentation file will contain an example 
16518 \family sans
16519 Slide
16520 \family default
16521  â€“ 
16522 \family sans
16523 Overlay
16524 \family default
16525  â€“ 
16526 \family sans
16527 Note
16528 \family default
16529  triplet.
16530  The 
16531 \family sans
16532 Slide
16533 \family default
16534  and 
16535 \family sans
16536 Overlay
16537 \family default
16538  additionally contain an example of the use of 
16539 \family sans
16540 InvisibleText
16541 \family default
16542  and 
16543 \family sans
16544 VisibleText
16545 \family default
16546 .
16547  Lastly, the preamble will contain:
16548 \end_layout
16549
16550 \begin_layout LyX-Code
16551 % Uncomment to print out only slides and overlays
16552 \end_layout
16553
16554 \begin_layout LyX-Code
16555 %
16556 \end_layout
16557
16558 \begin_layout LyX-Code
16559 %
16560 \backslash
16561 onlyslides{
16562 \backslash
16563 slides}
16564 \begin_inset Newline newline
16565 \end_inset
16566
16567  
16568 \end_layout
16569
16570 \begin_layout LyX-Code
16571 % Uncomment to print out only notes
16572 \end_layout
16573
16574 \begin_layout LyX-Code
16575 %
16576 \end_layout
16577
16578 \begin_layout LyX-Code
16579 %
16580 \backslash
16581 onlynotes{
16582 \backslash
16583 notes}
16584 \end_layout
16585
16586 \begin_layout Standard
16587 One final thing: I created this class to support the LaTeX2e 
16588 \begin_inset Quotes eld
16589 \end_inset
16590
16591
16592 \noun on
16593 SliTeX
16594 \noun default
16595  emulation
16596 \begin_inset Quotes erd
16597 \end_inset
16598
16599  class, one of the built-in LaTeX2e classes.
16600  Neither I nor the rest of the LyX Team endorse or oppose the use of this
16601  built-in slide class.
16602  It's here if you want it or need it.
16603  There exist other LaTeX2e classes for creating presentations, such as the
16604  
16605 \family sans
16606 Foils
16607 \family default
16608  class [see section
16609 \begin_inset space ~
16610 \end_inset
16611
16612
16613 \begin_inset CommandInset ref
16614 LatexCommand ref
16615 reference "sec:foiltex"
16616
16617 \end_inset
16618
16619 ] or the 
16620 \begin_inset Quotes eld
16621 \end_inset
16622
16623
16624 \family typewriter
16625 seminar
16626 \family default
16627
16628 \begin_inset Quotes erd
16629 \end_inset
16630
16631  package [present on some TeX distributions].
16632  The latter is not yet supported under LyX.
16633 \begin_inset Foot
16634 status collapsed
16635
16636 \begin_layout Plain Layout
16637 Perhaps you can take on the task\SpecialChar \ldots{}
16638
16639 \end_layout
16640
16641 \end_inset
16642
16643  I know nothing about these other classes.
16644  Try them out to see what sort of alternative they provide.
16645 \end_layout
16646
16647 \begin_layout Chapter
16648 LyX Features needing Extra Software
16649 \end_layout
16650
16651 \begin_layout Section
16652 Checking TeX
16653 \end_layout
16654
16655 \begin_layout Standard
16656 by 
16657 \noun on
16658 Asger Alstrup
16659 \end_layout
16660
16661 \begin_layout Subsection
16662 Introduction
16663 \end_layout
16664
16665 \begin_layout Standard
16666 If you have the 
16667 \family typewriter
16668 chktex
16669 \family default
16670  program installed
16671 \begin_inset Foot
16672 status collapsed
16673
16674 \begin_layout Plain Layout
16675
16676 \family typewriter
16677 chktex
16678 \family default
16679  is not yet available when you are using the LaTeX distribution MiKTeX.
16680 \end_layout
16681
16682 \end_inset
16683
16684 , you'll find in the 
16685 \family sans
16686 Tools
16687 \family default
16688  menu the entry: 
16689 \family sans
16690 Check
16691 \begin_inset space ~
16692 \end_inset
16693
16694 TeX
16695 \family default
16696 .
16697  You can get 
16698 \family typewriter
16699 chktex
16700 \family default
16701  it from CTAN, 
16702 \begin_inset CommandInset href
16703 LatexCommand href
16704 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
16705
16706 \end_inset
16707
16708 .
16709 \end_layout
16710
16711 \begin_layout Standard
16712 The 
16713 \family sans
16714 ChkTeX
16715 \family default
16716  package is a program that was written by 
16717 \begin_inset Flex CharStyle:Noun
16718 status collapsed
16719
16720 \begin_layout Plain Layout
16721 Jens T.
16722 \begin_inset space ~
16723 \end_inset
16724
16725 Berger Thielemann
16726 \end_layout
16727
16728 \end_inset
16729
16730  in frustration because some constructs in LaTeX are sometimes non-intuitive,
16731  and easy to forget.
16732  The program runs over your LaTeX file, checks the integrity of the file,
16733  and flags some common errors.
16734  In other technical words, it is 
16735 \family typewriter
16736 lint
16737 \family default
16738  for LaTeX.
16739 \end_layout
16740
16741 \begin_layout Standard
16742 Well, what is a syntax checker doing in LyX which is supposed to produce
16743  correct LaTeX anyways? The answer is simple: Just as 
16744 \family typewriter
16745 Lint
16746 \family default
16747  not only checks the 
16748 \emph on
16749 syntax
16750 \emph default
16751  of C programs, but also does 
16752 \emph on
16753 semantic
16754 \emph default
16755  checks for type-errors, 
16756 \family sans
16757 ChkTeX
16758 \family default
16759  catches some common 
16760 \emph on
16761 typographic
16762 \emph default
16763  errors, in addition to the syntactical ones.
16764  Specifically, 
16765 \family sans
16766 ChkTeX
16767 \family default
16768  is capable of detecting several common errors, such as
16769 \end_layout
16770
16771 \begin_layout Itemize
16772 Ellipsis detection:
16773 \begin_inset Newline newline
16774 \end_inset
16775
16776 Use \SpecialChar \ldots{}
16777  instead of ...
16778 \end_layout
16779
16780 \begin_layout Itemize
16781 No space in front of/after parenthesis:
16782 \begin_inset Newline newline
16783 \end_inset
16784
16785 ( wrong spacing )
16786 \end_layout
16787
16788 \begin_layout Itemize
16789 Enforcement of normal space after common abbreviations:
16790 \begin_inset Newline newline
16791 \end_inset
16792
16793 e.
16794 \begin_inset space \thinspace{}
16795 \end_inset
16796
16797 g.
16798 \begin_inset space \space{}
16799 \end_inset
16800
16801 is too wide spacing.
16802 \end_layout
16803
16804 \begin_layout Itemize
16805 Enforcement of end-of-sentence space when the last sentence ends with a
16806  capital letter:
16807 \begin_inset Newline newline
16808 \end_inset
16809
16810 This is a TEST.
16811  And this is wrong spacing.
16812 \end_layout
16813
16814 \begin_layout Itemize
16815 Space in front of labels and similar commands:
16816 \begin_inset Newline newline
16817 \end_inset
16818
16819 The label should stick right up to the text to avoid falling to a wrong
16820  page.
16821  
16822 \begin_inset CommandInset label
16823 LatexCommand label
16824 name "sec:chktex"
16825
16826 \end_inset
16827
16828  
16829 \begin_inset Foot
16830 status collapsed
16831
16832 \begin_layout Plain Layout
16833 This footnote is in danger of falling off to a wrong page
16834 \end_layout
16835
16836 \end_inset
16837
16838  The label is separated too much.
16839 \end_layout
16840
16841 \begin_layout Itemize
16842 Space in front of references, instead of hard spaces:
16843 \begin_inset Newline newline
16844 \end_inset
16845
16846 In you are in bad luck, the text will break right between the referenced
16847  text and reference number, and that's a pity.
16848  See section 
16849 \begin_inset CommandInset ref
16850 LatexCommand ref
16851 reference "sec:chktex"
16852
16853 \end_inset
16854
16855 .
16856 \end_layout
16857
16858 \begin_layout Itemize
16859 Use of 
16860 \begin_inset Quotes eld
16861 \end_inset
16862
16863 x
16864 \begin_inset Quotes erd
16865 \end_inset
16866
16867  instead of 
16868 \begin_inset Formula $\times$
16869 \end_inset
16870
16871  between numbers:
16872 \begin_inset Newline newline
16873 \end_inset
16874
16875 2x2 looks cheap compared to 
16876 \begin_inset Formula $2\times2$
16877 \end_inset
16878
16879 .
16880 \end_layout
16881
16882 \begin_layout Standard
16883 and more \SpecialChar \ldots{}
16884  It is an invaluable tool when you are 
16885 \begin_inset Quotes eld
16886 \end_inset
16887
16888 finishing up
16889 \begin_inset Quotes erd
16890 \end_inset
16891
16892  your document before printing, and you should run it right after the obligatory
16893  spelling check, and before you go fine tuning the typesetting.
16894 \end_layout
16895
16896 \begin_layout Subsection
16897 How to use it
16898 \end_layout
16899
16900 \begin_layout Standard
16901 If you have the program installed, usage is as simple as choosing 
16902 \family sans
16903 Tools\SpecialChar \menuseparator
16904 Check
16905 \begin_inset space ~
16906 \end_inset
16907
16908 TeX
16909 \family default
16910 .
16911  This will make LyX generate a LaTeX file of your document, start 
16912 \family sans
16913 ChkTeX
16914 \family default
16915  to check it, and then make LyX insert 
16916 \begin_inset Quotes eld
16917 \end_inset
16918
16919 error boxes
16920 \begin_inset Quotes erd
16921 \end_inset
16922
16923  with the warnings from 
16924 \family sans
16925 ChkTeX
16926 \family default
16927 , if there were any.
16928  The warnings will be placed close to the point of the mistake, and you
16929  can quickly find them by using the 
16930 \family sans
16931 Navigate\SpecialChar \menuseparator
16932 Error
16933 \family default
16934  menu item, or the shortcut key 
16935 \family sans
16936 C-g
16937 \family default
16938  from the default 
16939 \family typewriter
16940 cua
16941 \family default
16942  bind file.
16943  Open the error boxes by clicking on them with the mouse, or use the shortcut
16944  key 
16945 \family sans
16946 C-i
16947 \family default
16948  from 
16949 \family typewriter
16950 cua
16951 \family default
16952  bindings, or the corresponding 
16953 \family sans
16954 C-o
16955 \family default
16956  for the alternate 
16957 \family typewriter
16958 emacs
16959 \family default
16960  bind file.
16961  Read the warning and correct the mistake, if it is a mistake.
16962  If you have trouble understanding what the warning is about, you can safely
16963  ignore it.
16964  Remember that there is a hidden layer between the document on screen and
16965  the technical details in invoking 
16966 \family sans
16967 ChkTeX
16968 \family default
16969 , and this gap can make some warnings seem arcane or just right down plain
16970  silly.
16971 \end_layout
16972
16973 \begin_layout Standard
16974 This document is an excellent testing bed for the feature, and it should
16975  provide quite a few warnings for you to fiddle with.
16976  Since computers are only so smart, expect most of the warnings to be false
16977  alarms, though.
16978 \end_layout
16979
16980 \begin_layout Subsection
16981 How to fine tune it
16982 \end_layout
16983
16984 \begin_layout Standard
16985 Sometimes, you'll find that 
16986 \family sans
16987 ChkTeX
16988 \family default
16989  makes more noise than suits your mood.
16990  Then you can choose not to use it, wait until your mood changes, or try
16991  to customize 
16992 \family sans
16993 ChkTeX
16994 \family default
16995  to get better along with you.
16996  Another choice in the most desperate situations is to use 
16997 \family sans
16998 View\SpecialChar \menuseparator
16999 Remove
17000 \begin_inset space ~
17001 \end_inset
17002
17003 All
17004 \begin_inset space ~
17005 \end_inset
17006
17007 Error
17008 \begin_inset space ~
17009 \end_inset
17010
17011 Boxes
17012 \family default
17013 , which will get rid of all warnings instantly.
17014 \end_layout
17015
17016 \begin_layout Standard
17017 Although 
17018 \family sans
17019 ChkTeX
17020 \family default
17021  
17022 \emph on
17023 is
17024 \emph default
17025  very configurable and extensible, you shouldn't expect to solve all problems
17026  with 
17027 \family sans
17028 ChkTeX
17029 \family default
17030  in LyX this way.
17031  Since LyX has to generate a somewhat special LaTeX file to be able to match
17032  the line numbers from the 
17033 \family sans
17034 ChkTeX
17035 \family default
17036  output
17037 \begin_inset Foot
17038 status collapsed
17039
17040 \begin_layout Plain Layout
17041 You can inspect the specific output from 
17042 \family sans
17043 chktex
17044 \family default
17045  by using 
17046 \family sans
17047 Edit\SpecialChar \menuseparator
17048 View
17049 \begin_inset space ~
17050 \end_inset
17051
17052 LaTeX
17053 \begin_inset space ~
17054 \end_inset
17055
17056 Log
17057 \family default
17058  right after a 
17059 \family sans
17060 chktex
17061 \family default
17062  run.
17063 \end_layout
17064
17065 \end_inset
17066
17067  to the internal document structure, some of the warnings will not seen
17068  to appear correctly.
17069  There are two things you can do about this:
17070 \end_layout
17071
17072 \begin_layout Itemize
17073 Fine tune the 
17074 \family sans
17075 ChkTeX
17076 \family default
17077  invocation command line in 
17078 \family sans
17079 Preferences
17080 \family default
17081  (tabs 
17082 \family sans
17083 Outputs
17084 \family default
17085
17086 \family sans
17087 Misc
17088 \family default
17089 ), or the global 
17090 \family sans
17091 ChkTeX
17092 \family default
17093  installation configuration file (usually with the file 
17094 \family typewriter
17095 chktexrc
17096 \family default
17097 ).
17098  See below to learn what warnings can be enabled and disabled on the command
17099  line.
17100  
17101 \end_layout
17102
17103 \begin_layout Itemize
17104 Export your document as a raw LaTeX file using 
17105 \family sans
17106 File\SpecialChar \menuseparator
17107 Export\SpecialChar \menuseparator
17108 LaTeX
17109 \family default
17110  and run 
17111 \family typewriter
17112 chktex
17113 \family default
17114  manually on that.
17115  Invoked in this way, it can be a hassle to find the corresponding place
17116  in the document inside LyX, but with a little patience, you should be able
17117  to do it.
17118 \end_layout
17119
17120 \begin_layout Standard
17121 Here follows the warning messages that can be enabled and disabled in 
17122 \family sans
17123 Preferences
17124 \family default
17125 .
17126  Use 
17127 \family typewriter
17128 -n#
17129 \family default
17130  to disable a warning, and 
17131 \family typewriter
17132 -w#
17133 \family default
17134  to enable a warning.
17135  The emphasized entries are disabled by default, because the default is
17136  "
17137 \family typewriter
17138 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
17139 \family default
17140 ".
17141 \end_layout
17142
17143 \begin_layout Standard
17144 Notice that you should only use the options that enable and disable warnings,
17145  because LyX relies on some of the other command line parameters to be set
17146  in a specific way to have a chance to communicate with 
17147 \family typewriter
17148 chktex
17149 \family default
17150 .
17151 \end_layout
17152
17153 \begin_layout Enumerate
17154
17155 \size small
17156 \emph on
17157 Command terminated with space.
17158 \end_layout
17159
17160 \begin_layout Enumerate
17161
17162 \size small
17163 Non-breaking space (
17164 \begin_inset Quotes eld
17165 \end_inset
17166
17167
17168 \family typewriter
17169 ~
17170 \family default
17171
17172 \begin_inset Quotes erd
17173 \end_inset
17174
17175 ) should have been used.
17176 \end_layout
17177
17178 \begin_layout Enumerate
17179
17180 \size small
17181 \emph on
17182 You should enclose the previous parenthesis with 
17183 \begin_inset Quotes eld
17184 \end_inset
17185
17186
17187 \family typewriter
17188 {}
17189 \family default
17190
17191 \begin_inset Quotes erd
17192 \end_inset
17193
17194 .
17195 \end_layout
17196
17197 \begin_layout Enumerate
17198
17199 \size small
17200 Italic correction (
17201 \begin_inset Quotes eld
17202 \end_inset
17203
17204
17205 \family typewriter
17206
17207 \backslash
17208 /
17209 \family default
17210
17211 \begin_inset Quotes erd
17212 \end_inset
17213
17214 ) found in non-italic buffer.
17215 \end_layout
17216
17217 \begin_layout Enumerate
17218
17219 \size small
17220 Italic correction (
17221 \begin_inset Quotes eld
17222 \end_inset
17223
17224
17225 \family typewriter
17226
17227 \backslash
17228 /
17229 \family default
17230
17231 \begin_inset Quotes erd
17232 \end_inset
17233
17234 ) found more than once.
17235 \end_layout
17236
17237 \begin_layout Enumerate
17238
17239 \size small
17240 \emph on
17241 No italic correction (
17242 \begin_inset Quotes eld
17243 \end_inset
17244
17245
17246 \family typewriter
17247
17248 \backslash
17249 /
17250 \family default
17251
17252 \begin_inset Quotes erd
17253 \end_inset
17254
17255 ) found.
17256 \end_layout
17257
17258 \begin_layout Enumerate
17259
17260 \size small
17261 Accent command 
17262 \begin_inset Quotes eld
17263 \end_inset
17264
17265
17266 \family typewriter
17267 cmd
17268 \family default
17269
17270 \begin_inset Quotes erd
17271 \end_inset
17272
17273  needs use of 
17274 \begin_inset Quotes eld
17275 \end_inset
17276
17277
17278 \family typewriter
17279 cmd
17280 \family default
17281
17282 \begin_inset Quotes erd
17283 \end_inset
17284
17285 .
17286 \end_layout
17287
17288 \begin_layout Enumerate
17289
17290 \size small
17291 Wrong length of dash may have been used.
17292 \end_layout
17293
17294 \begin_layout Enumerate
17295
17296 \size small
17297 \emph on
17298 \begin_inset Quotes eld
17299 \end_inset
17300
17301
17302 \family typewriter
17303 %s
17304 \family default
17305
17306 \begin_inset Quotes erd
17307 \end_inset
17308
17309  expected, found 
17310 \begin_inset Quotes eld
17311 \end_inset
17312
17313
17314 \family typewriter
17315 %s
17316 \family default
17317
17318 \begin_inset Quotes erd
17319 \end_inset
17320
17321 .
17322 \end_layout
17323
17324 \begin_layout Enumerate
17325
17326 \size small
17327 Solo 
17328 \begin_inset Quotes eld
17329 \end_inset
17330
17331
17332 \family typewriter
17333 %s
17334 \family default
17335
17336 \begin_inset Quotes erd
17337 \end_inset
17338
17339  found.
17340 \end_layout
17341
17342 \begin_layout Enumerate
17343
17344 \size small
17345 You should use 
17346 \begin_inset Quotes eld
17347 \end_inset
17348
17349
17350 \family typewriter
17351 %s
17352 \family default
17353
17354 \begin_inset Quotes erd
17355 \end_inset
17356
17357  to achieve an ellipsis.
17358 \end_layout
17359
17360 \begin_layout Enumerate
17361
17362 \size small
17363 Inter-word spacing (
17364 \begin_inset Quotes eld
17365 \end_inset
17366
17367
17368 \family typewriter
17369
17370 \backslash
17371
17372 \family default
17373  
17374 \begin_inset Quotes eld
17375 \end_inset
17376
17377 ) should perhaps be used.
17378 \end_layout
17379
17380 \begin_layout Enumerate
17381
17382 \size small
17383 Inter-sentence spacing (
17384 \begin_inset Quotes eld
17385 \end_inset
17386
17387
17388 \family typewriter
17389
17390 \backslash
17391 @
17392 \family default
17393
17394 \begin_inset Quotes erd
17395 \end_inset
17396
17397 ) should perhaps be used.
17398 \end_layout
17399
17400 \begin_layout Enumerate
17401
17402 \size small
17403 Could not find argument for command.
17404 \end_layout
17405
17406 \begin_layout Enumerate
17407
17408 \size small
17409 No match found for 
17410 \begin_inset Quotes eld
17411 \end_inset
17412
17413
17414 \family typewriter
17415 %s
17416 \family default
17417
17418 \begin_inset Quotes erd
17419 \end_inset
17420
17421 .
17422 \end_layout
17423
17424 \begin_layout Enumerate
17425
17426 \size small
17427 Math mode still on at end of LaTeX file.
17428 \end_layout
17429
17430 \begin_layout Enumerate
17431
17432 \size small
17433 Number of 
17434 \begin_inset Quotes eld
17435 \end_inset
17436
17437
17438 \family typewriter
17439 char
17440 \family default
17441
17442 \begin_inset Quotes erd
17443 \end_inset
17444
17445  doesn't match the number of 
17446 \begin_inset Quotes eld
17447 \end_inset
17448
17449
17450 \family typewriter
17451 char
17452 \family default
17453
17454 \begin_inset Quotes erd
17455 \end_inset
17456
17457 .
17458 \end_layout
17459
17460 \begin_layout Enumerate
17461
17462 \size small
17463 You should use either 
17464 \family typewriter
17465
17466 \begin_inset Quotes eld
17467 \end_inset
17468
17469
17470 \family default
17471  or 
17472 \family typewriter
17473
17474 \begin_inset Quotes erd
17475 \end_inset
17476
17477
17478 \family default
17479  as an alternative to 
17480 \begin_inset Quotes eld
17481 \end_inset
17482
17483
17484 \family typewriter
17485 "
17486 \family default
17487
17488 \begin_inset Quotes erd
17489 \end_inset
17490
17491 .
17492 \end_layout
17493
17494 \begin_layout Enumerate
17495
17496 \size small
17497 You should use "
17498 \family typewriter
17499 '
17500 \family default
17501 " (ASCII 39) instead of "
17502 \family typewriter
17503 ´
17504 \family default
17505 " (ASCII 180).
17506 \end_layout
17507
17508 \begin_layout Enumerate
17509
17510 \size small
17511 User-specified pattern found.
17512 \end_layout
17513
17514 \begin_layout Enumerate
17515
17516 \size small
17517 This command might not be intended.
17518 \end_layout
17519
17520 \begin_layout Enumerate
17521
17522 \size small
17523 \emph on
17524 Comment displayed.
17525 \end_layout
17526
17527 \begin_layout Enumerate
17528
17529 \size small
17530 Either 
17531 \family typewriter
17532 ''
17533 \backslash
17534 ,'
17535 \family default
17536  or 
17537 \family typewriter
17538 '
17539 \backslash
17540 ,''
17541 \family default
17542  will look better.
17543 \end_layout
17544
17545 \begin_layout Enumerate
17546
17547 \size small
17548 Delete this space to maintain correct page references.
17549 \end_layout
17550
17551 \begin_layout Enumerate
17552
17553 \size small
17554 \emph on
17555 You might wish to put this between a pair of 
17556 \begin_inset Quotes eld
17557 \end_inset
17558
17559
17560 \family typewriter
17561 {}
17562 \family default
17563
17564 \begin_inset Quotes erd
17565 \end_inset
17566
17567 .
17568 \end_layout
17569
17570 \begin_layout Enumerate
17571
17572 \size small
17573 You ought to remove spaces in front of punctuation.
17574 \end_layout
17575
17576 \begin_layout Enumerate
17577
17578 \size small
17579 Could not execute LaTeX command.
17580 \end_layout
17581
17582 \begin_layout Enumerate
17583
17584 \size small
17585 Don't use 
17586 \family typewriter
17587
17588 \backslash
17589 /
17590 \family default
17591  in front of small punctuation.
17592 \end_layout
17593
17594 \begin_layout Enumerate
17595
17596 \family typewriter
17597 \size small
17598 $
17599 \backslash
17600 times$
17601 \family default
17602  may look prettier here.
17603 \end_layout
17604
17605 \begin_layout Enumerate
17606
17607 \size small
17608 \emph on
17609 Multiple spaces detected in output.
17610 \end_layout
17611
17612 \begin_layout Enumerate
17613
17614 \size small
17615 This text may be ignored.
17616 \end_layout
17617
17618 \begin_layout Enumerate
17619
17620 \size small
17621 Use 
17622 \family typewriter
17623
17624 \begin_inset Quotes eld
17625 \end_inset
17626
17627
17628 \family default
17629  to begin quotation, not 
17630 \family typewriter
17631 '
17632 \family default
17633 .
17634 \end_layout
17635
17636 \begin_layout Enumerate
17637
17638 \size small
17639 Use 
17640 \family typewriter
17641 '
17642 \family default
17643  to end quotation, not 
17644 \family typewriter
17645
17646 \begin_inset Quotes eld
17647 \end_inset
17648
17649
17650 \family default
17651 .
17652 \end_layout
17653
17654 \begin_layout Enumerate
17655
17656 \size small
17657 Don't mix quotes.
17658 \end_layout
17659
17660 \begin_layout Enumerate
17661
17662 \size small
17663 You should perhaps use 
17664 \begin_inset Quotes eld
17665 \end_inset
17666
17667
17668 \family typewriter
17669 cmd
17670 \family default
17671
17672 \begin_inset Quotes erd
17673 \end_inset
17674
17675  instead.
17676 \end_layout
17677
17678 \begin_layout Enumerate
17679
17680 \size small
17681 You should put a space in front of/after parenthesis.
17682 \end_layout
17683
17684 \begin_layout Enumerate
17685
17686 \size small
17687 You should avoid spaces in front of/after parenthesis.
17688 \end_layout
17689
17690 \begin_layout Enumerate
17691
17692 \size small
17693 \emph on
17694 You should not use punctuation in front of/after quotes.
17695 \end_layout
17696
17697 \begin_layout Enumerate
17698
17699 \size small
17700 Double space found.
17701 \end_layout
17702
17703 \begin_layout Enumerate
17704
17705 \size small
17706 You should put punctuation outside inner/inside display math mode.
17707 \end_layout
17708
17709 \begin_layout Enumerate
17710
17711 \size small
17712 You ought to not use primitive TeX in LaTeX code.
17713 \end_layout
17714
17715 \begin_layout Enumerate
17716
17717 \size small
17718 You should remove spaces in front of 
17719 \begin_inset Quotes eld
17720 \end_inset
17721
17722
17723 \family typewriter
17724 %s
17725 \family default
17726
17727 \begin_inset Quotes erd
17728 \end_inset
17729
17730
17731 \end_layout
17732
17733 \begin_layout Enumerate
17734
17735 \size small
17736 \begin_inset Quotes eld
17737 \end_inset
17738
17739
17740 \family typewriter
17741 %s
17742 \family default
17743
17744 \begin_inset Quotes erd
17745 \end_inset
17746
17747  is normally not followed by 
17748 \begin_inset Quotes eld
17749 \end_inset
17750
17751
17752 \family typewriter
17753 %c
17754 \family default
17755
17756 \begin_inset Quotes erd
17757 \end_inset
17758
17759 .
17760 \end_layout
17761
17762 \begin_layout Standard
17763 In later versions of LyX, we hope to provide a more complete interface to
17764  this tool (and it's smaller cousin 
17765 \family typewriter
17766 lacheck
17767 \family default
17768 ) to exploit the full power of it.
17769  But it's not exactly useless as it is now: go try it on one of your existing
17770  documents of a certain length and be surprised.
17771 \end_layout
17772
17773 \begin_layout Section
17774 Version Control in LyX
17775 \end_layout
17776
17777 \begin_layout Standard
17778 by
17779 \noun on
17780  Lars Gullik Bjønnes, 
17781 \noun default
17782 updated by 
17783 \noun on
17784 Pavel Sanda
17785 \end_layout
17786
17787 \begin_layout Subsection
17788 Introduction
17789 \end_layout
17790
17791 \begin_layout Standard
17792 A friend of mine wanted to try LyX for a group project.
17793  When he didn't find support for version control or file locking, he dropped
17794  it.
17795  This angered me a bit, so I thought that I should at least make support
17796  for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
17797  This has now been done.
17798  LyX now supports some of the most basic RCS commands.
17799  If you need to something a bit more sophisticated you will have to do that
17800  manually in an xterm.
17801 \end_layout
17802
17803 \begin_layout Standard
17804 Before you begin to use the version control features in LyX, you should
17805  read 
17806 \begin_inset Quotes eld
17807 \end_inset
17808
17809 rcsintro
17810 \begin_inset Quotes erd
17811 \end_inset
17812
17813  (a man file, read it with 
17814 \family typewriter
17815 man rcsintro
17816 \family default
17817 ).
17818  This file describes all the basic features of RCS.
17819  You should especially notice the comment about a RCS directory, and the
17820  notion of a master RCS file (the file ending in 
17821 \family typewriter
17822 ,v
17823 \family default
17824 ).
17825 \end_layout
17826
17827 \begin_layout Standard
17828 Later basic CVS/SVN support was added.
17829  You should be familiar with CVS/SVN usage before start using it under LyX.
17830  Most of the log messages are not currently displayed after operations -
17831  you can check them in terminal window if unsure.
17832 \end_layout
17833
17834 \begin_layout Standard
17835 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
17836  package—no guarantees are made for older versions.
17837 \end_layout
17838
17839 \begin_layout Standard
17840 For introducing your own external commands consult vc-command in the manual
17841  of LyX functions.
17842 \end_layout
17843
17844 \begin_layout Subsection
17845 RCS commands in LyX
17846 \end_layout
17847
17848 \begin_layout Standard
17849 The following sections describe the RCS commands supported by LyX.
17850  You can find them in the 
17851 \family sans
17852 File\SpecialChar \menuseparator
17853 Version
17854 \begin_inset space ~
17855 \end_inset
17856
17857 Control
17858 \family default
17859  submenu.
17860  LyX was tested against RCS 5.7.
17861 \end_layout
17862
17863 \begin_layout Subsubsection
17864
17865 \family sans
17866 Register
17867 \end_layout
17868
17869 \begin_layout Standard
17870 If your document is not under revision control, this is the only item shown
17871  in the menu.
17872  And if it is under revision control, the 
17873 \family sans
17874 Register
17875 \family default
17876  item is not visible.
17877  
17878 \end_layout
17879
17880 \begin_layout Standard
17881 This command registers your document with RCS (unless you are under the
17882  directory managed by CVS)\SpecialChar \@.
17883  You are asked interactively to supply an initial
17884  description of the document.
17885  The document is now set in Read-Only mode and you have to 
17886 \family sans
17887 Check
17888 \begin_inset space ~
17889 \end_inset
17890
17891 Out
17892 \begin_inset space ~
17893 \end_inset
17894
17895 For
17896 \begin_inset space ~
17897 \end_inset
17898
17899 Edit
17900 \family default
17901 , before making any changes to it.
17902  A document under revision control has a 
17903 \begin_inset Quotes eld
17904 \end_inset
17905
17906 [RCS:<version> <locker>]
17907 \begin_inset Quotes erd
17908 \end_inset
17909
17910  item tagged to the filename in the minibuffer.
17911 \end_layout
17912
17913 \begin_layout Standard
17914 RCS command that is run: 
17915 \family typewriter
17916 ci -q -u -i -t-"<initial description>" <file-name>
17917 \end_layout
17918
17919 \begin_layout Standard
17920 Read 
17921 \family typewriter
17922 man ci
17923 \family default
17924  to understand the switches.
17925  
17926 \end_layout
17927
17928 \begin_layout Subsubsection
17929
17930 \family sans
17931 Check In Changes
17932 \end_layout
17933
17934 \begin_layout Standard
17935 When you are finished editing a file, you check in your changes.
17936  When you do this, you are asked for a description of the changes.
17937  This is stored in the history log.
17938  The version number is bumped, your changes are applied to the master RCS
17939  file, the document is unlocked and set to Read-Only mode.
17940  
17941 \end_layout
17942
17943 \begin_layout Standard
17944 RCS command: 
17945 \family typewriter
17946 ci -q -u -m"<description>" <file-name>
17947 \end_layout
17948
17949 \begin_layout Subsubsection
17950
17951 \family sans
17952 Check Out For Edit
17953 \end_layout
17954
17955 \begin_layout Standard
17956 By doing this you lock the document so that only you can edit it.
17957  This will also make the document Read-Write only for you.
17958  You will usually continue editing for a while and when you are finished
17959  you check in your changes.
17960  The status line is changed to reflect that you have locked the file.
17961  
17962 \end_layout
17963
17964 \begin_layout Standard
17965 RCS command: 
17966 \family typewriter
17967 co -q -l <file-name>
17968 \end_layout
17969
17970 \begin_layout Subsubsection
17971
17972 \family sans
17973 Revert To Repository Version
17974 \end_layout
17975
17976 \begin_layout Standard
17977 This will discard all changes made to the document since the last check
17978  in.
17979  You get a warning before changes are discarded.
17980 \end_layout
17981
17982 \begin_layout Standard
17983 RCS command: 
17984 \family typewriter
17985 co -f -u<version> <file-name>
17986 \end_layout
17987
17988 \begin_layout Subsubsection
17989
17990 \family sans
17991 Undo Last Checkin
17992 \end_layout
17993
17994 \begin_layout Standard
17995 This makes as if the last check in never happened.
17996  No changes are made to the document loaded into LyX, but the last version
17997  is removed from the master RCS file.
17998  
17999 \end_layout
18000
18001 \begin_layout Standard
18002 RCS command: 
18003 \family typewriter
18004 rcs -o<version> <file-name>
18005 \end_layout
18006
18007 \begin_layout Subsubsection
18008
18009 \family sans
18010 Show History
18011 \end_layout
18012
18013 \begin_layout Standard
18014 This show the complete history of the RCS document.
18015  The output of 
18016 \family typewriter
18017 rlog <file-name>
18018 \family default
18019  is shown in a browser.
18020  See 
18021 \family typewriter
18022 man rlog
18023 \family default
18024  for more info.
18025 \end_layout
18026
18027 \begin_layout Subsection
18028 CVS commands in LyX
18029 \end_layout
18030
18031 \begin_layout Standard
18032 CVS is now partially supported by LyX.
18033  You can find the commands in the 
18034 \family sans
18035 File\SpecialChar \menuseparator
18036 Version
18037 \begin_inset space ~
18038 \end_inset
18039
18040 Control
18041 \family default
18042  submenu.
18043 \end_layout
18044
18045 \begin_layout Subsubsection
18046
18047 \family sans
18048 Register
18049 \end_layout
18050
18051 \begin_layout Standard
18052 If your document is not under revision control, this is the only item shown
18053  in the menu.
18054  And if it is under revision control, the 
18055 \family sans
18056 \bar under
18057 R
18058 \bar default
18059 egister
18060 \family default
18061  item is not visible.
18062  
18063 \end_layout
18064
18065 \begin_layout Standard
18066 This command registers in CVS your document ONLY in case you have already
18067  the documents directory under CVS control (in particular 
18068 \family typewriter
18069 CVS/Entries
18070 \family default
18071  file exists).
18072  This means you have to checkout the archive by yourself.
18073  
18074 \end_layout
18075
18076 \begin_layout Standard
18077 Then you are asked interactively to supply an initial description of the
18078  document.
18079  Don't forget that registered file is not yet commited.
18080 \end_layout
18081
18082 \begin_layout Standard
18083 CVS command that is run: 
18084 \family typewriter
18085 cvs -q add -m
18086 \begin_inset Quotes erd
18087 \end_inset
18088
18089 <entered message>" 
18090 \begin_inset Quotes eld
18091 \end_inset
18092
18093 <file-name>
18094 \begin_inset Quotes erd
18095 \end_inset
18096
18097
18098 \end_layout
18099
18100 \begin_layout Standard
18101 Read 
18102 \family typewriter
18103 man svn
18104 \family default
18105  to understand the switches.
18106  
18107 \end_layout
18108
18109 \begin_layout Subsubsection
18110
18111 \family sans
18112 Check In Changes
18113 \end_layout
18114
18115 \begin_layout Standard
18116 When you are finished editing a file, you commit your changes.
18117  When you do this, you are asked for a description of the changes.
18118  After that changes are commited.
18119 \end_layout
18120
18121 \begin_layout Standard
18122 CVS command: 
18123 \family typewriter
18124 cvs -q commit -m"<description>" "<file-name>"
18125 \end_layout
18126
18127 \begin_layout Subsubsection
18128
18129 \family sans
18130 Revert To Repository Version
18131 \end_layout
18132
18133 \begin_layout Standard
18134 This will discard all changes made to the document since the last check
18135  in.
18136  You get a warning before changes are discarded.
18137  Firstly the file is deleted, secondly CVS update command is run.
18138 \end_layout
18139
18140 \begin_layout Standard
18141 CVS command: 
18142 \family typewriter
18143 cvs update 
18144 \begin_inset Quotes eld
18145 \end_inset
18146
18147 <file-name>
18148 \begin_inset Quotes erd
18149 \end_inset
18150
18151
18152 \end_layout
18153
18154 \begin_layout Subsubsection
18155
18156 \family sans
18157 Show History
18158 \end_layout
18159
18160 \begin_layout Standard
18161 This show the complete history of the CVS document.
18162  The output of 
18163 \family typewriter
18164 cvs log 
18165 \begin_inset Quotes eld
18166 \end_inset
18167
18168 <file-name>
18169 \begin_inset Quotes erd
18170 \end_inset
18171
18172
18173 \family default
18174  is shown in a browser.
18175 \end_layout
18176
18177 \begin_layout Subsection
18178 SVN commands in LyX
18179 \end_layout
18180
18181 \begin_layout Standard
18182 SVN is now partially supported by LyX.
18183  You can find the commands in the 
18184 \family sans
18185 File\SpecialChar \menuseparator
18186 Version
18187 \begin_inset space ~
18188 \end_inset
18189
18190 Control
18191 \family default
18192  submenu.
18193  Please note that if you use password protected access to repository via
18194  ssh, you will be asked in terminal window.
18195  LyX was tested against SVN 1.4 and 1.5.
18196 \end_layout
18197
18198 \begin_layout Subsubsection
18199
18200 \family sans
18201 Register
18202 \end_layout
18203
18204 \begin_layout Standard
18205 If your document is not under revision control, this is the only item shown
18206  in the menu.
18207  And if it is under revision control, the 
18208 \family sans
18209 \bar under
18210 R
18211 \bar default
18212 egister
18213 \family default
18214  item is not visible.
18215  
18216 \end_layout
18217
18218 \begin_layout Standard
18219 This command registers in SVN your document ONLY in case you have already
18220  the documents directory under SVN control (in particular 
18221 \family typewriter
18222 .svn/entries
18223 \family default
18224  file exists).
18225  This means you have to checkout the archive by yourself.
18226  
18227 \end_layout
18228
18229 \begin_layout Standard
18230 Then you are asked interactively to supply an initial description of the
18231  document.
18232  Don't forget that registered file is not yet commited.
18233 \end_layout
18234
18235 \begin_layout Standard
18236 SVN command that is run: 
18237 \family typewriter
18238 snv add -q 
18239 \begin_inset Quotes eld
18240 \end_inset
18241
18242 <file-name>
18243 \begin_inset Quotes erd
18244 \end_inset
18245
18246
18247 \end_layout
18248
18249 \begin_layout Standard
18250 Read 
18251 \family typewriter
18252 man svn
18253 \family default
18254  to understand the switches.
18255  
18256 \end_layout
18257
18258 \begin_layout Subsubsection
18259
18260 \family sans
18261 Check In Changes
18262 \end_layout
18263
18264 \begin_layout Standard
18265 When you are finished editing a file, you commit your changes.
18266  When you do this, you are asked for a description of the changes.
18267  After that changes are commited.
18268 \end_layout
18269
18270 \begin_layout Standard
18271 SVN command:
18272 \begin_inset Foot
18273 status collapsed
18274
18275 \begin_layout Plain Layout
18276 In case locking is not enabled.
18277  See Section 
18278 \begin_inset CommandInset ref
18279 LatexCommand ref
18280 reference "subsec:SVN-File-Locking"
18281
18282 \end_inset
18283
18284 .
18285 \end_layout
18286
18287 \end_inset
18288
18289  
18290 \family typewriter
18291 svn commit -q -m"<description>" <file-name>
18292 \end_layout
18293
18294 \begin_layout Subsubsection
18295
18296 \family sans
18297 Check Out For Edit
18298 \end_layout
18299
18300 \begin_layout Standard
18301 Updates the changes of this file from the repository.
18302  Be sure you understand SVN merging and conflicts resolving before using
18303  this function, because all conflicts has to be done manually by you!
18304 \end_layout
18305
18306 \begin_layout Standard
18307 SVN command:
18308 \begin_inset Foot
18309 status collapsed
18310
18311 \begin_layout Plain Layout
18312 Ditto.
18313 \end_layout
18314
18315 \end_inset
18316
18317  
18318 \family typewriter
18319 svn update 
18320 \begin_inset Quotes eld
18321 \end_inset
18322
18323 <file-name>
18324 \begin_inset Quotes erd
18325 \end_inset
18326
18327
18328 \end_layout
18329
18330 \begin_layout Subsubsection
18331
18332 \family sans
18333 Revert To Repository Version
18334 \end_layout
18335
18336 \begin_layout Standard
18337 This will discard all changes made to the document since the last check
18338  in.
18339  You get a warning before changes are discarded.
18340  
18341 \end_layout
18342
18343 \begin_layout Standard
18344 SVN command: 
18345 \family typewriter
18346 svn revert -q 
18347 \begin_inset Quotes eld
18348 \end_inset
18349
18350 <file-name>
18351 \begin_inset Quotes erd
18352 \end_inset
18353
18354
18355 \end_layout
18356
18357 \begin_layout Subsubsection
18358
18359 \family sans
18360 Show History
18361 \end_layout
18362
18363 \begin_layout Standard
18364 This show the complete history of the SVN document.
18365  The output of 
18366 \family typewriter
18367 svn log 
18368 \begin_inset Quotes eld
18369 \end_inset
18370
18371 <file-name>
18372 \begin_inset Quotes erd
18373 \end_inset
18374
18375
18376 \family default
18377  is shown in a browser.
18378 \end_layout
18379
18380 \begin_layout Subsubsection
18381 File Locking
18382 \begin_inset CommandInset label
18383 LatexCommand label
18384 name "subsec:SVN-File-Locking"
18385
18386 \end_inset
18387
18388
18389 \end_layout
18390
18391 \begin_layout Standard
18392 The file exchange through various revision control systems brings the problem
18393  of merge conflicts in case two different users try to edit the same (parts
18394  of) document.
18395  When such conflict happens it needs manual resolving and one reasonable
18396  alternative is to provide some kind of locking mechanism, which guarantees
18397  that only one user is allowed to edit file at the given time.
18398 \end_layout
18399
18400 \begin_layout Standard
18401 SVN has two mechanisms to provide such kind of mutual exclusivity for file
18402  access - locks and automatical setting of write permissions (see sec.
18403  
18404 \begin_inset CommandInset ref
18405 LatexCommand ref
18406 reference "subsec:Automatical-Locking-Property"
18407
18408 \end_inset
18409
18410 ) based on 
18411 \begin_inset Flex CharStyle:Code
18412 status collapsed
18413
18414 \begin_layout Plain Layout
18415 svn:needs-lock
18416 \end_layout
18417
18418 \end_inset
18419
18420  file svn property
18421 \begin_inset Foot
18422 status open
18423
18424 \begin_layout Plain Layout
18425 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
18426 \end_layout
18427
18428 \end_inset
18429
18430 .
18431  In a case this property is detected for a given document LyX starts to
18432  use SVN locks for document editing automatically and the whole check-in/out
18433  mechanism switches to the same regimen as for RCS.
18434  This in particular means there are two different modes how file is used
18435  in LyX:
18436 \end_layout
18437
18438 \begin_layout Itemize
18439 Unlocked state.
18440  The loaded file is in the read-only mode.
18441  For editation on needs to check-out.
18442  
18443 \emph on
18444 Check-out
18445 \emph default
18446  consists of update from repository and gaining write lock.
18447  If the lock is not possible to obtain, we remain in unlocked state.
18448 \end_layout
18449
18450 \begin_layout Itemize
18451 Locked state.
18452  The loaded file is in the 'normal' edit mode.
18453  No other user is allowed to edit the file.
18454  
18455 \emph on
18456 Check-in
18457 \emph default
18458  consists of commiting changes and releasing write-lock.
18459  If no changes have been made to the document, no commit will be produced
18460 \begin_inset Foot
18461 status collapsed
18462
18463 \begin_layout Plain Layout
18464 Don't be puzzled by the fact that you will be asked for commit message anyway.
18465 \end_layout
18466
18467 \end_inset
18468
18469  and only the write-lock will be released.
18470 \end_layout
18471
18472 \begin_layout Standard
18473 SVN commands:
18474 \end_layout
18475
18476 \begin_layout Labeling
18477 \labelwidthstring 00.00.0000
18478 Check-in:
18479 \family typewriter
18480  svn commit -q -m"<description>" "<file-name>"
18481 \begin_inset Newline newline
18482 \end_inset
18483
18484 svn unlock "<file-name>"
18485 \end_layout
18486
18487 \begin_layout Labeling
18488 \labelwidthstring 00.00.0000
18489 Check-out: 
18490 \family typewriter
18491 svn update "<file-name>"
18492 \begin_inset Newline newline
18493 \end_inset
18494
18495 svn lock "<file-name>"
18496 \end_layout
18497
18498 \begin_layout Subsubsection
18499
18500 \family typewriter
18501 \begin_inset CommandInset label
18502 LatexCommand label
18503 name "subsec:Automatical-Locking-Property"
18504
18505 \end_inset
18506
18507
18508 \family default
18509 Automatical Locking Property
18510 \end_layout
18511
18512 \begin_layout Standard
18513 The above mentioned automatical setting of write permissions of the .lyx
18514  file can be set through
18515 \family sans
18516 \bar under
18517  F
18518 \bar default
18519 ile\SpecialChar \menuseparator
18520
18521 \bar under
18522 V
18523 \bar default
18524 ersion
18525 \begin_inset space ~
18526 \end_inset
18527
18528 Control\SpecialChar \menuseparator
18529
18530 \bar under
18531 T
18532 \bar default
18533 oggle locking property
18534 \family default
18535 .
18536  This command is active only when the file is not locked on the svn server
18537  (i.e.
18538  you need to check-out before proceeding).
18539 \end_layout
18540
18541 \begin_layout Labeling
18542 \labelwidthstring 00.00.0000
18543 SVN
18544 \begin_inset space ~
18545 \end_inset
18546
18547 commands:
18548 \end_layout
18549
18550 \begin_layout Labeling
18551 \labelwidthstring 00.00.0000
18552 Set:
18553 \family typewriter
18554  svn propset svn:needs-lock ON "<file-name>"
18555 \end_layout
18556
18557 \begin_layout Labeling
18558 \labelwidthstring 00.00.0000
18559 Unset: 
18560 \family typewriter
18561 svn propdel svn:needs-lock "<file-name>"
18562 \end_layout
18563
18564 \begin_layout Subsubsection
18565 Revision Information in Documents
18566 \end_layout
18567
18568 \begin_layout Standard
18569 Currently there is no way how to provide such kind of information directly
18570  from LyX.
18571  There are possibilities how to activate it with the help of svn features,
18572  but each has its own drawbacks.
18573 \end_layout
18574
18575 \begin_layout Standard
18576 One possibility is to use svn keywords
18577 \begin_inset Foot
18578 status collapsed
18579
18580 \begin_layout Plain Layout
18581 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
18582 \end_layout
18583
18584 \end_inset
18585
18586 .
18587  In short -- you set file keywords property (e.g.
18588  
18589 \family sans
18590 svn propset svn:keywords 'Rev' file.lyx
18591 \family default
18592 ) and then paste keyword ERT
18593 \begin_inset Foot
18594 status collapsed
18595
18596 \begin_layout Plain Layout
18597 This is an easy way how to ensure that LyX won't break the line in the middle
18598  of keyword tag.
18599 \end_layout
18600
18601 \end_inset
18602
18603  tag in your document (e.g.
18604  
18605 \begin_inset ERT
18606 status open
18607
18608 \begin_layout Plain Layout
18609
18610 $Rev$
18611 \end_layout
18612
18613 \end_inset
18614
18615 ).
18616  This way svn client will automatically substitute revision number (e.g.
18617  
18618 \begin_inset ERT
18619 status open
18620
18621 \begin_layout Plain Layout
18622
18623 $Rev: 59 $
18624 \end_layout
18625
18626 \end_inset
18627
18628 ) after each update and commit.
18629  There are more problems with this approach.
18630  Firstly, the '$' character is used in TeX world for math equations, so
18631  any occurence of math formula 
18632 \begin_inset Formula $Rev$
18633 \end_inset
18634
18635  become 
18636 \begin_inset Formula $Rev:59$
18637 \end_inset
18638
18639  in your LyX document.
18640  Similarly for other keywords like Id, Date, Author, etc.
18641  Secondly svn output is dependent on your locales, so its very easy that
18642  svn would produce some problematic strings once Date is used.
18643  Thirdly you get the whole 'Rev: 59' string in your document instead of
18644  the plain number.
18645  Until subversion implements user's custom keywords it will be hard to use
18646  this approach reliably or let LyX to support it directly .
18647 \end_layout
18648
18649 \begin_layout Standard
18650 The second possibility would be to write your own external-material template
18651  which calls either 
18652 \begin_inset Flex CharStyle:Code
18653 status collapsed
18654
18655 \begin_layout Plain Layout
18656 svnversion
18657 \end_layout
18658
18659 \end_inset
18660
18661  utility or parses the output of 
18662 \begin_inset Flex CharStyle:Code
18663 status collapsed
18664
18665 \begin_layout Plain Layout
18666 svn info file.lyx
18667 \end_layout
18668
18669 \end_inset
18670
18671  command and returns the result back, when typeseting the document.
18672 \end_layout
18673
18674 \begin_layout Subsection
18675 SVN and Windows Environment
18676 \end_layout
18677
18678 \begin_layout Quote
18679 My inclination is to say that if the user cannot figure out the command
18680  line operations on their own fairly quickly, they would be well advised
18681  to use TortoiseSVN.
18682  ---P.
18683  A.
18684  Rubin
18685 \end_layout
18686
18687 \begin_layout Subsubsection
18688 Preparation
18689 \end_layout
18690
18691 \begin_layout Standard
18692 In addition to installing LyX, and having access to a Subversion repository,
18693  the user will need to install the Subversion client program.
18694  A Windows installer for the client program is available from 
18695 \begin_inset CommandInset href
18696 LatexCommand href
18697 name "CollabNet"
18698 target "http://www.collab.net/nonav/downloads/subversion/"
18699
18700 \end_inset
18701
18702 .
18703  The user may also want to install 
18704 \begin_inset CommandInset href
18705 LatexCommand href
18706 name "TortoiseSVN"
18707 target "http://tortoisesvn.tigris.org/"
18708
18709 \end_inset
18710
18711 , which integrates Subversion operations into the context (rightclick) menu
18712  of Windows Explorer.
18713  Operations done outside LyX will typically be more convenient using the
18714  Explorer context menu.
18715  Note that TortoiseSVN is not a replacement for the client program, which
18716  is what LyX itself will use.
18717 \end_layout
18718
18719 \begin_layout Subsubsection
18720 Bringing a document under Subversion control
18721 \end_layout
18722
18723 \begin_layout Standard
18724 Before a LyX document can be brought under version control in Subversion,
18725  its parent directory needs to be under version control.
18726  If the document is being added to a project already in the repository,
18727  this is accomplished by checking the project out to the directory where
18728  the new document will be placed.
18729  If the project itself is not yet under version control (for instance, if
18730  this document starts a new project), the directory must be imported into
18731  the repository.
18732  This is done outside LyX.
18733  Both import and checkout are easily accomplished from the Explorer context
18734  menu using TortoiseSVN, or alternatively can be done using the command
18735  line client at a DOS prompt.
18736  The procedure for importing the project using TortoiseSVN is described
18737  below, assuming an existing repository and a new project being started
18738  in 
18739 \family typewriter
18740 C:
18741 \backslash
18742 new project
18743 \family default
18744 .
18745  For information on using the Subversion client program, run 
18746 \family typewriter
18747 svn --help 
18748 \family default
18749 in a DOS shell.
18750 \end_layout
18751
18752 \begin_layout Enumerate
18753 Locate 
18754 \family typewriter
18755 C:
18756 \backslash
18757 new project 
18758 \family default
18759 in Windows Explorer, right click it, and select 
18760 \family typewriter
18761 TortoiseSVN > Repo-browser
18762 \family default
18763 .
18764  If necessary, adjust the URL for the repository, then click OK.
18765 \end_layout
18766
18767 \begin_layout Enumerate
18768 Right click the level of the repository under which you want to place the
18769  new project folder (typically the top level) and click 
18770 \family typewriter
18771 Create folder\SpecialChar \ldots{}
18772
18773 \family default
18774  Supply a name for the project folder and click OK.
18775  Add a message for the log file if desired, then click OK again.
18776  The new project folder should appear in the repository.
18777  Finally, click OK again to exit the repository browser.
18778 \end_layout
18779
18780 \begin_layout Enumerate
18781 Once again right click 
18782 \family typewriter
18783 C:
18784 \backslash
18785 new project
18786 \family default
18787 , this time selecting SVN Checkout\SpecialChar \ldots{}
18788  Select the URL of the project folder
18789  you just created in the repository, and set the checkout directory to 
18790 \family typewriter
18791 C:
18792 \backslash
18793 new project.
18794
18795 \family default
18796  Click OK.
18797  You will be warned about a non-empty folder; click OK to proceed.
18798  You should now have a 
18799 \family typewriter
18800 .svn
18801 \family default
18802  directory under 
18803 \family typewriter
18804 C:
18805 \backslash
18806 new project.
18807 \end_layout
18808
18809 \begin_layout Enumerate
18810 Create or open your document in LyX and click 
18811 \family sans
18812 \bar under
18813 F
18814 \bar default
18815 ile\SpecialChar \menuseparator
18816
18817 \bar under
18818 V
18819 \bar default
18820 ersion
18821 \begin_inset space ~
18822 \end_inset
18823
18824 Control\SpecialChar \menuseparator
18825
18826 \bar under
18827 R
18828 \bar default
18829 egister.
18830  
18831 \family default
18832 Add a log message and click OK to commit the document to version control.
18833 \end_layout
18834
18835 \begin_layout Standard
18836 From this point onward, you should have full functionality in the 
18837 \family sans
18838 \bar under
18839 F
18840 \bar default
18841 ile\SpecialChar \menuseparator
18842
18843 \bar under
18844 V
18845 \bar default
18846 ersion
18847 \begin_inset space ~
18848 \end_inset
18849
18850 Control
18851 \family default
18852  menu.
18853  You also have the option of checking the document in and out, viewing its
18854  history, etc.
18855  using the TortoiseSVN context menu in Windows Explorer or the Subversion
18856  client program from a command prompt.
18857 \end_layout
18858
18859 \begin_layout Subsection
18860 Further tuning
18861 \end_layout
18862
18863 \begin_layout Standard
18864 With the recent addition of the vc-command function LyX power users are
18865  allowed to create their own commands for revision control.
18866 \end_layout
18867
18868 \begin_layout Standard
18869 As an example you can see how two TortoiseSVN commands could be integrated
18870  directly:
18871 \end_layout
18872
18873 \begin_layout Description
18874 Commit: 
18875 \begin_inset Flex CharStyle:Code
18876 status collapsed
18877
18878 \begin_layout Plain Layout
18879 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
18880 \end_layout
18881
18882 \end_inset
18883
18884
18885 \end_layout
18886
18887 \begin_layout Description
18888 Revert: 
18889 \begin_inset Flex CharStyle:Code
18890 status collapsed
18891
18892 \begin_layout Plain Layout
18893 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
18894 \end_layout
18895
18896 \end_inset
18897
18898
18899 \end_layout
18900
18901 \begin_layout Section
18902 Literate Programming
18903 \end_layout
18904
18905 \begin_layout Standard
18906 Updated by 
18907 \noun on
18908 Kayvan Sylvan 
18909 \noun default
18910 (kayvan@sylvan.com)
18911 \noun on
18912
18913 \noun default
18914 original documentation written by 
18915 \noun on
18916 Edmar Wienskoski Jr.
18917
18918 \noun default
18919  (edmar-w-jr@technologist.com)
18920 \end_layout
18921
18922 \begin_layout Subsection
18923 Introduction
18924 \end_layout
18925
18926 \begin_layout Standard
18927 The main purpose of this documentation is to show you how to use LyX for
18928  literate programming.
18929  Where it is assumed that you are familiar with this programming technique,
18930  and know what 
18931 \begin_inset Quotes eld
18932 \end_inset
18933
18934 tangling
18935 \begin_inset Quotes erd
18936 \end_inset
18937
18938  and 
18939 \begin_inset Quotes eld
18940 \end_inset
18941
18942 weaving
18943 \begin_inset Quotes erd
18944 \end_inset
18945
18946  means.
18947  If that is not the case, please follow the web links provided in the following
18948  sections.
18949  There is a lot of good documentation out there covering old development
18950  history to the latest tools tips.
18951 \end_layout
18952
18953 \begin_layout Standard
18954 It is also assumed that you are familiar with LyX itself to a point that
18955  you are comfortable changing your LyX preferences, and X resources file.
18956  If that is not the case please refer to other LyX documentation to cover
18957  your specific needs.
18958 \end_layout
18959
18960 \begin_layout Subsection
18961 Literate Programming
18962 \end_layout
18963
18964 \begin_layout Standard
18965 From the Literate Programming FAQ: 
18966 \end_layout
18967
18968 \begin_layout Quotation
18969 Literate programming is the combination of documentation and source together
18970  in a fashion suited for reading by human beings.
18971  In fact, literate programs should be enjoyable reading, even inviting!
18972  (Sorry Bob, I couldn't resist!) In general, literate programs combine source
18973  and documentation in a single file.
18974  Literate programming tools then parse the file to produce either readable
18975  documentation or compilable source.
18976  The WEB style of literate programming was created by D.
18977 \begin_inset space \thinspace{}
18978 \end_inset
18979
18980 g.
18981  Knuth during the development of his TeX typesetting software.
18982  
18983 \end_layout
18984
18985 \begin_layout Standard
18986 Another excerpt says:
18987 \end_layout
18988
18989 \begin_layout Quotation
18990
18991 \emph on
18992 How is literate programming different from verbose commenting?
18993 \end_layout
18994
18995 \begin_layout Quotation
18996 There are three distinguishing characteristics.
18997  In order of importance, they are: 
18998 \end_layout
18999
19000 \begin_deeper
19001 \begin_layout Itemize
19002 flexible order of elaboration 
19003 \end_layout
19004
19005 \begin_layout Itemize
19006 automatic support for browsing 
19007 \end_layout
19008
19009 \begin_layout Itemize
19010 typeset documentation, especially diagrams and mathematics 
19011 \end_layout
19012
19013 \end_deeper
19014 \begin_layout Standard
19015 Now that I sparked your curiosity, take a look in the references.
19016 \end_layout
19017
19018 \begin_layout Subsubsection
19019 References
19020 \end_layout
19021
19022 \begin_layout Standard
19023 The complete Literate Programming FAQ can be found at:
19024 \end_layout
19025
19026 \begin_layout Quote
19027 Literate Programming FAQ 
19028 \begin_inset Flex URL
19029 status collapsed
19030
19031 \begin_layout Plain Layout
19032
19033 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
19034 \end_layout
19035
19036 \end_inset
19037
19038
19039 \end_layout
19040
19041 \begin_layout Standard
19042 The FAQ lists 23 (twenty three!) different literate programming tools.
19043  Where some are specialized or 
19044 \begin_inset Quotes eld
19045 \end_inset
19046
19047 tailored
19048 \begin_inset Quotes erd
19049 \end_inset
19050
19051  for particular programming languages, while other have general scope.
19052  I selected 
19053 \noun on
19054 Noweb
19055 \noun default
19056  for my own use for several reasons:
19057 \end_layout
19058
19059 \begin_layout Itemize
19060 It can generate the documentation either in LaTeX or HTML.
19061 \end_layout
19062
19063 \begin_layout Itemize
19064 It has a open architecture, i.
19065 \begin_inset space \thinspace{}
19066 \end_inset
19067
19068 g.
19069 \begin_inset space \space{}
19070 \end_inset
19071
19072 it is easy to plug in new filters and to perform special processing that
19073  you may need.
19074  
19075 \end_layout
19076
19077 \begin_layout Itemize
19078 There is a good selection of filters available already (the HTML is one
19079  of them).
19080 \end_layout
19081
19082 \begin_layout Itemize
19083 It is free.
19084 \end_layout
19085
19086 \begin_layout Standard
19087 The Noweb web page can be found at: 
19088 \end_layout
19089
19090 \begin_layout Quote
19091 Noweb home page 
19092 \begin_inset Flex URL
19093 status collapsed
19094
19095 \begin_layout Plain Layout
19096
19097 http://www.cs.virginia.edu/~nr/noweb/
19098 \end_layout
19099
19100 \end_inset
19101
19102
19103 \end_layout
19104
19105 \begin_layout Standard
19106 Starting from there you can reach many other interesting links and even
19107  some literate program examples.
19108 \end_layout
19109
19110 \begin_layout Subsection
19111 LyX and Literate Programming
19112 \end_layout
19113
19114 \begin_layout Standard
19115 The LyX support for Literate Programming is provided by using the generic
19116  LyX converters mechanism.
19117  This support is provided in a 
19118 \begin_inset Quotes eld
19119 \end_inset
19120
19121 Noweb independent
19122 \begin_inset Quotes erd
19123 \end_inset
19124
19125  way, i.
19126 \begin_inset space \thinspace{}
19127 \end_inset
19128
19129 g.
19130 \begin_inset space \space{}
19131 \end_inset
19132
19133 you will be able to use this new LyX feature with some other literate programmin
19134 g tool of your choice by just changing your LyX preferences.
19135 \end_layout
19136
19137 \begin_layout Subsubsection
19138 Generating documents and code (weaving and tangling)
19139 \end_layout
19140
19141 \begin_layout Paragraph
19142 Selecting the document class
19143 \end_layout
19144
19145 \begin_layout Standard
19146 If you have installed Noweb and LyX successfully, whenever you open a new
19147  document or try to change the document class of an existing one, you will
19148  find that there are three new document classes available:
19149 \end_layout
19150
19151 \begin_layout Itemize
19152 Article (Noweb)
19153 \end_layout
19154
19155 \begin_layout Itemize
19156 Book (Noweb)
19157 \end_layout
19158
19159 \begin_layout Itemize
19160 Report (Noweb)
19161 \end_layout
19162
19163 \begin_layout Standard
19164 You must select one of them to create your literate documents from.
19165  
19166 \end_layout
19167
19168 \begin_layout Standard
19169 Note that literate documents are not limited to these three classes.
19170  New classes can be generated from other styles like letter or in combination
19171  with other class variations like Article (AMS).
19172  If you have special needs that cannot be covered by one of the existing
19173  classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
19174  will arrange to insert a new entry, or teach you how to do it.
19175 \begin_inset Foot
19176 status collapsed
19177
19178 \begin_layout Plain Layout
19179 It is very simple, it involves the creation of a file with four lines, and
19180  re-running of the auto configuration.
19181 \end_layout
19182
19183 \end_inset
19184
19185  Moreover, if you use a literate tool other than Noweb you may need to create
19186  a new set of document classes for it.
19187 \end_layout
19188
19189 \begin_layout Paragraph
19190 Typing code in
19191 \end_layout
19192
19193 \begin_layout Standard
19194 LyX enables you to write code with a layout named 
19195 \noun on
19196 Scrap
19197 \noun default
19198 .
19199 \begin_inset Foot
19200 status collapsed
19201
19202 \begin_layout Plain Layout
19203 The equivalent Noweb term is 
19204 \begin_inset Quotes eld
19205 \end_inset
19206
19207 Chunk
19208 \begin_inset Quotes erd
19209 \end_inset
19210
19211 .
19212  For historical reasons, I got used to the term 
19213 \begin_inset Quotes eld
19214 \end_inset
19215
19216 scrap
19217 \begin_inset Quotes erd
19218 \end_inset
19219
19220  introduced by other literate tool named Nuweb, which I used for many years
19221  before rendering myself to Noweb.
19222 \end_layout
19223
19224 \end_inset
19225
19226  Noweb delimits scraps like this:
19227 \end_layout
19228
19229 \begin_layout LyX-Code
19230 <<My scrap>>=
19231 \end_layout
19232
19233 \begin_layout LyX-Code
19234   code
19235 \end_layout
19236
19237 \begin_layout LyX-Code
19238   more code
19239 \end_layout
19240
19241 \begin_layout LyX-Code
19242   even more code
19243 \end_layout
19244
19245 \begin_layout LyX-Code
19246   @
19247 \end_layout
19248
19249 \begin_layout Standard
19250 The problem is that whatever is written in between the << and the 
19251 \family typewriter
19252 @
19253 \family default
19254  must be taken literally, i.
19255 \begin_inset space \thinspace{}
19256 \end_inset
19257
19258 g.
19259 \begin_inset space \space{}
19260 \end_inset
19261
19262 LyX should be prevented from making any special interpretation of what has
19263  been written.
19264  This is handled by a special layout named Scrap, that works like a normal
19265  paragraph but has a free spacing capability.
19266 \end_layout
19267
19268 \begin_layout Standard
19269 The down side of the Scrap paragraph layout is that consecutive paragraphs
19270  of code will be spaced with one empty line in the source code and also
19271  in the printed documentation.
19272  The work around is to enter each line of code within a single Scrap, with
19273  a newline (ctrl-return).
19274  The example above will look like this:
19275 \begin_inset Foot
19276 status collapsed
19277
19278 \begin_layout Plain Layout
19279 If you have a printed version of this document you will not see any difference
19280  between the previous example and this one.
19281 \end_layout
19282
19283 \end_inset
19284
19285
19286 \end_layout
19287
19288 \begin_layout LyX-Code
19289 <<My scrap>>=
19290 \begin_inset Newline newline
19291 \end_inset
19292
19293   code
19294 \begin_inset Newline newline
19295 \end_inset
19296
19297   more code
19298 \begin_inset Newline newline
19299 \end_inset
19300
19301   even more code
19302 \begin_inset Newline newline
19303 \end_inset
19304
19305   @
19306 \end_layout
19307
19308 \begin_layout Standard
19309 This layout works fine.
19310  The only real inconvenience is that you have to type ctrl-return instead
19311  of a plain return.
19312 \begin_inset Foot
19313 status collapsed
19314
19315 \begin_layout Plain Layout
19316 It is in my list of 
19317 \begin_inset Quotes eld
19318 \end_inset
19319
19320 improvements
19321 \begin_inset Quotes erd
19322 \end_inset
19323
19324  to fix that.
19325 \end_layout
19326
19327 \end_inset
19328
19329
19330 \end_layout
19331
19332 \begin_layout Standard
19333 As a special note, you can also use the 
19334 \begin_inset Quotes eld
19335 \end_inset
19336
19337 %def
19338 \begin_inset Quotes erd
19339 \end_inset
19340
19341  construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
19342 rence:
19343 \end_layout
19344
19345 \begin_layout LyX-Code
19346 <<My scrap>>=
19347 \begin_inset Newline newline
19348 \end_inset
19349
19350   def some_function(args):
19351 \begin_inset Newline newline
19352 \end_inset
19353
19354     "This is the doc string for this function."
19355 \begin_inset Newline newline
19356 \end_inset
19357
19358     print "My args: ", args
19359 \end_layout
19360
19361 \begin_layout LyX-Code
19362 @ %def some_function
19363 \end_layout
19364
19365 \begin_layout Standard
19366 For an example of this usage and the resulting cross-reference output, look
19367  at the Literate python program in 
19368 \emph on
19369 LIBDIR/examples/listerrors.lyx
19370 \emph default
19371  which should make this all clear.
19372 \end_layout
19373
19374 \begin_layout Paragraph
19375 Generating the documentation
19376 \end_layout
19377
19378 \begin_layout Standard
19379 At this point you already have a new document file with a proper document
19380  class, and with some code and text on it.
19381  How do I print it? The answer is simple, you select 
19382 \family sans
19383 View\SpecialChar \menuseparator
19384 DVI,
19385 \family default
19386  etc.
19387  Just like you would do for a plain document.
19388  No special procedure is required.
19389 \end_layout
19390
19391 \begin_layout Standard
19392 To help orientate you, I will now explain what happens inside LyX:
19393 \end_layout
19394
19395 \begin_layout Enumerate
19396 When the 
19397 \family sans
19398 Update\SpecialChar \menuseparator
19399 DVI
19400 \family default
19401  menu option is chosen, a LaTeX file is generated.
19402  
19403 \end_layout
19404
19405 \begin_deeper
19406 \begin_layout Standard
19407 If the document is of any literate class the generated file will be named
19408  with an extension name defined by the 
19409 \begin_inset Quotes eld
19410 \end_inset
19411
19412 literate
19413 \begin_inset Quotes erd
19414 \end_inset
19415
19416  format (defined in the Preferences panel), otherwise the file will have
19417  the usual 
19418 \family typewriter
19419 .tex
19420 \family default
19421  extension.
19422 \end_layout
19423
19424 \end_deeper
19425 \begin_layout Enumerate
19426 Note that the only difference so far is in the name of the file, no special
19427  processing is required by LyX.
19428  Given that you formatted the code using the Scrap layout that, by itself,
19429  takes care of the business.
19430 \end_layout
19431
19432 \begin_layout Enumerate
19433 If the document is of any literate class LyX will then use the internal
19434  LyX to Noweb converter, followed by the Noweb to LaTeX converter
19435 \begin_inset Foot
19436 status collapsed
19437
19438 \begin_layout Plain Layout
19439 The converters are defined in the 
19440 \family sans
19441 Tools\SpecialChar \menuseparator
19442 Preferences
19443 \family default
19444  panel, under the 
19445 \begin_inset Quotes eld
19446 \end_inset
19447
19448 Conversion
19449 \begin_inset Quotes erd
19450 \end_inset
19451
19452  tab.
19453  See section 
19454 \emph on
19455 Converters
19456 \emph default
19457  of the 
19458 \emph on
19459 Customization
19460 \emph default
19461  manual for general information about converters.
19462 \end_layout
19463
19464 \end_inset
19465
19466  to generate the LaTeX file.
19467 \end_layout
19468
19469 \begin_deeper
19470 \begin_layout Standard
19471 Otherwise it will just skip this step.
19472 \end_layout
19473
19474 \end_deeper
19475 \begin_layout Enumerate
19476 Finally, LaTeX is invoked and the regular post processing continues as in
19477  a plain document.
19478 \end_layout
19479
19480 \begin_layout Standard
19481 Independence from a particular 
19482 \begin_inset Quotes eld
19483 \end_inset
19484
19485 literate tool
19486 \begin_inset Quotes erd
19487 \end_inset
19488
19489  is easily achieved by changing the commands that are run by the various
19490  converters.
19491 \end_layout
19492
19493 \begin_layout Paragraph
19494 Generating the code
19495 \end_layout
19496
19497 \begin_layout Standard
19498 When the build menu option is chosen or the corresponding button in the
19499  toolbar is pressed, a LaTeX file is generated just like step 1 above.
19500  Next, LyX invokes the 
19501 \family typewriter
19502 Noweb->Program
19503 \family default
19504  converter.
19505  This converter needs to be defined by the user and is not installed by
19506  default, though the Program format is.
19507  This converter (like any other converter) will have two parts:
19508 \end_layout
19509
19510 \begin_layout Enumerate
19511 The converter program itself.
19512  This program performs the conversion from the one format to the other (in
19513  this case, from the Noweb format to the Program pseudo-format).
19514 \end_layout
19515
19516 \begin_layout Enumerate
19517 The error log parser.
19518  This is a program whose sole purpose is to rewrite error messages in a
19519  format that LyX understands.
19520  This makes it possible for LyX to place error boxes in the right places
19521  in the file buffer.
19522 \end_layout
19523
19524 \begin_layout Standard
19525 The first part, the 
19526 \begin_inset Quotes eld
19527 \end_inset
19528
19529 Converter
19530 \begin_inset Quotes erd
19531 \end_inset
19532
19533  setting, should be set to 
19534 \begin_inset Quotes eld
19535 \end_inset
19536
19537
19538 \family typewriter
19539 build-script $$i
19540 \family default
19541
19542 \begin_inset Quotes erd
19543 \end_inset
19544
19545 .
19546  This basically means that LyX will call 
19547 \begin_inset Quotes eld
19548 \end_inset
19549
19550 build-script
19551 \begin_inset Quotes erd
19552 \end_inset
19553
19554  (a program or script) with the name of the Noweb file (normally a file
19555  in the LyX temp directory).
19556  
19557 \end_layout
19558
19559 \begin_layout Standard
19560 This is an implementation of 
19561 \begin_inset Quotes eld
19562 \end_inset
19563
19564 build-script
19565 \begin_inset Quotes erd
19566 \end_inset
19567
19568  that you can place in a directory on your path:
19569 \end_layout
19570
19571 \begin_layout LyX-Code
19572 #!/bin/sh
19573 \end_layout
19574
19575 \begin_layout LyX-Code
19576 #
19577 \end_layout
19578
19579 \begin_layout LyX-Code
19580 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
19581 \end_layout
19582
19583 \begin_layout Standard
19584 The next part of the converter setting is the 
19585 \begin_inset Quotes eld
19586 \end_inset
19587
19588 Flags
19589 \begin_inset Quotes erd
19590 \end_inset
19591
19592  which is to be set to 
19593 \begin_inset Quotes eld
19594 \end_inset
19595
19596
19597 \family typewriter
19598 parselog=listerrors
19599 \family default
19600
19601 \begin_inset Quotes erd
19602 \end_inset
19603
19604 .
19605  This will run any errors that are generated by the 
19606 \begin_inset Quotes eld
19607 \end_inset
19608
19609 build-script
19610 \begin_inset Quotes erd
19611 \end_inset
19612
19613  process through the 
19614 \begin_inset Quotes eld
19615 \end_inset
19616
19617 listerrors
19618 \begin_inset Quotes erd
19619 \end_inset
19620
19621  program.
19622 \end_layout
19623
19624 \begin_layout Standard
19625 The converter code looks in 
19626 \emph on
19627 MYLYXDIR/scripts
19628 \emph default
19629  first, then in 
19630 \emph on
19631 LIBDIR/scripts
19632 \emph default
19633  then on the path for the 
19634 \begin_inset Quotes eld
19635 \end_inset
19636
19637 listerrors
19638 \begin_inset Quotes erd
19639 \end_inset
19640
19641  program.
19642 \end_layout
19643
19644 \begin_layout Standard
19645 The build will normally take place in LyX's temporary directory, so the
19646  files produced by the conversion will be in that directory.
19647  LyX will copy out what it regards as the `main' file, but the 
19648 \family typewriter
19649 Noweb->Program
19650 \family default
19651  conversion may produce several files, and so most of these would then be
19652  deleted when LyX was closed.
19653  The present solution is to use a `copier',
19654 \begin_inset Foot
19655 status collapsed
19656
19657 \begin_layout Plain Layout
19658 See section 
19659 \emph on
19660 Copiers
19661 \emph default
19662  of the 
19663 \emph on
19664 Customization
19665 \emph default
19666  manual for information on these.
19667 \end_layout
19668
19669 \end_inset
19670
19671  in this case, the 
19672 \family typewriter
19673 ext_copy.py
19674 \family default
19675  script in its default mode, so that the entire contents of the temporary
19676  directory is copied.
19677  More will get copied than is needed, to be sure, but nothing will be lost.
19678  If, however, you know what extensions the generated files will have, this
19679  can be improved by using the 
19680 \family typewriter
19681 -e
19682 \family default
19683  option to 
19684 \family typewriter
19685 ext_copy
19686 \family default
19687 .
19688  This option takes a comma-separated list of extensions to copy.
19689  So, for example, if the conversion will generate only files with the extensions
19690  
19691 \family typewriter
19692 .c
19693 \family default
19694  and 
19695 \family typewriter
19696 .h
19697 \family default
19698 , then the correct definition would be:
19699 \end_layout
19700
19701 \begin_layout LyX-Code
19702 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
19703 \end_layout
19704
19705 \begin_layout Standard
19706 The result will be that only files with these two extensions will be copied
19707  out.
19708 \end_layout
19709
19710 \begin_layout Paragraph
19711 Build instructions in the document
19712 \end_layout
19713
19714 \begin_layout Standard
19715 The last piece of the integration between LyX and noweb is the 
19716 \begin_inset Quotes eld
19717 \end_inset
19718
19719 build-script
19720 \begin_inset Quotes erd
19721 \end_inset
19722
19723  scrap.
19724  Generally, the instructions for building your program should be embedded
19725  in a scrap of its own.
19726  The noweb-specific 
19727 \begin_inset Quotes eld
19728 \end_inset
19729
19730 build-script
19731 \begin_inset Quotes erd
19732 \end_inset
19733
19734  above uses the notangle command to look for this scrap (called 
19735 \begin_inset Quotes eld
19736 \end_inset
19737
19738 build-script
19739 \begin_inset Quotes erd
19740 \end_inset
19741
19742 ) and runs its contents through 
19743 \begin_inset Quotes eld
19744 \end_inset
19745
19746 sh
19747 \begin_inset Quotes erd
19748 \end_inset
19749
19750 .
19751 \end_layout
19752
19753 \begin_layout Standard
19754 Typically, such a scrap would look something like this:
19755 \end_layout
19756
19757 \begin_layout LyX-Code
19758 <<build-script>>=
19759 \begin_inset Newline newline
19760 \end_inset
19761
19762 #!/bin/sh
19763 \begin_inset Newline newline
19764 \end_inset
19765
19766
19767 \begin_inset Newline newline
19768 \end_inset
19769
19770 if [ -z "${NOWEB_SOURCE}" ]
19771 \begin_inset Newline newline
19772 \end_inset
19773
19774 then
19775 \begin_inset Newline newline
19776 \end_inset
19777
19778   NOWEB_SOURCE=myfile.nw
19779 \begin_inset Newline newline
19780 \end_inset
19781
19782 fi
19783 \begin_inset Newline newline
19784 \end_inset
19785
19786 [...
19787  code to extract files ...]
19788 \begin_inset Newline newline
19789 \end_inset
19790
19791 [...
19792  code to compile files ...]
19793 \begin_inset Newline newline
19794 \end_inset
19795
19796 @
19797 \end_layout
19798
19799 \begin_layout Standard
19800 Look in 
19801 \emph on
19802 LIBDIR/examples/listerrors.lyx
19803 \emph default
19804  or in 
19805 \emph on
19806 LIBDIR/examples/Literate.lyx
19807 \emph default
19808  which implement two versions of the 
19809 \begin_inset Quotes eld
19810 \end_inset
19811
19812 listerrors
19813 \begin_inset Quotes erd
19814 \end_inset
19815
19816  program for some illustrations of how all of these pieces go together or
19817  in 
19818 \emph on
19819 LIBDIR/examples/noweb2lyx.lyx.
19820
19821 \emph default
19822  Interestingly, these three files show off the language-indepence of the
19823  LyX literate programming support since they are written in Python, C and
19824  Perl respectively.
19825 \end_layout
19826
19827 \begin_layout Subsubsection
19828 Configuring LyX
19829 \end_layout
19830
19831 \begin_layout Standard
19832 All the Literate Programming support is configured by the 
19833 \family sans
19834 Tools\SpecialChar \menuseparator
19835 Preferences
19836 \family default
19837  panel in the 
19838 \begin_inset Quotes eld
19839 \end_inset
19840
19841 Conversion
19842 \begin_inset Quotes erd
19843 \end_inset
19844
19845  tab.
19846  The important parts are:
19847 \end_layout
19848
19849 \begin_layout Description
19850 the
19851 \begin_inset space ~
19852 \end_inset
19853
19854
19855 \begin_inset Quotes eld
19856 \end_inset
19857
19858 literate
19859 \begin_inset Quotes erd
19860 \end_inset
19861
19862
19863 \begin_inset space ~
19864 \end_inset
19865
19866 format Set up via the Formats tab, this is where the Noweb-specific pieces
19867  are set up.
19868  The 
19869 \family sans
19870 GUI Name
19871 \family default
19872  is set to 
19873 \family typewriter
19874 NoWeb
19875 \family default
19876 , the file extension is set to 
19877 \family typewriter
19878 .nw
19879 \family default
19880 .
19881  This tells LyX to create a file with a 
19882 \family typewriter
19883 .nw
19884 \family default
19885  extension in the first step of the conversion process.
19886 \end_layout
19887
19888 \begin_layout Description
19889 the
19890 \begin_inset space ~
19891 \end_inset
19892
19893
19894 \family sans
19895 Program
19896 \family default
19897
19898 \begin_inset space ~
19899 \end_inset
19900
19901 format This is an empty format whose sole purpose is to be the endpoint
19902  of a conversion (which then allows us to set up a converter for it).
19903 \end_layout
19904
19905 \begin_layout Description
19906
19907 \family sans
19908 NoWeb
19909 \family default
19910 ->
19911 \family sans
19912 LaTeX
19913 \family default
19914  This converter performs the 
19915 \begin_inset Quotes eld
19916 \end_inset
19917
19918 weaving
19919 \begin_inset Quotes erd
19920 \end_inset
19921
19922  of the literate document.
19923  For Noweb, it is set to 
19924 \begin_inset Quotes eld
19925 \end_inset
19926
19927
19928 \family typewriter
19929 noweave -delay -index $$i > $$o
19930 \family default
19931
19932 \begin_inset Quotes erd
19933 \end_inset
19934
19935
19936 \end_layout
19937
19938 \begin_layout Description
19939
19940 \family sans
19941 NoWeb
19942 \family default
19943 ->
19944 \family sans
19945 Program
19946 \family default
19947  This performs the 
19948 \begin_inset Quotes eld
19949 \end_inset
19950
19951 tangling step
19952 \begin_inset Quotes erd
19953 \end_inset
19954
19955 .
19956  As stated above, the Converter is set to 
19957 \begin_inset Quotes eld
19958 \end_inset
19959
19960
19961 \family typewriter
19962 build-script $$i
19963 \family default
19964
19965 \begin_inset Quotes erd
19966 \end_inset
19967
19968 , with Flags set to 
19969 \begin_inset Quotes eld
19970 \end_inset
19971
19972
19973 \family typewriter
19974 originaldir,parselog=listerrors
19975 \family default
19976
19977 \begin_inset Quotes erd
19978 \end_inset
19979
19980 .
19981 \end_layout
19982
19983 \begin_layout Subsubsection
19984 Debug extensions
19985 \end_layout
19986
19987 \begin_layout Standard
19988 There is also a new function implemented in the LyX server, the 
19989 \begin_inset Quotes eld
19990 \end_inset
19991
19992 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
19993  
19994 \end_layout
19995
19996 \begin_layout Standard
19997 When debugging code with ddd/gdb, it is possible to invoke a text editor
19998  at the current execution position with a single key stroke.
19999  The default ddd configuration for that is shift-ctrl-V.
20000  It happens that you can define the editor command line invocation in ddd
20001  by accessing the 
20002 \family sans
20003 Edit\SpecialChar \menuseparator
20004 Preferences\SpecialChar \menuseparator
20005 Helpers
20006 \family default
20007  dialog and changing the "Edit Sources" entry.
20008 \end_layout
20009
20010 \begin_layout Standard
20011 I take advantage of the new created LyX server function and this ddd feature,
20012  and set 
20013 \begin_inset Quotes eld
20014 \end_inset
20015
20016 Edit Sources
20017 \begin_inset Quotes erd
20018 \end_inset
20019
20020  to:
20021 \end_layout
20022
20023 \begin_layout LyX-Code
20024 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
20025 \end_layout
20026
20027 \begin_layout Standard
20028 With this, whenever you are using ddd and find a point in the program that
20029  you want to edit, you just press shift-ctrl-V (in the ddd window), and
20030  ddd you forward this information to LyX through the LyX server and then
20031  the LyX window will show the same file with the cursor at the same position
20032  ddd was pointing to.
20033  No more guessing or long scrolling to locate a point in the program back
20034  from debugging !
20035 \end_layout
20036
20037 \begin_layout Standard
20038 Note however that you must enable the LyX server to get this feature working
20039  (it is disabled by default).
20040  You can enable it in 
20041 \family sans
20042 Preferences
20043 \family default
20044  (tabs 
20045 \family sans
20046 Inputs
20047 \family default
20048
20049 \family sans
20050 Paths
20051 \family default
20052 ) by entering in the 
20053 \family sans
20054 LyXserver pipe
20055 \family default
20056  a path like 
20057 \begin_inset Quotes eld
20058 \end_inset
20059
20060
20061 \family typewriter
20062 /home/<your-home-directory>/.lyx/lyxpipe
20063 \family default
20064
20065 \begin_inset Quotes erd
20066 \end_inset
20067
20068
20069 \end_layout
20070
20071 \begin_layout Standard
20072 Read the LyX server documentation in the 
20073 \emph on
20074 Customization Manual
20075 \emph default
20076  for further information.
20077 \end_layout
20078
20079 \begin_layout Subsubsection
20080 Toolbar extensions
20081 \end_layout
20082
20083 \begin_layout Standard
20084 There are six new buttons that can be added to your LyX toolbar.
20085  Five of these buttons are short cuts to layout styles: 
20086 \family sans
20087 Standard
20088 \family default
20089
20090 \family sans
20091 Section
20092 \family default
20093
20094 \family sans
20095 LaTeX
20096 \family default
20097
20098 \family sans
20099 LyX-Code
20100 \family default
20101 , and 
20102 \family sans
20103 Scrap
20104 \family default
20105 .
20106  The last one is a short cut to the 
20107 \begin_inset Quotes eld
20108 \end_inset
20109
20110 Build Program
20111 \begin_inset Quotes erd
20112 \end_inset
20113
20114  File menu entry.
20115  
20116 \end_layout
20117
20118 \begin_layout Standard
20119 LyX has a range of buttons that are available for tool bar customization.
20120  In my toolbar I like to combine the six short cuts above with two more:
20121  One for 
20122 \family sans
20123 View
20124 \family default
20125 \SpecialChar \menuseparator
20126
20127 \family sans
20128 Update
20129 \family default
20130 \SpecialChar \menuseparator
20131
20132 \family sans
20133 DVI
20134 \family default
20135  and the other for 
20136 \family sans
20137 View\SpecialChar \menuseparator
20138 DVI
20139 \family default
20140  File menu entries.
20141  Here is how it looks like:
20142 \end_layout
20143
20144 \begin_layout LyX-Code
20145 Toolbar
20146 \end_layout
20147
20148 \begin_layout LyX-Code
20149   Layouts
20150 \end_layout
20151
20152 \begin_layout LyX-Code
20153   Icon "layout Standard"
20154 \end_layout
20155
20156 \begin_layout LyX-Code
20157   Icon "layout Section"
20158 \end_layout
20159
20160 \begin_layout LyX-Code
20161   Icon "layout LaTeX"
20162 \end_layout
20163
20164 \begin_layout LyX-Code
20165   Icon "layout LyX-Code"
20166 \end_layout
20167
20168 \begin_layout LyX-Code
20169   Icon "layout Scrap"
20170 \end_layout
20171
20172 \begin_layout LyX-Code
20173   Separator
20174 \end_layout
20175
20176 \begin_layout LyX-Code
20177   Icon "buffer-view"
20178 \end_layout
20179
20180 \begin_layout LyX-Code
20181   Icon "buffer-typeset"
20182 \end_layout
20183
20184 \begin_layout LyX-Code
20185   Icon "build-program"
20186 \end_layout
20187
20188 \begin_layout LyX-Code
20189   Separator
20190 \end_layout
20191
20192 \begin_layout LyX-Code
20193 .
20194 \end_layout
20195
20196 \begin_layout LyX-Code
20197 .
20198 \end_layout
20199
20200 \begin_layout LyX-Code
20201 .
20202 \end_layout
20203
20204 \begin_layout LyX-Code
20205 End
20206 \end_layout
20207
20208 \begin_layout Subsubsection
20209 Colors customization
20210 \end_layout
20211
20212 \begin_layout Standard
20213 There are a number of colors in LyX that can be customized in 
20214 \family sans
20215 Preferences
20216 \family default
20217 .
20218  One of the things that bothers people is the LaTeX font color.
20219  The default color is red, since the scraps uses LaTeX font, and there is
20220  a lot of scraps in literate documents, you may get tired of seeing everything
20221  in red.
20222  You can change it by going to the tabs 
20223 \family sans
20224 Look&Feel
20225 \family default
20226
20227 \family sans
20228 Colors.
20229 \end_layout
20230
20231 \begin_layout Standard
20232 The next thing is the visible presence of the newline character in the screen.
20233  You can choose the color of this particular character and make it blend
20234  in the background.
20235  I recommend you choosing a color that is close to the background but not
20236  equal, that way you still can see it is there, but it is not bothering
20237  you anymore.
20238  
20239 \end_layout
20240
20241 \begin_layout Chapter
20242 Secrets of the LaTeX Masters
20243 \begin_inset CommandInset label
20244 LatexCommand label
20245 name "cha:secrets"
20246
20247 \end_inset
20248
20249
20250 \end_layout
20251
20252 \begin_layout Standard
20253 Though LyX is a powerful tool, it cannot hope to support everything that
20254  can be done with pure TeX/LaTeX.
20255  However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
20256  as long as you are not afraid to use that 
20257 \begin_inset Quotes eld
20258 \end_inset
20259
20260 TeX
20261 \begin_inset Quotes erd
20262 \end_inset
20263
20264  button on the toolbar or add things to the LaTeX preamble.
20265  This section lists some tips, tricks, and otherwise cool ideas to give
20266  your document that extra little flair.
20267  
20268 \emph on
20269 Do try this at home
20270 \emph default
20271 , just start with something a little smaller and less important than your
20272  dissertation!
20273 \end_layout
20274
20275 \begin_layout Standard
20276 Most ideas in this section require less common files in your LaTeX installation.
20277  If you have a system like teTeX, most will already be available.
20278  A few, however, will need to be downloaded from one of the CTAN archives.
20279  Often, there are several ways to do something, or several LaTeX style files
20280  which do the same thing.
20281  We do not endorse one choice over another, we simply claim that we have
20282  done a particular task with a particular file.
20283  Put on your wizard hat, keep an eye out for dragons, and let us begin.
20284 \end_layout
20285
20286 \begin_layout Section
20287 Multiple Columns
20288 \end_layout
20289
20290 \begin_layout Standard
20291 by 
20292 \noun on
20293 Lars Gullik Bjønnes
20294 \end_layout
20295
20296 \begin_layout Subsection
20297 Purpose
20298 \end_layout
20299
20300 \begin_layout Standard
20301 The aim for this chapter
20302 \begin_inset Foot
20303 status collapsed
20304
20305 \begin_layout Plain Layout
20306 Editor's note: Lars' original chapter was a masterful description of how
20307  to use the 
20308 \family typewriter
20309 multicol
20310 \family default
20311  package.
20312  However, it was too long to flow smoothly in this document.
20313  I have therefore chosen to excerpt the most important sections here (sorry,
20314  Lars); you can read the original chapter (and more of the story!) in the
20315  example file 
20316 \family typewriter
20317 examples/multicol.lyx
20318 \family default
20319 .
20320  â€” mer
20321 \end_layout
20322
20323 \end_inset
20324
20325  is to show how the LaTeX package 
20326 \family typewriter
20327 multicol
20328 \family default
20329  can be used in a LyX document.
20330  As LyX doesn't support the 
20331 \family typewriter
20332 multicol
20333 \family default
20334  package natively yet, we have to use some small hacks.
20335  By reading this section it should be obvious how to do this.
20336 \end_layout
20337
20338 \begin_layout Subsection
20339 Limitations 
20340 \end_layout
20341
20342 \begin_layout Standard
20343 The 
20344 \family typewriter
20345 multicol
20346 \family default
20347  package allows switching between one and multicolumn format on the same
20348  page.
20349  Footnotes are handled correctly (for the most part), but will be placed
20350  at the bottom of the page and not under each column.
20351  LaTeX's float mechanism, however, is partly disabled in the current implementat
20352 ion.
20353  At the moment only page-wide floats can be used within the scope of the
20354  environment.
20355 \end_layout
20356
20357 \begin_layout Subsection
20358 Examples
20359 \end_layout
20360
20361 \begin_layout Subsubsection
20362 Two columns
20363 \end_layout
20364
20365 \begin_layout Standard
20366 If you want to have two columns in your text, you have use LaTeX mode to
20367  insert 
20368 \family typewriter
20369
20370 \backslash
20371 begin{multicols}{2}
20372 \family default
20373  at the point where you want the two column layout to start, and then 
20374 \family typewriter
20375
20376 \backslash
20377 end{multicols}
20378 \family default
20379  where you want it to end.
20380  Like this:
20381 \end_layout
20382
20383 \begin_layout Standard
20384 \begin_inset ERT
20385 status open
20386
20387 \begin_layout Plain Layout
20388
20389
20390 \backslash
20391 begin{multicols}{2}
20392 \end_layout
20393
20394 \end_inset
20395
20396
20397 \end_layout
20398
20399 \begin_layout Standard
20400 \noindent
20401
20402 \series bold
20403 \size small
20404 The Adventure of the Empty House
20405 \series default
20406
20407 \begin_inset Newline newline
20408 \end_inset
20409
20410 by 
20411 \noun on
20412 Sir Arthur Conan Doyle
20413 \end_layout
20414
20415 \begin_layout Standard
20416
20417 \size small
20418 It was in the spring of the year 1894 that all London was interested, and
20419  the fashionable world dismayed, by the murder of the Honourable Ronald
20420  Adair under most unusual and inexplicable circumstances.
20421  The public has already learned those particulars of the crime which came
20422  out in the police investigation, but a good deal was suppressed upon that
20423  occasion, since the case for the prosecution was so overwhelmingly strong
20424  that it was not necessary to bring forward all the facts.
20425  Only now, at the end of nearly ten years, am I allowed to supply those
20426  missing links which make up the whole of that remarkable chain.
20427  The crime was of interest in itself, but that interest was as nothing to
20428  me compared to the inconceivable sequel, which afforded me the greatest
20429  shock and surprise of any event in my adventurous life.
20430  Even now, after this long interval, I find myself thrilling as I think
20431  of it, and feeling once more that sudden flood of joy, amazement, and increduli
20432 ty which utterly submerged my mind.
20433  Let me say to that public, which has shown some interest in those glimpses
20434  which I have occasionally given them of the thoughts and actions of a very
20435  remarkable man, that they are not to blame me if I have not shared my knowledge
20436  with them, for I should have considered it my first duty to do so, had
20437  I not been barred by a positive prohibition from his own lips, which was
20438  only withdrawn upon the third of last month.
20439 \end_layout
20440
20441 \begin_layout Standard
20442 \begin_inset ERT
20443 status open
20444
20445 \begin_layout Plain Layout
20446
20447
20448 \backslash
20449 end{multicols}
20450 \end_layout
20451
20452 \end_inset
20453
20454
20455 \end_layout
20456
20457 \begin_layout Subsubsection
20458 Multiple columns
20459 \end_layout
20460
20461 \begin_layout Standard
20462 The same pattern is used when you want more than two columns:
20463 \end_layout
20464
20465 \begin_layout Standard
20466 \begin_inset ERT
20467 status open
20468
20469 \begin_layout Plain Layout
20470
20471
20472 \backslash
20473 begin{multicols}{3}
20474 \end_layout
20475
20476 \end_inset
20477
20478
20479 \end_layout
20480
20481 \begin_layout Standard
20482
20483 \size footnotesize
20484 It can be imagined that my close intimacy with Sherlock Holmes had interested
20485  me deeply in crime, and that after his disappearance I never failed to
20486  read with care the various problems which came before the public.
20487  And I even attempted, more than once, for my own private satisfaction,
20488  to employ his methods in their solution, though with indifferent success.
20489  There was none, however, which appealed to me like this tragedy of Ronald
20490  Adair.
20491  As I read the evidence at the inquest, which led up to a verdict of willful
20492  murder against some person or persons unknown, I realized more clearly
20493  than I had ever done the loss which the community had sustained by the
20494  death of Sherlock Holmes.
20495  There were points about this strange business which would, I was sure,
20496  have specially appealed to him, and the efforts of the police would have
20497  been supplemented, or more probably anticipated, by the trained observation
20498  and the alert mind of the first criminal agent in Europe.
20499  All day, as I drove upon my round, I turned over the case in my mind and
20500  found no explanation which appeared to me to be adequate.
20501  At the risk of telling a twice-told tale, I will recapitulate the facts
20502  as they were known to the public at the conclusion of the inquest.
20503 \end_layout
20504
20505 \begin_layout Standard
20506 \begin_inset ERT
20507 status open
20508
20509 \begin_layout Plain Layout
20510
20511
20512 \backslash
20513 end{multicols}
20514 \end_layout
20515
20516 \end_inset
20517
20518
20519 \end_layout
20520
20521 \begin_layout Standard
20522 You can have more than 3 columns if you want to, but that might not be very
20523  pleasant for the eye.
20524 \end_layout
20525
20526 \begin_layout Subsubsection
20527 Columns inside columns
20528 \end_layout
20529
20530 \begin_layout Standard
20531 You can even have columns inside columns:
20532 \end_layout
20533
20534 \begin_layout Standard
20535 \begin_inset ERT
20536 status open
20537
20538 \begin_layout Plain Layout
20539
20540
20541 \backslash
20542 begin{multicols}{2}
20543 \end_layout
20544
20545 \end_inset
20546
20547
20548 \end_layout
20549
20550 \begin_layout Standard
20551
20552 \size footnotesize
20553 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
20554  at that time governor of one of the Australian colonies.
20555  Adair's mother had returned from Australia to undergo the operation for
20556  cataract, and she, her son Ronald, and her daughter Hilda were living together
20557  at 427 Park Lane.
20558 \end_layout
20559
20560 \begin_layout Standard
20561 \begin_inset ERT
20562 status open
20563
20564 \begin_layout Plain Layout
20565
20566
20567 \backslash
20568 begin{multicols}{2}
20569 \end_layout
20570
20571 \end_inset
20572
20573
20574 \end_layout
20575
20576 \begin_layout Standard
20577
20578 \size footnotesize
20579 The youth moved in the best society–had, so far as was known, no enemies
20580  and no particular vices.
20581  He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
20582  had been broken off by mutual consent some months before, and there was
20583  no sign that it had left any very profound feeling behind it.
20584  For the rest {sic} the man's life moved in a narrow and conventional circle,
20585  for his habits were quiet and his nature unemotional.
20586  Yet it was upon this easy-going young aristocrat that death came, in most
20587  strange and unexpected form, between the hours of ten and eleven-twenty
20588  on the night of March 30, 1894.
20589 \end_layout
20590
20591 \begin_layout Standard
20592 \begin_inset ERT
20593 status open
20594
20595 \begin_layout Plain Layout
20596
20597
20598 \backslash
20599 end{multicols}
20600 \end_layout
20601
20602 \end_inset
20603
20604
20605 \end_layout
20606
20607 \begin_layout Standard
20608
20609 \size footnotesize
20610 Ronald Adair was fond of cards–playing continually, but never for such stakes
20611  as would hurt him.
20612  He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
20613  It was shown that, after dinner on the day of his death, he had played
20614  a rubber of whist at the latter club.
20615  He had also played there in the afternoon.
20616
20617 \size default
20618  
20619 \size footnotesize
20620 The evidence of those who had played with him– Mr.
20621  Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
20622  and that there was a fairly equal fall of the cards.
20623  Adair might have lost five pounds, but not more.
20624  His fortune was a considerable one, and such a loss could not in any way
20625  affect him.
20626  He had played nearly every day at one club or other, but he was a cautious
20627  player, and usually rose a winner.
20628  It came out in evidence that, in partnership with Colonel Moran, he had
20629  actually won as much as four hundred and twenty pounds in a sitting, some
20630  weeks before, from Godfrey Milner and Lord Balmoral.
20631  So much for his recent history as it came out at the inquest.
20632 \end_layout
20633
20634 \begin_layout Standard
20635 \begin_inset ERT
20636 status open
20637
20638 \begin_layout Plain Layout
20639
20640
20641 \backslash
20642 end{multicols}
20643 \end_layout
20644
20645 \end_inset
20646
20647
20648 \end_layout
20649
20650 \begin_layout Standard
20651 Please do read the file 
20652 \family typewriter
20653 examples/multicol.lyx
20654 \family default
20655  for more advanced examples including column and header spacing, vertical
20656  separator lines, and more.
20657 \end_layout
20658
20659 \begin_layout Section
20660 Numbering in the 
20661 \family sans
20662 Enumerate
20663 \family default
20664  Paragraph Environment
20665 \begin_inset OptArg
20666 status collapsed
20667
20668 \begin_layout Plain Layout
20669 Numbering in Enumerate
20670 \end_layout
20671
20672 \end_inset
20673
20674
20675 \end_layout
20676
20677 \begin_layout Standard
20678 by 
20679 \noun on
20680 John Weiss
20681 \end_layout
20682
20683 \begin_layout Standard
20684 \begin_inset VSpace bigskip
20685 \end_inset
20686
20687
20688 \end_layout
20689
20690 \begin_layout Standard
20691 \noindent
20692 The default numbering for the 
20693 \family sans
20694 Enumerate
20695 \family default
20696  paragraph environment begins with Arabic numbers and ends with uppercase
20697  letters.
20698  Suppose, however, you wanted a different type of numbering scheme.
20699  Here's a quickie example of how to change the numbering scheme:
20700 \end_layout
20701
20702 \begin_layout LyX-Code
20703
20704 \backslash
20705 renewcommand{
20706 \backslash
20707 labelenumi}{
20708 \backslash
20709 Roman{enumi}.}
20710 \end_layout
20711
20712 \begin_layout LyX-Code
20713
20714 \backslash
20715 renewcommand{
20716 \backslash
20717 labelenumii}{
20718 \backslash
20719 Alph{enumii}.}
20720 \end_layout
20721
20722 \begin_layout LyX-Code
20723
20724 \backslash
20725 renewcommand{
20726 \backslash
20727 labelenumiii}{
20728 \backslash
20729 arabic{enumiii}.}
20730 \end_layout
20731
20732 \begin_layout LyX-Code
20733
20734 \backslash
20735 renewcommand{
20736 \backslash
20737 labelenumiv}{
20738 \backslash
20739 alph{enumiv}.)}
20740 \end_layout
20741
20742 \begin_layout Standard
20743 \SpecialChar \ldots{}
20744  which changes the numbering scheme to uppercase Roman numerals, uppercase
20745  letters, Arabic numbers, and lowercase letter.
20746 \end_layout
20747
20748 \begin_layout Standard
20749 Additionally, the previous example also adds a little bit extra to the numbering
20750  scheme.
20751  For example, the first level label actually looks like: 
20752 \begin_inset Quotes eld
20753 \end_inset
20754
20755 I.
20756 \begin_inset Quotes erd
20757 \end_inset
20758
20759 .
20760  For ease of reading, we'll describe what the numbering schemes look like
20761  using a notation something like this: <
20762 \begin_inset Quotes eld
20763 \end_inset
20764
20765 I.
20766 \begin_inset Quotes erd
20767 \end_inset
20768
20769 ,
20770 \begin_inset space ~
20771 \end_inset
20772
20773
20774 \begin_inset Quotes erd
20775 \end_inset
20776
20777 A.
20778 \begin_inset Quotes erd
20779 \end_inset
20780
20781 ,
20782 \begin_inset space ~
20783 \end_inset
20784
20785
20786 \begin_inset Quotes erd
20787 \end_inset
20788
20789 1.
20790 \begin_inset Quotes erd
20791 \end_inset
20792
20793 ,
20794 \begin_inset space ~
20795 \end_inset
20796
20797
20798 \begin_inset Quotes eld
20799 \end_inset
20800
20801 a.)
20802 \begin_inset Quotes erd
20803 \end_inset
20804
20805 >.
20806  
20807 \end_layout
20808
20809 \begin_layout Standard
20810 As you can see in the example, there is a label command for each nesting
20811  level, 
20812 \family typewriter
20813
20814 \backslash
20815 labelenumi
20816 \family default
20817  \SpecialChar \ldots{}
20818  
20819 \family typewriter
20820
20821 \backslash
20822 labelenumiv
20823 \family default
20824 , as well as a counter, 
20825 \family typewriter
20826 enumi
20827 \family default
20828  \SpecialChar \ldots{}
20829  
20830 \family typewriter
20831 enumiv
20832 \family default
20833 .
20834  There are also five 
20835 \begin_inset Quotes eld
20836 \end_inset
20837
20838 number printing
20839 \begin_inset Quotes erd
20840 \end_inset
20841
20842  commands, 
20843 \family typewriter
20844
20845 \backslash
20846 arabic{}
20847 \family default
20848
20849 \family typewriter
20850
20851 \backslash
20852 roman{}
20853 \family default
20854
20855 \family typewriter
20856
20857 \backslash
20858 Roman{}
20859 \family default
20860
20861 \family typewriter
20862
20863 \backslash
20864 alph{}
20865 \family default
20866 , and 
20867 \family typewriter
20868
20869 \backslash
20870 Alph{}
20871 \family default
20872 , each of which take one counter as an argument.
20873  You can add characters before or after these, but there's no need to add
20874  spaces.
20875 \end_layout
20876
20877 \begin_layout Standard
20878 You can get really fancy with these.
20879  For example:
20880 \end_layout
20881
20882 \begin_layout LyX-Code
20883
20884 \backslash
20885 renewcommand{
20886 \backslash
20887 labelenumi}{
20888 \backslash
20889 #
20890 \backslash
20891 Alph{enumi}
20892 \backslash
20893 #}
20894 \end_layout
20895
20896 \begin_layout LyX-Code
20897
20898 \backslash
20899 renewcommand{
20900 \backslash
20901 labelenumii}{
20902 \backslash
20903 Alph{enumi}.
20904 \backslash
20905 arabic{enumii}}
20906 \end_layout
20907
20908 \begin_layout LyX-Code
20909
20910 \backslash
20911 renewcommand{
20912 \backslash
20913 labelenumiii}{
20914 \backslash
20915 alph{enumiii}+}
20916 \end_layout
20917
20918 \begin_layout LyX-Code
20919
20920 \backslash
20921 renewcommand{
20922 \backslash
20923 labelenumiv}{(
20924 \backslash
20925 roman{enumiv})}
20926 \end_layout
20927
20928 \begin_layout Standard
20929 produces the somewhat out of hand numbering scheme: <
20930 \begin_inset Quotes eld
20931 \end_inset
20932
20933 #A#
20934 \begin_inset Quotes erd
20935 \end_inset
20936
20937 ,
20938 \begin_inset space ~
20939 \end_inset
20940
20941
20942 \begin_inset Quotes erd
20943 \end_inset
20944
20945 A.1
20946 \begin_inset Quotes erd
20947 \end_inset
20948
20949 ,
20950 \begin_inset space ~
20951 \end_inset
20952
20953
20954 \begin_inset Quotes erd
20955 \end_inset
20956
20957 a+
20958 \begin_inset Quotes erd
20959 \end_inset
20960
20961 ,
20962 \begin_inset space ~
20963 \end_inset
20964
20965
20966 \begin_inset Quotes eld
20967 \end_inset
20968
20969 (i)
20970 \begin_inset Quotes erd
20971 \end_inset
20972
20973 >.
20974  
20975 \end_layout
20976
20977 \begin_layout Standard
20978
20979 \end_layout
20980
20981 \begin_layout Section
20982 Dropped Capitals
20983 \end_layout
20984
20985 \begin_layout Standard
20986 by 
20987 \noun on
20988 Mike Ressler
20989 \end_layout
20990
20991 \begin_layout Standard
20992 \begin_inset VSpace bigskip
20993 \end_inset
20994
20995
20996 \end_layout
20997
20998 \begin_layout Standard
20999 \noindent
21000 \begin_inset ERT
21001 status collapsed
21002
21003 \begin_layout Plain Layout
21004
21005
21006 \backslash
21007 newfont{
21008 \backslash
21009 tmpfont}{cmr17 scaled 2500}{
21010 \backslash
21011 tmpfont T}
21012 \backslash
21013 vspace*{-8.4ex}
21014 \end_layout
21015
21016 \end_inset
21017
21018
21019 \end_layout
21020
21021 \begin_layout Standard
21022 \noindent
21023 \begin_inset ERT
21024 status open
21025
21026 \begin_layout Plain Layout
21027
21028
21029 \backslash
21030 hangindent=3.3em 
21031 \backslash
21032 hangafter=-3
21033 \end_layout
21034
21035 \end_inset
21036
21037  hose of you who like the style of old books probably also like 
21038 \begin_inset Quotes eld
21039 \end_inset
21040
21041 dropped capitals
21042 \begin_inset Quotes erd
21043 \end_inset
21044
21045 —those large capital letters which begin each new chapter or section.
21046  Implementing them with plain LyX/LaTeX is straightforward (assuming you
21047  know some plain TeX!) but does require a lot of work and many iterations,
21048  as you can see by all the ugly TeX-mode stuff at the beginning of this
21049  paragraph.
21050 \end_layout
21051
21052 \begin_layout Standard
21053 \begin_inset ERT
21054 status open
21055
21056 \begin_layout Plain Layout
21057
21058
21059 \backslash
21060 verb+
21061 \backslash
21062 bigdrop{-1em}{3}{ptmri}{T}+
21063 \end_layout
21064
21065 \end_inset
21066
21067 here is a much easier way of doing this, of course.
21068  The 
21069 \family typewriter
21070 dropcaps
21071 \family default
21072  (or the newer 
21073 \family typewriter
21074 dropping
21075 \family default
21076 ) package from CTAN allows a simple way to add such letters to your documents.
21077  Since this package is not a standard part of teTeX, I can't demonstrate
21078  it within this document, but if you copy this paragraph to a new document,
21079  delete the 
21080 \begin_inset Quotes eld
21081 \end_inset
21082
21083
21084 \family typewriter
21085
21086 \backslash
21087 verb
21088 \family default
21089
21090 \begin_inset Quotes erd
21091 \end_inset
21092
21093  and the pluses from the TeX code at the beginning of the paragraph, and
21094  add 
21095 \family typewriter
21096
21097 \backslash
21098 usepackage{dropcaps}
21099 \family default
21100  to your LaTeX preamble, you will get a nice Times Roman Italic 
21101 \begin_inset Quotes eld
21102 \end_inset
21103
21104 T
21105 \begin_inset Quotes erd
21106 \end_inset
21107
21108 , whose height is three lines of text and which protrudes 1 em into the
21109  margin.
21110  (Make certain you have copied 
21111 \begin_inset Quotes eld
21112 \end_inset
21113
21114
21115 \family typewriter
21116 dropcaps.sty
21117 \family default
21118
21119 \begin_inset Quotes erd
21120 \end_inset
21121
21122  into a directory where TeX can see it.) The first argument is the amount
21123  of indentation; in this case the negative sign moves it into the margin.
21124  The second argument is the height of the letter in number of lines of text.
21125  The third argument is the font name: virtually anything which has a tfm
21126  file should work (wade through the 
21127 \family typewriter
21128 .../texmf/fonts/tfm
21129 \family default
21130  directory for possibilities).
21131  My personal favorite is 
21132 \begin_inset Quotes eld
21133 \end_inset
21134
21135
21136 \family typewriter
21137 yinit
21138 \family default
21139
21140 \begin_inset Quotes erd
21141 \end_inset
21142
21143 , a fancy German font specifically designed for dropped capitals.
21144  The fourth argument is the letter (or letters) to be dropped.
21145  The 
21146 \family typewriter
21147 dropping
21148 \family default
21149  package also offers the 
21150 \family typewriter
21151
21152 \backslash
21153 bigdrop
21154 \family default
21155  command, as well as a slightly simplified 
21156 \family typewriter
21157
21158 \backslash
21159 dropping
21160 \family default
21161  command.
21162 \end_layout
21163
21164 \begin_layout Section
21165 Non-standard Paragraph Shapes
21166 \end_layout
21167
21168 \begin_layout Standard
21169 by 
21170 \noun on
21171 Mike Ressler
21172 \end_layout
21173
21174 \begin_layout Standard
21175 \begin_inset VSpace bigskip
21176 \end_inset
21177
21178
21179 \end_layout
21180
21181 \begin_layout Standard
21182 \begin_inset ERT
21183 status collapsed
21184
21185 \begin_layout Plain Layout
21186
21187
21188 \backslash
21189 begin{sloppypar}
21190 \end_layout
21191
21192 \end_inset
21193
21194
21195 \end_layout
21196
21197 \begin_layout Standard
21198 \begin_inset ERT
21199 status collapsed
21200
21201 \begin_layout Plain Layout
21202
21203
21204 \backslash
21205 newdimen
21206 \backslash
21207 varunit 
21208 \end_layout
21209
21210 \begin_layout Plain Layout
21211
21212
21213 \backslash
21214 setlength{
21215 \backslash
21216 varunit}{4.5in}
21217 \end_layout
21218
21219 \end_inset
21220
21221
21222 \end_layout
21223
21224 \begin_layout Standard
21225 \noindent
21226 \begin_inset ERT
21227 status collapsed
21228
21229 \begin_layout Plain Layout
21230
21231
21232 \backslash
21233 parshape 19 0.45
21234 \backslash
21235 varunit 0.332
21236 \backslash
21237 varunit
21238 \end_layout
21239
21240 \begin_layout Plain Layout
21241
21242 0.40
21243 \backslash
21244 varunit 0.300
21245 \backslash
21246 varunit
21247 \end_layout
21248
21249 \begin_layout Plain Layout
21250
21251 0.35
21252 \backslash
21253 varunit 0.293
21254 \backslash
21255 varunit
21256 \end_layout
21257
21258 \begin_layout Plain Layout
21259
21260 0.30
21261 \backslash
21262 varunit 0.300
21263 \backslash
21264 varunit
21265 \end_layout
21266
21267 \begin_layout Plain Layout
21268
21269 0.25
21270 \backslash
21271 varunit 0.317
21272 \backslash
21273 varunit
21274 \end_layout
21275
21276 \begin_layout Plain Layout
21277
21278 0.20
21279 \backslash
21280 varunit 0.342
21281 \backslash
21282 varunit
21283 \end_layout
21284
21285 \begin_layout Plain Layout
21286
21287 0.15
21288 \backslash
21289 varunit 0.373
21290 \backslash
21291 varunit
21292 \end_layout
21293
21294 \begin_layout Plain Layout
21295
21296 0.10
21297 \backslash
21298 varunit 0.410
21299 \backslash
21300 varunit
21301 \end_layout
21302
21303 \begin_layout Plain Layout
21304
21305 0.05
21306 \backslash
21307 varunit 0.453
21308 \backslash
21309 varunit
21310 \end_layout
21311
21312 \begin_layout Plain Layout
21313
21314 0.00
21315 \backslash
21316 varunit 0.500
21317 \backslash
21318 varunit
21319 \end_layout
21320
21321 \begin_layout Plain Layout
21322
21323 0.05
21324 \backslash
21325 varunit 0.453
21326 \backslash
21327 varunit
21328 \end_layout
21329
21330 \begin_layout Plain Layout
21331
21332 0.10
21333 \backslash
21334 varunit 0.410
21335 \backslash
21336 varunit
21337 \end_layout
21338
21339 \begin_layout Plain Layout
21340
21341 0.15
21342 \backslash
21343 varunit 0.373
21344 \backslash
21345 varunit
21346 \end_layout
21347
21348 \begin_layout Plain Layout
21349
21350 0.20
21351 \backslash
21352 varunit 0.342
21353 \backslash
21354 varunit
21355 \end_layout
21356
21357 \begin_layout Plain Layout
21358
21359 0.25
21360 \backslash
21361 varunit 0.317
21362 \backslash
21363 varunit
21364 \end_layout
21365
21366 \begin_layout Plain Layout
21367
21368 0.30
21369 \backslash
21370 varunit 0.300
21371 \backslash
21372 varunit
21373 \end_layout
21374
21375 \begin_layout Plain Layout
21376
21377 0.35
21378 \backslash
21379 varunit 0.293
21380 \backslash
21381 varunit
21382 \end_layout
21383
21384 \begin_layout Plain Layout
21385
21386 0.40
21387 \backslash
21388 varunit 0.300
21389 \backslash
21390 varunit
21391 \end_layout
21392
21393 \begin_layout Plain Layout
21394
21395 0.45
21396 \backslash
21397 varunit 0.332
21398 \backslash
21399 varunit
21400 \end_layout
21401
21402 \begin_layout Plain Layout
21403
21404 \end_layout
21405
21406 \end_inset
21407
21408 There are times when the tyranny of rectangular paragraphs must be overthrown.
21409  In such situations, a call to the delightful plain TeX command 
21410 \family typewriter
21411
21412 \backslash
21413 parshape
21414 \family default
21415  is called for.
21416  As you can see, completely arbitrary shapes can be laid out with a suitable
21417  set of linelength definitions.
21418  While this parshape may look a bit silly and useless, one could conceive
21419  of situations such as finely tuned dropped capitals, word wrapping around
21420  non-rectangular graphics, etc.
21421  which will benefit from such handcrafting.
21422 \end_layout
21423
21424 \begin_layout Standard
21425 \begin_inset VSpace bigskip
21426 \end_inset
21427
21428
21429 \end_layout
21430
21431 \begin_layout Standard
21432 The syntax is 
21433 \family typewriter
21434
21435 \backslash
21436 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
21437  #nindent #nlength
21438 \family default
21439 , where 
21440 \family typewriter
21441 numlines
21442 \family default
21443  is the number of lines of text which define the paragraph.
21444  If there turn out to be fewer lines, the shape is truncated; if there are
21445  more, the excess lines have the same dimensions as the last line of the
21446  definition.
21447  The 
21448 \family typewriter
21449 #nindent
21450 \family default
21451  and 
21452 \family typewriter
21453 #nlength
21454 \family default
21455  entries specify the indentation of the line from the left margin, and the
21456  length of the line as measured from that point.
21457  The shape applies only to the current paragraph; everything is reset to
21458  normal for the next paragraph.
21459 \end_layout
21460
21461 \begin_layout Standard
21462 \begin_inset ERT
21463 status collapsed
21464
21465 \begin_layout Plain Layout
21466
21467
21468 \backslash
21469 end{sloppypar}
21470 \end_layout
21471
21472 \end_inset
21473
21474
21475 \end_layout
21476
21477 \begin_layout Section
21478 Summary
21479 \end_layout
21480
21481 \begin_layout Standard
21482 As you can see, the examples in this section range from the useful to the
21483  whimsical.
21484  While I don't expect that anyone will ever need the paragraph shape demonstrate
21485 d in the last section, the important point is that you can do almost anything
21486  you want in LyX if you are willing to figure out how to do it in TeX and
21487  LaTeX.
21488  TeX is a fantastically powerful typesetting system and all that power is
21489  available to you since LyX uses it as its backend.
21490  Happy LyXing!
21491 \end_layout
21492
21493 \end_body
21494 \end_document