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