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