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