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