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